Polycurve Containment Test

Is there a way to check if a polycurve can contain another plolycurve? I have Building pads as polycurves and i want to check if these building pads can contain different floorplans. is there a way to check that?

Polycurve containment test as one method.

thats for polygons not polycurves

[&] ObjectList.GroupByContainer from Ampersand does this: “Sort a set of objects into groups using their location points by their inclusion in a set of given list of containers. Containers must be solids, closed polygons, polycurves. Objects and points not included are returned separately.”

where is that node located

See the Ampersand package

I dont understand how to use it

See here:

1 Like

i dont think that this node does what im trying to do

How would we know if you don’t send screenshots, illustrations and references?

I have a list of floorplans(FP in image) as polycurves and I want to see which ones can fit inside the building pads (BP in image) which are also polycurves.

So convert the polycurves to polygons… the ampersand package is likely a better bet though.

1 Like

Can someone please help me to use the “List.GroupByContainer” node from “Ampersand”? I’m trying to find the surfaces that are within the polycurve I have and the ones that are not. However, it doesn’t seem to be working correctly. Am I doing something wrong? Thanks for your help!

Please note that I want to preserve the geometry of my polycurve as it also contains curves (not only straight lines).

Hi @jacob.small
How do we convert (or approximate) a polycurve to a polygon? I mean is there a node or package for it or you meant script it out.
Also, I checked the Ampersand package, I could not find a method similar to polygon’s containment test.

Polygon containment test should be an out of the box node in the library - this thread is 5+ years old so some of it will be well outdated.

To convert a polyline to a polygon you’d do something along the lines of this:
Polycurve.Curves > Curve.StartPoint > Polygon.ByPoints. I do not know of a package which does these for you, but with only 3 steps I’m not sure why you’d need one either. If you get stuck with it please start a new topic though.

1 Like

I have some curves(not straight lines) in my polycurves. So I used PointsAtEqualSegmentLength to approximate it with some midpoints and then converted everything to polygons.

1 Like

If you’ve got curves, then Surface.ByPatch > Geometry.DoesIntersect may be a better solution. This will have the added benefit of being able to test shapes with an opening in the middle.


That’s great to know. I agree and the shapes will likely have openings.

Hi again @jacob.small
I have a floor with opening in Revit and I have been able to get the polycurves of outer outline and the opening.

What would be the best way to have a surface with opening in dynamo. Would you use TrimWithEdgeLoops? Or is there a direct way for bringing the floor into Dynamo as a patch?