How to load geometry from linked block files?

Hello,

I am not sure whether I am using the right terminology here but I got a 3dm file that has block references to other 3dm files. The other files are relative and are found when opening in rhino.

Do I have to take care of finding the referenced files as a developer or should the Rhino3dm library already resolve those files in the same way as rhino resolves these? If I have to take care of loading the referenced files, where can I find the file paths to the linked files?

Thanks!

Yes

– Dale

Ok, no problem, but where can I find the file paths in the Rhino3dm API?

https://developer.rhino3d.com/api/RhinoCommon/html/P_Rhino_DocObjects_InstanceDefinition_SourceArchive.htm

Could it be that this isn’t available in the Rhino3dm library, I mean the free openNURBS? I couldn’t find that property…

Or can I use RhinoCommon somehow together with openNURBS?

Are you using C#, JavaScript, or Python?

– Dale

Dale, I just checked and I believe this is missing in rhino3dm.net

This is essentially what rhino3dm is. It is a trimmed down version of RhinoCommon that is built on top of openNURBS.

1 Like

I added this as a feature request to rhino3dm at

1 Like

Sorry, forgot to mention, it is C#.

Got it, I was wondering what the difference between rhino3dm and openNURBS is.

Thanks, we will track the issue and put this feature on hold for the moment.

Bump. Just ran into the same problem and found my own thread via a web search… Would be nice to see some progress here.

2 Likes

I agree. As this is a (fairly common) pattern in a .3dm file, I think this should be supported properly. Otherwise you cannot load a file with linked blocks and then save the file again with the same linked blocks, because you can’t get the file path.

2 Likes

I am having the same problem in building a plugin to read/write 3dm files. Would highly appreciate this feature in rhino3dm!

2 Likes

Yep, this is on the to-do list.

https://mcneel.myjetbrains.com/youtrack/issue/RH-74754

– Dale

1 Like

RH-74754 is fixed in the latest WIP.

2 Likes

That’s great news! Any idea when the Nuget will be updated?

Also I saw that the Nuget here: NuGet Gallery | Rhino3dm 7.15.0 is already Version 8 beta. Are we correct in assuming that we can still use it to write files that are compatible with Version 7 of Rhino?

Good question! I bet pretty soon™ but I suspect @fraguada can give a better guess than I.

2 Likes

Yes. Just ensure you set the file version before saving.

We’ll need to get this updated openNURBS into the rhino3dm repo and then we can work on the bindings. Can’t say for sure, but barring any other obstacles, a few weeks™

2 Likes

RH-74754 is fixed in the latest WIP

1 Like

This has been available in the 8.0.0-beta releases, the latest was released today Rhino3dm 8.0.0-beta3 released 🎉

1 Like