Surface center

Hi,
is there a node for getting a center point of a surface?
For now I am using rather slow method of getting end points of surface sides, making polygons and then using polygon center node.

1 Like

Point at parameter 0.5 should do the trick.

In design script: Surface.PointAtParameter(surf,0.5,0.5);

Or just use the node: Dynamo Dictionary

1 Like

@jacob.small thank you, it kind of works. Just tested. Although the point is not in center. Probably because surface are from pattern based family. For my purpose it will do fine but it is not precise. See image below, the blue is the point at parameter 0.5

This is because the surface has been trimmed, throwing the overall shape off. Since you’re using pattern toolkit it may be best to just pull the pattern point directly (you already have the data why recalculate it?).

As an alternative Topology.Verticies > Vertex.PointGeometry > Point.Average should be faster than the permeter curves method.

1 Like

@jacob.small thank you!
Pattern point ? Can’t find where is that node…
As I added depth to that surface, surface.pointAtParameter no longer works for me, so I tried Element.GetLocation but strangely all points are off my some distance… Please see image below.

Ah! Thought you were using the PatternToolkit package.

GetLocation > Point.Average may be the best, but without more of the data set we’re guessing at this point.

1 Like