Page 1 of 1

dxf import issue - how to utilize projection information?

Posted: Thu Feb 12, 2015 5:56 pm
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

Re: dxf import issue - how to utilize projection information

Posted: Thu Feb 12, 2015 7:30 pm
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.

Re: dxf import issue - how to utilize projection information

Posted: Thu Feb 12, 2015 9:01 pm
by mapdeep
Hi Daniel,

Thanks for this info - look forward to a fix for the import in the near future.

Re: dxf import issue - how to utilize projection information

Posted: Sat Feb 14, 2015 5:50 pm
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).

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

Posted: Mon Feb 16, 2015 6:50 pm
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)

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

Posted: Tue Feb 17, 2015 8:12 am
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.

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

Posted: Thu Nov 21, 2019 1:21 pm
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!

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

Posted: Thu Nov 21, 2019 9:34 pm
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...