OpenNURBS 3DM file support?

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
keithsloan52
Posts: 1361
Joined: Mon Feb 27, 2012 5:31 pm

Re: OpenNURBS 3DM file support?

Postby keithsloan52 » Tue Mar 24, 2020 3:40 pm

Okay fixed a number of errors but still get

Code: Select all

Import 3DM file : /home/keith/Example_3dm_files/V6/v6_rhino_logo.3dm
Import3DM Version 0.01
-----------------
Brep
is solid : True
is manifold : True
is surface : False
has 4 faces
has 4 surfaces
has 6 edges
<rhino3dm._rhino3dm.BrepFace object at 0x7f5bd1d63ed8>
None
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/keith/.FreeCAD/Mod/ImportNURBS/freecad/importNURBS/import3DM.py", line 27, in open
    process3DM(doc,filename)
  File "/home/keith/.FreeCAD/Mod/ImportNURBS/freecad/importNURBS/import3DM.py", line 165, in process3DM
    fi.parse_objects(doc)
  File "/home/keith/.FreeCAD/Mod/ImportNURBS/freecad/importNURBS/import3DM.py", line 55, in parse_objects
    obj = self.import_geometry(doc, self.f3dm.Objects[i].Geometry)
  File "/home/keith/.FreeCAD/Mod/ImportNURBS/freecad/importNURBS/import3DM.py", line 73, in import_geometry
    shapes.append(s.toShape())
<class 'AttributeError'>: 'NoneType' object has no attribute 'toShape'
Need a break for today - back tomorrow
User avatar
Chris_G
Posts: 1369
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: OpenNURBS 3DM file support?

Postby Chris_G » Tue Mar 24, 2020 4:15 pm

It's an indentation bug.
PR #1
keithsloan52
Posts: 1361
Joined: Mon Feb 27, 2012 5:31 pm

Re: OpenNURBS 3DM file support?

Postby keithsloan52 » Tue Mar 24, 2020 4:25 pm

Thanks - Committed your Pull request - rhino_logo now loads :-)
keithsloan52
Posts: 1361
Joined: Mon Feb 27, 2012 5:31 pm

Re: OpenNURBS 3DM file support?

Postby keithsloan52 » Tue Mar 24, 2020 7:46 pm

Hi Chris ( @Chris_G) If I look at what the Rhino file creates I see it has a number of Faces(Objects), but they seem to have been created as BSplineSurface objects. The Faces Objects don't seem to have any properties that can be changed/edited.

Would I be correct in that FreeCAD does not really support BSplineSurface Objects that one can change property and it redraw.
I am thinking one could create support for such objects with Part::PythonObjects.

There seem to be a number of workbenches that implement curves and surfaces, are you aware if they have implemented a BSplineSurface object?