jmplonka / InventorLoader

Workbench for FreeCAD to loads or import Autodesk (R) Inventor (R) files.
GNU General Public License v2.0
119 stars 17 forks source link

FreeCad crashes trying to import this file #59

Open bitingsock opened 2 years ago

bitingsock commented 2 years ago

Installed from the Addon Manager.

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * InventorLoader 1.3.0
  * sheetmetal 0.2.56

crash.log Fully parametric ball bearing.zip

jmplonka commented 2 years ago

It's because of an access violation caused by trying to generate a cone surface out of a revoluted line. eg:

import Part V = App.Vector
apex = V(0.0, 0.0, -65.00000000000001) center = V(0.0, 0.0, -26.25) major = V(38.75, 0.0, 0.0) axis = V(0.0, 0.0, -1.0) line = Part.Line(apex, center + major).toShape() line.revolve(center, axis, 360.0)

jmplonka commented 2 years ago

According to Chris_G, line has to be created not with Part.Line but rather with Part.LineSegment.

luzpaz commented 2 years ago

Can freecad python interpreter be adjusted to recognize this an output recommended command instead of crashing ?

numericOverflow commented 2 years ago

I've got a similar issue. FreeCad 0.20.1 crashes whenever I try to import the attached *.f3d file.

crash.log

f3d_files.zip The "Holder_v13.f3d" crashes freecad "Front_Rev_1_v9.f3d" doesn't crash freecad, but nothing gets converted.

OS: Windows 10 Version 2009 Word size of FreeCAD: 64-bit Version: 0.20.1.29410 (Git) Build type: Release Branch: releases/FreeCAD-0-20 Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563 Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3 Locale: English/United States (en_US) Installed mods:

luzpaz commented 1 year ago

@tomate44 do you mind weighing in again ?

Edit: https://github.com/jmplonka/InventorLoader/issues/59#issuecomment-1290668175

tomate44 commented 1 year ago

It is a OCCT crash that seem to happen here : https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Part/App/TopoShape.cpp#L2579 I tried to put the crashing function into a try/catch block, without luck. A more skilled dev should have a look.