Home Page > Programming Samples and Tutorials > Overview > Shape Explorer
Shape Explorer Sample Overview
Shape Explorer Sample
Shape Explorer Sample demonstrates investigation of structure of
BSpline BRep shapes
See also All samples
The application
By default the application displays two
BSpline BRep objects. The controls on the form allow browsing different
objects and the tree of subshapes inside each object
The text on the top of Shape Info group shows number of each kind of subshape in
the current object. The Current Face control allws browsing all faces in the
object. The face is highlighted with a different color in 3D view. The controls
inside the Current Face info allow browsing subshapes of the current face. The
current element is also displayed in 3D view.
The "More Properties" dialog. Shows additional properties of the current face,
like range of it su,v parameters. It also demonstrates mapping of u,v rectangle
to 3D points
The Construction menu demonstrates building a
new
BSpline BRep object
from the ground up by defining geometry of its vertices, edges and faces.
Implementation
Information about subshapes of the current object are obtained via
IKO_TopExp_Explorer
queried from ISection of the current object. The
same interface is used to obtain the m_iExplorerFace which is
another IKO_TopExp_Explorer implemented by the current face.
m_iExplorerFace is used to obtain information about sub shapes of
the current face.
ISelection_KC interface queried
from IView is used to highlight current sub shapes in
3D view.
The Face Properties dialog uses
IKO_BRepGProp_Face interface queried from the relevant
IKO_TopExp_Explorer to
access the information.
The Build New Shape item from Construction menu is inmplemented in ShapeBuilder
class, which uses
IKO_BRep_Builder interface to define geometry of the new object
|