This question already has an answer here:

I have encountered some difficulties getting BSplineSurface to export to STL.

The following code works and generates a triangulated polygon mesh from the NURBS spline (adapted from a BSplineSurface example):

cpts = Table[{i, j, RandomReal[{-1, 1}]}, {i, 4}, {j, 4}];
b = Graphics3D[BSplineSurface[cpts]]
Export["surface.stl", b, "STL"]

However, decreasing the number of control points in each dimension from 4 to 3

cpts = Table[{i, j, RandomReal[{-1, 1}]}, {i, 3}, {j, 3}];
b = Graphics3D[BSplineSurface[cpts]]
Export["surface.stl", b, "STL"]

results in

GeometricFunctions`BSplineSurface::deglen: -- Message text not found -- (3)
Export::nodta: Graphics3D contains no data that can be exported to the STL format. >>

(Mathematica version 10).

Why is the success of exporting a BSplineSurface to STL dependent on the number of control points? Is there a reliable way to get arbitrary spline surfaces to export to STL? Convert Graphics3D containing BSpline to polygon primitives for export to 3DS? seems somewhat related though not identical. I am aware that Mathematica cannot actually export NURBS surfaces, so a triangulation will suffice, just as it happens already for the surface with 16 control points.


marked as duplicate by J. M. is away Aug 31 '17 at 15:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ This question that you linked provides a way to export to stl. $\endgroup$ – Öskå Aug 11 '14 at 10:21

Browse other questions tagged or ask your own question.