New Eiki crown design using conformal mapping
This commit is contained in:
parent
89283efd59
commit
396dd997e0
|
@ -357,6 +357,10 @@ class Crown(Model):
|
|||
return sketch.assemble()
|
||||
|
||||
def side_guard(self) -> Cq.Workplane:
|
||||
"""
|
||||
Constructs the side guard using a cone. Via Gauss's Theorema Egregium,
|
||||
the surface of the cone can be deformed into a plane.
|
||||
"""
|
||||
angle = 360 / 5
|
||||
outer = Cq.Solid.makeCone(
|
||||
radius1=self.radius_lower + self.side_guard_thickness,
|
||||
|
@ -399,7 +403,48 @@ class Crown(Model):
|
|||
)
|
||||
return shell * profile - channel
|
||||
|
||||
def front_surrogate(self) -> Cq.Workplane:
|
||||
"""
|
||||
Create a surrogate cylindrical section structure for the front since we
|
||||
cannot bend extrusions
|
||||
"""
|
||||
angle = 360 / 5
|
||||
outer = Cq.Solid.makeCone(
|
||||
radius1=self.radius_lower + self.thickness,
|
||||
radius2=self.radius_upper + self.thickness,
|
||||
height=self.height,
|
||||
angleDegrees=angle,
|
||||
)
|
||||
inner = Cq.Solid.makeCone(
|
||||
radius1=self.radius_lower,
|
||||
radius2=self.radius_upper,
|
||||
height=self.height,
|
||||
angleDegrees=angle,
|
||||
)
|
||||
shell = (
|
||||
outer.cut(inner)
|
||||
.rotate((0,0,0), (0,0,1), -angle/2)
|
||||
)
|
||||
dx = math.sin(math.radians(angle / 2)) * self.radius_middle
|
||||
profile = (
|
||||
Cq.Workplane('YZ')
|
||||
.polyline([
|
||||
(0, self.height),
|
||||
(-dx, self.height / 2),
|
||||
(-dx, 0),
|
||||
(dx, 0),
|
||||
(dx, self.height / 2),
|
||||
])
|
||||
.close()
|
||||
.extrude(self.radius_upper + self.side_guard_thickness)
|
||||
.val()
|
||||
)
|
||||
return shell * profile
|
||||
|
||||
def assembly(self) -> Cq.Assembly:
|
||||
"""
|
||||
New assembly using conformal mapping on the cone.
|
||||
"""
|
||||
side_guard = self.side_guard()
|
||||
a = Cq.Assembly()
|
||||
for i in range(1,5):
|
||||
|
@ -409,6 +454,11 @@ class Crown(Model):
|
|||
material=self.material_side,
|
||||
loc=Cq.Location(rz=i*360/5)
|
||||
)
|
||||
a.addS(
|
||||
self.front_surrogate(),
|
||||
name="front",
|
||||
material=self.material,
|
||||
)
|
||||
return a
|
||||
|
||||
def old_assembly(self) -> Cq.Assembly:
|
||||
|
|
Loading…
Reference in New Issue