Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

How to get the outline of a shape

How to get the outline of a shape
George Feng 2012/07/04 13:46
When I project with hlr, the edge as shown in the attached picture marked with a green arrow is grouped into VCompound in the projection results, and does not appear in the OutLineVCompound. But I want to recognize the edge as an outline edge in the projection results. How can I distinguish the line with others. Can anyone give me some suggestions?
You have to be logged in to download the attached file
George Feng 2012/07/04 13:50
          TopoDS_Shape needRotateShape = aHLRToShape.VCompound();
     TopoDS_Shape OutLineShape = aHLRToShape.OutLineVCompound();
     TopoDS_Shape Rg1LineShape = aHLRToShape.Rg1LineVCompound();
     TopoDS_Shape RgNLineVShape = aHLRToShape.RgNLineVCompound();
     TopoDS_Shape IsoLineShape = aHLRToShape.IsoLineVCompound();
George Feng 2012/07/04 13:57
The projecting direction in this problem should be from top to bottom along Z axis.
George Feng 2012/07/04 14:00
     Codes to generate the cylindrical shape are as follows:


TopoDS_Shape aCylinderShape, aBoxShape;

// first Shape = Cylinder
gp_Pnt middlePoint = gp_Pnt(500, 0, 1000);
gp_Dir direction = gp_Dir(0, 1, 0);
gp_Ax2 Ax2 = gp_Ax2(middlePoint, direction);
aCylinderShape = BRepPrimAPI_MakeCylinder(Ax2, 500,2000);

// second Shape = Cone
middlePoint = gp_Pnt(0, 0, 0);
direction = gp_Dir(1, 0, 0);
Ax2 = gp_Ax2(middlePoint, direction);
//Shape2 = BRepPrimAPI_MakeCone(Ax2, 0.0635114, 0, 0.309304);
aBoxShape = BRepPrimAPI_MakeBox(2000,1000,2000);

//TopoDS_Shape aFuseShape = BRepAlgoAPI_Fuse(aCylinderShape, aBoxShape);
//TopoDS_Shape aFuseShape = BRepAlgoAPI_Cut(aCylinderShape, aBoxShape);
TopoDS_Shape aFuseShape = BRepAlgoAPI_Common(aCylinderShape, aBoxShape);
George Feng 2012/07/04 19:18
A similar problem is found and still not resolved, where OutlineVCompound also only contains part of the outline and part of outline is appeared in VCompound.

http://www.opencascade.org/org/forum/thread_18901/?forum=3     ;
 
 
Latest news
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map