Bug 1763369

Summary: FreeCAD using opencascade, and the sheet metal add on gets an error trying to use the version included in Fedora
Product: [Fedora] Fedora Reporter: Andrig Miller <andrig.t.miller>
Component: freecadAssignee: Richard Shaw <hobbes1069>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 30CC: cz172638, hobbes1069, john, luzpaz
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: freecad-0.18.4-1.fc30 freecad-0.18.4-1.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-18 01:17:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrig Miller 2019-10-19 00:16:24 UTC
Description of problem:

Using the sheetmetal add-on in FreeCAD (installed through the add-on manager), when you create a sheet metal project, and then unfold it, it unfolds it, but fails creating the bend lines for the flattened model, and it gets the following exception:

Unfold successful
19Standard_OutOfRange No OCCT Exception Message
Traceback (most recent call last):
  File "/home/andrigtmiller/.FreeCAD/Mod/sheetmetal/SheetMetalUnfolder.py", line 2871, in accept
    grp2 = Drawing.projectEx(co, norm)
<class 'Part.OCCError'>: 19Standard_OutOfRange No OCCT Exception Message

Version-Release number of selected component (if applicable):


How reproducible:

Every time you Unfold a sheet metal project.

Steps to Reproduce:
1. Install the sheetmetal add-on through the add-on manager.
2. Restart FeeCAD.
3. Create a 3D sheet metal project with bends, using the sheetmetal add-on.
4. Select the proper place in the model, and press the unfold icon.
5. You get a flattened, or unfolded object, but without the bend lines.

Actual results:

Unfold object is created, but without the bend lines.

Expected results:

Unfold object is created, and has the bend lines for each bend in the model.

Additional info:

It seems like, based on the FreeCAD forums that it works fine for basically everyone that has posted, except for me, and they are either using the AppImage, or another OS like Windows or Mac.

The version of Open Cascade seems to be the issue.  Currently Fedora is using Open Cascade 6.9.1 oce 0.18, and these are very old.

The AppImage from the FreeCAD website reports that it is using Open Cascade 7.3.0.  There is an even newer release, but all I need is an upgrade to the open cascade packages to at least 7.3.0, and I believe this problem will go away.

Comment 1 luzpaz 2019-10-19 13:51:54 UTC
Devs, 
To summarize, OCC is also needed to be packaged not just OCE.
The latest stable was just recently releases, it is v7.4.0
https://repology.org/project/opencascade/badges

Comment 2 Richard Shaw 2019-10-21 13:36:04 UTC
I new this day was coming but trying to avoid it. One problem with opencasecade is that while they did finally choose a real open source license several years ago, downloading the source requires a login which is incompatible with Fedora infra tools. Additionally the packaging is non-trivial and my free cycles have been few as of late.

I'll ask on the devel list if the login requirement is a show stopper or not.

Comment 3 Richard Shaw 2019-10-22 12:54:23 UTC
Ok, source issue resolved. I got it compiling but at least two issues remain:

1. cmake is not finding tcl or tk even though the appropriate development packages are installed and the OCE fork didn't have this issue.
2. They are doing some nasty stuff during install with hard coded directories which is incompatible with package building.

May take me a bit to work through the issues.

Comment 4 Richard Shaw 2019-11-05 16:26:12 UTC
Just and FYI, opencascade is now building. Once complete I'll build FreeCAD 0.18.4 with it and create releases. 

I am also experimenting with building with Coin4 even though some of the other FreeCAD dependencies (SoQt) is still linked with Coin3. No clue if that's going to blow up or not but as things are already broken...

Comment 5 Andrig Miller 2019-11-05 16:58:56 UTC
Sounds good, and I appreciate you untangling to knot here ;-)

Comment 6 Fedora Update System 2019-11-07 13:35:08 UTC
FEDORA-2019-ec1247a71d has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-ec1247a71d

Comment 7 Fedora Update System 2019-11-07 13:35:16 UTC
FEDORA-2019-1ff1241c0f has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-1ff1241c0f

Comment 8 Fedora Update System 2019-11-09 23:20:28 UTC
freecad-0.18.4-1.fc31, opencascade-7.4.0-2.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-1ff1241c0f

Comment 9 Fedora Update System 2019-11-10 00:39:16 UTC
freecad-0.18.4-1.fc30, opencascade-7.4.0-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-ec1247a71d

Comment 10 Fedora Update System 2019-11-18 01:17:48 UTC
freecad-0.18.4-1.fc30, opencascade-7.4.0-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2019-11-18 01:36:51 UTC
freecad-0.18.4-1.fc31, opencascade-7.4.0-2.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2019-11-18 22:47:20 UTC
freecad-0.18.4-1.fc31, opencascade-7.4.0-2.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.