4)mAISMesh->SetSelectionMode(1); / context->ActivateStandartMode(TopAbs_VERTEX); //I thought maybe nodes are handled as vertices..
I tried all above to be able to select nodes(vertices) or elements(triangles) of a mesh but none succeeded. I can select hole mesh but not its elements. How can I select them? (Also is there any doc or samples codes about how to handle/visualize/select/modify meshes in occ?)
Thanks in advance
Author
Discussion
3 archived replies
Posts are displayed in their archived order.
01Commenter-1
Hello,
The following will demonstrate selection of elements in DRAW. Check the source code in XSDRAWSTLVRML.cxx
Draw> pload ALL
Draw> psphere ss 15 #create a sphere
Draw> incmesh ss 0.1 #add triangulation
Draw> writestl ss sphere.stl #dump into STL file using triangulation
Draw> vinit #create 3D view
Draw> meshfromstl ms sphere.stl #create MeshVS from STL (use any other STL if you like)
Draw> meshselmode ms 8 (0x0008 bit is used for element selection)
Draw> getsource mesh #returns source files where mesh- prefixed commands are defined
Thanks that really helped. But now I couldn't find how to modify (for ex: translate) selected node of a mesh. Is it possible without completely deleting whole mesh data and rebuild nodes and elements from stretch?
Thanks again
Author