Skip to main content

SolidOperation

Enum SolidOperation 

Source
#[non_exhaustive]
pub enum SolidOperation {
Show 13 variants Extrusion { profile: NodeId, direction: Vec3, depth: Scalar, }, TaperedExtrusion { start_profile: NodeId, end_profile: NodeId, direction: Vec3, depth: Scalar, }, Revolution { profile: NodeId, axis_origin: Point3, axis_direction: Vec3, angle: Scalar, }, TaperedRevolution { start_profile: NodeId, end_profile: NodeId, axis_origin: Point3, axis_direction: Vec3, angle: Scalar, }, SweptDisk { directrix: NodeId, radius: Scalar, inner_radius: Option<Scalar>, parameter_range: Option<(Scalar, Scalar)>, fillet_radius: Option<Scalar>, }, FixedReferenceSweep { profile: NodeId, directrix: NodeId, reference_direction: Vec3, parameter_range: Option<(Scalar, Scalar)>, }, SurfaceCurveSweep { profile: NodeId, directrix: NodeId, reference_surface: NodeId, parameter_range: Option<(Scalar, Scalar)>, }, SectionedSpine { spine: NodeId, sections: Vec<Section>, }, Boolean { left: NodeId, right: NodeId, operator: BooleanOperator, }, BoundedHalfSpace { half_space: NodeId, boundary: NodeId, placement: Transform3, }, StationedSpine { directrix: NodeId, sections: Vec<StationedSection>, frame: StationFrame, }, SectionsAtStations { directrix: NodeId, sections: Vec<SectionAtStation>, frame: StationFrame, }, BoundedHalfSpaceAlongZ { half_space: NodeId, boundary: NodeId, placement: Transform3, },
}
Expand description

Relationship that constructs a solid from lower-level geometry.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Extrusion

Linear extrusion of a profile.

Fields

§profile: NodeId
§direction: Vec3
§depth: Scalar
§

TaperedExtrusion

Tapered linear extrusion between two profiles.

Fields

§start_profile: NodeId
§end_profile: NodeId
§direction: Vec3
§depth: Scalar
§

Revolution

Revolution of a profile.

Fields

§profile: NodeId
§axis_origin: Point3
§axis_direction: Vec3
§angle: Scalar
§

TaperedRevolution

Tapered revolution between two profiles.

Fields

§start_profile: NodeId
§end_profile: NodeId
§axis_origin: Point3
§axis_direction: Vec3
§angle: Scalar
§

SweptDisk

Disk swept along a directrix curve.

fillet_radius rounds the corners where consecutive directrix segments meet, and is meaningful only on a piecewise-linear directrix: a smooth curve has no corners to round. None means sharp corners, which is also the correct reading for any directrix that is already smooth.

It is a property of the SWEEP, not of the disk: the disk stays circular and it is the swept path whose corners are filleted. A consumer that cannot round corners must refuse a Some rather than drop it, because silently sharpening a pipe run produces geometry that builds, renders, and is wrong.

Fields

§directrix: NodeId
§radius: Scalar
§inner_radius: Option<Scalar>
§parameter_range: Option<(Scalar, Scalar)>
§fillet_radius: Option<Scalar>

Corner rounding radius; None means sharp corners.

§

FixedReferenceSweep

Profile swept along a directrix using a fixed reference direction.

At each point of the directrix the profile’s x axis is the reference direction projected square to the tangent, its z axis is the tangent and its y axis is z cross x. The directrix must be tangent continuous (a corner has no tangent), and the reference must never be parallel to the tangent, or the profile has no orientation there. parameter_range selects the part of the directrix swept: a curve’s own parameter, and on a composite of curves the arc length.

The reference compiler proves its chord budget along a chain of segments and circular arcs, open or closed, when the reference is normal to the plane of every arc or lies in it, or leans off by a twist of the frame the walls’ half of the budget pays for (up to an eighth of the budget at the profile’s furthest vertex); it sweeps an arc oblique to the reference beyond that as sampled and reports it unbounded. It refuses a corner, a reference parallel to the tangent, a gap between pieces and a profile that reaches an arc’s axis by name. A closed chain it proves is swept without caps.

Fields

