SketchConstraint
Kind: Class
Domain: Sketch
Canonical import: from cadflow import SketchConstraint
Signature
class SketchConstraint(constraint_id: 'str', kind: 'str', targets: 'Tuple[Dict[str, Any], ...]', value: 'Any' = None, driving: 'bool' = True, metadata: 'Dict[str, Any]' = <factory>) -> None
Description
Serializable constraint inside a declarative sketch.
Parameters
| Name | Type | Required | Default | Source description |
|---|---|---|---|---|
constraint_id | 'str' | yes | - | Not explicitly described in the source docstring. |
kind | 'str' | yes | - | Not explicitly described in the source docstring. |
targets | 'Tuple[Dict[str, Any], ...]' | yes | - | Not explicitly described in the source docstring. |
value | 'Any' | no | None | Not explicitly described in the source docstring. |
driving | 'bool' | no | True | Not explicitly described in the source docstring. |
metadata | 'Dict[str, Any]' | no | <factory> | 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.
Data fields
| Name | Type | Default |
|---|---|---|
constraint_id | 'str' | required |
kind | 'str' | required |
targets | 'Tuple[Dict[str, Any], ...]' | required |
value | 'Any' | None |
driving | 'bool' | True |
metadata | 'Dict[str, Any]' | factory |
Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
to_dict | method | (self) -> 'Dict[str, Any]' | See the member signature. |
Behavior and constraints
- Instances are immutable dataclass values; update workflows return a replacement value.
Import check
from cadflow import SketchConstraint