def __init__(self, name, sketch, revolve_center=None, revolve_axis=None, radius=None, angle=None, copy=False): Primitive.__init__(self, name=name) self.sketch = sketch self.revolve_center = Vector(revolve_center, copy=copy) if revolve_center else Vector.O3() self.revolve_axis = Vector(revolve_axis, copy=copy) if revolve_axis else Vector.Z3() self.radius = Vector(radius, copy=copy) if radius else Vector.X3() self.angle = 180 if angle is None else float(angle)
def __init__(self, name, sketch, base=None, height=None, u_vec=None, v_vec=None, copy=False): Primitive.__init__(self, name=name) self.sketch = sketch self.base = Vector(base, copy=copy) if base else Vector.O3() self.height = Vector(height, copy=copy) if height else Vector.Z3() self.u_vec = Vector(u_vec, copy=copy) if u_vec else Vector.X3() self.v_vec = Vector(v_vec, copy=copy) if v_vec else Vector.Y3()