Hi there,
I’m new to rhino and have a question about converting a 3dm model into a DXF model. I’ve figured out how to load the model and can view it, and I’ve figured out how to export the model as a DXF file, but all of the surfaces appear to be SPLINEs rather than MESHes as I was expecting/hoping. I’m trying to puzzle through the various export options and am not quite sure how to go forward.
I chose a surface at random from the 3dm model, looked at the properties->details and see this:
surface
ID: 26817bb7-f8c0-45c3-8718-5224a32d741e (132159)
Object name: (not named)
Layer name: Buildings::RoofTop Surface
Render Material:
source = from layer
index = -1
Geometry:
Valid surface.
trimmed surface.
Plane Surface
"U": (-1184.9 <= U <= 22.2594)
"V": (-153.134 <= V <= 1.51618)
Edge Tally:
3 boundary edges
Edge Tolerances: 0 to 0.000149158
median = 5.37682e-09 average = 4.97211e-05
Vertex Tolerances: all 0
Render mesh: 1 mesh 5 vertices 3 polygons
Created with fast meshing parameters.
Analysis mesh: none present
This appears as best I can tell to already be a mesh (render mesh: 1 mesh, 5 vertices, 3 polygons). That’s what I’m hoping to see exported in the DXF file, and then I suspect I can figure out the rest from there.
I’m still working to understand how rhino works and represents things, so this may be a RTFM problem… but there’s a lot there to sift through, so hoping someone might have some pointers on what to look for or what concepts to go read about in more detail. I’m suspecting that I need to either go through some sort of conversion process within rhino from one format/representation to a mesh representation, and then export from there…? Or it may be with the appropriate export scheme selection, I’ll get what I’m looking for. (I tried Default scheme and 2007 Solid… I’m not sure what solid gave me, but it appeared to be some code - perhaps it was g-code for a mill? idk.)
For some context, my end goal is to convert this version of a New York City building model from 3dm to DXF with meshes for the surfaces.
https://www1.nyc.gov/site/planning/data-maps/open-data/dwn-nyc-3d-model-download.page
I’ve figured out how to load a similar DXF building model file from cadmapper.com into my code (python), so my thought is that if I can convert the NYC open data model to mesh format, I might be able to use that as well.
For additional context, the reason I think I need meshes is that I’m reading in the DXF file, extracting the meshes, performing triangulation on the meshes, and rendering the triangles in Open GL. (This isn’t terribly relevant to the question, but might help shape the answer? "Did you think about… " etc.) I understand conceptually a DXF file with meshes and have a pipeline built up around that (in python), but I’m not quite sure what to do with splines because (in my head) they represent a curved line, not a closed polygon, so I’m not quite sure what I would do with them or how I would go about triangulating them.
Additional background – I’m a student, I have a simulation and visualization environment built up in python where I can load the DXF file (with meshes), perform my simulations in it, and then view the output in Open GL. If I can get past this stumbling point, then I should be able to run my simulations within these building models, which would be kind of fun.
I’ve also been searching the forum here, finding entries that get close to what I’m looking for, but I haven’t had any success trying to apply them. Example post:
That one is especially relevant as it is discussing mesh from surface. From this, I also tried selecting a surface in rhino, selected Mesh->From NURBS Object, default number of polygons. This resulted in a what looks like a triangulated polygon visible in rhino. I went back, selected the mesh objects in rhino, File->Export Selected, then exported as DXF with default Scheme. I thought I was on the right track as the output indicated that 1 Mesh was exported, but when I inspect the DXF file, I see that it is a POLYLINE rather than a mesh. So I think this is probably the right direction, but I haven’t figured out how to manipulate rhino to get what I’m looking for.
Thanks in advance for any pointers in the right direction.
J.