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
| Member | Kind | Signature | Description |
|---|---|---|---|
arc | method | (self, points: 'Sequence[Sequence[float]]') -> 'ShapeHandle' | See the member signature. |
area | method | (self, shape: 'ShapeHandle') -> 'float' | See the member signature. |
bbox | method | (self, shape: 'ShapeHandle') -> 'tuple[float, float, float, float, float, float]' | See the member signature. |
bezier_surface | method | (self, points: 'Sequence[Sequence[Sequence[float]]]', *, weights: 'Sequence[Sequence[float]] | None' = None) -> 'ShapeHandle' | See the member signature. |
box | method | (self, width: 'float', depth: 'float', height: 'float') -> 'ShapeHandle' | See the member signature. |
bspline | method | (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_mass | method | (self, shape: 'ShapeHandle') -> 'tuple[float, float, float]' | See the member signature. |
chamfer | method | (self, shape: 'ShapeHandle', distance: 'float', edge_indices: 'Sequence[int] | None' = None, *, edges: 'Sequence[int] | None' = None) -> 'ShapeHandle' | See the member signature. |
circle_profile | method | (self, radius: 'float', center: 'Sequence[float]' = (0, 0, 0), normal: 'Sequence[float]' = (0, 0, 1)) -> 'ShapeHandle' | See the member signature. |
close | method | (self) -> 'None' | See the member signature. |
cone | method | (self, radius1: 'float', radius2: 'float', height: 'float') -> 'ShapeHandle' | See the member signature. |
cut | method | (self, body: 'ShapeHandle', tool: 'ShapeHandle') -> 'ShapeHandle' | See the member signature. |
cylinder | method | (self, radius: 'float', height: 'float') -> 'ShapeHandle' | See the member signature. |
distance | method | (self, left: 'ShapeHandle', right: 'ShapeHandle') -> 'float' | See the member signature. |
execute | method | (self, program: 'str') -> 'list[str]' | See the member signature. |
export_step | method | (self, shape: 'ShapeHandle', path: 'str | os.PathLike[str]') -> 'None' | See the member signature. |
export_stl | method | (self, shape: 'ShapeHandle', path: 'str | os.PathLike[str]', *, binary: 'bool' = True) -> 'None' | See the member signature. |
extrude | method | (self, profile: 'ShapeHandle', x: 'float', y: 'float', z: 'float') -> 'ShapeHandle' | See the member signature. |
face | method | (self, wire: 'ShapeHandle') -> 'ShapeHandle' | See the member signature. |
face_properties | method | (self, face: 'ShapeHandle', *, u: 'float' = 0.5, v: 'float' = 0.5) -> 'dict[str, tuple[float, ...]]' | See the member signature. |
fillet | method | (self, shape: 'ShapeHandle', radius: 'float', edge_indices: 'Sequence[int] | None' = None, *, edges: 'Sequence[int] | None' = None) -> 'ShapeHandle' | See the member signature. |
filling_surface | method | (self, edges: 'Sequence[ShapeHandle]', *, tolerance: 'float' = 1e-06) -> 'ShapeHandle' | See the member signature. |
fit_surface | method | (self, points: 'Sequence[Sequence[Sequence[float]]]', *, tolerance: 'float' = 0.001, degree_min: 'int' = 3, degree_max: 'int' = 8) -> 'ShapeHandle' | See the member signature. |
free_boundaries | method | (self, shape: 'ShapeHandle', *, tolerance: 'float' = 1e-06) -> 'tuple[ShapeHandle, ...]' | See the member signature. |
gordon_surface | method | (self, profiles: 'Sequence[ShapeHandle]', guides: 'Sequence[ShapeHandle]', *, tolerance: 'float' = 1e-06) -> 'ShapeHandle' | See the member signature. |
helix | method | (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_brep | method | (self, path: 'str | os.PathLike[str]') -> 'ShapeHandle' | See the member signature. |
import_step | method | (self, path: 'str | os.PathLike[str]') -> 'ShapeHandle' | See the member signature. |
import_stl | method | (self, path: 'str | os.PathLike[str]') -> 'ShapeHandle' | See the member signature. |
interpolate | method | (self, points: 'Sequence[Sequence[float]]', *, periodic: 'bool' = False, tolerance: 'float' = 1e-06) -> 'ShapeHandle' | See the member signature. |
intersect | method | (self, left: 'ShapeHandle', right: 'ShapeHandle') -> 'ShapeHandle' | See the member signature. |
kind | method | (self, shape: 'ShapeHandle') -> 'str' | See the member signature. |
length | method | (self, shape: 'ShapeHandle') -> 'float' | See the member signature. |
loft | method | (self, profiles: 'Sequence[ShapeHandle]', *, solid: 'bool' = True, ruled: 'bool' = False) -> 'ShapeHandle' | See the member signature. |
mesh | method | (self, shape: 'ShapeHandle', deflection: 'float' = 0.1) -> 'dict[str, list[float] | list[int]]' | See the member signature. |
mirror | method | (self, shape: 'ShapeHandle', origin: 'Sequence[float]', normal: 'Sequence[float]') -> 'ShapeHandle' | See the member signature. |
polyline | method | (self, points: 'Sequence[Sequence[float]]', *, closed: 'bool' = False) -> 'ShapeHandle' | See the member signature. |
preview_mesh_buffer | method | (self, shape: 'ShapeHandle', deflection: 'float' = 0.35) -> 'bytes' | Return the versioned native render buffer without JSON conversion. |
revolve | method | (self, profile: 'ShapeHandle', origin: 'Sequence[float]', axis: 'Sequence[float]', degrees: 'float' = 360.0) -> 'ShapeHandle' | See the member signature. |
rotate | method | (self, shape: 'ShapeHandle', origin: 'Sequence[float]', axis: 'Sequence[float]', degrees: 'float') -> 'ShapeHandle' | See the member signature. |
ruled_surface | method | (self, edge_a: 'ShapeHandle', edge_b: 'ShapeHandle') -> 'ShapeHandle' | See the member signature. |
scale | method | (self, shape: 'ShapeHandle', factor: 'float', center: 'Sequence[float]' = (0, 0, 0)) -> 'ShapeHandle' | See the member signature. |
sew | method | (self, faces: 'Sequence[ShapeHandle]', *, tolerance: 'float' = 1e-06) -> 'ShapeHandle' | See the member signature. |
shell | method | (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_solid | method | (self, shell: 'ShapeHandle') -> 'ShapeHandle' | See the member signature. |
sphere | method | (self, radius: 'float') -> 'ShapeHandle' | See the member signature. |
subshapes | method | (self, shape: 'ShapeHandle', shape_type: 'int') -> 'tuple[ShapeHandle, ...]' | See the member signature. |
surface_face_metrics | method | (self, face: 'ShapeHandle') -> 'dict[str, object]' | Return solver-neutral geometric evidence for one BREP face. |
surface_pair_metrics | method | (self, face_a: 'ShapeHandle', face_b: 'ShapeHandle') -> 'dict[str, object]' | Return exact closest-point and orientation evidence for two faces. |
sweep | method | (self, profile: 'ShapeHandle', path: 'ShapeHandle', *, solid: 'bool' = True, frenet: 'bool' = False) -> 'ShapeHandle' | See the member signature. |
topology | method | (self, shape: 'ShapeHandle') -> 'dict[str, int]' | See the member signature. |
translate | method | (self, shape: 'ShapeHandle', x: 'float', y: 'float', z: 'float') -> 'ShapeHandle' | See the member signature. |
twisted_sweep | method | (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. |
union | method | (self, left: 'ShapeHandle', right: 'ShapeHandle') -> 'ShapeHandle' | See the member signature. |
version | property | - | See the member signature. |
volume | method | (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