- Posts: 35
- Thank you received: 0
[Qt_Vismach] STL file incorrectly centered
- RomeReactor
- Topic Author
- Offline
- Junior Member
-
Less
More
4 years 7 months ago #237594
by RomeReactor
[Qt_Vismach] STL file incorrectly centered was created by RomeReactor
Hello all. We're in the process of adding a rotating fourth joint to a mill, but the STL file doesn't have its origin in the center of the piece, which causes it to rotate incorrectly:
Is there a way to move the origin to the actual center of the piece?
Attachment not found
Is there a way to move the origin to the actual center of the piece?
Please Log in to join the conversation.
4 years 7 months ago #237614
by cmorley
Replied by cmorley on topic [Qt_Vismach] STL file incorrectly centered
As far as I know, no the program assumes the origin is the center.
I am not very experienced with vismach though.
was your model of the chuck built with the origin in the middle?
I am not very experienced with vismach though.
was your model of the chuck built with the origin in the middle?
Please Log in to join the conversation.
- RomeReactor
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 35
- Thank you received: 0
4 years 7 months ago #237663
by RomeReactor
Replied by RomeReactor on topic [Qt_Vismach] STL file incorrectly centered
yes, the STL model is made in SOLIDWORK and we established the origin of the piece in the center
Please Log in to join the conversation.
4 years 7 months ago #237668
by cmorley
Replied by cmorley on topic [Qt_Vismach] STL file incorrectly centered
maybe something like this (setting translate x y or z to the required offset)?
chuck = HalRotate([STL_part], None, "hal_pin_name", angle_scale, x, y, z)
chuck = Translate([chuck], x, y, z)
chuck = HalRotate([STL_part], None, "hal_pin_name", angle_scale, x, y, z)
chuck = Translate([chuck], x, y, z)
Please Log in to join the conversation.
4 years 7 months ago #237729
by cmorley
Replied by cmorley on topic [Qt_Vismach] STL file incorrectly centered
After thinking some more, you probably need to translate the part before adding the HAL rotate.
chuck = Translate([STL_part], x, y, z)
chuck = HalRotate([chuck], None, "hal_pin_name", angle_scale, x, y, z)
chuck = Translate([STL_part], x, y, z)
chuck = HalRotate([chuck], None, "hal_pin_name", angle_scale, x, y, z)
Please Log in to join the conversation.
4 years 7 months ago #237753
by cmorley
Replied by cmorley on topic [Qt_Vismach] STL file incorrectly centered
maybe this thread will help?
forum.linuxcnc.org/38-general-linuxcnc-q...h-coordinate-systems
forum.linuxcnc.org/38-general-linuxcnc-q...h-coordinate-systems
Please Log in to join the conversation.
4 years 7 months ago #238058
by andypugh
Replied by andypugh on topic [Qt_Vismach] STL file incorrectly centered
Yes, translate first, then hal_rotate.
Though it might be tidier to move the model to the right place in the CAD.
Though it might be tidier to move the model to the right place in the CAD.
Please Log in to join the conversation.
- RomeReactor
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 35
- Thank you received: 0
4 years 7 months ago #238134
by RomeReactor
Replied by RomeReactor on topic [Qt_Vismach] STL file incorrectly centered
Sorry for the late reply. Yes, I figured we needed to translate the part to offset the origin, then add the pin, and lastly reverse the translation to return the part to the desired position. It's working fine now:
Attachment not found
Please Log in to join the conversation.
Time to create page: 0.091 seconds
