Finding Center Points of Surfaces with Surface.PointAtParameter Question

Hi,
I have a basic problem. It’s the surface.PointAtParameter node. I’m trying to get the average point(u:0.5, v:0.5) on the surfaces but Dynamo gives me points on an arbitrary location and three of those points are located on the same x,y,z coords.

Video

Also the four points it returns all are on a lower Z value whereas they should be all on z:0.00 value. Because the intersection happens on Z:0.00 surface.

Intersection%20State

I tried on another simple geometry at it worked but here doesn’t. Do you have any suggestions?

I tried to reproduce your situation, an intersection between BoundingBox.ToCuboid and Select Face, and I got the same issues. Probably something goes wrong because of the intersection of solids and surfaces.

If you need the centre of the faces, you can use a workaround like this:

GetCenter

1 Like

Can one of you share the offending dyn so I can have a look at it?

1 Like

Here is a an example I tried to reproduce the problem:
I couldn’t upload the revit file. Because it exceeds the max file size but a floor and doors some doors are enough to replicate it.
Select Face is to select the floor and the model element to choose is one of the doors.

exampleFilePointOnSurface.dyn (14.0 KB)

Luca thank you for your answer. It’s a nice workaround for now :slight_smile:

But I also wonder why it did go wrong in the first place.

I think someone (me?) will be creating a bug for this sometime soon (it’s so weird I can’t confirm it just yet), but in the meantime use the workaround provided.

As an aside, you can pull some rather odd results this way, and using Element.GetLocation may provide what you’re looking for, and with less computational overhead and less headache.

2 Likes

The surface parameterization may not be what you think if you are using geometry extracted from revit. Try using very large numbers instead.

Reproduces in Dynamo Sandbox as well, with multiple cuboid primitive (I texted by bounding box, by origin + lengths).

GitHub issue is here: Surface.PointAtParameter · Issue #9424 · DynamoDS/Dynamo · GitHub

2 Likes