I don’t know if Rhino’s behavior is intentional or not:
We’re working on large buildings, divided into small, reasonably sized models. While working on one model, other models get attached or detached, depending on the context. So far, so good. But sometimes, a model needs to be directly imported into another. The individual model origins are coordinated, so it is expected that the import fits to the rest of the model, just like attaching it.
But sometimes, the geometry gets placed somewhere else than where it should be - but only if imported, by attaching its placement is correct.
So I investigated a bit and noticed that the imported models somehow have a different basepoint (something else than 0,0,0). But nobody changed it?
I investigated further and found the culprit: dwg imports. We often import or attach third party dwg files for reference. I noticed that some of the third party dwgs have changed basepoints (for whatever reason). While importing (or attaching) a dwg with a changed basepoint, the Rhino model basepoint gets changed as well. Is this intended?
(I’m aware that attaching a non-3dm file results in a temporary import/conversion)
Steps to reproduce (tested with v7 and v8 latest SR)
Create the dwg, or use the example base-test.dwg (30.2 KB):
Use AutoCAD, draw a few things
Run the “BASE” command, change the base point to something else than 0,0,0
Save the dwg
First variant (import):
Open a new or existing Rhino model, run the “ModelBasepoint” command, it should say 0,0,0
Import the dwg file
Run the “ModelBasepoint” command again, the coordinates have changed
Second variant (attach):
Open a new or existing Rhino model, run the “ModelBasepoint” command, it should say 0,0,0
Attach the dwg file
Run the “ModelBasepoint” command again, the coordinates have changed
I encountered the same problem when importing a .dwg file in my rhino file that some objects where translated to faraway locations. When I open the dwg file instead of importing it, objects are well positioned and I get a popup about ModelBasepoint.
Why is there a difference between the 2 systems ? What operations are done by the Open command that the Import command does not do ? Can I detect before importing that the modelbasepoint is incorrect and fix it to simulate what Open does ? I’m looking for a workaround while this bug is investigated and fixed in a later version.
Thanks for your help,
Regards,
Thomas
EDIT: I used this as a workaround in the meantime : call RhioDoc.OpenHeadless on my file with the correct readOptions dictionnary (no object teleportation since this is an Open function) and copy all objects from this opened document to my main document and don’t forget to dispose of the headless doc afterwards.