display shape outline

How to display shape outline?
thnank you

Dennis G.'s picture

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

Sharjith Naramparambath's picture

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.