Bug: Assembly 4 and Path job creation incompatability

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!
Post Reply
I_am_the_Carl
Posts: 1
Joined: Mon May 29, 2023 6:25 am
Contact:

Bug: Assembly 4 and Path job creation incompatability

Post by I_am_the_Carl »

Okay, maybe a bug. I'll let you guys confirm or deny that.

First all the version information:

Code: Select all

OS: Pop!_OS 22.04 LTS (pop:GNOME/pop)
Word size of FreeCAD: 64-bit
Version: 2023.521.0.14555 (Git shallow) AppImage
Build type: Release
Branch: HEAD
Hash: f428979aa87456d1ce57e2ea78ee9d70dc7595e4
Python 3.11.3, Qt 5.15.8, Coin 4.0.1, Vtk 9.2.5, OCC 7.7.1
Locale: English/United States (en_US)
Installed mods: 
  * freecad.gears 1.0.0
  * Assembly4 0.50.2
Did I find this issue when searching the forum? No.
Did I find this issue when searching the issue tracker? No, not in the FreeCAD issue tracker or the Assembly 4 issue tracker.

The issue I am having:
The exact error I get depends on the version of FreeCAD I use but it all relates to Assembly 4's Local Coordinate Systems. If one is present in the project tree, the "Job" button (in the Paths workbench) will fail to create a job. Remove all local coordinate systems and the job button works just fine.

I enabled all of the logging and have gotten the following error message and stack trace:

Code: Select all

02:46:25  Origin "DrumGear#Origin" doesn't contain feature with role "XY_Plane"
02:46:25  Origin "DrumGear#Origin" doesn't contain feature with role "XY_Plane"
02:46:25  Job.ERROR: creation of box failed
02:46:25  Traceback (most recent call last):
02:46:25    File "/tmp/.mount_FreeCAIZrmJ1/usr/Mod/Path/Path/Main/Gui/Job.py", line 1643, in Create
    obj = PathJob.Create("Job", base, template)
02:46:25    File "/tmp/.mount_FreeCAIZrmJ1/usr/Mod/Path/Path/Main/Job.py", line 863, in Create
    obj.Proxy = ObjectJob(obj, models, templateFile)
02:46:25    File "/tmp/.mount_FreeCAIZrmJ1/usr/Mod/Path/Path/Main/Job.py", line 240, in __init__
    self.setupStock(obj)
02:46:25    File "/tmp/.mount_FreeCAIZrmJ1/usr/Mod/Path/Path/Main/Job.py", line 388, in setupStock
    obj.Stock = PathStock.CreateFromBase(obj)
02:46:25    File "/tmp/.mount_FreeCAIZrmJ1/usr/Mod/Path/Path/Main/Stock.py", line 390, in CreateFromBase
    obj.Proxy.execute(obj)
02:46:25    File "/tmp/.mount_FreeCAIZrmJ1/usr/Mod/Path/Path/Main/Stock.py", line 222, in execute
    shape = Part.makeBox(self.length, self.width, self.height, self.origin)
02:46:25  Part.OCCDomainError: creation of box failed
And you can find that exact problematic line on github: https://github.com/FreeCAD/FreeCAD/blob ... ck.py#L222
I think this has to do with the creation of the stock but I haven't dug quite that deep into it yet.

So, is this a bug?
If yes, which issue tracker do I report it on? I suspect assembly 4 since I've tried with a few older versions of FreeCAD and gotten very different errors relating to missing fields, which makes me think there's something wrong with the local coordinate system objects.

Edit: Clarified which workbench the jobs button is under to improve clarity.
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Bug: Assembly 4 and Path job creation incompatability

Post by Zolko »

I_am_the_Carl wrote: Mon May 29, 2023 6:54 am it all relates to Assembly 4's Local Coordinate Systems. If one is present in the project tree, the "Job" button (in the Paths workbench) will fail to create a job. Remove all local coordinate systems and the job button works just fine.
The LCS that Assembly4 uses are standard FreeCAD PartDesign Datum objects. Can you try to make a Path job based on a PartDesign::Body with a PartDesign::CoordinateSystem, without using Assembly4 ?
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Bug: Assembly 4 and Path job creation incompatability

Post by Zolko »

I_am_the_Carl wrote: Mon May 29, 2023 6:54 am First all the version information:

Code: Select all

Version: 2023.521.0.14555 (Git shallow) AppImage
The exact error I get depends on the version of FreeCAD I use
You're using LinkStage version. I just tried with FreeCAD 0.19 and 0.21 and they both work : I can create an assembly, create a Body, import the Body, and create a job and contour on that Body.
path_lcs.png
path_lcs.png (318.69 KiB) Viewed 2693 times
try the Assembly4 workbench for FreCAD — tutorials here and here
Post Reply