Interactive model building.

Hi All,

I am beginning to develop a geometric modeller with OpenCascade, OCAF and FLTK. My question regards topological gluing and the use of TopoDS_Builder class.

Lets set the scenario. The user creates some construction points (these are not part of the model they are used just for construction aid). They then create a curve through these points using approximation. At this stage I create a TopoDS_Edge using the BRepBuilder_MakeEdge(...)This process continues...

Now if one edge ends at the same construction point as the start of anouther edge, these edges should be glued, i.e. reference the same TopoDS_Vertex. How is this achieved ??

I was thinking that maybe the TopoDS_Builder class has this functionality built in. And when you add an edge for example the existing vertices are checked for geometric coherance and the edge is updated accordingly. Is this correct ?

If not how do people approach the problem of geometric gluing ? Obviously this problem extends to faces that share the same edges etc.

Thank you for any help.

Regards Simon

Jean-Claude Demosthenidy's picture

Simon,

I am sorry I do not have the answer to your question about TopoDS_Builder. I am interested however, in what you are doing to catch mouse events. I am trying to do something similar, create a line with mouse input rubberbanding between the 2 vertices. Could you please share the part of your code that deals with the mouse capture? I have tried to find samples that do this with no success - I have looked at AIS examples where selection is used for model editing, is this the way to do rubberbanding also?

Thanks for any help!

Jean-Claude Demosthenidy - Interactive Design Systems