pub struct TrimSpec {
pub basis_curve: EntityId,
pub trim1: Trim,
pub trim2: Trim,
pub sense_agreement: bool,
pub master_representation: TrimmingPreference,
}Expand description
The complete, uncollapsed trim of a curve.
Every field is kept because dropping any one of them loses a distinguishable arc. See the module docs on the four-arc problem.
Fields§
§basis_curve: EntityIdThe IfcCurve being trimmed.
trim1: TrimThe trim at the start of the resulting curve.
trim2: TrimThe trim at the end of the resulting curve.
sense_agreement: boolDoes the trimmed curve run along the basis curve’s own direction?
false means traverse from trim1 to trim2 the other way round the
basis curve. On an open basis curve this only reverses the direction;
on a closed one it selects the complementary arc.
master_representation: TrimmingPreferenceWhich trim form is authoritative.
Implementations§
Source§impl TrimSpec
impl TrimSpec
Sourcepub fn endpoints(&self) -> (Trim, Trim)
pub fn endpoints(&self) -> (Trim, Trim)
The start and end trims in traversal order.
Always (trim1, trim2): SenseAgreement changes which way round the
basis curve the traversal goes, it does not swap the endpoints. Files
are frequently misread the other way, so this accessor exists to state
the rule once.
Sourcepub fn is_parametrically_complete(&self) -> bool
pub fn is_parametrically_complete(&self) -> bool
Both trims carry a parameter, so the arc is fully defined numerically.
A kernel can take the fast path only when this holds; otherwise it must project the Cartesian trim points onto the basis curve.