More on contours and topography
-
Hi everyone. Some of you may have read a previous thread of mine http://forums.sketchucation.com/viewtopic.php?f=79&t=42645 where I wish to create a large accurate topographic surface from contour lines imported from CAD. I'd tried all the suggestions in that thread and it was a great learning experience, however I didn't quite get to my ultimate solution there.
I now have a workflow that creates what I require, but it is labour intensive and slow. I've posted the attached sketchup file, not only as a plea for more help, but I also hope this may be of assistance to others working with CAD contours. This is just a small section of the model that I actually want to produce. I've saved my workflow as series of scenes - I'd really appreciate it if you folks could scan through it and see if there is a way to improve this. In particular - in scene 2 you'll see that I select a contour segment, expand the selection to 'all connected', weld this to a single curve before adding equally spaced guide points along the curve. At the moment I have to do this for each contour individually.
It's also worth noting that I've tried thomthoms edge tools>simplify, but with my data this still yielded contours that either crossed over too much using a wide tolerance or were too complex to efficiently create a surface from when using a tighter tolerance.
thanks in advance
- Mick
topography from CAD contours.skp
-
The Sandbox tools 'From Contours' has an optional complementary Google Ruby-script called 'Simplify Contours' to reduce the complexity before using the main tool.
Have you tried that ?
http://sketchup.google.com/intl/en/download/rubyscripts.html [download link at bottom of the page...] -
Your described flow is workable. Keeping the essential methodology same, I can suggest some efficiency improvements using Tgi3D amorph (training version is not enough for you (too many vertices), but you can try amorph for 30 days for free).
workflow
-
converting the contours to construction point cloud, the greatest gain is here.
a) from Tgi3D settings menu (gear like icon in the tgi3d toolbar), set the curve crease angle to around 80 degrees. This parameter is effective in complexity reduction. If a contour deviates more than this angle on a vertex, that vertex is preserved, these are sharp corners reduction tool, you can play with this angle.
b) select all the contours.
c) use resample-paths tool from other Tgi3d utilities sub menu. It will prompt a box asking for the length of new segments, for your case I tried 20m. In your case this operation took around 25 seconds on my pc, so you may have to wait. Better yet start from small cases to build your confidence in the tool. When this stage finishes you should get a reduced vertex contour set.d) Using the MarkPoints http://forums.sketchucation.com/viewtopic.php?f=323&t=42089#p373073 (requires LibFredo, I suggest download the latest version) place a construction point in place of every vertex. This leaves the contours selected, I erased the contours right away. You have your construction point cloud now.
-
Convert the construction points to a mesh. (the created mesh will be slightly cleaner, a little less cleaning required)
a. draw a rectangle around the construction points (encompassing them).
b. erase the face. select the remaining edges and the construction points. activate create-mesh tool from Tgi3d menu.
The rest is the same as your flow. trim the redundant faces etc...
I hope this helps
Ogan
3. -
-
Thanks for your reply Ogan. I'll have a detailed look at this tomorrow and see how it works and will report back. Regards - Mick
-
@tig said:
The Sandbox tools 'From Contours' has an optional complementary Google Ruby-script called 'Simplify Contours' to reduce the complexity before using the main tool.
Have you tried that ?
http://sketchup.google.com/intl/en/download/rubyscripts.html [download link at bottom of the page...]Hi TIG, thanks for that - yes, I had tried that one. It did work sort of OK, but I was getting a pretty messy mesh even with very over simplified contours, so abandoned it in favour of my more labour intensive method. I was also getting little ledges in the surface along each of the original contours - it made some of the valleys look like open cut mine pits. I like your thinking though - the simple solutions are often the best. Regards - Mick
-
OK, I've got my mesh. The original cad contours had 1.3 million edges.
Thanks guys for your suggestions... like I said - it's been a great learning experience.
TIG - I experimented more with the simply contour plugin - most of the problem were with my contour set - some were ludicrously convoluted whereas most were quite simple. There was no one setting that did a good job with all of them, but with some selective processing of different sets of contours based on complexity, it worked well.
Ogan - I tried tgi3d amorph. Haven't had time to explore it all properly (hardly at all actually - there seems a lot too it), but I ran through your suggested method. I had a similar experience here to that described above. Setting a 20m segment length worked for some of the contours, whereas other lengths were required to get anything acceptable for other segments. In other words I had to do a lot of selective processing using different settings to get a good overall result.
In the end I used "Edge Tools" to simplify all the curves to within 2m of the original, then went and cleaned up the overlapping contours with reference to the original dwg. At the same time I deleted any extraneous noise. This all took about 1hr, but wasn't too onerous. Then I just used the sandbox tools to create a mesh from contours. The result is shown in the attached. This was definitely the quickest way to process the entire contour set in 1 go and came up with an acceptable result. I think my method posted at the beginning of this thread gave a really nice result, but was too labour intensive for anyone dealing with a lot of lines, but otherwise I'd recommend it.
thanks again for your help with this...
Regards
- Mick
Advertisement