Align coupler holes
This commit is contained in:
parent
b55dc8caa3
commit
7d3845f3c1
|
@ -129,6 +129,7 @@ class FlangeCoupler(Model):
|
||||||
loc = Cq.Location.rot2d(i * 360 / self.n_hole_flange) * Cq.Location(self.r_hole_flange, 0)
|
loc = Cq.Location.rot2d(i * 360 / self.n_hole_flange) * Cq.Location(self.r_hole_flange, 0)
|
||||||
result.tagAbsolute(f"holeT{i}", loc * Cq.Location(0, 0, self.height_flange), direction="+Z")
|
result.tagAbsolute(f"holeT{i}", loc * Cq.Location(0, 0, self.height_flange), direction="+Z")
|
||||||
result.tagAbsolute(f"holeB{i}", loc, direction="-Z")
|
result.tagAbsolute(f"holeB{i}", loc, direction="-Z")
|
||||||
|
result.tagAbsolute("dir", (0, 0, self.height_hole), direction="+X")
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
@ -215,6 +216,7 @@ class Motor(Model):
|
||||||
result.tagAbsolute("anchor1", (self.dx_anchor, 0, z_anchor), direction="+Z")
|
result.tagAbsolute("anchor1", (self.dx_anchor, 0, z_anchor), direction="+Z")
|
||||||
result.tagAbsolute("anchor2", (-self.dx_anchor, 0, z_anchor), direction="+Z")
|
result.tagAbsolute("anchor2", (-self.dx_anchor, 0, z_anchor), direction="+Z")
|
||||||
result.tagAbsolute("shaft", (0, 0, self.height_body + self.height_base_shaft), direction="+Z")
|
result.tagAbsolute("shaft", (0, 0, self.height_body + self.height_base_shaft), direction="+Z")
|
||||||
|
result.tagAbsolute("dir", (0, 0, self.height_body + self.height_hole), direction="+X")
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
@ -611,7 +613,13 @@ class Onbashira(Model):
|
||||||
.constrain(
|
.constrain(
|
||||||
"flange_coupler?top",
|
"flange_coupler?top",
|
||||||
"motor?shaft",
|
"motor?shaft",
|
||||||
"Plane"
|
"Axis"
|
||||||
|
)
|
||||||
|
.constrain(
|
||||||
|
"flange_coupler?dir",
|
||||||
|
"motor?dir",
|
||||||
|
"Plane",
|
||||||
|
param=0,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
for i in range(self.flange_coupler.n_hole_flange):
|
for i in range(self.flange_coupler.n_hole_flange):
|
||||||
|
|
Loading…
Reference in New Issue