Wow, that's pretty impressive indeed, jelle.
 

-----Original Message-----
From: pythonocc-users-boun...@gna.org
[mailto:pythonocc-users-boun...@gna.org] On Behalf Of Jelle Feringa
Sent: Wednesday, June 10, 2009 11:28 AM
To: pythonOCC users mailing list.
Subject: Re: [Pythonocc-users] pythonOCC has parametric &
topologicassociativity!

> Wow, this looks totally awsome! Can you explain a bit how it works?  
> I'm curious... Can any shape receive parameters? Did you add all this 
> "by hand" or did it exist somewhere hidden in OCC?

Thanks!

Its pretty basic.
I've made a class Parameters.
On instantiation you give it a Geom_Engine and a docId parameter.

Then, you add the solvers of the operations you'd like to do.
Its these operations ( prim_operations, basic_operations ) that do the hard
work, and track dependencies.

The cool thing is that when you set or add a parameter, that the whole
operations is updated.
Its pretty pythonic if I can say so ;')

Than you see that I call a bunch of operations ( MakeBox, MakeBoolean,
MakeFilletAll ) Finally, the register_presentation functions returns the
TPrsStd_AISPresentation of the resulting objects.
Now the cool thing is that you can call .Update on these objects and update
the graphic presentation as expected.

Right now I havent found yet a way that you wouldnt have to set a callback
to the Parameter object to get the TPrsStd_AISPresentation updated
automagically.
Surely that'll happen one of these days. Still being able to set a callback
is useful; right now it makes sure the objects fit in the viewer (
display.FitAll() )

Happy to hear you're excited about this!
I'm pretty content with it myself ;')

Cheers,

-jelle





_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users


_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to