Pocket operation cutting outside of area

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!
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Pocket operation cutting outside of area

Post by GeneFC »

The model is broken, regardless of the elegance used to construct it.

Fix the model, and further explorations into any possible flaws in the Path workbench can become productive.

Gene
hokieengr
Posts: 62
Joined: Sat Dec 31, 2016 5:09 pm

Re: Pocket operation cutting outside of area

Post by hokieengr »

I agree that if the model is invalid then the Path workbench is just the messenger in this case and I'm certainly not arguing that Path should work with invalid models. But what's confusing to me is that I still can't see any issue with the model. Bear with me here, I'm not challenging anyone!

I just opened the model again (downloaded from this thread) and get no warning or error messages printed anywhere. Furthermore, I selected the root object ("bad_pocket_operation"), "Mark to recompute", then hit the Recompute button. Here's the result:
Screenshot_2018-06-14_13-28-33.png
Screenshot_2018-06-14_13-28-33.png (206.87 KiB) Viewed 1315 times
Note a few things. For starters, the path is now correct! I think someone else noted similar behavior earlier in this thread. I had previously recomputed the geometry and the path jobs but not the whole document. So that's the first question (although I suspect the answer is something in the geometry pipeline before it gets to the Path workbench...)

Secondly, there is no indication anything is wrong even after recomputing everything. No red exclamation points, no error messages in the report, no error messages in the console. Without knowing what's going on under the hood, it would seem to the average user (read: me) that nothing is actually wrong. Thus I would expect Path to work in this case and assume it's a bug in Path when it doesn't.

Do you guys actually get error messages or other indications the geometry isn't valid?
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Pocket operation cutting outside of area

Post by chrisb »

If I load the file and perform a recompute-all everything looks good, except that the last pocket shows an error. That means, that the view of the this pocket cannot be recomputed, so I see the old version. Going back one step things are completely different:
Attachments
Bildschirmfoto 2018-06-14 um 22.44.34.png
Bildschirmfoto 2018-06-14 um 22.44.34.png (52.6 KiB) Viewed 1308 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Pocket operation cutting outside of area

Post by GeneFC »

I see exactly the same error after a complete recompute that chrisb shows.

The difference may be related to the difference in FC versions. I am using an officially sanctioned pre-release version, and I believe chrisb is also using such a version.

Your version (hokieengr) is some sort of mash-up of old OCC and new Python, so this may be relevant.

Gene
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Pocket operation cutting outside of area

Post by chrisb »

chrisb wrote: Thu Jun 14, 2018 1:24 pm Of course it should work, but as we have seen: it doesn't. So I pointed out a different way using operations as simple as possible. I will create a model tonight and it would be kind if you can try it.
Here is a proposal. It contains a master sketch which contains everything controlling the layout of the subsequent features. That makes it very robust. There is slightly too much in the master sketch, one rail would have been enough, I have modeled two because I didn't want to define half of the rail width.

Please try the Path generation, although I'm afraid after mlampert's find that it still will fail.
Attachments
PadAndPocketOnly.FCStd
(60.73 KiB) Downloaded 57 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Pocket operation cutting outside of area

Post by GeneFC »

Worked perfectly for me. Even the oddity at the crossover was gone.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13959 (Git)
Build type: Release
Branch: master
Hash: 2f18182b6dff87f8857787c854e39ca4d441f993
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)


Gene
hokieengr
Posts: 62
Joined: Sat Dec 31, 2016 5:09 pm

Re: Pocket operation cutting outside of area

Post by hokieengr »

chrisb wrote: Thu Jun 14, 2018 11:37 pm
chrisb wrote: Thu Jun 14, 2018 1:24 pm Please try the Path generation
Sadly still the same behavior as before. Even a full document recompute doesn't seem to fix it.
Screenshot_2018-06-14_20-51-31.png
Screenshot_2018-06-14_20-51-31.png (123.23 KiB) Viewed 1288 times
OS: Ubuntu 18.04 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13905 (Git)
Build type: Debug
Branch: master
Hash: e80b5678ccfa59a5222b91bdc7e748a53a468468
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.9.1.oce-0.18
Locale: English/UnitedStates (en_US)
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Pocket operation cutting outside of area

Post by chrisb »

Thanks anyway for trying (but you still used the outdated version).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
hokieengr
Posts: 62
Joined: Sat Dec 31, 2016 5:09 pm

Re: Pocket operation cutting outside of area

Post by hokieengr »

chrisb wrote: Fri Jun 15, 2018 5:58 am Thanks anyway for trying (but you still used the outdated version).
Sorry, I missed that you wanted me to try it with a different configuration. What would you like me to update?

In the meantime I rebuilt FC from the latest git master. Your file does cause an error (not sure if you expected that or not). See below:
updated_file_with_error_open.png
updated_file_with_error_open.png (111.21 KiB) Viewed 1258 times
You can see that I added the pocket operation again, recomputed everything, repeat, etc and same results as before. Note that I used "Offset" with a 50% set over. Zigzag works fine. Also, selecting the track face and running "Profile based on edges" results in the same straight line segment as the pocket.

I suspect this is the same issue as the one mlampert found.

OS: Ubuntu 18.04 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13971 (Git)
Build type: Debug
Branch: master
Hash: 8e4dd8ca8496595d4718dc24c872f7ed668b2521
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.9.1.oce-0.18
Locale: English/UnitedStates (en_US)
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Pocket operation cutting outside of area

Post by chrisb »

hokieengr wrote: Fri Jun 15, 2018 11:10 pm Your file does cause an error (not sure if you expected that or not).
I currently get this message on every model I load which contains a Path Job. I will update and try again.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply