Problem with imported DXF file

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  04 April 2013
Problem with imported DXF file

I have a problem with DXF file that I imported into my 3ds Max 5. The DXF file is suppose to be a line (converted KML file into DXF to be exact) but as you can see on the screenshot below it isn't. When I select 'spline' the 'segment' is being selected. And the second problem, there are two instances of the line that overlap each other. I tried using different import options but cannot get it right no matter what. I would appreciate it very much if someone could tell me how to import this file correctly.

 
  04 April 2013
5? hmmmmm... haven't used that for a long time so not sure what's applicable, but this is all pretty basic so should be valid back to 5. Look for "auto weld" when importing. If that doesn't work or exist, how about just selecting all vertices on the sub-object level and welding them?
 
  04 April 2013
Originally Posted by rox44: 5? hmmmmm... haven't used that for a long time so not sure what's applicable, but this is all pretty basic so should be valid back to 5. Look for "auto weld" when importing. If that doesn't work or exist, how about just selecting all vertices on the sub-object level and welding them?

There is just 'weld' option as seen below:


But I'm not sure whether it should be ticked or not? Besides, it seems to make no difference after all.

As for welding vertices - it reduces the number of them but still there are two lines instead of just one. Please see image below:




Those irregular lines are segments that I just moved. And as you can see there are another lines hidden beneath them. And that goes for the whole line - everything is doubled somehow. I have no idea why it happens when importing that DXF file and I cannot fix it either.
 
  04 April 2013
You would want weld to be checked, but if it doesn't work, it doesn't work. I'd say adjust the threshold spinner, but coming from a DXF those segment ends are coincidental, so threshold shouldn't matter, except that it will start welding groups of vertices within the threshold. For instance, if you have segments shorter than 0,01 m then those segment end vertices theoretically will be combined, but no matter, like you said, it doesn't do anything on import which doesn't surprise me.

It looks like the original DXF has duplicate lines. I work with DWG/DXF all the time, and some folks always have duplicate lines, even triples sometimes, just their workflow I guess. If the lines are not on separate layers, then I think you're doomed to manually delete the overlap. Probably the quickest way is to weld all vertices and then break the verts at each end of the "spline", which should hopefully give you two individual overlapped splines, one of which can be completely deleted with one click. Also, if you're noticing clumps of vertices combining into one, adjust the weld threshold to a lower value, same concept I was talking about above.

One more tid bit that may or may not be applicable in your situation. On current versions of MAX, working with imported DWG and DXF lines always cause problems when surfacing. I don't know at what point along the road of new versions this broke, or what your final intentions are, but I typically re-draw new lines in MAX snapping to the CAD line vertices to reduce headaches later on.
 
  04 April 2013
Originally Posted by rox44: You would want weld to be checked, but if it doesn't work, it doesn't work. I'd say adjust the threshold spinner, but coming from a DXF those segment ends are coincidental, so threshold shouldn't matter, except that it will start welding groups of vertices within the threshold. For instance, if you have segments shorter than 0,01 m then those segment end vertices theoretically will be combined, but no matter, like you said, it doesn't do anything on import which doesn't surprise me.

It looks like the original DXF has duplicate lines. I work with DWG/DXF all the time, and some folks always have duplicate lines, even triples sometimes, just their workflow I guess. If the lines are not on separate layers, then I think you're doomed to manually delete the overlap. Probably the quickest way is to weld all vertices and then break the verts at each end of the "spline", which should hopefully give you two individual overlapped splines, one of which can be completely deleted with one click. Also, if you're noticing clumps of vertices combining into one, adjust the weld threshold to a lower value, same concept I was talking about above.

One more tid bit that may or may not be applicable in your situation. On current versions of MAX, working with imported DWG and DXF lines always cause problems when surfacing. I don't know at what point along the road of new versions this broke, or what your final intentions are, but I typically re-draw new lines in MAX snapping to the CAD line vertices to reduce headaches later on.

Could you tell me please how to check if the lines are on separate layers? And as for breaking the verts - after welding I have still over 700 vertices - does it mean I have to break every single one of them? (clicking over 700 times?)

And as for my intentions, this line was to be a center line of my road that I would like to model. I wanted to create road and some roadside for a game. Does it mean that I should also re-draw this line as you suggested?
 
  04 April 2013
I don't remember if version 5 has a layer manager, if not then no bother; otherwise, check the layer manager for any imported layers. Turn them off and on to see what's in each layer. If you're lucky, the duplicate lines are in separate layers and you can just select objects in one layer and delete them.

If you have to go the other route, after welding all vertices, you'll have what looks like a single line consisting of a string of vertices, but since you've got double lines, we know that you actually have a loop that is collapsed on itself - 2 lines with 2 vertices at each point except the extreme ends where these two end points should be single vertices where the line folds back on itself, right? So only break the two end vertices. That should give you two separate sub-object splines. Then just delete one of the sub-object splines, and you should be left with a single spline, single set of vertices. Make sense?

Yeah, you probably don't want to redraw a +700 vertices line, so hopefully the imported lines play nice when you start surfacing. Just be wary if there are strange problems surfacing that you cannot reproduce with native MAX lines, then the CAD lines are suspect and you might have to trace them. Maybe there's a script to handle such a tedious task.
 
  04 April 2013
Thank you very much for your help. You were 100% right about those two looped splines and it came nice and easy at the end. You saved me a lot of troubles - thank you once again.

I just hope that this CAD line won't play any tricks on me when lofting my terrain along its path.


p.s.
Max 5 has a layer manager but there was only one layer and I couldn't delete it.
 
  04 April 2013
Glad I could help someone... I get tons of info on here, so it feels nice to contribute. Good luck!
 
  04 April 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:06 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.