Struct CadAuthoredGraph
pub struct CadAuthoredGraph { /* private fields */ }Description
Common immutable owner of the admitted authored-CAD operation histories.
Persisted v1 and v2 schemas remain closed private variants. Existing v1 bytes and digests are reproduced exactly while callers use one feature- neutral Rust surface before Python and Studio projection.
Implementations§
§impl CadAuthoredGraph
impl CadAuthoredGraph
pub fn new(
sketch: ConstrainedRectangleV1,
extrusion_depth_m: f64,
requested_modeling_tolerance_m: f64,
) -> Result<CadAuthoredGraph, Diagnostic>
pub fn new( sketch: ConstrainedRectangleV1, extrusion_depth_m: f64, requested_modeling_tolerance_m: f64, ) -> Result<CadAuthoredGraph, Diagnostic>
Construct the frozen rectangle → face → positive-z extrusion history.
The requested modeling tolerance is identity-only. It is never used as a coordinate offset, classification tolerance, or repair policy.
§Errors
Returns EQ0901 for a non-positive/non-finite depth or tolerance, a
non-finite derived extent, or unexpected canonical serialization.
pub fn circular_through_cut(
&self,
center_m: [f64; 2],
radius_m: f64,
requested_boolean_tolerance_m: f64,
) -> Result<CadAuthoredGraph, Diagnostic>
pub fn circular_through_cut( &self, center_m: [f64; 2], radius_m: f64, requested_boolean_tolerance_m: f64, ) -> Result<CadAuthoredGraph, Diagnostic>
Append the one admitted circular through-all difference operation.
The cut starts on the predecessor end cap and proceeds through all in negative z. Signed inward side clearance must exceed the requested Boolean tolerance; no tolerance substitution or healing is available.
§Errors
Returns EQ0901 unless the predecessor is the closed v1 history and
the finite positive circle lies strictly inside every rectangle side by
more than the requested Boolean tolerance.
pub fn through_cut(
&self,
sketch: &CadAuthoredSketch,
requested_boolean_tolerance_m: f64,
) -> Result<CadAuthoredGraph, Diagnostic>
pub fn through_cut( &self, sketch: &CadAuthoredSketch, requested_boolean_tolerance_m: f64, ) -> Result<CadAuthoredGraph, Diagnostic>
Apply the one admitted circular through-cut to its exact predecessor.
§Errors
Returns EQ0901 unless this is a v1 rectangle-extrusion graph, the
sketch is a circle bound to this graph’s canonical end-cap, and the
existing finite positive tolerance and strict signed-clearance
predicates are satisfied.
pub fn planar_circular_section(
&self,
classification_tolerance_m: f64,
region: &str,
x_lower: &str,
x_upper: &str,
y_lower: &str,
y_upper: &str,
hole: &str,
) -> Result<CanonicalGeometryV1, Diagnostic>
pub fn planar_circular_section( &self, classification_tolerance_m: f64, region: &str, x_lower: &str, x_upper: &str, y_lower: &str, y_upper: &str, hole: &str, ) -> Result<CanonicalGeometryV1, Diagnostic>
Derive one exact planar section from the admitted through-cut history.
The section is the rectangle-minus-circle profile shared by every transverse plane of the through-cut body. Extrusion depth, sketch-plane placement, and modeling tolerance therefore do not enter its exact planar identity. Geometry classification tolerance remains a separate caller-owned value and is revalidated by the existing exact planar owner rather than copied from either authored CAD tolerance.
§Errors
Returns EQ0901 unless this graph contains the admitted circular
through-cut, or when the independently supplied planar tolerance or
semantic role names fail exact Geometry admission.
pub fn decode_canonical(bytes: &[u8]) -> Result<CadAuthoredGraph, Diagnostic>
pub fn decode_canonical(bytes: &[u8]) -> Result<CadAuthoredGraph, Diagnostic>
Decode either closed schema and reconstruct its one canonical byte form.
Object-member order and equivalent numeric spellings are nonsemantic; duplicate/unknown members and unsupported dependencies reject.
§Errors
Returns EQ0901 for excess bytes or a malformed/unsupported graph.
pub const fn sketch(&self) -> ConstrainedRectangleV1
pub const fn sketch(&self) -> ConstrainedRectangleV1
Fully constrained rectangle owned by the graph.
pub const fn extrusion_depth_m(&self) -> f64
pub const fn extrusion_depth_m(&self) -> f64
Positive-z extrusion depth in metres.
pub const fn requested_modeling_tolerance_m(&self) -> f64
pub const fn requested_modeling_tolerance_m(&self) -> f64
Identity-bearing base modeling tolerance in metres.
pub const fn requested_boolean_tolerance_m(&self) -> Option<f64>
pub const fn requested_boolean_tolerance_m(&self) -> Option<f64>
Requested Boolean tolerance, absent from the rectangle-only history.
pub const fn cut_center_m(&self) -> Option<[f64; 2]>
pub const fn cut_center_m(&self) -> Option<[f64; 2]>
Circular cut centre, absent from the rectangle-only history.
pub const fn cut_radius_m(&self) -> Option<f64>
pub const fn cut_radius_m(&self) -> Option<f64>
Circular cut radius, absent from the rectangle-only history.
pub const fn output(&self) -> AxisAlignedBox3
pub const fn output(&self) -> AxisAlignedBox3
Exact outer analytic bounds; the through-cut does not change them.
pub const fn repair_disposition(&self) -> CadRepairDispositionV1
pub const fn repair_disposition(&self) -> CadRepairDispositionV1
Neither admitted history performs healing or topology repair.
pub fn canonical_bytes(&self) -> &[u8] ⓘ
pub fn canonical_bytes(&self) -> &[u8] ⓘ
Exact compact canonical JSON bytes for the graph’s closed wire variant.
pub const fn digest_bytes(&self) -> [u8; 32]
pub const fn digest_bytes(&self) -> [u8; 32]
Complete domain-separated authored-graph identity.
pub fn vertices_m(&self) -> [[f64; 3]; 8]
pub fn vertices_m(&self) -> [[f64; 3]; 8]
Outer rectangle-extrusion corners in lower-then-upper order.
pub const fn vertex_count(&self) -> Option<usize>
pub const fn vertex_count(&self) -> Option<usize>
Exact vertex count only where the analytic representation is closed.
pub const fn edge_count(&self) -> Option<usize>
pub const fn edge_count(&self) -> Option<usize>
Exact edge count only where the analytic representation is closed.
pub const fn closed_shell_count(&self) -> usize
pub const fn closed_shell_count(&self) -> usize
Number of connected closed shells.
pub fn volume_m3(&self) -> f64
pub fn volume_m3(&self) -> f64
Exact analytic body volume in cubic metres.
pub fn surface_area_m2(&self) -> f64
pub fn surface_area_m2(&self) -> f64
Exact analytic total surface area in square metres.
pub fn face_handles(&self) -> Result<Vec<CadAuthoredFaceHandle>, Diagnostic>
pub fn face_handles(&self) -> Result<Vec<CadAuthoredFaceHandle>, Diagnostic>
Every admitted graph-bound face handle in canonical provenance order.
§Errors
Returns EQ0901 only for an unexpected canonical handle serialization
failure.
pub fn face_handle(
&self,
provenance_key: &str,
) -> Result<CadAuthoredFaceHandle, Diagnostic>
pub fn face_handle( &self, provenance_key: &str, ) -> Result<CadAuthoredFaceHandle, Diagnostic>
Bind one stable provenance key to this exact graph identity.
§Errors
Returns EQ0901 for an unknown or inadmissible provenance key or an
unexpected canonical handle serialization failure.
pub fn resolve_face(
&self,
handle: &CadAuthoredFaceHandle,
) -> Result<&'static str, Diagnostic>
pub fn resolve_face( &self, handle: &CadAuthoredFaceHandle, ) -> Result<&'static str, Diagnostic>
Validate one graph-bound handle, then reveal its stable provenance key.
§Errors
Returns EQ0901 before lookup for any foreign/stale graph digest or
handle schema, then rejects a face outside this graph inventory.
pub fn face_area_m2(
&self,
handle: &CadAuthoredFaceHandle,
) -> Result<f64, Diagnostic>
pub fn face_area_m2( &self, handle: &CadAuthoredFaceHandle, ) -> Result<f64, Diagnostic>
Exact face area after validating the graph-bound handle.
pub fn face_boundary_loop_count(
&self,
handle: &CadAuthoredFaceHandle,
) -> Result<usize, Diagnostic>
pub fn face_boundary_loop_count( &self, handle: &CadAuthoredFaceHandle, ) -> Result<usize, Diagnostic>
Exact number of analytic boundary loops on the selected face.
pub fn rectangular_face_vertices_m(
&self,
handle: &CadAuthoredFaceHandle,
) -> Result<Option<[[f64; 3]; 4]>, Diagnostic>
pub fn rectangular_face_vertices_m( &self, handle: &CadAuthoredFaceHandle, ) -> Result<Option<[[f64; 3]; 4]>, Diagnostic>
Four outward-oriented vertices for a rectangular face, when applicable.
pub fn rectangular_face_centroid_m(
&self,
handle: &CadAuthoredFaceHandle,
) -> Result<Option<[f64; 3]>, Diagnostic>
pub fn rectangular_face_centroid_m( &self, handle: &CadAuthoredFaceHandle, ) -> Result<Option<[f64; 3]>, Diagnostic>
Centroid of a rectangular selected face, when applicable.
pub fn planar_face_outward_normal(
&self,
handle: &CadAuthoredFaceHandle,
) -> Result<Option<[f64; 3]>, Diagnostic>
pub fn planar_face_outward_normal( &self, handle: &CadAuthoredFaceHandle, ) -> Result<Option<[f64; 3]>, Diagnostic>
Constant outward unit normal for a planar selected face.
pub fn build_analytic(&self) -> Result<CadAuthoredBuild, Diagnostic>
pub fn build_analytic(&self) -> Result<CadAuthoredBuild, Diagnostic>
Execute the bounded built-in analytic profile and close its receipt.
§Errors
Returns EQ0901 only if graph-bound lineage handles cannot be formed.
Trait Implementations§
§impl Clone for CadAuthoredGraph
impl Clone for CadAuthoredGraph
§impl Debug for CadAuthoredGraph
impl Debug for CadAuthoredGraph
§impl PartialEq for CadAuthoredGraph
impl PartialEq for CadAuthoredGraph
§fn eq(&self, other: &CadAuthoredGraph) -> bool
fn eq(&self, other: &CadAuthoredGraph) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CadAuthoredGraph
Auto Trait Implementations§
impl Freeze for CadAuthoredGraph
impl RefUnwindSafe for CadAuthoredGraph
impl Send for CadAuthoredGraph
impl Sync for CadAuthoredGraph
impl Unpin for CadAuthoredGraph
impl UnsafeUnpin for CadAuthoredGraph
impl UnwindSafe for CadAuthoredGraph
Blanket Implementations§
Source§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
Source§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, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
§fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
Source§impl<T> From<T> for T
impl<T> From<T> for T
Source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
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>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
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
Source§impl<T> Same for T
impl<T> Same 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.