DiscussionsIssue archiveOther usage issues

Archived discussion

individual Attributes

Other usage issuesWed, 10/05/2005 - 16:083 replies

Browse this forum
QuestionAuthor

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

Discussion

3 archived replies

Posts are displayed in their archived order.

01Commenter-1

Hi Niko,

what you want to do calls for OCAF. I started by merging the Qt Import/Export Sample with the Windows OCAF Sample.

Commenter-1

02Commenter-2

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.

Commenter-2

03Commenter-3

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