#[non_exhaustive]pub struct GeometryPatch {
pub mesh: TriangleMesh,
pub colour: Option<SurfaceColour>,
}Expand description
Replace a product’s body geometry with mesh.
mesh is in the product’s own local placement frame (the frame its
ObjectPlacement defines), in the file’s length units. Nothing is
transformed or scaled on the way in.
The product gets a new IfcProductDefinitionShape holding one Body
IfcShapeRepresentation in the file’s existing Body context (or its
Model context; one is created when the file has none). The mesh is
written in what the source schema can express, never converted: an
IfcTriangulatedFaceSet in IFC4 and IFC4X3, an IfcFacetedBrep in
IFC2X3 (an IfcShellBasedSurfaceModel when the mesh is not closed, since
a brep asserts a solid). colour, when given, is attached through an
IfcStyledItem.
Every representation the old shape carried is gone from the product,
not just its body: an Axis, Box or FootPrint representation
described the old geometry. Each non-Body one is listed in
WriteReport::dropped_representations. Old records nothing else uses
are pruned from the output; a record another product still uses (a shared
item, a type’s IfcRepresentationMap, a profile) is kept.
A product whose geometry comes from its type through an IfcMappedItem
gets geometry of its own; the type and its other occurrences keep the
map. An opening voiding the product (IfcRelVoidsElement) is left as it
is: the caller’s mesh is taken as the body before voids, like any other
body representation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mesh: TriangleMesh§colour: Option<SurfaceColour>Implementations§
Source§impl GeometryPatch
impl GeometryPatch
pub fn new(mesh: TriangleMesh) -> Self
pub fn with_colour(self, colour: SurfaceColour) -> Self
Trait Implementations§
Source§impl Clone for GeometryPatch
impl Clone for GeometryPatch
Source§fn clone(&self) -> GeometryPatch
fn clone(&self) -> GeometryPatch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for GeometryPatch
impl RefUnwindSafe for GeometryPatch
impl Send for GeometryPatch
impl Sync for GeometryPatch
impl Unpin for GeometryPatch
impl UnwindSafe for GeometryPatch
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.