Model
Kind: Class
Domain: Core runtime
Canonical import: from cadflow import Model
Signature
class Model(session: 'NativeSession | None' = None) -> 'None'
Description
Explicit-session frontend analogous to a small CAD model context.
Parameters
| Name | Type | Required | Default | Source description |
|---|---|---|---|---|
session | 'NativeSession | None' | no | None | 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.
Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
apply | method | (self, operation: 'str', *args: 'object', **kwargs: 'object') -> 'OperationResult' | Invoke a named Model operation and return its result with a report. |
arc | method | (self, start: 'Sequence[float]', middle: 'Sequence[float]', end: 'Sequence[float]') -> 'Shape' | See the member signature. |
bezier_surface | method | (self, points: 'Sequence[Sequence[Sequence[float]]]', *, weights: 'Sequence[Sequence[float]] | None' = None) -> 'Shape' | See the member signature. |
box | method | (self, width: 'float', depth: 'float', height: 'float') -> 'Shape' | See the member signature. |
bspline | method | (self, control_points, *, degree, knots, multiplicities, weights=None, periodic=False) -> 'Shape' | See the member signature. |
capabilities | method | (self) -> 'dict[str, object]' | Describe available operations without exposing private handles. |
chamfer | method | (self, shape: 'Shape', distance: 'float', edge_indices: 'Sequence[int] | None' = None, *, edges: 'Sequence[int] | None' = None) -> 'Shape' | See the member signature. |
circle_profile | method | (self, radius: 'float', center: 'tuple[float, float, float]' = (0, 0, 0), normal: 'tuple[float, float, float]' = (0, 0, 1)) -> 'Shape' | See the member signature. |
close | method | (self) -> 'None' | See the member signature. |
cone | method | (self, radius1: 'float', radius2: 'float', height: 'float') -> 'Shape' | See the member signature. |
cut | method | (self, body: 'Shape', tool: 'Shape') -> 'Shape' | See the member signature. |
cylinder | method | (self, radius: 'float', height: 'float') -> 'Shape' | See the member signature. |
distance | method | (self, left: 'Shape', right: 'Shape') -> 'float' | See the member signature. |
extrude | method | (self, profile: 'Shape', x: 'float', y: 'float', z: 'float') -> 'Shape' | See the member signature. |
face | method | (self, wire: 'Shape') -> 'Shape' | See the member signature. |
faces | method | (self, shape: 'Shape') -> 'tuple[Shape, ...]' | Return deterministic zero-based OCCT face handles for a shape. |
fillet | method | (self, shape: 'Shape', radius: 'float', edge_indices: 'Sequence[int] | None' = None, *, edges: 'Sequence[int] | None' = None) -> 'Shape' | See the member signature. |
filling_surface | method | (self, edges, *, tolerance: 'float' = 1e-06) -> 'Shape' | 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) -> 'Shape' | See the member signature. |
free_boundaries | method | (self, shape: 'Shape', *, tolerance: 'float' = 1e-06) -> 'tuple[Shape, ...]' | See the member signature. |
gordon_surface | method | (self, profiles, guides, *, tolerance: 'float' = 1e-06) -> 'Shape' | See the member signature. |
helix | method | (self, pitch: 'float', height: 'float', radius: 'float', center: 'tuple[float, float, float]' = (0, 0, 0), direction: 'tuple[float, float, float]' = (0, 0, 1)) -> 'Shape' | See the member signature. |
import_brep | method | (self, path: 'str') -> 'Shape' | See the member signature. |
import_step | method | (self, path: 'str') -> 'Shape' | See the member signature. |
import_stl | method | (self, path: 'str') -> 'Shape' | See the member signature. |
interpolate | method | (self, points: 'Sequence[Sequence[float]]', *, periodic: 'bool' = False, tolerance: 'float' = 1e-06) -> 'Shape' | See the member signature. |
intersect | method | (self, left: 'Shape', right: 'Shape') -> 'Shape' | See the member signature. |
loft | method | (self, profiles: 'Sequence[Shape]', *, solid: 'bool' = True, ruled: 'bool' = False) -> 'Shape' | See the member signature. |
mirror | method | (self, shape: 'Shape', normal: 'tuple[float, float, float]', origin: 'tuple[float, float, float]' = (0, 0, 0)) -> 'Shape' | See the member signature. |
polyline | method | (self, points: 'Sequence[Sequence[float]]', *, closed: 'bool' = False) -> 'Shape' | See the member signature. |
preflight | method | (self, operation: 'str', *args: 'object', **kwargs: 'object') -> 'OperationReport' | Check common Agent mistakes before invoking a native operation. |
revolve | method | (self, profile: 'Shape', degrees: 'float' = 360.0, axis: 'tuple[float, float, float]' = (0, 0, 1), origin: 'tuple[float, float, float]' = (0, 0, 0)) -> 'Shape' | See the member signature. |
rotate | method | (self, shape: 'Shape', degrees: 'float', axis: 'tuple[float, float, float]' = (0, 0, 1), origin: 'tuple[float, float, float]' = (0, 0, 0)) -> 'Shape' | See the member signature. |
ruled_surface | method | (self, edge_a: 'Shape', edge_b: 'Shape') -> 'Shape' | See the member signature. |
scale | method | (self, shape: 'Shape', factor: 'float', center: 'tuple[float, float, float]' = (0, 0, 0)) -> 'Shape' | See the member signature. |
sew | method | (self, faces, *, tolerance: 'float' = 1e-06) -> 'Shape' | See the member signature. |
shell | method | (self, shape: 'Shape', thickness: 'float', face_indices: 'Sequence[int] | None' = None, *, tolerance: 'float' = 0.001, faces: 'Sequence[int] | None' = None) -> 'Shape' | See the member signature. |
shell_to_solid | method | (self, shell: 'Shape') -> 'Shape' | See the member signature. |
sketch | method | (self, name: 'str | None' = None, *, workplane: 'Workplane | None' = None) | See the member signature. |
sphere | method | (self, radius: 'float') -> 'Shape' | See the member signature. |
subshapes | method | (self, shape: 'Shape', shape_type: 'int') -> 'tuple[Shape, ...]' | See the member signature. |
sweep | method | (self, profile: 'Shape', path: 'Shape', *, solid: 'bool' = True, frenet: 'bool' = False) -> 'Shape' | See the member signature. |
translate | method | (self, shape: 'Shape', x: 'float', y: 'float', z: 'float') -> 'Shape' | See the member signature. |
twisted_sweep | method | (self, profile: 'Shape', distance: 'float', twist_degrees: 'float', *, origin=(0, 0, 0), axis=(0, 0, 1), guide_radius=1.0) -> 'Shape' | See the member signature. |
union | method | (self, left: 'Shape', right: 'Shape') -> 'Shape' | See the member signature. |
workplane | method | (self, origin: 'Sequence[float]' = (0, 0, 0), normal: 'Sequence[float]' = (0, 0, 1), x_dir: 'Sequence[float]' = (1, 0, 0)) -> 'Workplane' | 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 Model