Dimensions of faces

I can get the area of a face, but there is no API endpoint to get the height and width of a face for example. I assume because those are harder to define for faces that are rotated or even flat. Let’s assume I’m only interested in the dimension of square faces that have two horizontal edges which will be the width and to other edges which would be the height. How do I find those edges?

did you look at face.bounds.height and face.bounds.width?

Sure, but the BoundingBox is incorrect for every rotated face.

when you said ‘square’, I read it as square to the axis…
the short and long of it is to get the face edges of your target face…

edges = []
face.edges.each{|e| edges << e.length}
short = edges.sort.uniq.first
long = edges.sort.uniq.last
w,h = long,short

john

2 Likes