pub struct Patch {
pub index: usize,
pub node_offset: usize,
pub points: Vec<Point>,
pub topology: Topology,
pub closed: Vec<bool>,
}Expand description
One patch: its points, and what they form.
Fields§
§index: usizeIndex of the patch inside the representation, as RESQML numbers them.
node_offset: usizeWhere this patch’s points start in the representation’s own node numbering - the running sum of the preceding patches’ point counts.
A subrepresentation, a property, or anything else that indexes nodes of
the representation counts from here; Topology indices do not, see
Patch::topology.
points: Vec<Point>The points, in the representation’s local coordinate system.
topology: TopologyHow they connect - always indexed into this patch’s own points,
whichever convention the file used.
closed: Vec<bool>Which of this patch’s polylines close back on their first node.
One entry per run of Topology::Polylines, empty when the file
says nothing - which is not the same as all open: a producer that
omits ClosedPolylines has stated nothing, and a reader that drew the
closing edge anyway would invent a ring.
It lives here and not in Topology::Polylines because RESQML states
it in a boolean array beside the counts, and the topology carries
lengths. Added after a Volve polyline the file
calls closed was drawn open: the reader took
NodeCountPerPolyline and never ClosedPolylines, so the last segment
of every ring was missing.