dprojects / Woodworking

This is Woodworking workbench for FreeCAD
MIT License
212 stars 21 forks source link

Magic Drill overwrites parametric panel dimensions #32

Closed flashydave closed 10 months ago

flashydave commented 12 months ago

If you use a spreadsheet to size a panel using parameters and then add holes through the magic drill then the sizes that were defined as formulas get replaced by the current size values when the part is created.

ie you lose all the elements of the design and need to edit these in manually as constraints on the sketches or attachment coordinates.

The magic drill script should preserve any parametric entries when the part and sub-components of it are created

I suspect magic dowels does the same.

dprojects commented 10 months ago

I guess this issue is not only related to single tool, I think this should be general testing with expressions. Well, I am not sure this is urgent issue but I will look into this. So leave it open.

flashydave commented 10 months ago

OK - Agree not urgent - but very painful if you have a lot of holes etc. My design required several hundred manual corrections which took many hours to rectify.

On 02:59, Tue 16 Jan 24, Darek L wrote:

I guess this issue is not only related to single tool, I think this should be general testing with expressions. Well, I am not sure this is urgent issue but I will look into this. So leave it open.

-- Reply to this email directly or view it on GitHub: https://github.com/dprojects/Woodworking/issues/32#issuecomment-1893515380 You are receiving this because you authored the thread.

Message ID: @.***>

dprojects commented 10 months ago

Can you add sample freeCAD file, with simple scenario, this will be easier to determine how to fix it

flashydave commented 10 months ago

2 files. First magic_drill.FCSd contains a simple spreadsheet controlling panel size Second magic_drill_with_holes.FCSd contains the same panel with MagicDriller used to create a series of holes on one face. If you look at the resulting panel constraints the parameterised dimensions these are now shown with their current values replacing the previous formula. Same with any sketch. Parameterised locations are replaced with absolute values at the time of the usage of magic drill. 2024.tar.gz

dprojects commented 10 months ago

I have improved the main Cube to Pad function. So now all the conversions should keep the expressions. Here is the video about it: https://www.youtube.com/watch?v=9_2S45Vb1-Y

Feel free to re-open this issue if there still problem related to this issue. Thanks.

flashydave commented 10 months ago

Thanks - great response and I liked the video! An interesting related problem is where you might want to keep the hole locations relative to the face upon which they were initially associated so that if that face is resized in X and Y or moves in the Z axis then the holes move accordingly based on the rules that defined where they initially placed.

Maybe there is an argument for X and Y remaining unchanged but I'm not sure you would often want the holes to stay in the same position if you change the face Z value.

I dont know if that is possible as I suspect might you lose that upon the cube to pad construction based on what the dialogue values where at the time. However if they could retain some essence of the spreadsheet expression from the face then any small adjustments can be made with a lot less manual editing of constraints.

Maybe something for some further development?

Thanks