# Find a point on a Surface

**URL:** <https://forum.dynamobim.com/t/find-a-point-on-a-surface/78559>\
**Category:** Geometry\
**Created:** [July 11, 2022, 4:04pm UTC](https://forum.dynamobim.com/t/find-a-point-on-a-surface/78559 "2022-07-11T16:04:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Menno\_Mekes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/menno_mekes/32/11080_2.png) [@Menno\_Mekes](https://forum.dynamobim.com/u/Menno_Mekes)\
**Post date:** [July 11, 2022, 4:04pm UTC](https://forum.dynamobim.com/t/find-a-point-on-a-surface/78559/1 "2022-07-11T16:04:42Z")

</div>

Hi all,

I’d like to share my solution here.

When looking for a point on a surface we all tend to go for 'Surface.PointAtParameter, _u_ and _v_ both at 0.5) This is fine for simple shapes but not for floorplans. The midpoint of a L-shaped surface lies outside the surface. In older graphs I used to get the polycurve from the perimeter curves. Then offset those 50 and -50. The shortest is inside. Then I took the startpoint and I would have a point to place an Area or a Room. Annoying that it’s so close to the edge but it worked most of the time. When it didn’t I needed to change the offset distance.

Now that I am revising a lot of those graphs I started thinking about this solution. Here is my new workflow: (Numbers correspond with the bullets in the image)  
1: get the Surface.PointAtParameter at _u_=0, _v_=0  
2: get the Surface.PointAtParameter at _u_=1, _v_=1  
draw a line between them. Now I don’t take the Curve.PointAtParameter yet becouse the midpoint can be outside the surface.  
3: Intersect the line and the surface. The result is one or more lines, each line is completely on the surface.  
4: I take the one at index 0.  
5: Curve.PointAtParameter, _param_ = 0.5

And I get a point ón the surface.

 ![point on surface](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/a/2a51fa97388db7b8c88370831f4610be8bded510.jpeg)
