Note: cross-posted in stackoverflow as well. Would this be OK?

I have a very fine mesh (STL) of some organic shapes (e.g., a bone) and would like to convert it to a few patches of NURBS, which will be much smoother with reasonable simplification.

I can do this manually with Solidworks ScanTo3D function, but it is not scriptable. It's a pain when I need to do hundreds of them.

Would there be a way to automate it, e.g., with blender or some other open source libraries available? I am perfectly fine with quite some loss in accuracy. I use mainly Python, but I don't mind if it is in other languages and I can work my way around it.

Note that one thing I'd like to avoid is to convert an STL of 10,000 triangles to a NURBS with 10,000 patches. I'd like to automatically (programmatically, could be with some parameter tunings) divide the mesh into a few patches and then fit it. Again, I'm perfect fine with quite some loss in accuracy.

  • 1
    $\begingroup$ Sounds like something that might be possible through Python scripting, but I don't know enough about it to say for sure. Main problem I'd see is that NURBS implementation in Blender is really lacking in terms of features and tools, not sure you'd be able to faithfully represent your shapes. You would also be most likely locked in, since as I know of no way or format to export NURBS surfaces as actual NURBS out of Blender. $\endgroup$ Apr 10, 2017 at 1:28
  • $\begingroup$ @DuarteFarrajotaRamos Thank you for your response! Yes I felt like this is doable through python scripting as well, but just could not find a pointer :( $\endgroup$ Apr 10, 2017 at 4:31
  • $\begingroup$ Does this help in anyway? blender.stackexchange.com/questions/7020/… $\endgroup$ Apr 11, 2017 at 1:08

1 Answer 1


You could write a python script in blender to import each stl in a folder, generate a cylindrical nurb surface around it (I am imagining long bone models like tibia and femur) and use the shrinkwrap modifier to approximate the tesselated surface of your STL model. Iges export would in theory keep the native surface nurb description intact for further cleanup in a solid modeling software, but in the past implementation in blender, it would chop the smooth surface up into polygons during export.

There is a lovely pure python nurb curve and surface library outside of Blender https://nurbs-python.readthedocs.io/en/latest/index.html that might be helpful.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .