Path simulator bug?

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Giulio Buccini
Posts: 246
Joined: Fri Aug 26, 2016 9:07 pm

Path simulator bug?

Postby Giulio Buccini » Sat Jul 10, 2021 9:15 pm

I was just playing with the "Linear2D" array command to duplicate some circular pockets on a plane.
I noticed that if I try to simulate the path then only the milling ops on the first pocket are executed, the other pockets are ignored.

I missing something? :?
(I attach my file.)
working table MDF 1.0.FCStd
(142.39 KiB) Downloaded 7 times
---------------------------------------------------------
OS: Ubuntu 16.04.7 LTS (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.20.25065 (Git) AppImage
Build type: Release
Branch: master
Hash: 4de2ad46b2b9c78ac2721a0dbea7c19306261095
Python version: 3.9.4
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United States (en_US)
Attachments
Selection_7431.jpg
Selection_7431.jpg (29.71 KiB) Viewed 471 times
Russ4262
Posts: 715
Joined: Sat Jun 30, 2018 3:22 pm

Re: Path simulator bug?

Postby Russ4262 » Sat Jul 10, 2021 10:20 pm

Giulio Buccini wrote: Sat Jul 10, 2021 9:15 pm ... I noticed that if I try to simulate the path then only the milling ops on the first pocket are executed, the other pockets are ignored.

I missing something? :? ...
Afternoon from the sunny state of Oklahoma in the United States of America. I am taking a look at your file and the issue you are reporting. First test confirms your reported issue. I am now looking into the code for the cause.

Russell
Russ4262
Posts: 715
Joined: Sat Jun 30, 2018 3:22 pm

Re: Path simulator bug?

Postby Russ4262 » Sat Jul 10, 2021 10:41 pm

Me again.
The problem appears to be that the `Array` object lacks the `Active` property that other operations possess. I will see if I can identify a proper solution for this issue. Feel free to create a bug tracker ticket for this issue.

I currently have an open PR that refactors the `PathArray` module. If I identify a solution to this issue, I may append it to that PR.

Thanks for reporting the matter. Have a great afternoon.

Russell
Giulio Buccini
Posts: 246
Joined: Fri Aug 26, 2016 9:07 pm

Re: Path simulator bug?

Postby Giulio Buccini » Sun Jul 11, 2021 1:44 am

Hi Russel, 3:30 AM here in Germany.

Anyway the generated g-code seems ok to me. So it seems a problem of the simulator only. Can you confirm?

P.S.
Following the link you posted I read: "IMPORTANT: POST ONLY 0.19 BUG REPORTS"
I'm using version 0.20 ... :?
Russ4262
Posts: 715
Joined: Sat Jun 30, 2018 3:22 pm

Re: Path simulator bug?

Postby Russ4262 » Sun Jul 11, 2021 3:05 am

Giulio Buccini wrote: Sun Jul 11, 2021 1:44 am ... So it seems a problem of the simulator only. Can you confirm? ...
Good early German morning!
I can confirm the issue is isolated to the simulator.

I have added a simple fix, adding the `Active` property to the Array object, to the existing PR #4818, [Path] Refactor path array algorithm into independent PathArray class. I tested the fix and it does allow the simulator to include the Array object in the simulation. I also added the Path Array operation to the recognized list for the `Active` toggle in the Path WB toolbar since it will now have the dependent `Active` property for the toggle process.

Giulio Buccini wrote: Sun Jul 11, 2021 1:44 am ...
P.S.
Following the link you posted I read: "IMPORTANT: POST ONLY 0.19 BUG REPORTS"
I'm using version 0.20 ... :?
The bug does exist in 0.19 also. You are simply a very astute individual that uses the latest and greatest version. ;)

Have a great day. Thanks for making FreeCAD better.

Russell
Attachments
Simulator including the Array object
Simulator including the Array object
Snip macro screenshot-a07149.png (246.93 KiB) Viewed 398 times
Newly added `Active` property for `Array` objects
Newly added `Active` property for `Array` objects
Snip macro screenshot-deea19.png (268.64 KiB) Viewed 398 times
Giulio Buccini
Posts: 246
Joined: Fri Aug 26, 2016 9:07 pm

Re: Path simulator bug?

Postby Giulio Buccini » Sun Jul 11, 2021 9:16 am