[Sandbox Tools] From contours skips edges

I’m trying to produce a terrain using the sandbox tools, but the TIN ends up jumping over most of the edges in this area. It seems like the From Contours tool actually ignores edges, and instead just triangulates the end points?

Here are the contours I’m trying to create a mesh from:

Here are the results of running From Contours

And here’s that same view, but with Endpoints shown, and back edges:

This was imported from CAD, and you can see it’s a little funny how the contours are created.

But the TIN basically ignores edges and just “connects the dots” wherever points occur. I’ve run the Simplify Contours plugin with no improvement. Does anyone know a solution for this? I was hoping to find a plugin that would “divide” a selection of edges, inserting end points at a set interval. I think that would produce a better result, but I haven’t been able to find anything. Any other ideas? I’ve attached the contours lines if you’d like to mess around with it. MSketcher_Contours.skp (1.0 MB)

A quick try with Fredos Toposhaper

Toposhaper is great, but zoom in to the road area and there is so much detail lost, even if I crank it up all the way. I really need to preserve all the contour data that is there and just create a mesh from what is there.

Try temporarily scaling up the contour lines 10-100x then run toposhaper?

Here’s an area that isn’t acceptable and why I didn’t want to use Toposhaper on this one. It averages out these details way too much.

@catamountain scaling it up makes no difference in this case because Toposhaper has a limit to the number of “grid cells” it can generate to produce the terrain. I wonder if I could split the terrain into smaller chunks and run toposhaper on each part, then slice them together in the end? That sounds like fun… lol

Before creating the mesh it is necessary to do some pre-processing to correct problems that are usually inherent in high density contours like your dealing with.
I would suggest using that capability in both Fredos Toposhaper and Curvizard ( Part of Fredo6 tool collection). You can select specific atreas you what to smooth, simplify etc. Trying total model may take a very long time . There are some corresponding videos with these tools one should spend some time with => tools do not do thinking for you.

That Curvizard plugin looks pretty interesting, gotta love Fredo6. Perhaps I can convert everything to guidepoints, then use the “from cloud points” option in Toposhaper since itforces intersection with each guide point.

I would approach by first tiring to fix small problems before big ones. In the videos Freod6 shows different ways to correct contour issues. The contours you post have many of those type of issue IMHO.
BTW I am sorry but not fully understanding yet, what is the OPR-CONTOURS? It appears you have primitive geometry in SU assigned to layers other than zero which usually is a no-no in SU. If that is not intentional just select that layer, the - minus sign, then when requesteed just select the option to move contents to layer zero. Edges assigned a yellow color??
ThomThom also has a plugin called Edge Tools that may be helpful to you also. Using that tool I was able to reduce the number of some of the contours form hundred’s down to a few, 40 , 50 etc. However, for what you are doing fewer is not necessarily the better. Ideally for adjacent contours a one to one correspondence of the vertices would be nice because that then is like along the gradient of the topo? Hope that made sense :frowning:

The contours are an import from CAD, so it’s common for entities to be assigned to layers, and have materials assigned to them. Unless you’re going to go through every entity and “select all on layer” And group them, then it’s typically not worth resetting them to layer0. With linework import like this, I have never come across an instance where entities on different layers have connected in a CAD import, so it’s not really an issue. But I would say it’s imperative for the average SketchUp user to understand the consequences of not having things on layer0. I agree, it’s a big problem.

Bottom line, yes I agree the CAD import has not been optimized but I don’t think it has any affect on what I’m trying to accomplish.

What videos are you referring to from Fredo? Tutorials on Curviard?

SU is not CAD in that it does not use layers for geometry isolation! It only use layers for visibility control. Components / Groups are used for geometry isolation. Hope you are correct . Why take chance when it so easy to correct?? Any thing more I do I will convert back to layer zero.
Yes on videos.

Just fyi, the CAD is from a third party subcontractor so it’s not optimized for SketchUp. If I had created it myself perhaps it would be cleaner.

I’m fully aware of the consequences of not having geometry on layer0. You are on spot for cautioning people about not having things on layer0, and using groups/components for isolating structure. But I never use imported CAD for anything other than reference. As long as the imported CAD is contained within its own group, that’s all I need. I can toggle the imported layers on/off in order to see what’s what. It’s just not worth the time to group the imported entities by layer and reassign everything to layer0. Especially when there is no benefit, it’s just a waste of time. (This particular file has something like 180 layers! The file I attached was just a selection of the contours. )

If I were actually taking the CAD entities and somehow using them to extrude shapes and whatnot, then yes, I’d absolutely isolate it and put them on layer0, but I rarely do that because most CAD I’ve ever tried that with has not been accurate enough to extrude, lol. (open edges, not aligned properly)

As for the contours, yes I isolate them into a group before generating the terrain.

JMSketcher_Contours mac1 12296.skp (1.0 MB) ust for your info:

  1. The attached skp shows two cases where in I have converted the contour line to a polyline using Freod6 Bezier and then converting that to a polyline segmenter ( His same Bezier tool set). Ref 1 shows a relative short loop and shows the result ;
  2. Ref 2 shows the case for a long loop. This curve was also reporting 22 split segments which I repaired , others in same area was doing that but not same value, but I cannot say that contributes to the stop . You should note the equal segment creation stops in the near middle even thought I tried a number of different possible correction approaches , so cause is still TBD. I’ll probably send note to Fredo for his comments.
    Even if working this does not appear acceptable for batch mode creation which for you size model one would want although it may be useful for local changes?? I have not tried Toposhaper to see how it accepts these changes.

I’m having this same issue, sandbox tools uses only the endpoints when creating a terrain, which results in an inaccurate terrain. It would be great if sandbox tools would be changed so that it would use the lines themselves to create the terrain. At the moment i cannot use the terrain created, and instead have to use some other program for this.