DWG Import changes ModelBasepoint - Bug or Feature?

Hi all,

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):

  1. Use AutoCAD, draw a few things
  2. Run the “BASE” command, change the base point to something else than 0,0,0
  3. Save the dwg

First variant (import):

  1. Open a new or existing Rhino model, run the “ModelBasepoint” command, it should say 0,0,0
  2. Import the dwg file
  3. Run the “ModelBasepoint” command again, the coordinates have changed

Second variant (attach):

  1. Open a new or existing Rhino model, run the “ModelBasepoint” command, it should say 0,0,0
  2. Attach the dwg file
  3. Run the “ModelBasepoint” command again, the coordinates have changed

Regards,
Michael

*bump* sorry :frowning:

monthly bump

Hi Michael,
Thank you. Somehow this got buried.
Testing now… stay tuned.

Sincerely,
Mary Ann Fugier

Hi Michael,
First variant (import):
I can see the issue.
I will get it logged.

Second variant (Worksession Attach):
I can see the issue.
I will get it logged.

I will update with the YT’s when I have both of these logged.
Thank you for the “heads up” again.
Sincerely,
Mary Ann Fugier

Hi Mary,

any chance to get Modelbasepoint restored to 0,0,0 after pasting from Acad?

Have a look to this post here as well

thanks!

Hi Luca,
This is a bug.
We have added RH-89723/Model-Base-Pt-Changes-After-Paste.

This happens anytime the “import” DWG is run whether Paste or Import or Attach in the Worksession command.

We will let you know here when we see a fix.
Thanks for letting us know.

Sincerely,
Mary Ann Fugier

Hi there,

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.