Surface perimeter returning constructor lines

Hi all,

Not sure why this simple looking task has proven to be difficult. I’m creating a simple random surface using the script attached. The goal is to get the outline curves of the surface as shown below in red.

2018_02_22_15_18_31_Dynamo2

but for some reason surface perimeter returns the lines that were initially used to create the surfaces:

image

I’ve tried multiple ways such as creating polysurface, exploding the surface (this returns the same surface!), recreating surface using intersection with a solid , etc and none of them return the curves that I want.

Here’s the script:

Capture

In addition to above I’m having two other weird thing happening:

1- When I try thickening the random looking surface only one part of it thickens!
2- The intersection of the base surface with the random looking surface returns empty list!

Does anyone know what’s going on here?

RandomSurface.dyn (27.6 KB)

Can you redo the camera export with a zoomed in version? The node names aren’t readings. You don’t need to see the whole graph to get the camera export to send the whole graph. :slight_smile:

1 Like

Sure, didn’t know this trick:

You need to recreate the surface as a single element. Easiest way to do this is to extrude all the surfaces, join the new solids to create a single solid, and intersect that solid with your original plane. The perimeter curves from this surface should get you the desired output.
Looks like this:

1 Like

Thanks @jacob.small your suggestion works well. I do feel however that the previous method should have worked too. Doesn’t it seem like a bug to you? Cause the surface coming out the highlighted node should’ve been an IS a single surface not a polysurface. Exploding it or getting the perimeter’s should return the same result as your method.

Capture

Intuitively I say it feels buggy (as you likely agree), but in further review I say no it’s acting as intended as the surface.perimetercurves node pulls the full curve that defines the surface.

The surface in question was built by trimming a larger surface it with a series of criss-crossing lines to remove voids. In doing so the overlapping line elements were “swallowed” by surface but the geometry itself isn’t changed - the lines are still complete in their input. Since the lines still run end to end, and the new trimmed surface itself is built by these lines… you get the complete lines not partial ones as you’d hope. This explains ‘weird 1’ (and as you noted - you got the constructor curves).

Weird 2 is… weird. I didn’t put much thought or testing into it though. It may be related to the surface’s having crossed perimeter curves (again tied to option 1 as the perimeter curves are actually the constructor curves) but I’d need to explore to confirm.

Weird 3 felt like a possible miss in the geometry - as your surfaces are built randomly extruding them would result in only the edges being extruded (tall lines) instead of a solid being extruded, and the geometry may miss at points as a result. By thickening the curve instead I ensured a solid which are usually more stable and consistent (one element instead of many elements, etc).