Determining Cylindrical Solid Size from Geometry.IntersectAll for Round Builder Works Family Placement

I have a list of solids that are approximately cylindrical in shape. the intersection i am doing is between the Pipes and the walls. These solids are generated from Geometry.IntersectAll, so they may not be perfectly cylindrical.

My goal is to determine the size (diameter/radius) of each cylinder-like solid so that I can place the Round Builder Works family wherever pipes or other round elements pass through the wall.

Since the geometry comes from intersections, I understand that the resulting solids may have irregular shapes and may not represent a perfect cylinder. However, I still need a reliable way to identify the cylindrical dimensions for family placement.

Hi @sohel.pathan looks like you have some intersections curve try give them a Curve.PointAtParameter and a Circle.ByBestFitThroughPoints and a Circle.Radius and get diameter from there, could maybe work…or maybe a boundingbox, with min/max point and then calculate the max diameter

I would recommend going about this differently, but if you want to stay with the geometry method you can extract the edges from each intersection (Topology.Edges), get the curve geometry from there (Edge.Curves), and check for radii directly (Arc.Radius) for any curve which didn’t convert to a nurbs curve. Any curve which did convert can be converted to line and arc segments (Curve.ApproximateWithLineAndArcSegments), and the radii pulled from there.

A Element Intersects Element filter followed by a GetParameterValueByName, a GetLocation of the pipe, InsideFace of the wall, and ClosestPointTo, and finally FamilyInstance placement (face hosted on the wall face at the intersection point) would be my route.

getting very large circle. I have intersection geometry , just need to get the size of that cylinder or circle

Just wanted the size of that circle

yeah doesnt look right with that method, guees its because you only have one point in pointatparameter for the circle…but then try Jacobs method…or try give you bounding box min max from these intersection curves…maybe :wink: i cant check right now im not at dynamo in the moment

Why not use a category and intersecting bounding box filter with a FilteredElementCollector to grab the Revit pipe element at the intersection and pull the diameter property? [Edit: Reading Jacob’s response after posting… :flushed_face:]