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

Demo-Status-0.4.2.ipt broken with STRATEGY_STEP #68

Closed marcocecchiscmgroup closed 1 year ago

marcocecchiscmgroup commented 1 year ago

In the latest version, actually starting from 2/3 commits before, in the same point there acisFace is: face $12 472 $-1 $13 $14 $6 $-1 $15 forward single #

which is then now parsed as a Part.SurfaceOfRevolution. Before it was not, it has to do with the ready_to_build thing.

Also, if (isinstance(shape, Part.SurfaceOfRevolution)): return _createSurfaceRevolution(surface.profile, surface.center, surface.axis, acisFace.sense)

gives exception because surface.center does not exist. surface is rot_spl_spur, maybe you meant surface.profile.center? But the question is how the surface is now seen as a SurfaceRevolution and not a BSpline anymore.

So, after fixing with: return _createSurfaceRevolution(surface.profile, surface.profile.center, surface.profile.axis, acisFace.sense)

another error shows up:

File "D:\InventorLoader-74cf2faec5da6e7db6f48ab4e669f345dacf393b\Acis.py", line 1684, in build self.shape = self._surface.build() File "D:\InventorLoader-74cf2faec5da6e7db6f48ab4e669f345dacf393b\Acis.py", line 2705, in build self.shape = Part.Cylinder(circle).toShape() TypeError: init() takes 1 positional argument but 2 were given

after fixing this latter as well, the converted STEP file is wrong: it misses many surfaces, while the previous versions worked well.

It looks as though many regressions have been made while doing the latests fixes. Can you please manage?

Thanks a lot.

marcocecchiscmgroup commented 1 year ago

The breaking change started with commit cba87fd9889a0ef27fa5037487e470a7a34462c7

luzpaz commented 1 year ago

CC @jmplonka

jmplonka commented 1 year ago

should be fixed now with commit 1d4da

marcocecchiscmgroup commented 1 year ago

Confirmed. Very good that you removed the dependencies from Part in Acis2Step.py/_createSurfaceFaceShape(), which now only looks at the parsed ACIS.