
Wed, 10/05/2005 - 16:08
Hi,
I've written some code to import stl-geometries and to visualize them with OCC.
Now i can (interactively) select parts of my "shape" with the mouse, i.E. faces:
//some code-fragments here:
.... //import STL
TopoDS_Shape aShape = ResultShape;
Handle(TopTools_HSequenceOfShape) shapes = new TopTools_HSequenceOfShape();
shapes->Append( aShape );
...
for ( int i = 1; i Length(); i++ )
myInteractiveContext->Display( new AIS_Shape( shapes->Value( i ) ), false );
myInteractiveContext->UpdateCurrentViewer();
...
//face selection
myInteractiveContext->CloseAllContexts();
myInteractiveContext->OpenLocalContext();
myInteractiveContext->ActivateStandardMode(TopAbs_FACE);
Now I want to add some Attributes to the selected Faces, like material-informations, elasticity-factors,... . This could be done with edit-masks or sliders (I use qt) connected to the current selection.
I also want to add my selection to different, pre-defined groups.
Is there any guide/example how to do this?
Or has anybody done sth like this before or knows how to start?
Niko
Mon, 10/10/2005 - 14:35
Hi Niko,
what you want to do calls for OCAF. I started by merging the Qt Import/Export Sample with the Windows OCAF Sample.
Torsten
Thu, 10/13/2005 - 20:29
This can be a good advise.
Using OCAF you can make sure your mapping between faces and attributes will be restored from a persistent file. Another advantage is that if you use XML flavor of OCAF persistence - you can view/edit your data in an external application.
Roman
Mon, 10/17/2005 - 03:44
Hello Niko,
i try to select interactively select parts of my shape too, i want to change the position by moving the actual point/vertices , can you sentd me your complete example how you use it,
i would appreciate it,
Taxi