Hey everybody...
could someone help me? i have selected a face on a shape,now i would like to compute and display a normal vector to the selected face.Pliz Help...
Hey Pawel.
what i would like to achieve it in an opened LocalContext...
i have a AIS_Context,than i open a LocalContext(myContext.OpenLocalContext) with Vertex Selection orientation (myContext->ActivateStandardMode(TopAbs_VERTEX)..after opening a Local context,i can select a Vertex...everything works..but further when i try to get or used the selected Face or Vertex nothing works..I don't know what i'm doing wrong.i have readed the Visualization guide,searched the Forum and try all possibilities..may b i'm missing some basics backgrounds?
Here is my code.
myContext->OpenLocalContext();//open a local context
myContext->ActivateStandardMode(TopAbs_VERTEX);
myContext->Select();
myContext->InitSelected();
while(myContext->MoreSelected())
{
if(myContext->HasSelectedShape())
{
TopoDS_Shape myVertex = myContext->SelectedShape();
//here i added a code to use the face i selected but
//nothing worked.
}
else
{
TopoDS_Shape vertex = Handle(AIS_Shape)::DownCast( myContext->SelectedInteractive() )->Shape();
//here i did the same..nothing worked
}
myContext->NextSelected();
}
it seems every codes coming after i have open a local context ist just ignored.
Any help will b welcome.
Thanks.
Fri, 05/12/2006 - 02:59
I haven't tested it but maybe you could use:
BRepLProp_SLProps
Good luck
PK
Fri, 05/12/2006 - 08:40
Hey Pawel.
what i would like to achieve it in an opened LocalContext...
i have a AIS_Context,than i open a LocalContext(myContext.OpenLocalContext) with Vertex Selection orientation (myContext->ActivateStandardMode(TopAbs_VERTEX)..after opening a Local context,i can select a Vertex...everything works..but further when i try to get or used the selected Face or Vertex nothing works..I don't know what i'm doing wrong.i have readed the Visualization guide,searched the Forum and try all possibilities..may b i'm missing some basics backgrounds?
Here is my code.
myContext->OpenLocalContext();//open a local context
myContext->ActivateStandardMode(TopAbs_VERTEX);
myContext->Select();
myContext->InitSelected();
while(myContext->MoreSelected())
{
if(myContext->HasSelectedShape())
{
TopoDS_Shape myVertex = myContext->SelectedShape();
//here i added a code to use the face i selected but
//nothing worked.
}
else
{
TopoDS_Shape vertex = Handle(AIS_Shape)::DownCast( myContext->SelectedInteractive() )->Shape();
//here i did the same..nothing worked
}
myContext->NextSelected();
}
it seems every codes coming after i have open a local context ist just ignored.
Any help will b welcome.
Thanks.