|
@@ -3,14 +3,17 @@ from typing import Optional
|
|
from .scene_object3d import Object3D
|
|
from .scene_object3d import Object3D
|
|
|
|
|
|
class Scene(Object3D):
|
|
class Scene(Object3D):
|
|
|
|
+
|
|
def __init__(self, view):
|
|
def __init__(self, view):
|
|
super().__init__('scene', view)
|
|
super().__init__('scene', view)
|
|
|
|
|
|
class Group(Object3D):
|
|
class Group(Object3D):
|
|
|
|
+
|
|
def __init__(self):
|
|
def __init__(self):
|
|
super().__init__('group')
|
|
super().__init__('group')
|
|
|
|
|
|
class Box(Object3D):
|
|
class Box(Object3D):
|
|
|
|
+
|
|
def __init__(self,
|
|
def __init__(self,
|
|
width: float = 1.0,
|
|
width: float = 1.0,
|
|
height: float = 1.0,
|
|
height: float = 1.0,
|
|
@@ -20,6 +23,7 @@ class Box(Object3D):
|
|
super().__init__('box', width, height, depth, wireframe)
|
|
super().__init__('box', width, height, depth, wireframe)
|
|
|
|
|
|
class Sphere(Object3D):
|
|
class Sphere(Object3D):
|
|
|
|
+
|
|
def __init__(self,
|
|
def __init__(self,
|
|
radius: float = 1.0,
|
|
radius: float = 1.0,
|
|
width_segments: int = 32,
|
|
width_segments: int = 32,
|
|
@@ -29,6 +33,7 @@ class Sphere(Object3D):
|
|
super().__init__('sphere', radius, width_segments, height_segments, wireframe)
|
|
super().__init__('sphere', radius, width_segments, height_segments, wireframe)
|
|
|
|
|
|
class Cylinder(Object3D):
|
|
class Cylinder(Object3D):
|
|
|
|
+
|
|
def __init__(self,
|
|
def __init__(self,
|
|
top_radius: float = 1.0,
|
|
top_radius: float = 1.0,
|
|
bottom_radius: float = 1.0,
|
|
bottom_radius: float = 1.0,
|
|
@@ -40,6 +45,7 @@ class Cylinder(Object3D):
|
|
super().__init__('cylinder', top_radius, bottom_radius, height, radial_segments, height_segments, wireframe)
|
|
super().__init__('cylinder', top_radius, bottom_radius, height, radial_segments, height_segments, wireframe)
|
|
|
|
|
|
class Extrusion(Object3D):
|
|
class Extrusion(Object3D):
|
|
|
|
+
|
|
def __init__(self,
|
|
def __init__(self,
|
|
outline: list[list[float, float]],
|
|
outline: list[list[float, float]],
|
|
height: float,
|
|
height: float,
|
|
@@ -48,6 +54,7 @@ class Extrusion(Object3D):
|
|
super().__init__('extrusion', outline, height, wireframe)
|
|
super().__init__('extrusion', outline, height, wireframe)
|
|
|
|
|
|
class Stl(Object3D):
|
|
class Stl(Object3D):
|
|
|
|
+
|
|
def __init__(self,
|
|
def __init__(self,
|
|
url: str,
|
|
url: str,
|
|
wireframe: bool = False,
|
|
wireframe: bool = False,
|
|
@@ -55,6 +62,7 @@ class Stl(Object3D):
|
|
super().__init__('stl', url, wireframe)
|
|
super().__init__('stl', url, wireframe)
|
|
|
|
|
|
class Line(Object3D):
|
|
class Line(Object3D):
|
|
|
|
+
|
|
def __init__(self,
|
|
def __init__(self,
|
|
start: list[float, float, float],
|
|
start: list[float, float, float],
|
|
end: list[float, float, float],
|
|
end: list[float, float, float],
|
|
@@ -62,6 +70,7 @@ class Line(Object3D):
|
|
super().__init__('line', start, end)
|
|
super().__init__('line', start, end)
|
|
|
|
|
|
class Curve(Object3D):
|
|
class Curve(Object3D):
|
|
|
|
+
|
|
def __init__(self,
|
|
def __init__(self,
|
|
start: list[float, float, float],
|
|
start: list[float, float, float],
|
|
control1: list[float, float, float],
|
|
control1: list[float, float, float],
|
|
@@ -72,6 +81,7 @@ class Curve(Object3D):
|
|
super().__init__('curve', start, control1, control2, end, num_points)
|
|
super().__init__('curve', start, control1, control2, end, num_points)
|
|
|
|
|
|
class Texture(Object3D):
|
|
class Texture(Object3D):
|
|
|
|
+
|
|
def __init__(self,
|
|
def __init__(self,
|
|
url: str,
|
|
url: str,
|
|
coordinates: list[list[Optional[list[float]]]],
|
|
coordinates: list[list[Optional[list[float]]]],
|