PlanarUnion fails silently

I find that PlanarUnion fails silently on me quite a lot. I have two surfaces that I am very certain it should manage since they were first created via a CurveBoolean on the same set of curves. When I try to do a PlanarUnion nothing happens but I get no errors or indications from Rhino that it has an issue with them. I can get to my desired result by applying DupBorder on the two surfaces then doing a CurveBoolean. I also have checked with Python that they are coplanar.

The uploaded file has two surfaces that don’t want to get unioned together.

In context what I am actually trying to do it union together a couple of hundred or so surfaces. Doing DupBorder on all of them then CurveBoolean on this thing with many holes would be rather painful when a single command should be getting me there.

I am using Rhino 7 on a Mac if that makes any difference.

planar-union-issue.3dm (3.1 MB)

Hi Ohnir - thanks, I see the problem here as well.
@onihr1 -RebuildEdges on these surfaces before PlanarUnion and it should work.

Note your curves may not be as well lined up as you expect…

-Pascal

Thanks! That helped that particular case. I have another case from the same model that exhibits some nondeterministic behavior from a PlanarUnion. I have attached a video. I select all 6 surfaces and do a planar union. Then I get the result I am looking for. Then I undo it and try again. This time one of the holes gets covered up. I undo, select, planar union, correct result. Rather odd. I did a -RebuildEdges on them all before copy/pasting to a new document.

This is macOS M2 Rhino 7.32

And the model:

planar-union-issue.3dm (3.4 MB)

Hi Onihr - it looks to me like things do not actually line up very well -

You can back out the file tolerance to .01 (no larger than that) and get cleaner results.

-Pascal

Thanks for the speedy reply! I will play with that a little. I see now zooming in that those particular curves are pretty messy. I could have been a bit more careful there.

But I am a little concerned that Rhino is exhibiting different behavior on what should be two identical runs. And since the surfaces in question came from a CurveBoolean on the same set of curves I would be expecting the surface edges to line up nicely. I will go through my model and fix up the bit you highlighted and see if Rhino is a bit happier with it all.

Hi Onihr -
Most likely this is related to the order in which the objects in the selection are processed.

-Pascal

On the example I moved some points around a little and now I am getting some new interesting behavior. I select all and PlanarUnion and sometimes everything just gets deleted. Other times I end up with a surface that has no shade so more or less looks like it would in Wireframe when in Shaded. I am sure I can work on fixing up the input a bit more but neither of the results are good and are also very unexpected.

Here is a video of this behavior:

And the model in its current state:

planar-union-issue.3dm (3.4 MB)

The surfaces in that file will not produce a valid result with the _PlanarUnion command as long as file tolerance set to 0.001

@pascal has already answered this question

Actually, the surfaces in this file will work with a tolerance of 0.0015

If you want consistent reliable results from the _PlanarUnion command you should use source surfaces that overlap.

-Kevin

Thanks for the help. I changed the file tolerance and I am getting somewhat better results with my larger model. It looks like I can amend my workflow to PlanarUnion, then DupBorder, then a cleanup on minor curve artifacts, then a PlanarSrf on everything gives me what I want.