Files
kittycad.py/kittycad/models/transform.py
Jess Frazelle cf1e048bea fix mypy (#267)
* better default types

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* more mypy fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* more fixes for mypy

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix mypy;

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix mypy;

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* I have generated the latest API!

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-10 14:35:25 -07:00

23 lines
643 B
Python

from pydantic import BaseModel, ConfigDict
from ..models.point3d import Point3d
from ..models.rotation import Rotation
class Transform(BaseModel):
"""Ways to transform each solid being replicated in a repeating pattern."""
replicate: bool = True
rotation: Rotation = {
"angle": {"unit": "degrees", "value": 0.0},
"axis": {"x": 0.0, "y": 0.0, "z": 1.0},
"origin": {"type": "local"},
} # type: ignore
scale: Point3d = {"x": 1.0, "y": 1.0, "z": 1.0} # type: ignore
translate: Point3d = {"x": 0.0, "y": 0.0, "z": 0.0} # type: ignore
model_config = ConfigDict(protected_namespaces=())