How was this object created? Basically the object is a little wacko, it should have 4 faces total, one for each side. Your object has 10, explode it to see what I mean.
From what I can tell watching it in the debugger is that all of the sides have 2 faces, one pointing inward and one pointing outward. The top (which is invisible in Rhino) is a single face with 2 identical loops, only the trim directions are opposite. That probably confuses Rhino and is why it isn’t rendered. It looks like the loop on the bottom face is meant to be inner, i.e. a hole, but since it’s the only loop and that wouldn’t make sense, at least for Rhino, it probably changes it to an outer loop and that’s why it is actually seen.
I’m not sure that there’s anything in Rhino to fix, at least that I would know how to handle.
I’m not the creator of the DWG-File and I can’t give You more information. I know the original file is “very” old and I believe it was created with AutoCAD.
I have some more files from the same supplier with similar problems. That is a real problem for us. Because in the reference software (which is not developed by ourself) the files open correctly. And also in the CAD Software of the supplier it looks fine.
In our Software we can’t open DWG directly so we use Rhino to convert them. Which don’t work for some files.
An other problem is the file size. We have some DWG-files that are ~120KB. After saving as OBJ the file size is 16 MB.
We have done some research, too. As CAD Software we use BricsCAD. BricsCAD can open this files without problems. But BricsCAD can’t save OBJ-Files… But if we use the command “3dconvert” which convert solids to regions/meshes and save this as DWG. These DWG-Files can be opened by Rhino and saved with a much small file size (some KB not MB).
I believe it is a problem in rhino or the handling differs from other CAD Software. That doesn’t have to be wrong. But in our case there are different results. And that’s bad…
Thats correct. Best example is a sphere which is defined as X, Y, Z and radius. 4 float values in DWG. Saved as OBJ will convert these values to a lot of meshes. But 120 KB → 16 MB is too much. We can also see a lot of rectangles which could be converted to 2 triangles but will produce thousands of triangles.
Here is an exmple. On the left side You can see a lot more triangles and a missing top plate. This OBJ is saved by Rhino from the original DWG File. On the right side the original DWG file is saved with “3dconvert” as a new DWG and these DWG is also saved by Rhino as OBJ. This variant has less triangles.
Thank You very much for Your help.
This settings help reducing the file size (triangle count). This is very good. But there are still some graphic parts that are not loaded/exported correctly. See my first test.dwg from my first post.
If you check this box on export (the equivalent was added to dotnet options and scripted) it should remove at least some of the interior vertices on planar “faces” in OBJ export.
OBJ is fine with polygon boundaries of a single face. Rhino does not like that though. So, if you reimport the same obj file into Rhino it may look like single faces, if ngons were created, but under the hood that face will get triangulated. The interior vertices won’t be there anymore though.