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.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
egil
Posts: 4
Joined: Tue Oct 09, 2018 2:17 pm

Ticket #3626 - OpenSCAD import causing Multifusion failed

Post by egil »

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
Veteran
Posts: 2756
Joined: Mon Feb 27, 2012 5:31 pm

Re: OpenSCAD import causing Multifusion failed

Post by keithsloan52 »

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 49 times
testTrans2.scad
(62 Bytes) Downloaded 42 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
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: OpenSCAD import causing Multifusion failed

Post by Kunda1 »

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.
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
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #3626 - OpenSCAD import causing Multifusion failed

Post by Kunda1 »

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
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Ticket #3626 - OpenSCAD import causing Multifusion failed

Post by chennes »

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)
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply