跳到主要内容

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_arcmethod(self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', center: 'SketchRef | str', *, construction: 'bool' = False) -> "'SketchDocument'"见成员签名。
add_bsplinemethod(self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', control_points: 'Sequence[Any]', degree: 'int' = 3, **kwargs: 'Any') -> "'SketchDocument'"见成员签名。
add_circlemethod(self, entity_id: 'str', center: 'SketchRef | str', radius: 'Any', *, construction: 'bool' = False) -> "'SketchDocument'"见成员签名。
add_linemethod(self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', *, construction: 'bool' = False) -> "'SketchDocument'"见成员签名。
add_pointmethod(self, point_id: 'str', x: 'Any', y: 'Any') -> "'SketchDocument'"见成员签名。
arcmethod(self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', center: 'SketchRef | str', *, construction: 'bool' = False) -> "'SketchDocument'"见成员签名。
circlemethod(self, entity_id: 'str', center: 'SketchRef | str', radius: 'Any', *, construction: 'bool' = False) -> "'SketchDocument'"见成员签名。
constrain_anglemethod(self, a, b, value, **kwargs)见成员签名。
constrain_coincidentmethod(self, a, b, **kwargs)见成员签名。
constrain_collinearmethod(self, a, b, **kwargs)见成员签名。
constrain_concentricmethod(self, a, b, **kwargs)见成员签名。
constrain_connectmethod(self, a, b, **kwargs)见成员签名。
constrain_diametermethod(self, entity, value, **kwargs)见成员签名。
constrain_distancemethod(self, a, b, value, **kwargs)见成员签名。
constrain_distance_xmethod(self, a, b, value, **kwargs)见成员签名。
constrain_distance_ymethod(self, a, b, value, **kwargs)见成员签名。
constrain_equal_lengthmethod(self, a, b, **kwargs)见成员签名。
constrain_equal_radiusmethod(self, a, b, **kwargs)见成员签名。
constrain_fixmethod(self, entity, **kwargs)见成员签名。
constrain_horizontalmethod(self, line, **kwargs)见成员签名。
constrain_lengthmethod(self, entity, value, **kwargs)见成员签名。
constrain_midpointmethod(self, point, line, **kwargs)见成员签名。
constrain_parallelmethod(self, a, b, **kwargs)见成员签名。
constrain_perpendicularmethod(self, a, b, **kwargs)见成员签名。
constrain_point_onmethod(self, point, entity, **kwargs)见成员签名。
constrain_radiusmethod(self, entity, value, **kwargs)见成员签名。
constrain_symmetricmethod(self, a, b, axis, **kwargs)见成员签名。
constrain_tangentmethod(self, a, b, **kwargs)见成员签名。
constrain_verticalmethod(self, line, **kwargs)见成员签名。
constraintsproperty-见成员签名。
createclass method(cls, name: 'str | None' = None, *, frame: 'CoordinateFrame | None' = None, sketch_id: 'str | None' = None) -> "'SketchDocument'"见成员签名。
describemethod(self) -> 'dict[str, Any]'见成员签名。
entitiesproperty-见成员签名。
frameproperty-见成员签名。
inspectmethod(self, **options: 'Any') -> 'SketchSolveResult'见成员签名。
linemethod(self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', *, construction: 'bool' = False) -> "'SketchDocument'"见成员签名。
nameproperty-见成员签名。
pointmethod(self, point_id: 'str', x: 'Any', y: 'Any') -> "'SketchDocument'"见成员签名。
point_refmethod(self, point_id: 'str') -> 'SketchRef'见成员签名。
refmethod(self, entity_id: 'str') -> 'SketchRef'见成员签名。
sketch_idproperty-见成员签名。
solvemethod(self, **options: 'Any') -> 'SketchSolveResult'见成员签名。
to_facemethod(self, **options: 'Any')见成员签名。
to_native_facemethod(self, model: 'Any', *, profile: 'int | str' = 0, **options: 'Any')Lower a single circle or polygon profile through cad.Model.
to_wiremethod(self, **options: 'Any')见成员签名。

行为与约束

  • 以下契约由当前公共运行时签名生成;所有权与工作流限制见对应领域说明。

导入检查

from cadflow import SketchDocument

相关内容