InterOp:Graphical/Graphical Concepts Edge Data
From DocR23
3D InterOp Graphical provides its graphical data for topological edges, wires, and PMI lines as polylines. Polyline data comes in three basic primitive types: LineStrip, LineLoop, and LineLoopFilled. All polyline data is defined using an indexed point list.
Contents |
Edge Data
Each topological edge, wire, or line within a PMI has an associated CGMPartVisualizationEdge object. Edge data can be retrieved from a CGMPartVisualizationMesh, CGMPartVisualizationWire, or CGMPartVisualizationPMI object. Since any of these high-level body types can have one or more edges, the edge data is accessed through a CGMPartVisualizationEdgeIter object. Each edge describes a general polyline comprised of two or more points by indexing into a point list. Any given instance of CGMPartVisualizationEdge represents one of three types of line primitive: LineStrip, LineLoop, or LineLoopFilled. Your application should be prepared to map the given data for each of these types into your own data structures used for rendering or analyzing lines.
LineStrip Data
LineStrip data leverages the fact that two successive segments in a polyline share a point. The first segment is defined by the first two points and every subsequent segment is defined by an additional point.
LineLoop Data
LineLoop data also makes use of shared points, similar to a LineStrip, but the polyline is to be interpreted such that, when rendered, the last point should be connected to the first point, forming a loop. Note that the data does not replicate the first point at the end of the line definition, it is, instead, up to the consumer of the data to "close the loop".
LineLoopFilled Data
LineLoopFilled data is defined exactly like LineLoop data, except that, when rendered, the enclosed area for the loop should be filled with the active color.
Point/Index Data
All edge data in 3D InterOp Graphical is given as indices into a list of points. Each instance of CGMPartVisualizationEdge provides a list of points that is an array of float values that are the x, y, and z coordinates for each point. Therefore, each point is indexed at multiples of three (3). That is to say, the Nth point in the point list is the 3-tuple of x, y, z values at indices N * 3, (N * 3) + 1, and (N * 3) + 2.
So, for a given point B, if it is the second point in the point list (N = 1), then its x, y, and z coordinates has a starting index of I = 1 * 3 or I = 3.
[[Category:InterOp Docs]