Skip to main content

NativeSession

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

Signature

class NativeSession() -> 'None'

Description

Owns native shapes and exposes batched primitive operations.

Other public imports

  • from cadflow.native import NativeSession

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.

Public members

MemberKindSignatureDescription
arcmethod(self, points: 'Sequence[Sequence[float]]') -> 'ShapeHandle'See the member signature.
areamethod(self, shape: 'ShapeHandle') -> 'float'See the member signature.
bboxmethod(self, shape: 'ShapeHandle') -> 'tuple[float, float, float, float, float, float]'See the member signature.
bezier_surfacemethod(self, points: 'Sequence[Sequence[Sequence[float]]]', *, weights: 'Sequence[Sequence[float]] | None' = None) -> 'ShapeHandle'See the member signature.
boxmethod(self, width: 'float', depth: 'float', height: 'float') -> 'ShapeHandle'See the member signature.
bsplinemethod(self, control_points: 'Sequence[Sequence[float]]', *, degree: 'int', knots: 'Sequence[float]', multiplicities: 'Sequence[int]', weights: 'Sequence[float] | None' = None, periodic: 'bool' = False) -> 'ShapeHandle'See the member signature.
center_of_massmethod(self, shape: 'ShapeHandle') -> 'tuple[float, float, float]'See the member signature.
chamfermethod(self, shape: 'ShapeHandle', distance: 'float', edge_indices: 'Sequence[int] | None' = None, *, edges: 'Sequence[int] | None' = None) -> 'ShapeHandle'See the member signature.
circle_profilemethod(self, radius: 'float', center: 'Sequence[float]' = (0, 0, 0), normal: 'Sequence[float]' = (0, 0, 1)) -> 'ShapeHandle'See the member signature.
closemethod(self) -> 'None'See the member signature.
conemethod(self, radius1: 'float', radius2: 'float', height: 'float') -> 'ShapeHandle'See the member signature.
cutmethod(self, body: 'ShapeHandle', tool: 'ShapeHandle') -> 'ShapeHandle'See the member signature.
cylindermethod(self, radius: 'float', height: 'float') -> 'ShapeHandle'See the member signature.
distancemethod(self, left: 'ShapeHandle', right: 'ShapeHandle') -> 'float'See the member signature.
executemethod(self, program: 'str') -> 'list[str]'See the member signature.
export_stepmethod(self, shape: 'ShapeHandle', path: 'str | os.PathLike[str]') -> 'None'See the member signature.
export_stlmethod(self, shape: 'ShapeHandle', path: 'str | os.PathLike[str]', *, binary: 'bool' = True) -> 'None'See the member signature.
extrudemethod(self, profile: 'ShapeHandle', x: 'float', y: 'float', z: 'float') -> 'ShapeHandle'See the member signature.
facemethod(self, wire: 'ShapeHandle') -> 'ShapeHandle'See the member signature.
face_propertiesmethod(self, face: 'ShapeHandle', *, u: 'float' = 0.5, v: 'float' = 0.5) -> 'dict[str, tuple[float, ...]]'See the member signature.
filletmethod(self, shape: 'ShapeHandle', radius: 'float', edge_indices: 'Sequence[int] | None' = None, *, edges: 'Sequence[int] | None' = None) -> 'ShapeHandle'See the member signature.
filling_surfacemethod(self, edges: 'Sequence[ShapeHandle]', *, tolerance: 'float' = 1e-06) -> 'ShapeHandle'See the member signature.
fit_surfacemethod(self, points: 'Sequence[Sequence[Sequence[float]]]', *, tolerance: 'float' = 0.001, degree_min: 'int' = 3, degree_max: 'int' = 8) -> 'ShapeHandle'See the member signature.
free_boundariesmethod(self, shape: 'ShapeHandle', *, tolerance: 'float' = 1e-06) -> 'tuple[ShapeHandle, ...]'See the member signature.
gordon_surfacemethod(self, profiles: 'Sequence[ShapeHandle]', guides: 'Sequence[ShapeHandle]', *, tolerance: 'float' = 1e-06) -> 'ShapeHandle'See the member signature.
helixmethod(self, pitch: 'float', height: 'float', radius: 'float', center: 'Sequence[float]' = (0, 0, 0), direction: 'Sequence[float]' = (0, 0, 1)) -> 'ShapeHandle'See the member signature.
import_brepmethod(self, path: 'str | os.PathLike[str]') -> 'ShapeHandle'See the member signature.
import_stepmethod(self, path: 'str | os.PathLike[str]') -> 'ShapeHandle'See the member signature.
import_stlmethod(self, path: 'str | os.PathLike[str]') -> 'ShapeHandle'See the member signature.
interpolatemethod(self, points: 'Sequence[Sequence[float]]', *, periodic: 'bool' = False, tolerance: 'float' = 1e-06) -> 'ShapeHandle'See the member signature.
intersectmethod(self, left: 'ShapeHandle', right: 'ShapeHandle') -> 'ShapeHandle'See the member signature.
kindmethod(self, shape: 'ShapeHandle') -> 'str'See the member signature.
lengthmethod(self, shape: 'ShapeHandle') -> 'float'See the member signature.
loftmethod(self, profiles: 'Sequence[ShapeHandle]', *, solid: 'bool' = True, ruled: 'bool' = False) -> 'ShapeHandle'See the member signature.
meshmethod(self, shape: 'ShapeHandle', deflection: 'float' = 0.1) -> 'dict[str, list[float] | list[int]]'See the member signature.
mirrormethod(self, shape: 'ShapeHandle', origin: 'Sequence[float]', normal: 'Sequence[float]') -> 'ShapeHandle'See the member signature.
polylinemethod(self, points: 'Sequence[Sequence[float]]', *, closed: 'bool' = False) -> 'ShapeHandle'See the member signature.
preview_mesh_buffermethod(self, shape: 'ShapeHandle', deflection: 'float' = 0.35) -> 'bytes'Return the versioned native render buffer without JSON conversion.
revolvemethod(self, profile: 'ShapeHandle', origin: 'Sequence[float]', axis: 'Sequence[float]', degrees: 'float' = 360.0) -> 'ShapeHandle'See the member signature.
rotatemethod(self, shape: 'ShapeHandle', origin: 'Sequence[float]', axis: 'Sequence[float]', degrees: 'float') -> 'ShapeHandle'See the member signature.
ruled_surfacemethod(self, edge_a: 'ShapeHandle', edge_b: 'ShapeHandle') -> 'ShapeHandle'See the member signature.
scalemethod(self, shape: 'ShapeHandle', factor: 'float', center: 'Sequence[float]' = (0, 0, 0)) -> 'ShapeHandle'See the member signature.
sewmethod(self, faces: 'Sequence[ShapeHandle]', *, tolerance: 'float' = 1e-06) -> 'ShapeHandle'See the member signature.
shellmethod(self, shape: 'ShapeHandle', thickness: 'float', face_indices: 'Sequence[int] | None' = None, *, tolerance: 'float' = 0.001, faces: 'Sequence[int] | None' = None) -> 'ShapeHandle'See the member signature.
shell_to_solidmethod(self, shell: 'ShapeHandle') -> 'ShapeHandle'See the member signature.
spheremethod(self, radius: 'float') -> 'ShapeHandle'See the member signature.
subshapesmethod(self, shape: 'ShapeHandle', shape_type: 'int') -> 'tuple[ShapeHandle, ...]'See the member signature.
surface_face_metricsmethod(self, face: 'ShapeHandle') -> 'dict[str, object]'Return solver-neutral geometric evidence for one BREP face.
surface_pair_metricsmethod(self, face_a: 'ShapeHandle', face_b: 'ShapeHandle') -> 'dict[str, object]'Return exact closest-point and orientation evidence for two faces.
sweepmethod(self, profile: 'ShapeHandle', path: 'ShapeHandle', *, solid: 'bool' = True, frenet: 'bool' = False) -> 'ShapeHandle'See the member signature.
topologymethod(self, shape: 'ShapeHandle') -> 'dict[str, int]'See the member signature.
translatemethod(self, shape: 'ShapeHandle', x: 'float', y: 'float', z: 'float') -> 'ShapeHandle'See the member signature.
twisted_sweepmethod(self, profile: 'ShapeHandle', distance: 'float', twist_degrees: 'float', *, origin: 'Sequence[float]' = (0, 0, 0), axis: 'Sequence[float]' = (0, 0, 1), guide_radius: 'float' = 1.0) -> 'ShapeHandle'See the member signature.
unionmethod(self, left: 'ShapeHandle', right: 'ShapeHandle') -> 'ShapeHandle'See the member signature.
versionproperty-See the member signature.
volumemethod(self, shape: 'ShapeHandle') -> 'float'See the member signature.

Behavior and constraints

  • Shape values remain bound to their owning session; do not use them after the session closes.

Import check

from cadflow import NativeSession

See also