Open hassanteymoori opened 7 months ago
@hassanteymoori this is just an attempt to help you a little bit with this issue.
You can always check the code in my custom 3DM Exporter for a reference.
If your obj
is just a mesh that doesn't have any children then your if (obj.children)
will always be skipped.
You should instead try to traverse the obj
and create a rhino mesh out of any mesh you encounter and then add it to the rhino document (or file).
Take your time and inspect the function parse_objects()
in my custom exporter.
I’m attempting to load and convert an OBJ file to 3DM format using the
rhino3dm
library. Here’s the relevant code snippet:The code successfully generates a 3DM file, but unfortunately, the resulting file is not valid. When re-uploaded to a 3D viewer, it fails to load properly. I’ve followed the example from the repository, but I’m encountering this issue.
Any insights on why the generated 3DM file isn’t valid, and how I can address this problem?