Skip to main content

Shape

Kind: Class
Domain: Core runtime
Canonical import: from cadflow import Shape

Signature

class Shape(_session: 'NativeSession', _handle: 'ShapeHandle') -> None

Description

Shape(_session: 'NativeSession', _handle: 'ShapeHandle')

Parameters

NameTypeRequiredDefaultSource description
_session'NativeSession'yes-Not explicitly described in the source docstring.
_handle'ShapeHandle'yes-Not explicitly described in the source docstring.

Returns

Type: None

The source docstring does not declare additional return semantics.

Errors

The source docstring does not declare a narrower exception contract. Invalid types, values, ownership, paths, or backend state may still raise the corresponding public error.

Data fields

NameTypeDefault
_session'NativeSession'required
_handle'ShapeHandle'required

Public members

MemberKindSignatureDescription
areaproperty-See the member signature.
bboxproperty-See the member signature.
center_of_massproperty-See the member signature.
contact_metricsmethod(self, other: "'Shape'") -> 'dict[str, object]'Measure face-to-face proximity and relative orientation in C++.
describemethod(self, *, detail: 'str' = 'summary') -> 'dict[str, object]'Return a JSON-safe shape summary for inspection and Agent feedback.
distance_tomethod(self, other: "'Shape'") -> 'float'See the member signature.
export_preview_glbmethod(self, path: 'str', deflection: 'float' = 0.35) -> 'None'See the member signature.
export_stepmethod(self, path: 'str') -> 'None'See the member signature.
export_stlmethod(self, path: 'str', *, binary: 'bool' = True) -> 'None'See the member signature.
face_propertiesmethod(self, *, u: 'float' = 0.5, v: 'float' = 0.5) -> 'dict[str, tuple[float, ...]]'See the member signature.
kindproperty-See the member signature.
lengthproperty-See the member signature.
meshmethod(self, deflection: 'float' = 0.1) -> 'dict[str, list[float] | list[int]]'See the member signature.
preview_glbmethod(self, deflection: 'float' = 0.35) -> 'bytes'Return a browser-ready GLB assembled from the native mesh buffer.
preview_mesh_buffermethod(self, deflection: 'float' = 0.35) -> 'bytes'Return a compact C++-generated mesh buffer for real-time preview.
surface_metricsmethod(self) -> 'dict[str, object]'Return C++-measured properties needed by simulation preprocessors.
topologyproperty-See the member signature.
validatemethod(self) -> 'OperationReport'Perform inexpensive, backend-neutral checks on a native shape.
volumeproperty-See the member signature.

Behavior and constraints

  • Shape values remain bound to their owning session; do not use them after the session closes.
  • Instances are immutable dataclass values; update workflows return a replacement value.

Import check

from cadflow import Shape

See also