Thanks you very much!
I am now working on gears-matching simulation.
I model the gears with SolidEdge and load the models into my application as STEP file.
Please do me a favor to clear up my wonder on OpenCasCade!
1.When the model is loaded into TopoDS_Shape,Is it parametric?
2.If the underlying TopoDS_TShape is still parametric,is it possible to get the common parts by solving the parametric equations ,not triangulating the model?
3.If the underlying TopoDS_TShape is not parametric,how does OpenCasCade work when a local context is opened and actived as face selection mode?
For example,I model a sphere in SolidEdge and load it,when a local context is opened as face selection mode,the viewer feeds two circles (exactly two polygons) representing the whole surface back to me.Obviously OpenGL only displays polygons.
I wonder that
-----------------------
the two circles are held as circle's parametric equation inner OpenCasCade and OpenCasCade hands the polygon down to OpenGL by simpling the circle.
or
they are polygons in nature.
-----------------------
If the circles are held as circle's parametric equation,the equation's parameters must come from AIS_Shape::Compute().What is the underlying workflow?
-----------------------
When the shape is displayed,the AIS_InteractiveObject::Compute() is called to triangulate the shape.Does this happen every time? I think it must be buffered. Is the buffer related to BRepTools::Clean(aShape) and BRepMesh::Mesh(aShape,aDeflection)?
Finally, there are a cube and a gear,I triangulate the two shapes using BRepMesh::Mesh() and pass the triangular planes to my collision detection tool. In order to reduce the time needed to perform collision detection, different deflection policy must be carried on based on the shape's surface characteristic,for example, a cube and a gear. But I get the shape at runtime by iterating all the displayed objects. How can I adjust the deflection parameter of BRepMesh::Mesh()?
I am not sure whether I have had you caught me!
Vicart!