Visiting Solid Geometry
Functions Introduced:
Superseded Functions:
In
Creo Parametric 7.0.0.0 and later, the function
ProSolidSurfaceVisit() has been deprecated. The function
ProSolidSurfaceVisit() visits the surfaces of the model only if the model has a single body else returns the error
PRO_TK_MULTIBODY_UNSUPPORTED.
The method
ProSolidBodySurfaceVisit() visits all the surfaces in the specified body.
In a Creo Parametric solid, each surface contains a list of contours, and each contour contains a list of edges. The edges in a contour form a closed loop, and are ordered such that following the edges keeps the surface on the right. External contours go clockwise, and internal contours go counterclockwise.
The functions
ProSolidBodySurfaceVisit(),
ProSurfaceContourVisit(), and
ProContourEdgeVisit() traverse all the objects in this three-level hierarchy. If you visit all the surfaces, the contours of each surface, and the edges of each contour, the resulting code visits each surface and contour one time, and each edge twice. This is true because each edge forms the intersection between two surfaces, and is therefore listed in one contour of each of the two surfaces.
The function
ProEdgeContourGet() returns a pointer to the contour, which is associated with the specified edge. The input arguments are:
• surface—Specifies the surface of the contour.
• edge—Specifies the handle of the edge.
The function
ProContourTraversalGet() tells you whether the specified contour is internal or external. The function
ProContainingContourFind() finds the innermost contour that closes the specified contour. If the specified contour is internal, the returned contour will be external, and vice versa. If the specified contour is the outermost contour for the surface,
ProContainingContourFind() outputs
NULL.
Each contour has a natural direction in terms of the order in which
ProContourEdgeVisit() visits its edges. Each edge also has its own direction, in terms of its parameterization—the parameter, t, moves from 0 to 1 along the edge. The function
ProEdgeDirGet() tells you whether an edge is parameterized along or against the direction of the specified contour. Note that each edge belongs to two contours, and will be in the same direction as one contour, and in the opposite direction of the other.
The function
ProEdgeNeighborsGet() returns the two surfaces that intersect at the specified edge, and which edges on each of those surfaces is the next one following the specified edge when traversing its contour.
The surface region is defined by the edge itself and the side of the edge. In this context, edge refers to the ID that is specified using
ProEdge within
ProModelitem. The two adjacent surfaces can be specified using
PRO_SURF_REGION_SIDE1 and
PRO_SURF_REGION_SIDE2. You can then call
ProEdgeNeighborsGet() to get these two surfaces.
The function
ProEdgeVertexdataGet() returns the list of surfaces and edges that meet at the specified vertex.
|
 The functions in this section visit active geometry items only, so you do not need to call the function ProGeomitemIsInactive().
|