Mirror wing geometry
This commit is contained in:
parent
a684996475
commit
22a4f4ceec
|
@ -3,6 +3,9 @@
|
||||||
This is the design repository for NorCal Hakkero Factory No. 1, where we use
|
This is the design repository for NorCal Hakkero Factory No. 1, where we use
|
||||||
parametric CAD to make cosplay props.
|
parametric CAD to make cosplay props.
|
||||||
|
|
||||||
|
> NorCal Hakkero Factory № 1
|
||||||
|
> 北加国営八卦炉第一工場
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
Most cosplay schematics are created with Blender, CadQuery, and Inkscape. To
|
Most cosplay schematics are created with Blender, CadQuery, and Inkscape. To
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Mirror(Model):
|
||||||
outer_gap: float = 3.0
|
outer_gap: float = 3.0
|
||||||
|
|
||||||
core_thickness: float = 25.4 / 8
|
core_thickness: float = 25.4 / 8
|
||||||
casing_thickness: float = 25.4 / 16
|
casing_thickness: float = 25.4 / 8
|
||||||
|
|
||||||
flange_r0: float = 5.0
|
flange_r0: float = 5.0
|
||||||
flange_r1: float = 15.0
|
flange_r1: float = 15.0
|
||||||
|
@ -61,36 +61,7 @@ class Mirror(Model):
|
||||||
"""
|
"""
|
||||||
Base of the casing with no holes carved out
|
Base of the casing with no holes carved out
|
||||||
"""
|
"""
|
||||||
return (
|
|
||||||
Cq.Sketch()
|
|
||||||
.ellipse(self.width/2, self.height/2)
|
|
||||||
)
|
|
||||||
def casing_bot(self) -> Cq.Workplane:
|
|
||||||
return (
|
|
||||||
Cq.Workplane()
|
|
||||||
.placeSketch(self.profile_casing_bot())
|
|
||||||
.extrude(self.casing_thickness)
|
|
||||||
)
|
|
||||||
def profile_wing(self, sign: float=1) -> Cq.Sketch:
|
|
||||||
xt = self.width / 2 - self.outer_gap
|
|
||||||
return (
|
|
||||||
Cq.Sketch()
|
|
||||||
.polygon([
|
|
||||||
(sign*xt, self.wing_r1),
|
|
||||||
(sign*(xt+self.wing_x1), self.wing_r1),
|
|
||||||
(sign*(xt+self.wing_x1), self.wing_r2),
|
|
||||||
(sign*(xt+self.wing_x2), self.wing_r2),
|
|
||||||
(sign*(xt+self.wing_x2), -self.wing_r2),
|
|
||||||
(sign*(xt+self.wing_x1), -self.wing_r2),
|
|
||||||
(sign*(xt+self.wing_x1), -self.wing_r1),
|
|
||||||
(sign*xt, -self.wing_r1),
|
|
||||||
])
|
|
||||||
)
|
|
||||||
@target(name="casing-mid", kind=TargetKind.DXF)
|
|
||||||
def profile_casing_mid(self) -> Cq.Sketch:
|
|
||||||
yt = self.height / 2 - self.outer_gap
|
yt = self.height / 2 - self.outer_gap
|
||||||
rx = self.width/2 - self.outer_gap
|
|
||||||
ry = self.height/2 - self.outer_gap
|
|
||||||
yh = (self.flange_y1 + self.flange_y2) / 2
|
yh = (self.flange_y1 + self.flange_y2) / 2
|
||||||
flange = (
|
flange = (
|
||||||
Cq.Sketch()
|
Cq.Sketch()
|
||||||
|
@ -124,13 +95,42 @@ class Mirror(Model):
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
return (
|
return (
|
||||||
self.profile_casing_bot()
|
Cq.Sketch()
|
||||||
.ellipse(rx, ry, mode="s")
|
.ellipse(self.width/2, self.height/2)
|
||||||
.boolean(flange, mode="a")
|
.boolean(flange, mode="a")
|
||||||
.boolean(tail, mode="a")
|
.boolean(tail, mode="a")
|
||||||
.boolean(self.profile_wing(-1), mode="a")
|
.boolean(self.profile_wing(-1), mode="a")
|
||||||
.boolean(self.profile_wing(1), mode="a")
|
.boolean(self.profile_wing(1), mode="a")
|
||||||
)
|
)
|
||||||
|
def casing_bot(self) -> Cq.Workplane:
|
||||||
|
return (
|
||||||
|
Cq.Workplane()
|
||||||
|
.placeSketch(self.profile_casing_bot())
|
||||||
|
.extrude(self.casing_thickness)
|
||||||
|
)
|
||||||
|
def profile_wing(self, sign: float=1) -> Cq.Sketch:
|
||||||
|
xt = self.width / 2 - self.outer_gap
|
||||||
|
return (
|
||||||
|
Cq.Sketch()
|
||||||
|
.polygon([
|
||||||
|
(sign*xt, self.wing_r1),
|
||||||
|
(sign*(xt+self.wing_x1), self.wing_r1),
|
||||||
|
(sign*(xt+self.wing_x1), self.wing_r2),
|
||||||
|
(sign*(xt+self.wing_x2), self.wing_r2),
|
||||||
|
(sign*(xt+self.wing_x2), -self.wing_r2),
|
||||||
|
(sign*(xt+self.wing_x1), -self.wing_r2),
|
||||||
|
(sign*(xt+self.wing_x1), -self.wing_r1),
|
||||||
|
(sign*xt, -self.wing_r1),
|
||||||
|
])
|
||||||
|
)
|
||||||
|
@target(name="casing-mid", kind=TargetKind.DXF)
|
||||||
|
def profile_casing_mid(self) -> Cq.Sketch:
|
||||||
|
rx = self.width/2 - self.outer_gap
|
||||||
|
ry = self.height/2 - self.outer_gap
|
||||||
|
return (
|
||||||
|
self.profile_casing_bot()
|
||||||
|
.ellipse(rx, ry, mode="s")
|
||||||
|
)
|
||||||
def casing_mid(self) -> Cq.Workplane:
|
def casing_mid(self) -> Cq.Workplane:
|
||||||
return (
|
return (
|
||||||
Cq.Workplane()
|
Cq.Workplane()
|
||||||
|
|
Loading…
Reference in New Issue