Fire Damper Auto-Placement

Hello everyone,
I have an issue trying to make this script work. Curve.PointAtParameter didn’t work and I don’t know why?
ca anybody help me find out. I appreciate it.

Your output of the List.Flatten node is all solids, those need to be interpreted into curves (group / list of lines / points) that make sense for the fitting. It might be the perimeter of one side or at the middle.

thanks for the reply. which node can interpret solids to curves?

Use GetLocation instead of Element.Geometry.

When I used Getlocation, I get no geometry intersect

Sorry, you would only use GetLocation for your Duct. You still want the full geometry solids from your walls.

Thank you so much. now Curve.PointAtParameter works but the ducts turn to lines.

Your image is illegible. Zoom in so we can see your nodes.

Sorry about that

You flipped your MEPCurve list and ListOfPoints list on the MEPFitting node.
You might also need to use list levels with the MEPFitting node if it’s expecting a list of points for each curve.

Still it didn’t work

Fire Damper Autoplace.dyn (22.3 KB)

Looks like list levels is the wrong direction. You need to convert your list of points to sublists of points. Each duct should have its own sublist of points. Try List.Chop.

I did try sub-listing the points, and unfortunately, still didn’t work. I think MEPFitting.ByPointAndCurve works by list of points which represents the midpoints of duct and walls intersections and ducts are already represented by MEPCurve from ducts themselves.

maybe you need to select the duct elements that intersect and make those the list for MEPCurve input?

I did that and didn’t work. It gives fittings as null. I don’t know why


I got it to work in a test file. What happens when you use List.Chop to chop your list of points into individual sublists?

Maybe I did it wrong,
this is how I did it;

what i meant was take the indices with values (other than empty list) from geom intersect, get those duct elements (get item at index) that intersect and feed those into the MERCurves input. just a thought, don’t have time to test or figure out process.

when the list is flattened, there will be no empty elements in it. I think there is no need for Get Item At Index

Why is your list length set to 2? You want each individual point (you only used one value for PointAtParameter) to be its own sublist. Use List.Chop with length = 1.