3D pocket anomaly

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!
User avatar
freman
Veteran
Posts: 2198
Joined: Tue Nov 27, 2018 10:30 pm

3D pocket anomaly

Post by freman »

Hi,

I just made 3d pocket path and it looks as expected, except for one line which plunges through the base of the model a clears a small rectangle.
The anomalous line can be seen lower right in the screenshot.

Is there some anomaly in my 3D model which is causing this, it looks fine to me ?

Thanks.



OS: Fedora 34 (Thirty Four) (LXQt//usr/share/xsessions/lxqt)
Word size of FreeCAD: 64-bit
Version: 0.20.26155 (Git)
Build type: Release
Branch: master
Hash: 0926a4148bcff11249fd4f56bc30256102ffe105
Python version: 3.9.7
Qt version: 5.15.2
Coin version: 4.0.0a
OCC version: 7.5.0
Locale: English/United Kingdom (en_GB)
Attachments
3Dpocket-anomaly.png
3Dpocket-anomaly.png (5.19 KiB) Viewed 2819 times
3Dpocket-anomaly.FCStd
(132.25 KiB) Downloaded 28 times
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: 3D pocket anomaly

Post by chrisb »

Preliminary remarks not directly related to your issue:
It is always appreciated if you upload simplified models which show exactly the issue and nothing else. That's much less time for the helpers than just throwing a complete model over the fence.

Furthermore you should work on your sketching. Placing the whole model centered around the origin would have made things much easier. And probably better. I guess that in sketch under-cut-profile-Sketch the center of the arc should be on the symmetry line as well. Alas, it is more than a mm off, as the driven dimension at the top shows:
SnipScreenshot-f6f4cc.png
SnipScreenshot-f6f4cc.png (19.76 KiB) Viewed 2771 times
I'm still working on the issue, at least to simplify the model, so that the experts can help.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: 3D pocket anomaly

Post by chrisb »

Here is a simplified model still showing the same issue.

Edit: replaced by something even simpler
Attachments
3Dpocket-simplified_cb.FCStd
(32.82 KiB) Downloaded 30 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2198
Joined: Tue Nov 27, 2018 10:30 pm

Re: 3D pocket anomaly

Post by freman »

Thanks for taking a look Chis.

I had not noticed that line was off. Good catch. Earlier I had the symmetry constraint on the ends of the arc and this was leading to an inaccuracy. When I removed the sym that vertical line went off to one side and I had to apply a vertical constraint. I think that must have shifted something off screen which I did not notice. I was a bit surprised it went off vertical because even if the implicit vertical of sym was removed, it should have stayed were it was.

I did not bother stripping it down because my initial expectation was I may be doing something wrong.

Anyway, it does seem like there is an issue there. It seems that small uninteded offset is triggering a bug in the pocket algorithm.
Thanks for the stripped down example.

BTW, the reason this is not centred on y axis is because I am replicating an existing part. The defining feature is the outer rectangle, so that is where I put the axes. There is no physical centre line on the part so nothing is measured relative to that. The order of construction was based on pinning down dimensions until I had it replicated.
User avatar
freman
Veteran
Posts: 2198
Joined: Tue Nov 27, 2018 10:30 pm

Re: 3D pocket anomaly

Post by freman »

Just for reference, here is the earlier version of the file before I moved the symmetry constraint. Here the arc centre was still on the centre line and it does not produce the buggy 3Dpocket path.
Attachments
3DpocketOK.FCStd
(183.42 KiB) Downloaded 29 times
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: 3D pocket anomaly

Post by chrisb »

freman wrote: Sun Nov 28, 2021 7:55 am Just for reference, here is the earlier version of the file before I moved the symmetry constraint. Here the arc centre was still on the centre line and it does not produce the buggy 3Dpocket path.
I will have another look later, but would be happy if someone knowing better can jump in.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2198
Joined: Tue Nov 27, 2018 10:30 pm

Re: 3D pocket anomaly

Post by freman »

Thanks Chris, it's not a current problem for me since I've corrected the model and used 3Dsurface instead.

However, this particular geometry clearly has exposed a bug which ought to be looked at.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: 3D pocket anomaly

Post by chrisb »

I replaced the file in the post above by something even simpler. It contains only a single pad, but shows the same defect:
Attachments
SnipScreenshot-48feae.png
SnipScreenshot-48feae.png (14.65 KiB) Viewed 2483 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2198
Joined: Tue Nov 27, 2018 10:30 pm

Re: 3D pocket anomaly

Post by freman »

Nice work, stripped down to the essentials and a bit more asymmetry to make it clearer what is happening. That breakthrough plane is more than a glitch now. That should help a lot.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: 3D pocket anomaly

Post by chrisb »

One advantage is, that it is clearer now that the model doesn't have any hidden defects.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply