v0.19 PATH, pocket, extend corners -> not all corners extended

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
DomCa
Posts: 33
Joined: Tue Nov 05, 2019 9:00 pm

v0.19 PATH, pocket, extend corners -> not all corners extended

Post by DomCa »

Hi all,

I am using:
OS: Linux Mint 19.1 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18829 (Git) AppImage
Build type: Release
Branch: master
Hash: 186d52ffd47696fadcd91369365e97f084051e7b
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)

In Path I want to extend the corners of a face. However, not all corners are extended, only one. If I do not select extend corners but try to extend the edges, I cannot fully path the surface and some rest remains in the corners.

Is the behaviour of "extend corners" correct or is this a bug?
Bildschirmfoto vom 2019-12-07 13-49-10.png
Bildschirmfoto vom 2019-12-07 13-49-10.png (194.64 KiB) Viewed 2022 times
Bildschirmfoto vom 2019-12-07 13-49-37.png
Bildschirmfoto vom 2019-12-07 13-49-37.png (197.01 KiB) Viewed 2022 times


Is there maybe any other way of milling the steps?

Thanks
DomCa
Attachments
Spannpratzen.FCStd
(59.32 KiB) Downloaded 47 times
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: v0.19 PATH, pocket, extend corners -> not all corners extended

Post by chrisb »

I guess you are talking about the operation Pocket_Shape in your model. I can confirm that one corner is missing; I even tried enlarging the stock.
As a workaround you can use a dogbone dressup:
Snip macro screenshot-2e0078.png
Snip macro screenshot-2e0078.png (1.54 KiB) Viewed 2003 times
BTW: To identify a bug it is always helpful to reduce uploaded files to a minimum so that they clearly show the issue, because it takes some additional time, even if it is not much, for everyone looking at your file, if it contains irrelevant stuff.
Attachments
Spannpratzen_cb.FCStd
(40.98 KiB) Downloaded 58 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
DomCa
Posts: 33
Joined: Tue Nov 05, 2019 9:00 pm

Re: v0.19 PATH, pocket, extend corners -> not all corners extended

Post by DomCa »

Hi chrisb!

Thanks for your analysis and tips.

I am not a developer. But if this is a bug, should I at least file a bug report somewhere?

Thanks
DomCa
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: v0.19 PATH, pocket, extend corners -> not all corners extended

Post by chrisb »

We should wait for a developer to comment. I will move it to Path subforum.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: v0.19 PATH, pocket, extend corners -> not all corners extended

Post by mlampert »

DomCa wrote: Sat Dec 07, 2019 2:20 pm Is the behaviour of "extend corners" correct or is this a bug?
Definitely a bug - if you want to file an issue please go ahead.

Edit: thanks chrisb for moving it to the Path forum - much appreciated!
chrisb
Veteran
Posts: 54213
Joined: Tue Mar 17, 2015 9:14 am

Re: v0.19 PATH, pocket, extend corners -> not all corners extended

Post by chrisb »

A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
IMback!
Posts: 72
Joined: Sat Jul 13, 2019 9:40 pm

Re: v0.19 PATH, pocket, extend corners -> not all corners extended

Post by IMback! »

yes this has issues previously documented here: https://forum.freecadweb.org/viewtopic. ... 21#p323521
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: v0.19 PATH, pocket, extend corners -> not all corners extended

Post by freman »

This problem can be solved by my fix for boundarybox.

I have not put in a PR yet since, though it's pretty trivial, it needs a bit of testing first.

Code: Select all

class StockFromBase(Stock):

    def __init__(self, obj, base):
        "Make boundaryBox"
        obj.addProperty("App::PropertyLink", "Base", "Base", QtCore.QT_TRANSLATE_NOOP("PathStock", "The base object this stock is derived from"))
        obj.addProperty("App::PropertyDistance", "ExtXneg", "Stock", QtCore.QT_TRANSLATE_NOOP("PathStock", "Extra allowance from part bound box in negative X direction"))
        obj.addProperty("App::PropertyDistance", "ExtXpos", "Stock", QtCore.QT_TRANSLATE_NOOP("PathStock", "Extra allowance from part bound box in positive X direction"))
        obj.addProperty("App::PropertyDistance", "ExtYneg", "Stock", QtCore.QT_TRANSLATE_NOOP("PathStock", "Extra allowance from part bound box in negative Y direction"))
        obj.addProperty("App::PropertyDistance", "ExtYpos", "Stock", QtCore.QT_TRANSLATE_NOOP("PathStock", "Extra allowance from part bound box in positive Y direction"))
        obj.addProperty("App::PropertyDistance", "ExtZneg", "Stock", QtCore.QT_TRANSLATE_NOOP("PathStock", "Extra allowance from part bound box in negative Z direction"))
        obj.addProperty("App::PropertyDistance", "ExtZpos", "Stock", QtCore.QT_TRANSLATE_NOOP("PathStock", "Extra allowance from part bound box in positive Z direction"))

I put an external profile on the second step down and applied a boundaryBoxDressup. This gives the correct path , one straight cut with the 6mm tool, along the outer edge of the 3mm step, going full length. Extending the box +3 in each direction gets the path I think OP was looking for.

I guess this counts as a bit more testing.
Attachments
path-fixer-step+3.png
path-fixer-step+3.png (3.43 KiB) Viewed 1863 times
path-fixer-steps.png
path-fixer-steps.png (2.55 KiB) Viewed 1863 times
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: v0.19 PATH, pocket, extend corners -> not all corners extended

Post by freman »

hey, I've just realised what them thar Spanpratzen are. I'll think a make a couple tomorrow. Thanks for the idea.

Here's the next question: how to cut his little brother?

I think the short answer is hand gcode, but I'd like to know if anyone can do it in FC without it being 10 times the last answer. I tried the 3D tools but didn't have much luck. It would be nice to have a tool which could walk round something like that. Maybe waterline when it matures, or extensions , if they worked as planned.
Attachments
clamp-support.png
clamp-support.png (7.16 KiB) Viewed 1840 times
clamp-support.FCStd
(27.68 KiB) Downloaded 38 times
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: v0.19 PATH, pocket, extend corners -> not all corners extended

Post by freman »

Well I tried putting pockets on all those steps on the clamp support block above and the extensions worked fine.

That's great news in itself, but makes it seem a bit odd that OP could not get proper extensions on what looks like essentially the same kind of stepped form and I get the same problem replicated using his model.

Now I did my sketch a little differently since the solver seems a bit ill-conditioned if you use all horizontal and vertical constraints. It easily flips to a solution where some the steps go backwards and its quite messy to get the back into an orderly staircase again. I used angles ( which have a direction ) and one distance ( which has a direction ) This seemed to help the solver pin it down correctly.

However, presumably once the 3d model is established, this should not affect the geometry of the wires and how extensions are created nor be a factor in the extension bug.

Can anyone see why this model works perfectly and the OP's model fails to get the right extensions? Maybe comparing the two will shed some light on the bug.

BTW I've use 3mmx4mm steps which gives a 3-4-5 pythagorean triangle and a 53 deg. block.
Attachments
staircase-pocket-extensions.png
staircase-pocket-extensions.png (3.53 KiB) Viewed 1786 times
clamp-support.FCStd
(60.03 KiB) Downloaded 40 times
Post Reply