SketchDocument
类型: 类
领域: 草图
推荐导入: from cadflow import SketchDocument
签名
class SketchDocument(engine_sketch: 'EngineSketch')
功能说明
提供不可变的声明式草图编辑、约束、求解与轮廓转换接口。
原始 API 说明
Design-intent sketch with stable entity references and constraints.
Methods return a new document, matching the existing functional sketch operations. to_face() produces the compatibility OCP face; use to_native_face(model) for profiles supported by the C++ session.
其他公共导入路径
from cadflow.sketch_api import SketchDocument
参数
| 名称 | 类型 | 必需 | 默认值 | 源码说明 |
|---|---|---|---|---|
engine_sketch | 'EngineSketch' | 是 | - | 源码 Docstring 未单独说明。 |
返回值
类型: Any
源码 Docstring 未声明更多返回语义。
异常
源码 Docstring 未声明更窄的异常契约。类型、数值、所有权、路径或后端状态无效时,仍可能抛出相应公共异常。
公共成员
| 成员 | 类型 | 签名 | 说明 |
|---|---|---|---|
add_arc | method | (self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', center: 'SketchRef | str', *, construction: 'bool' = False) -> "'SketchDocument'" | 见成员签名。 |
add_bspline | method | (self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', control_points: 'Sequence[Any]', degree: 'int' = 3, **kwargs: 'Any') -> "'SketchDocument'" | 见成员签名。 |
add_circle | method | (self, entity_id: 'str', center: 'SketchRef | str', radius: 'Any', *, construction: 'bool' = False) -> "'SketchDocument'" | 见成员签名。 |
add_line | method | (self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', *, construction: 'bool' = False) -> "'SketchDocument'" | 见成员签名。 |
add_point | method | (self, point_id: 'str', x: 'Any', y: 'Any') -> "'SketchDocument'" | 见成员签名。 |
arc | method | (self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', center: 'SketchRef | str', *, construction: 'bool' = False) -> "'SketchDocument'" | 见成员签名。 |
circle | method | (self, entity_id: 'str', center: 'SketchRef | str', radius: 'Any', *, construction: 'bool' = False) -> "'SketchDocument'" | 见成员签名。 |
constrain_angle | method | (self, a, b, value, **kwargs) | 见成员签名。 |
constrain_coincident | method | (self, a, b, **kwargs) | 见成员签名。 |
constrain_collinear | method | (self, a, b, **kwargs) | 见成员签名。 |
constrain_concentric | method | (self, a, b, **kwargs) | 见成员签名。 |
constrain_connect | method | (self, a, b, **kwargs) | 见成员签名。 |
constrain_diameter | method | (self, entity, value, **kwargs) | 见成员签名。 |
constrain_distance | method | (self, a, b, value, **kwargs) | 见成员签名。 |
constrain_distance_x | method | (self, a, b, value, **kwargs) | 见成员签名。 |
constrain_distance_y | method | (self, a, b, value, **kwargs) | 见成员签名。 |
constrain_equal_length | method | (self, a, b, **kwargs) | 见成员签名。 |
constrain_equal_radius | method | (self, a, b, **kwargs) | 见成员签名。 |
constrain_fix | method | (self, entity, **kwargs) | 见成员签名。 |
constrain_horizontal | method | (self, line, **kwargs) | 见成员签名。 |
constrain_length | method | (self, entity, value, **kwargs) | 见成员签名。 |
constrain_midpoint | method | (self, point, line, **kwargs) | 见成员签名。 |
constrain_parallel | method | (self, a, b, **kwargs) | 见成员签名。 |
constrain_perpendicular | method | (self, a, b, **kwargs) | 见成员签名。 |
constrain_point_on | method | (self, point, entity, **kwargs) | 见成员签名。 |
constrain_radius | method | (self, entity, value, **kwargs) | 见成员签名。 |
constrain_symmetric | method | (self, a, b, axis, **kwargs) | 见成员签名。 |
constrain_tangent | method | (self, a, b, **kwargs) | 见成员签名。 |
constrain_vertical | method | (self, line, **kwargs) | 见成员签名。 |
constraints | property | - | 见成员签名。 |
create | class method | (cls, name: 'str | None' = None, *, frame: 'CoordinateFrame | None' = None, sketch_id: 'str | None' = None) -> "'SketchDocument'" | 见成员签名。 |
describe | method | (self) -> 'dict[str, Any]' | 见成员签名。 |
entities | property | - | 见成员签名。 |
frame | property | - | 见成员签名。 |
inspect | method | (self, **options: 'Any') -> 'SketchSolveResult' | 见成员签名。 |
line | method | (self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', *, construction: 'bool' = False) -> "'SketchDocument'" | 见成员签名。 |
name | property | - | 见成员签名。 |
point | method | (self, point_id: 'str', x: 'Any', y: 'Any') -> "'SketchDocument'" | 见成员签名。 |
point_ref | method | (self, point_id: 'str') -> 'SketchRef' | 见成员签名。 |
ref | method | (self, entity_id: 'str') -> 'SketchRef' | 见成员签名。 |
sketch_id | property | - | 见成员签名。 |
solve | method | (self, **options: 'Any') -> 'SketchSolveResult' | 见成员签名。 |
to_face | method | (self, **options: 'Any') | 见成员签名。 |
to_native_face | method | (self, model: 'Any', *, profile: 'int | str' = 0, **options: 'Any') | Lower a single circle or polygon profile through cad.Model. |
to_wire | method | (self, **options: 'Any') | 见成员签名。 |
行为与约束
- 以下契约由当前公共运行时签名生成;所有权与工作流限制见对应领域说明。
导入检查
from cadflow import SketchDocument