I believe I have found an issue with OpenSCAD imports. I found it when working with a rather complex script, with many parameters, but I was able the to isolate the issue to this:
translate([1,0,0]) if (0) cube();
translate([2,0,0]) if (0) cube();
translate([3,0,0]) if (1) cube();
(As mentioned, the original script was more complex, with this appearing in a for loop with parameters controlling the if-sentences, but that turned out not to be important)
Importing this (or running it in the workbench) causes a "Multifusion failed" exception.
One can even simplify it to this case:
translate([1,0,0]) if (0);
translate([2,0,0]) if (0);
cube();
Same problem. If you remove the middle line, or the if (0) or the translate, it behaves all right. Pretty sure this is a bug, so I filed one: issue #3626
Ticket #3626 - OpenSCAD import causing Multifusion failed
Ticket #3626 - OpenSCAD import causing Multifusion failed
Last edited by Kunda1 on Thu Sep 05, 2019 8:45 pm, edited 1 time in total.
Reason: Updated thread title with ticket number
Reason: Updated thread title with ticket number
-
- Veteran
- Posts: 2683
- Joined: Mon Feb 27, 2012 5:31 pm
Re: OpenSCAD import causing Multifusion failed
First of all WELL DONE in tracking the problem down and making the effort to produce a small test scenario
from which I created the following test files. I have taken a quick look at this problem and have updated the details in the bug tracker.
https://freecadweb.org/tracker/view.php?id=3626
Basically, I think that this is a regression in the Part MultiFuse function of FreeCAD 0.17.
The test files I created see bug tracker fail in FreeCAD 0.17 with Exception MultiFusion Failure.
But the same files DO NOT fail in FreeCAD 0.16.
For the versions, I was using see bug tracker
I don't think there is any related difference between importCSG.py in FreeCAD 0.16 and FreeCAD 0.17 so this points to a regression in FreeCAD 0.17 in the Part::MultiFuse function.
That is the problem is not in the OpenSCAD workbench or importCSG.py but a problem introduced in FreeCAD 0.17 to the Part Multifuse code.
The error is being generated when importCSG.py tries to execute myfuse = doc.addObject('Part::MultiFuse',name)
Might be worth trying FreeCAD 0.16 with you complicated file.
from which I created the following test files. I have taken a quick look at this problem and have updated the details in the bug tracker.
https://freecadweb.org/tracker/view.php?id=3626
Basically, I think that this is a regression in the Part MultiFuse function of FreeCAD 0.17.
The test files I created see bug tracker fail in FreeCAD 0.17 with Exception MultiFusion Failure.
But the same files DO NOT fail in FreeCAD 0.16.
For the versions, I was using see bug tracker
I don't think there is any related difference between importCSG.py in FreeCAD 0.16 and FreeCAD 0.17 so this points to a regression in FreeCAD 0.17 in the Part::MultiFuse function.
That is the problem is not in the OpenSCAD workbench or importCSG.py but a problem introduced in FreeCAD 0.17 to the Part Multifuse code.
The error is being generated when importCSG.py tries to execute myfuse = doc.addObject('Part::MultiFuse',name)
Might be worth trying FreeCAD 0.16 with you complicated file.
Re: OpenSCAD import causing Multifusion failed
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Ticket #3626 - OpenSCAD import causing Multifusion failed
bumped this issue to 0.19 milestone
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Ticket #3626 - OpenSCAD import causing Multifusion failed
This is not failing for me in:
OS: Windows 10 Version 2004
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23971 (Git)
Build type: Debug
Branch: master
Hash: a3fb41502b079a86175e6a414d82956a48bab4e2
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
OS: Windows 10 Version 2004
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23971 (Git)
Build type: Debug
Branch: master
Hash: a3fb41502b079a86175e6a414d82956a48bab4e2
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)