dxf import issue - how to utilize projection information?

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
mapdeep
Posts: 15
Joined: Tue Nov 04, 2014 12:29 am

dxf import issue - how to utilize projection information?

Post by mapdeep »

I have a 3D dxf file (lines) that I would like to import and see in perspective view (not orthographic) alongside a point cloud file that is in the same area.

When I import my .las point cloud file, I am asked if I would like to shift the coordinate system - if I say yes, everything works great (I can zoom in upon the point cloud using perspective view). However, if I then import my .dxf, I am not asked about coordinate shifting (it seems that CloudCompare ignores .dxf projection information?), so the two data sets are not overlapping and everything reduces to a point on screen.

It looked like a potential workaround was going to be to say no to the coordinate shift of the point cloud when it is imported. This way, when I then import the .dxf, it does indeed occupy the same area as the point cloud. However, if I zoom in on the these data sets using perspective view, they start to disappear. If I import just the point cloud without the coordinate shift, it also begins to disappear upon zoom in using perspective view.

I'm wondering in general why features are disappearing when using perspective view and non-shifted coordinates, yet if I use orthographic view with non-shifted coordinates, everything displays fine?

Specifically I'm wondering if there is any way I can shift the .dxf as with the point cloud import? (i think this would solve my issue?) If not, is there any other way I could view both the point cloud and the dxf file while in perspective view?

Thanks
daniel
Site Admin
Posts: 7374
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: dxf import issue - how to utilize projection information

Post by daniel »

Hi,

Indeed the DXF support is currently a bit 'weak'. Especially because we don't use it much and the library we use to read and write DXF file doesn't encompass all the DXF specfications (and I can understand why ;).

We should add the 'Global shift & scale' mechanism to DXF import asap. I believe it will fix your issue.

And the strange display behavior must come from very big coordinates (i.e. not shifted). Graphic cards don't like them at all. This is one of the reason why CloudCompare suggests the user to shift them at loading time.
Daniel, CloudCompare admin
mapdeep
Posts: 15
Joined: Tue Nov 04, 2014 12:29 am

Re: dxf import issue - how to utilize projection information

Post by mapdeep »

Hi Daniel,

Thanks for this info - look forward to a fix for the import in the near future.
daniel
Site Admin
Posts: 7374
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: dxf import issue - how to utilize projection information

Post by daniel »

Okay I've update the code to make the DXF filter handle 'large coordinates'. You can test this with the latest beta release (i've just updated it).

However I hadn't any DXF files with large coordinates... so it's a blind guess! Don't hesitate to give me some feedback (and I'm interested by your file if you can share it with me).
Daniel, CloudCompare admin
mapdeep
Posts: 15
Joined: Tue Nov 04, 2014 12:29 am

Re: dxf import issue - how to utilize projection information?

Post by mapdeep »

Hi Daniel,

Your blind guess was right - the import works like a charm! Thanks a lot(I guess you probably don't need any sample data now, but if you'd still like one I can send it your way)
daniel
Site Admin
Posts: 7374
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: dxf import issue - how to utilize projection information?

Post by daniel »

Thanks for the feedback.

I'm a bit curious about the ".dxf projection information" you talked about, so indeed I am still be interested by a sample file.
Daniel, CloudCompare admin
generic-user
Posts: 1
Joined: Thu Nov 21, 2019 1:14 pm

Re: dxf import issue - how to utilize projection information?

Post by generic-user »

Hi, I'm currently using version 2.x alpha. I'm having the same problem.

I have attached a file with a rectangle in it. When I import the DXF, I do not get the same message as when I import my cloud data ...

Any thoughts?

Thanks in advance!
Attachments
REC_ZONE_A.zip
(82.58 KiB) Downloaded 406 times
daniel
Site Admin
Posts: 7374
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: dxf import issue - how to utilize projection information?

Post by daniel »

Hum, in your case, the DXF file contains both a square with very big coordinates, and some lines with very small ones. Therefore CC can't apply any global shift as the small coordinates will become (negative) large coordinates...
Daniel, CloudCompare admin
Post Reply