跳到主要内容

NativeSession

类型:
领域: 核心运行时
推荐导入: from cadflow import NativeSession

签名

class NativeSession() -> 'None'

功能说明

管理原生 C++ Session 及其 Shape Handle 生命周期。

原始 API 说明

Owns native shapes and exposes batched primitive operations.

其他公共导入路径

  • from cadflow.native import NativeSession

返回值

类型: 'None'

源码 Docstring 未声明更多返回语义。

异常

源码 Docstring 未声明更窄的异常契约。类型、数值、所有权、路径或后端状态无效时,仍可能抛出相应公共异常。

公共成员

成员类型签名说明
arcmethod(self, points: 'Sequence[Sequence[float]]') -> 'ShapeHandle'见成员签名。
areamethod(self, shape: 'ShapeHandle') -> 'float'见成员签名。
bboxmethod(self, shape: 'ShapeHandle') -> 'tuple[float, float, float, float, float, float]'见成员签名。
bezier_surfacemethod(self, points: 'Sequence[Sequence[Sequence[float]]]', *, weights: 'Sequence[Sequence[float]] | None' = None) -> 'ShapeHandle'见成员签名。
boxmethod(self, width: 'float', depth: 'float', height: 'float') -> 'ShapeHandle'见成员签名。
bsplinemethod(self, control_points: 'Sequence[Sequence[float]]', *, degree: 'int', knots: 'Sequence[float]', multiplicities: 'Sequence[int]', weights: 'Sequence[float] | None' = None, periodic: 'bool' = False) -> 'ShapeHandle'见成员签名。
center_of_massmethod(self, shape: 'ShapeHandle') -> 'tuple[float, float, float]'见成员签名。
chamfermethod(self, shape: 'ShapeHandle', distance: 'float', edge_indices: 'Sequence[int] | None' = None, *, edges: 'Sequence[int] | None' = None) -> 'ShapeHandle'见成员签名。
circle_profilemethod(self, radius: 'float', center: 'Sequence[float]' = (0, 0, 0), normal: 'Sequence[float]' = (0, 0, 1)) -> 'ShapeHandle'见成员签名。
closemethod(self) -> 'None'见成员签名。
conemethod(self, radius1: 'float', radius2: 'float', height: 'float') -> 'ShapeHandle'见成员签名。
cutmethod(self, body: 'ShapeHandle', tool: 'ShapeHandle') -> 'ShapeHandle'见成员签名。
cylindermethod(self, radius: 'float', height: 'float') -> 'ShapeHandle'见成员签名。
distancemethod(self, left: 'ShapeHandle', right: 'ShapeHandle') -> 'float'见成员签名。
executemethod(self, program: 'str') -> 'list[str]'见成员签名。
export_stepmethod(self, shape: 'ShapeHandle', path: 'str | os.PathLike[str]') -> 'None'见成员签名。
export_stlmethod(self, shape: 'ShapeHandle', path: 'str | os.PathLike[str]', *, binary: 'bool' = True) -> 'None'见成员签名。
extrudemethod(self, profile: 'ShapeHandle', x: 'float', y: 'float', z: 'float') -> 'ShapeHandle'见成员签名。
facemethod(self, wire: 'ShapeHandle') -> 'ShapeHandle'见成员签名。
face_propertiesmethod(self, face: 'ShapeHandle', *, u: 'float' = 0.5, v: 'float' = 0.5) -> 'dict[str, tuple[float, ...]]'见成员签名。
filletmethod(self, shape: 'ShapeHandle', radius: 'float', edge_indices: 'Sequence[int] | None' = None, *, edges: 'Sequence[int] | None' = None) -> 'ShapeHandle'见成员签名。
filling_surfacemethod(self, edges: 'Sequence[ShapeHandle]', *, tolerance: 'float' = 1e-06) -> 'ShapeHandle'见成员签名。
fit_surfacemethod(self, points: 'Sequence[Sequence[Sequence[float]]]', *, tolerance: 'float' = 0.001, degree_min: 'int' = 3, degree_max: 'int' = 8) -> 'ShapeHandle'见成员签名。
free_boundariesmethod(self, shape: 'ShapeHandle', *, tolerance: 'float' = 1e-06) -> 'tuple[ShapeHandle, ...]'见成员签名。
gordon_surfacemethod(self, profiles: 'Sequence[ShapeHandle]', guides: 'Sequence[ShapeHandle]', *, tolerance: 'float' = 1e-06) -> 'ShapeHandle'见成员签名。
helixmethod(self, pitch: 'float', height: 'float', radius: 'float', center: 'Sequence[float]' = (0, 0, 0), direction: 'Sequence[float]' = (0, 0, 1)) -> 'ShapeHandle'见成员签名。
import_brepmethod(self, path: 'str | os.PathLike[str]') -> 'ShapeHandle'见成员签名。
import_stepmethod(self, path: 'str | os.PathLike[str]') -> 'ShapeHandle'见成员签名。
import_stlmethod(self, path: 'str | os.PathLike[str]') -> 'ShapeHandle'见成员签名。
interpolatemethod(self, points: 'Sequence[Sequence[float]]', *, periodic: 'bool' = False, tolerance: 'float' = 1e-06) -> 'ShapeHandle'见成员签名。
intersectmethod(self, left: 'ShapeHandle', right: 'ShapeHandle') -> 'ShapeHandle'见成员签名。
kindmethod(self, shape: 'ShapeHandle') -> 'str'见成员签名。
lengthmethod(self, shape: 'ShapeHandle') -> 'float'见成员签名。
loftmethod(self, profiles: 'Sequence[ShapeHandle]', *, solid: 'bool' = True, ruled: 'bool' = False) -> 'ShapeHandle'见成员签名。
meshmethod(self, shape: 'ShapeHandle', deflection: 'float' = 0.1) -> 'dict[str, list[float] | list[int]]'见成员签名。
mirrormethod(self, shape: 'ShapeHandle', origin: 'Sequence[float]', normal: 'Sequence[float]') -> 'ShapeHandle'见成员签名。
polylinemethod(self, points: 'Sequence[Sequence[float]]', *, closed: 'bool' = False) -> 'ShapeHandle'见成员签名。
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'见成员签名。
rotatemethod(self, shape: 'ShapeHandle', origin: 'Sequence[float]', axis: 'Sequence[float]', degrees: 'float') -> 'ShapeHandle'见成员签名。
ruled_surfacemethod(self, edge_a: 'ShapeHandle', edge_b: 'ShapeHandle') -> 'ShapeHandle'见成员签名。
scalemethod(self, shape: 'ShapeHandle', factor: 'float', center: 'Sequence[float]' = (0, 0, 0)) -> 'ShapeHandle'见成员签名。
sewmethod(self, faces: 'Sequence[ShapeHandle]', *, tolerance: 'float' = 1e-06) -> 'ShapeHandle'见成员签名。
shellmethod(self, shape: 'ShapeHandle', thickness: 'float', face_indices: 'Sequence[int] | None' = None, *, tolerance: 'float' = 0.001, faces: 'Sequence[int] | None' = None) -> 'ShapeHandle'见成员签名。
shell_to_solidmethod(self, shell: 'ShapeHandle') -> 'ShapeHandle'见成员签名。
spheremethod(self, radius: 'float') -> 'ShapeHandle'见成员签名。
subshapesmethod(self, shape: 'ShapeHandle', shape_type: 'int') -> 'tuple[ShapeHandle, ...]'见成员签名。
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'见成员签名。
topologymethod(self, shape: 'ShapeHandle') -> 'dict[str, int]'见成员签名。
translatemethod(self, shape: 'ShapeHandle', x: 'float', y: 'float', z: 'float') -> 'ShapeHandle'见成员签名。
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'见成员签名。
unionmethod(self, left: 'ShapeHandle', right: 'ShapeHandle') -> 'ShapeHandle'见成员签名。
versionproperty-见成员签名。
volumemethod(self, shape: 'ShapeHandle') -> 'float'见成员签名。

行为与约束

  • Shape 值始终绑定到其所属 Session;Session 关闭后不得继续使用。

导入检查

from cadflow import NativeSession

相关内容