Question about symmetry in assemblies using RigidJoint #636
Unanswered
roman-dvorak
asked this question in
Q&A
Replies: 1 comment
-
A key aspect of from build123d import *
from ocp_vscode import *
from bd_warehouse.open_builds import VSlotLinearRail
rail1 = VSlotLinearRail(10 * CM)
RigidJoint("0", rail1, rail1.faces().sort_by(Axis.Z)[0].location)
RigidJoint("1", rail1, rail1.faces().sort_by(Axis.Z)[-1].location)
slide_axis = Axis(
Edge.make_mid_way(
*rail1.edges().filter_by(Axis.Z).group_by(Axis.X)[-1].sort_by(Axis.Y)[1:3]
)
)
LinearJoint("slide", rail1, slide_axis, (0, 10 * CM))
rail1.color = Color(0x929966)
rail2 = VSlotLinearRail(2 * CM)
RigidJoint("0", rail2, rail2.faces().sort_by(Axis.Z)[0].location)
RigidJoint("1", rail2, rail2.faces().sort_by(Axis.Z)[-1].location)
rail2.color = Color(0x669299)
rail3 = VSlotLinearRail(6 * CM)
RigidJoint("0", rail3, rail3.faces().sort_by(Axis.Z)[0].location)
RigidJoint("1", rail3, rail3.faces().sort_by(Axis.Z)[-1].location)
rail3.color = Color(0x996692)
rail4 = VSlotLinearRail(8 * CM)
RigidJoint("0", rail4, Rot(0, -90, 0) * rail4.faces().sort_by(Axis.Z)[0].location)
RigidJoint("1", rail4, rail4.faces().sort_by(Axis.Z)[-1].location)
rail4.color = Color(0xC0C0C0)
rail1.joints["1"].connect_to(rail2.joints["0"])
rail2.joints["1"].connect_to(rail3.joints["0"])
rail1.joints["slide"].connect_to(rail4.joints["0"], position=6 * CM)
show(rail1, rail2, rail3, rail4, render_joints=True) There is a description this in the docs here (https://build123d.readthedocs.io/en/latest/joints.html#rigid-joint) "Once a joint is bound to a part this way, the connect_to() method can be used to repositioning another part relative to self which stay fixed - as follows:" Does this help? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am encountering an issue when assembling three objects using
RigidJoint
. I've noticed that the connections between the objects are not symmetrical, although I expected the outcomes to be consistent on both sides of each joint.Here is the code I'm using:
Below are images illustrating the two situations:
Situation 1 (correct)
Situation 2 (wrong)
I would like to inquire whether this is a known bug, or if such asymmetry is an intentional feature. I have not found any information about this in the documentation or in issues. Could someone please explain if there is something I might be missing, or how I should proceed?
Thank you for any help or advice.
Beta Was this translation helpful? Give feedback.
All reactions