Get Front Surface of Element in View

Hello Dynamo Friends! :slight_smile:

I want to dimension columns like in the following view. Therefore i have to identify the surface that I´m looking at in the view. Later i want to offset the line i need for the position of the dimensioning.

I could achieve what i want but it was a pretty wild ride and so i just wanted to ask if you have some advice on how i could get my results easier!

Here in Steps and pictures what i did:

  • Create View Coordinate System
  • Get Faces and Points
  • Transform to ViewCS
  • Test which point is the front point
  • Get the corresponding face
  • Create Polycurve and offset
  • Transform to ViewCS
  • Test which point is the left point
  • Get the corresponding line

Happy about any thoughts and advice!
Kind regards!

Assuming that all elevations are parallel to the surface you want to dimension, you could invert the view direction, and filter to just surfaces which have a normal that is almost equal to the inverted angle.


Hello Jacob,

I don´t get exactly what you mean.

I can filter the surfaces that are parallel to the view like that:

Pretty good start, but how to get the front surface now the easiest way?

Found this PointAtParameter node, that gives me points on the surfaces real quick, just have to transform them to ViewCS and filter the Front.

Instead of asking parallel, ask angle about the Z axis. If 180 you want that one. If 90 or 0 you do not.

1 Like

Oh i get it :smiley: Thanks Jacob!

But I´m Now just creating surface vectors and compare to reversed view direction, i think thats the fastest way and i dont need a ViewCoordinateSystem, nice!

Now I´ll try if i can also get the left line without the ViewCS…

So i would say getting the surface is state of the art, next step is getting the lleft line, the question is, is it 100% reliable to use ItemAtIndex for that? I always have a bad feeling about that, but it has to be correct i think?!

An alternative would be to compare z vector and line vector, but thats pretty much doing the same as item at index!

Tests tell that ItemAtIndex does not work, have to find another way to get the left line in view.
Or will I have to get back to the ViewCS method for that?

Still pretty much effort to get this two dimension lines:

Assuming a square, the angle of the curve’s tangent vector at any parameter to the cannonical Z axis would always be 0 or 180. The modulo (% node which returns the remainder after dividing) of 180 would always be 0 after rounding as well.