§profile: NodeId
§directrix: NodeId
§reference_direction: Vec3
§parameter_range: Option<(Scalar, Scalar)>
§

SurfaceCurveSweep

Profile swept along a directrix constrained by a reference surface.

Fields

§profile: NodeId
§directrix: NodeId
§reference_surface: NodeId
§parameter_range: Option<(Scalar, Scalar)>
§

SectionedSpine

Sections interpolated along a spine.

Fields

§spine: NodeId
§sections: Vec<Section>
§

Boolean

General CSG binary operation.

Fields

§left: NodeId
§right: NodeId
§

BoundedHalfSpace

Unbounded half-space clipped by a finite boundary geometry.

Fields

§half_space: NodeId
§boundary: NodeId

The boundary in placement’s XY plane: a closed 2D curve, or a Profile node whose region it is (#277). A 3D curve, or any other node, is refused when the graph is built.

A profile is how a boundary of line and circular-arc segments is stated: a Profile::Contour keeps each arc an exact Circle2 span, which a polyline cannot. The half-space is then its side of the plane within the infinite prism of that region, swept along the plane normal, so an arc segment bounds it by a right circular cylinder. Which profile families a compiler accepts is the compiler’s to say; it refuses the others by name.

§placement: Transform3

The boundary’s own frame, independent of the clip plane.

The boundary profile is authored in this frame, so its rotation orients the profile itself rather than the finished solid. A source format may place the boundary independently of the base surface. The whole frame is read (#322): its x projected into the plane fixes the boundary’s rotation about the clip normal, so a component along the normal is dropped rather than tilting the profile out of its own plane, while the frame’s own shape – the lengths of its x and y, the lean of y against x, and its handedness – is kept: y is laid to the side of normal x x, the other side for a left-handed frame. Only a degenerate frame, whose axes are parallel or zero, is refused.

§

StationedSpine

Closed profiles standing at stations along a directrix (#241).

Each profile is placed in the directrix’s frame at its station (profile x to the lateral axis, y to up, normal along the tangent; see crate::station). Between two stations the profiles are matched vertex for vertex, by ring and index, and interpolated linearly in distance, as are the offsets, so every section must flatten to the same ring structure. At least two sections, strictly increasing in distance, are required.

Fields

§directrix: NodeId
§

SectionsAtStations

Closed profiles standing at stations along a directrix, each optionally tagged and explicitly oriented (#246): the general form of SolidOperation::StationedSpine.

Each profile is placed as in a StationedSpine, its plane turned by the section’s orientation, and interpolated linearly in distance with the next. Untagged sections are matched by ring and index; tagged ones by tag, every section carrying the same tags (see crate::station). At least two sections, strictly increasing in distance, all tagged or none, are required.

Fields

§directrix: NodeId
§

BoundedHalfSpaceAlongZ

A half-space bounded by the prism of a boundary along its placement’s z (#321): the side of the plane that half_space keeps, within the lines through the boundary’s region parallel to placement’s z, infinite both ways and at any angle to the plane.

This is how IFC’s IfcPolygonalBoundedHalfSpace is bounded, by its Position: a vertical prism under a sloped roof plane, the common gable clip, which SolidOperation::BoundedHalfSpace (its prism always along the plane normal) cannot state. The boundary’s point (u, v) lies at placement * (u, v, 0), the frame read as written: its scale, shear and handedness all shape the prism. Only the direction of z counts, not its length or sign. A z within the angular tolerance of the plane never crosses it, and a placement whose axes are parallel or zero has no prism: both are refused by name when compiled.

Fields

§half_space: NodeId
§boundary: NodeId

The boundary in placement’s XY plane, as for SolidOperation::BoundedHalfSpace: a closed 2D curve, or a Profile node whose region it is. An arc segment bounds the half-space by the cylinder of lines through it along z.

§placement: Transform3

The boundary’s frame, its z the prism’s axis.

Trait Implementations§

Source§

impl BuiltInNode for SolidOperation

Source§

impl Clone for SolidOperation

Source§

fn clone(&self) -> SolidOperation

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SolidOperation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SolidOperation

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<SolidOperation> for GeometryNode

Source§

fn from(value: SolidOperation) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SolidOperation

Source§

fn eq(&self, other: &SolidOperation) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for SolidOperation

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for SolidOperation

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.