Skip to main content

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

NameTypeRequiredDefaultSource 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'noNoneNot explicitly described in the source docstring.
driving'bool'noTrueNot explicitly described in the source docstring.
metadata'Dict[str, Any]'no&lt;factory&gt;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

NameTypeDefault
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

MemberKindSignatureDescription
to_dictmethod(self) -&gt; '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

See also