TLDR: I want to export a polyline as obj but rhino always thinks its a bspline
Hello.
I have a Polyline in my Rhino File.
I want to export this polyline as an obj file.
In order to import it into another program (threejs) I need the obj file to adhere to the obj format specifications.
The polyline should export to an obj. file with this format:
. . .
v 0.000000 0.000000 -3.736486
v 2.571410 1.964406 1.868232
....
v 1.964382 3.178448 0.000000
l 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
It should first define vertices and then one single line object that lists the vertices in the order they appear in the polyline.
For some reason the polyline is always exported as a bspline curve no matter what settings I choose in the export options.
THe obj file looks like this:
v 5.8847417999999996 -9.2169456000000007 122.98487849999999
...
v -6.257246360000047 -9.860843650000044 123.81740572
cstype bspline
deg 1
curv 0 0.10000000000000001 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23...
Most programs cant interpret the .obj lines cstype bspline
, deg 1
and curv
. They are not part of the obj specification (see wikipedia)
This only happens for the actual polylines I want to export.
If I change just one control point of the polyline it exports correctly.
What would be the issue here?
How does changing a control point change how the curve is interpreted?
How can I force Rhino to always treat the curve as a polyline?
polyline_interpreted as bspline3.3dm (2.7 MB)