Proper class names (#272)
* towards proper class names Signed-off-by: Jess Frazelle <github@jessfraz.com> * mypy Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes 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>
This commit is contained in:
@ -9,7 +9,7 @@ from ..models.point2d import Point2d
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
|
||||
class line(BaseModel):
|
||||
class OptionLine(BaseModel):
|
||||
"""A straight line segment. Goes from the current path \"pen\" to the given endpoint."""
|
||||
|
||||
end: Point3d
|
||||
@ -21,7 +21,7 @@ class line(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class arc(BaseModel):
|
||||
class OptionArc(BaseModel):
|
||||
"""A circular arc segment. Arcs can be drawn clockwise when start > end."""
|
||||
|
||||
center: Point2d
|
||||
@ -39,7 +39,7 @@ class arc(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class bezier(BaseModel):
|
||||
class OptionBezier(BaseModel):
|
||||
"""A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point."""
|
||||
|
||||
control1: Point3d
|
||||
@ -55,7 +55,7 @@ class bezier(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class tangential_arc(BaseModel):
|
||||
class OptionTangentialArc(BaseModel):
|
||||
"""Adds a tangent arc from current pen position with the given radius and angle."""
|
||||
|
||||
offset: Angle
|
||||
@ -67,7 +67,7 @@ class tangential_arc(BaseModel):
|
||||
model_config = ConfigDict(protected_namespaces=())
|
||||
|
||||
|
||||
class tangential_arc_to(BaseModel):
|
||||
class OptionTangentialArcTo(BaseModel):
|
||||
"""Adds a tangent arc from current pen position to the new position. Arcs will choose a clockwise or counter-clockwise direction based on the arc end position."""
|
||||
|
||||
angle_snap_increment: Optional[Angle] = None
|
||||
@ -82,11 +82,11 @@ class tangential_arc_to(BaseModel):
|
||||
PathSegment = RootModel[
|
||||
Annotated[
|
||||
Union[
|
||||
line,
|
||||
arc,
|
||||
bezier,
|
||||
tangential_arc,
|
||||
tangential_arc_to,
|
||||
OptionLine,
|
||||
OptionArc,
|
||||
OptionBezier,
|
||||
OptionTangentialArc,
|
||||
OptionTangentialArcTo,
|
||||
],
|
||||
Field(discriminator="type"),
|
||||
]
|
||||
|
Reference in New Issue
Block a user