Correct, the BrepTools_ReShape class is what you're looking for. I agree that an example of how to use this would be a welcome addition.
-jelle On Feb 25, 2010, at 4:38 PM, Thomas Paviot wrote: > I think OCC can do the job, but it's not obvious. The following discussion > might help you: > http://www.opencascade.org/org/forum/thread_15411/ > > Please let us know if you get something working. > > Thomas > > 2010/2/25 Willy Hertz <willy.he...@yahoo.com> > Hi Thomas, > I understand the problems with changing topology by moving vertices. > > But there are situations where no such topology changes can happen (wireframe > of edges, triangular faces), and in other situation I would take care of > updating the topology. > > All this depends on the simple question: how can I modify the coordinates of > the vertices of a shape? > > I am discussing with these diagrams in mind : > http://1.bp.blogspot.com/_ZnQO9nI8DrY/SYn-gThQeZI/AAAAAAAAAGs/C9FUDoDKdkY/s1600-h/abstract-1.png > http://2.bp.blogspot.com/_ZnQO9nI8DrY/SYn-gi04zCI/AAAAAAAAAG0/ed5c_GHlW5g/s1600-h/abstract-2.png > (It is the last two diagrams on > http://opencascade.blogspot.com/2009/02/topology-and-geometry-in-open-cascade.html > in case the picture links are broken) > > Each Compound, Face, Edge has a TopoDS_TShape list of subshapes. Iterating > through them should lead me to the Vertex subshapes. > Modifying their 3D_point should be reflected in the geometry of each element > which is higher in the hierarchy of subshapes. > Is it possible to iterate like this in pythonOCC? In OpenCascade? Is it the > wrong track? > > Thank you > Willy > > > ________________________________ > From: Thomas Paviot <tpav...@gmail.com> > To: pythonOCC users mailing list. <pythonocc-users@gna.org> > Sent: Thu, February 25, 2010 2:37:25 PM > Subject: Re: [Pythonocc-users] retrieve vertices of an edge > > Willy, > > The use of hash codes in the Topology module *is* the essential difference. > > Regarding your sample at the end of the message, the result is not a > surprise: the t.vertices() returns an iterator over the shape topology. When > moving the vertex, you just move a copy of this vertex. But you also have to > tell the TopoDS_Shape that it has to take the new coords into account. In > your sample, when moving the vertex, you actually don't modify the shape, so > the second time you iterate the vertices, you get the same results. > > I remember we already discussed that topic with Jelle: if one move a vertex, > how could we update the underlying topology? This question is not simple, > since when moving one vertex, you may modify the topology: for instance, if > you move one vertex from a cylinder shape, the resulting shape is not a > cylinder anymore. I know it is doable in the SpaceClaim CAD software: you > load any topology (from a STEP file for instance), and then you just drag > edges/vertices while the kernel ensures the shape consistency. > > Jelle started to implement something in this way: the Topology module > provides a edges_from_vertex(self, vertex) method that returns edges > connected to a vertex. But I don't know which algorithm should be performed > over resulting edges. > > Best Regards, > > Thomas > > > > > > > _______________________________________________ > 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
_______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users