[Qt_Vismach] STL file incorrectly centered

More
18 Mar 2022 00:46 #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:


 

Is there a way to move the origin to the actual center of the piece?
Attachments:

Please Log in or Create an account to join the conversation.

More
18 Mar 2022 05:34 #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?
The following user(s) said Thank You: RomeReactor

Please Log in or Create an account to join the conversation.

More
18 Mar 2022 18:49 #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 or Create an account to join the conversation.

More
18 Mar 2022 19:40 #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)
The following user(s) said Thank You: RomeReactor

Please Log in or Create an account to join the conversation.

More
19 Mar 2022 18:07 #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 or Create an account to join the conversation.

More
19 Mar 2022 22:54 #237753 by cmorley
The following user(s) said Thank You: RomeReactor

Please Log in or Create an account to join the conversation.

More
23 Mar 2022 00:30 #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.
The following user(s) said Thank You: RomeReactor

Please Log in or Create an account to join the conversation.

More
23 Mar 2022 20:48 #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:

 
Attachments:
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
24 Mar 2022 05:08 #238191 by cmorley
Thanks for confirming the procedure. Very nice.

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.406 seconds
Powered by Kunena Forum