raygeo.sketch.constraints.rotational
RotationalConstraint
Enforces p2 is p1 rotated by angle_rad about center.
angle_rad
angle_rad: float
Resolved rotation angle in radians.
center
center: int
Rotation center.
p1
p1: int
Source point.
p2
p2: int
Rotated point.
error()
error(registry: registry.EntityRegistry) -> list[float]
Returns the constraint error at the registry's point positions.
| Parameter | Type | Description |
|---|---|---|
registry | registry.EntityRegistry | |
| Returns | list[float] |
expression()
expression() -> Optional[str]
The stored expression string, if any (evaluated caller-side).
| Parameter | Type | Description |
|---|---|---|
| Returns | Optional[str] |
set_expression()
set_expression(expression: Optional[str]) -> None
Sets the expression string (evaluated caller-side).
| Parameter | Type | Description |
|---|---|---|
expression | Optional[str] | |
| Returns | None |
set_user_visible()
set_user_visible(value: bool) -> None
Sets the reference user-visibility flag.
| Parameter | Type | Description |
|---|---|---|
value | bool | |
| Returns | None |
to_dict()
to_dict() -> dict
Serializes to the reference constraint dictionary shape.
| Parameter | Type | Description |
|---|---|---|
| Returns | dict |
user_visible()
user_visible() -> bool
Reference user-visibility flag.
| Parameter | Type | Description |
|---|---|---|
| Returns | bool |