Module curves

Source
Expand description

Polylines from usd::usdgeom::basiscurves.

In ifcx_alpha files the attribute is an object with points and, optionally, curveVertexCounts, which splits the points into several curves:

"usd::usdgeom::basiscurves": {
    "points": [[0, 0, 0], [10, 0, 0], [0, 5, 0], [0, 5, 3]],
    "curveVertexCounts": [2, 2]
}

None of the 85 curves in the upstream examples (1a63082) has a type, basis, or wrap field, and upstream’s viewer draws every one as a straight polyline. This crate does the same: a missing type means linear. That differs from USD, whose schema default is cubic. A type other than "linear" yields CurveGeometry::Unsupported instead of a polyline that would misrepresent the curve. For linear curves basis is irrelevant and ignored; wrap: "periodic" closes each polyline, and "nonperiodic" or "pinned" leave it open.

Structs§

Polyline
One connected line strip in the node’s local coordinates.
UnsupportedCurve
A curve type this crate does not turn into polylines.

Enums§

CurveGeometry
The result of decoding a curves attribute that is well formed.

Constants§

ATTRIBUTE
Attribute id that carries curves.