dprojects / Woodworking

This is Woodworking workbench for FreeCAD
MIT License
200 stars 17 forks source link

Panel move to anchor does not move a link object #18

Closed tearandfix closed 1 year ago

tearandfix commented 1 year ago

Hello.

First of all thanks for this workbench! I've been looking for something like that for a long time :)

I have a bit of a problem with "panel move to anchor" tool. It does not want to move a link object but moves an original object instead. I've recorded a short video to demonstrate it: https://www.youtube.com/watch?v=X9d1elEq0Bs

If a link is not suited to create a clone of a panel what operation should I use instead? Because I want to have a panel that follows the detentions of the original panel but can be placed somewhere else.

Thanks again for the great work.

tearandfix commented 1 year ago

I've managed to achieve the desired behavior by modifying: https://github.com/dprojects/Woodworking/blob/master/Tools/MagicPanels/panelMove2Anchor.py#L57

-               objRef = MagicPanels.getReference(o)
-               toMove = MagicPanels.getObjectToMove(objRef)
+               toMove = MagicPanels.getObjectToMove(o)

I'm not sure why getReference is used here...

dprojects commented 1 year ago

I'm not sure why getReference is used here...

Thank you for the kind words. The getReference is used to get base object for more complex objects. For the Link this will be the base object also if you have PartDesign objects. This may fail sometimes, especially for containers or Boolean Cut. I don't remember why there is reference for the object not the object. I need to look closer to it, probably there was reason for that.

dprojects commented 1 year ago

Thanks for this issue, fixed here: align to anchor fix