fatmice Thu, 10/13/2011 - 06:32 Forums: Other usage issuesHow to display shape outline? thnank you Dennis G. Fri, 10/14/2011 - 10:43 This might not be the most elegant solution, but it could work... 1. Make a shape from the bounding box of "theShape" you want to display the outline of... Bnd_Box outlineBox; BRepBndLib boxExpander; boxExpander.Add(theShape, outlineBox); Standard_Real xMin, xMax, yMin, yMax, zMin, zMax; outlineBox.Get(xMin, xMax, yMin, yMax, zMin, zMax); gp_Pnt minPnt(xMin, yMin, zMin), maxPnt(xMax, yMax, zMax); TopoDS_Shape outlineShape = BRepPrimAPI_MakeBox(minPnt,maxPnt).Shape(); 2. display outlineShape in wireframe mode Good luck, Dennis Log in to post comments Sharjith Naramp... Fri, 10/21/2011 - 17:07 Do you mean silhouette of a shape? If thats what you mean, you need to use HLR (Hidden Line Removal) for displaying. Check out the HLR MFC Sample. Log in to post comments
Fri, 10/14/2011 - 10:43
This might not be the most elegant solution, but it could work...
1. Make a shape from the bounding box of "theShape" you want to display the outline of...
Bnd_Box outlineBox;
BRepBndLib boxExpander;
boxExpander.Add(theShape, outlineBox);
Standard_Real xMin, xMax, yMin, yMax, zMin, zMax;
outlineBox.Get(xMin, xMax, yMin, yMax, zMin, zMax);
gp_Pnt minPnt(xMin, yMin, zMin), maxPnt(xMax, yMax, zMax);
TopoDS_Shape outlineShape = BRepPrimAPI_MakeBox(minPnt,maxPnt).Shape();
2. display outlineShape in wireframe mode
Good luck,
Dennis
Fri, 10/21/2011 - 17:07
Do you mean silhouette of a shape? If thats what you mean, you need to use HLR (Hidden Line Removal) for displaying. Check out the HLR MFC Sample.