
Thu, 04/22/2010 - 01:42
Forums:
hello ,i have to construct 3 surface planes ,and i need to construct thier normals....i need to know how to get the normale vector of more surface(plane ,or not) (automatically )?and how to calculate the angle between these 2 normals vectors of each surface.
i need your helppp!!!
Wed, 05/05/2010 - 17:23
if any one can get me some suggestion to this problem
sama
Wed, 05/05/2010 - 17:36
check the post of Chris Oke here
http://www.opencascade.org/org/forum/thread_11591/
Regards,
Mon, 05/24/2010 - 17:55
thanks for help.
also ,i need to make the normal of more faces adjacent succesively:
//code (taked from marco code)
TColgp_Array2OfPnt array1(1,2,1,2);
array2.SetValue(1,1,gp_Pnt P1);
array2.SetValue(1,2,gp_Pnt P2);
array2.SetValue(1,3,gp_Pnt P3);
array2.SetValue(1,4,gp_Pnt P4);
TColgp_Array2OfPnt array2(1,2,1,2);
array2.SetValue(1,1,gp_Pnt P5);
array2.SetValue(1,2,gp_Pnt P6);
array2.SetValue(1,3,gp_Pnt P7);
array2.SetValue(1,4,gp_Pnt P8);
Handle (Geom_BezierSurface) BezierSurf1 = new Geom_BezierSurface(array1);
TopoDS_Face F1 = BRepBuilderAPI_MakeFace(BezierSurf1);
Handle(AIS_Shape) anAISShape1=new AIS_Shape(F1);
myAISContext->Display(anAISShape1, Standard_False);
Handle (Geom_BezierSurface) BezierSurf2 = new Geom_BezierSurface(array2);
TopoDS_Face F2 = BRepBuilderAPI_MakeFace(BezierSurf2);
Handle(AIS_Shape) anAISShape2=new AIS_Shape(F2);
myAISContext->Display(anAISShape2, Standard_False);
// the question is how to make automaticaly the normal of face (F1,F2...)//it's possible to put the Faces in tab[j]; and to get the normal without repeating the code.
//
GProp_GProps system;
BRepGProp::SurfaceProperties(F1, system);// ?? how to get the something for the face F2 without repeating these lines.//
gp_Pnt centro = system.CentreOfMass();
BRepAdaptor_Surface adaptorSurface(F1);
Standard_Real u, v;
//
gp_Dir normale;
BRepLProp_SLProps props(adaptorSurface, u, v, 2, Precision::Confusion());
normale = props.Normal();
myAISContext->Display( new AIS_Point( new Geom_CartesianPoint( centro) ) );
myAISContext->Display( new AIS_Line( new Geom_Line( centro, normale )) );
if you can explain me by code.
best regards
Tue, 05/25/2010 - 13:51
i am waiting for your suggestion!!! ,; maybe i have to use .add Methodes???
regards
Thu, 05/27/2010 - 14:42
if any ideas???
regards