Search code examples
javascriptwebglsurfacedxfnurbs

How I can parse nurbs surface from dxf file? Or do you know library(for js, if exists or any other language) for parsing it?


I am trying to parse autocad nurbs surface and draw with triangulation using webGL in javascript. I already looked for dxf parser by bjnortier. It supports majority entities like line,arc,3Dface, polyline, lwpolyline, etc., but doesn't support surfaces. Is there any library? Help, please!


Solution

  • Unfortunately these entities like BODY, 3DSOLID, SURFACE, REGION and so on, are stored as ACIS data embedded in DXF files.

    The ACIS data is embedded in different ways for different DXF version. For older DXF versions the ACIS data is embedded as poorly encrypted text file (SAT) in the entity body and starting with DXF R2013, binary files (SAB) stored in the ACDSDATA section.

    But even if you can extract this data, it is pretty much useless, because the ACIS format is not an open data format and you need a license by Spatial Inc., which gives you access to their SDK, to process the ACIS data.

    So it is very unlikely you will find a free library which supports ACIS entities.