SketchDocument
Kind: Class
Domain: Sketch
Canonical import: from cadflow import SketchDocument
Signature
class SketchDocument(engine_sketch: 'EngineSketch')
Description
Design-intent sketch with stable entity references and constraints.
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.
Other public imports
from cadflow.sketch_api import SketchDocument
Parameters
| Name | Type | Required | Default | Source description |
|---|---|---|---|---|
engine_sketch | 'EngineSketch' | yes | - | Not explicitly described in the source docstring. |
Returns
Type: Any
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 |
|---|---|---|---|
add_arc | method | (self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', center: 'SketchRef | str', *, construction: 'bool' = False) -> "'SketchDocument'" | See the member signature. |
add_bspline | method | (self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', control_points: 'Sequence[Any]', degree: 'int' = 3, **kwargs: 'Any') -> "'SketchDocument'" | See the member signature. |
add_circle | method | (self, entity_id: 'str', center: 'SketchRef | str', radius: 'Any', *, construction: 'bool' = False) -> "'SketchDocument'" | See the member signature. |
add_line | method | (self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', *, construction: 'bool' = False) -> "'SketchDocument'" | See the member signature. |
add_point | method | (self, point_id: 'str', x: 'Any', y: 'Any') -> "'SketchDocument'" | See the member signature. |
arc | method | (self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', center: 'SketchRef | str', *, construction: 'bool' = False) -> "'SketchDocument'" | See the member signature. |
circle | method | (self, entity_id: 'str', center: 'SketchRef | str', radius: 'Any', *, construction: 'bool' = False) -> "'SketchDocument'" | See the member signature. |
constrain_angle | method | (self, a, b, value, **kwargs) | See the member signature. |
constrain_coincident | method | (self, a, b, **kwargs) | See the member signature. |
constrain_collinear | method | (self, a, b, **kwargs) | See the member signature. |
constrain_concentric | method | (self, a, b, **kwargs) | See the member signature. |
constrain_connect | method | (self, a, b, **kwargs) | See the member signature. |
constrain_diameter | method | (self, entity, value, **kwargs) | See the member signature. |
constrain_distance | method | (self, a, b, value, **kwargs) | See the member signature. |
constrain_distance_x | method | (self, a, b, value, **kwargs) | See the member signature. |
constrain_distance_y | method | (self, a, b, value, **kwargs) | See the member signature. |
constrain_equal_length | method | (self, a, b, **kwargs) | See the member signature. |
constrain_equal_radius | method | (self, a, b, **kwargs) | See the member signature. |
constrain_fix | method | (self, entity, **kwargs) | See the member signature. |
constrain_horizontal | method | (self, line, **kwargs) | See the member signature. |
constrain_length | method | (self, entity, value, **kwargs) | See the member signature. |
constrain_midpoint | method | (self, point, line, **kwargs) | See the member signature. |
constrain_parallel | method | (self, a, b, **kwargs) | See the member signature. |
constrain_perpendicular | method | (self, a, b, **kwargs) | See the member signature. |
constrain_point_on | method | (self, point, entity, **kwargs) | See the member signature. |
constrain_radius | method | (self, entity, value, **kwargs) | See the member signature. |
constrain_symmetric | method | (self, a, b, axis, **kwargs) | See the member signature. |
constrain_tangent | method | (self, a, b, **kwargs) | See the member signature. |
constrain_vertical | method | (self, line, **kwargs) | See the member signature. |
constraints | property | - | See the member signature. |
create | class method | (cls, name: 'str | None' = None, *, frame: 'CoordinateFrame | None' = None, sketch_id: 'str | None' = None) -> "'SketchDocument'" | See the member signature. |
describe | method | (self) -> 'dict[str, Any]' | See the member signature. |
entities | property | - | See the member signature. |
frame | property | - | See the member signature. |
inspect | method | (self, **options: 'Any') -> 'SketchSolveResult' | See the member signature. |
line | method | (self, entity_id: 'str', start: 'SketchRef | str', end: 'SketchRef | str', *, construction: 'bool' = False) -> "'SketchDocument'" | See the member signature. |
name | property | - | See the member signature. |
point | method | (self, point_id: 'str', x: 'Any', y: 'Any') -> "'SketchDocument'" | See the member signature. |
point_ref | method | (self, point_id: 'str') -> 'SketchRef' | See the member signature. |
ref | method | (self, entity_id: 'str') -> 'SketchRef' | See the member signature. |
sketch_id | property | - | See the member signature. |
solve | method | (self, **options: 'Any') -> 'SketchSolveResult' | See the member signature. |
to_face | method | (self, **options: 'Any') | See the member signature. |
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') | See the member signature. |
Behavior and constraints
- The contract below is generated from the current public runtime signature. Check domain notes for ownership and workflow constraints.
Import check
from cadflow import SketchDocument