[Qt_Vismach] STL file incorrectly centered

More
4 years 7 months ago #237594 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:


 

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.

More
4 years 7 months ago #237614 by cmorley
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?

Please Log in to join the conversation.

More
4 years 7 months ago #237663 by RomeReactor
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.

More
4 years 7 months ago #237668 by cmorley
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)

Please Log in to join the conversation.

More
4 years 7 months ago #237729 by cmorley
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)

Please Log in to join the conversation.

More
4 years 7 months ago #237753 by cmorley

Please Log in to join the conversation.

More
4 years 7 months ago #238058 by andypugh
Yes, translate first, then hal_rotate.

Though it might be tidier to move the model to the right place in the CAD.

Please Log in to join the conversation.

More
4 years 7 months ago #238134 by RomeReactor
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.

More
4 years 7 months ago #238191 by cmorley
Thanks for confirming the procedure. Very nice.

Please Log in to join the conversation.

Time to create page: 0.091 seconds
Powered by Kunena Forum