Export of polyline to obj crashes

Hi!

Have problems with exporting ONLY line/polyline object to *.obj (Rhino 6 and Rhino 7).
It crashes with message: “The file writting plug-in failed”.

If I use same scene and just add any mesh (_SrfPt) export works. File containes the line and a mesh.

Ideas what can be wrong in first option (no mesh):

  • it crashes before dialog “Polygon Mesh Options”, so maybe error is inside dialog (that was idea, why I even tried to add aditional mesh to test at first place)

And I often have this use case, so just exporting with additional mesh and then deleting it inside seperate program (notepad, any other 3d program) is not acceptable solution.

Error:

Ok:

SystemInfo:

Rhino 7 SR4 2021-3-8 (Rhino 7, 7.4.21067.13001, Git hash:master @ ed629035202f07e8b84a3ee211479ca20bb81b73)
License type: Commercial, build 2021-03-08
License details: Cloud Zoo

Windows 10.0.19042 SR0.0 or greater (Physical RAM: 32Gb)

Computer platform: DESKTOP 

Standard graphics configuration.
  Primary display and OpenGL: NVIDIA Quadro P400 (NVidia) Memory: 2GB, Driver date: 11-20-2020 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 457.49
> Accelerated graphics device with 4 adapter port(s)
    - Windows Main Display attached to adapter port #0
    - Secondary monitor attached to adapter port #1

OpenGL Settings
  Safe mode: Off
  Use accelerated hardware modes: On
  Redraw scene when viewports are exposed: On
  
  Anti-alias mode: 4x
  Mip Map Filtering: Linear
  Anisotropic Filtering Mode: High
  
  Vendor Name: NVIDIA Corporation
  Render version: 4.6
  Shading Language: 4.60 NVIDIA
  Driver Date: 11-20-2020
  Driver Version: 27.21.14.5749
  Maximum Texture size: 32768 x 32768
  Z-Buffer depth: 24 bits
  Maximum Viewport size: 32768 x 32768
  Total Video Memory: 2 GB

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino
  C:\Program Files\Rhino WIP\Plug-ins\Commands.rhp	"Commands"	7.4.21067.13001
  C:\Program Files\Rhino WIP\Plug-ins\rdk.rhp	"Renderer Development Kit"	
  C:\Program Files\Rhino WIP\Plug-ins\export_ACAD.rhp	"AutoCAD file export : export_ACAD"	
  C:\Program Files\Rhino WIP\Plug-ins\export_OBJ.rhp	"export_OBJ"	7.4.21067.13001
  C:\Program Files\Rhino WIP\Plug-ins\RhinoRenderCycles.rhp	"Rhino Render"	7.4.21067.13001
  C:\Program Files\Rhino WIP\Plug-ins\rdk_etoui.rhp	"RDK_EtoUI"	7.4.21067.13001
  C:\Program Files\Rhino WIP\Plug-ins\rdk_ui.rhp	"Renderer Development Kit UI"	
  C:\Program Files\Rhino WIP\Plug-ins\import_ACAD.rhp	"AutoCAD file import: import_ACAD"	
  C:\Program Files\Rhino WIP\Plug-ins\NamedSnapshots.rhp	"Snapshots"	
  C:\Program Files\Rhino WIP\Plug-ins\RhinoCycles.rhp	"RhinoCycles"	7.4.21067.13001
  C:\Program Files\Rhino WIP\Plug-ins\Toolbars\Toolbars.rhp	"Toolbars"	7.4.21067.13001
  C:\Program Files\Rhino WIP\Plug-ins\3dxrhino.rhp	"3Dconnexion 3D Mouse"	
  C:\Program Files\Rhino WIP\Plug-ins\Displacement.rhp	"Displacement"	

Thanks, Jure

Hi Jure - I tried exporting a single line here and didn’t run into this issue. Is it file-specific on your end?
Also, please run the Rhino SystemInfo command and copy-paste the result here.
-wim

Hi!

Thanks for answer, writing additional details actually help me to found a solution.
On “OBJ Export Options” in “Geometry” tab one must choose correct surface options even if there is no surfaces at all. I think that option to use “NURBS objects” fixes everything. And thing that crashes is “Polygon mesh objects” especialy when there is none.

Still think that option “Polygon mesh objects” should not crash - but at least my case is covered.

And as subquestion - 2 point line is always represented as “cstype bspline”:

v 0 0 0
v 1 0 0
cstype bspline
deg 1
curv 0 1 5 6
parm u 0 0 1 1
end

I suppose ther is no option in dialog for compact most simple format (“l”):

v 0 0 0
v 1 0 0
l 0 1

Thanks, Jure

Hi Jure -

Technically, it does not crash, it fails. But, yes, based on what it says in that dialog box, I would expect that to work as well and put it on the list as RH-63530.
Thanks,
-wim

RH-63530 is fixed in the latest Rhino 7 Service Release Candidate

Hello,
I see the bug has been fixed (thanks) but, as Jure already pointed out, the polyline is always exported as spline with deg=1 instead of a simple line.
I understand it is not a bug, but I would like to have the exported file with only vertex (“v”) and lines (“l”) because I am trying to use it in OpenFoam, which only supports lines, not spline.
So, is there a way to export as lines instead of spline?
If not possible in the current release, will it be possible in the future releases?
Thanks
Fabio

@tim - is this possible? Write polylines as obj polylines?
@dangeli.fabio - it looks like this is possible and should be added fairly soon
RH-64427 Add option to export polylines as a series of lines in OBJ

-Pascal