Edit topology


I want to modify a TopoDS Vertex within an arbitrary shape. Is this possible without reconstructing the shape?

I wish to edit a single TopoDS Vertex's x,y,z values while preserving all references to that vertex.

Stephen Leary's picture

Found the answer...

BRep.Builder builder;
builder.UpdateVertex(, , );

(instantiation syntax varies from language to language)


Stephen Leary's picture

Note that i found that after I had updated the vertices I found that the iterators didnt notice the change unless I applied an identity transform to the shape. I then ran a shapeFix operation on the object and it works just nicely.

If anyone has a more efficient way of doing a vertex update i'd be pleased to hear about it.

Cauchy Ding's picture

Hi Stephen Leary,

In my knowledge of OCC, there is no direct way to modify a Vertex which referred by Edges/Wires/Faces. If you modify a vertex, it means the referred Edge must be modified, the wire must be modified also. There is no API to modify Edge/Wire directly when you change your vertex. But if you want to modify a wire in face, a face in a shell, a shell in a solid, you can use API BRepTools_ReShape.


Stephen Leary's picture

Updating a vertex worked for me. Although i have to say i find the inabiltiy to directly edit a vertex to be a serious failing in a topology system.


zhushunlai2012's picture

hello,Cauchy Ding

i create a curve on a face;however,I found that the iterators didnt notice the curve, it is ignoring the edge.however i want to make the edge added into the topolgy of the face,how can i achieve this!
thank you!