Ticket #3626 - OpenSCAD import causing Multifusion failed

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
egil
Posts: 1
Joined: Tue Oct 09, 2018 2:17 pm

Ticket #3626 - OpenSCAD import causing Multifusion failed

Postby egil » Tue Oct 09, 2018 2:29 pm

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
Last edited by Kunda1 on Thu Sep 05, 2019 8:45 pm, edited 1 time in total.
Reason: Updated thread title with ticket number
keithsloan52
Posts: 976
Joined: Mon Feb 27, 2012 5:31 pm

Re: OpenSCAD import causing Multifusion failed

Postby keithsloan52 » Mon Oct 15, 2018 4:19 pm

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.
testTrans1.scad
(102 Bytes) Downloaded 16 times
testTrans2.scad
(62 Bytes) Downloaded 13 times
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.
User avatar
Kunda1
Posts: 5226
Joined: Thu Jan 05, 2017 9:03 pm

Re: OpenSCAD import causing Multifusion failed

Postby Kunda1 » Wed Nov 07, 2018 12:54 am

egil wrote:
Tue Oct 09, 2018 2:29 pm
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:
Might be worth trying FreeCAD 0.16 with you complicated file.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Kunda1
Posts: 5226
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #3626 - OpenSCAD import causing Multifusion failed

Postby Kunda1 » Thu Sep 05, 2019 8:45 pm

bumped this issue to 0.19 milestone
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features