Elements icon indicating copy to clipboard operation
Elements copied to clipboard

add normal property and face type for Face of solid

Open arif-hanif opened this issue 5 years ago • 7 comments

it would be nice to expose what the normal of the face on a solid is and if the face is a TOP, BOTTOM or SIDE

arif-hanif avatar Feb 21 '19 13:02 arif-hanif

I agree with the idea of the normal. This will likely be added when we support underlying surface equations for Face, like Face.Surface.Normal. Currently we only support planar surfaces so it would be easy to just do Face.Normal, but then I'd have to walk it back when we implement the above.

Surface classification is harder. How do your recommend that we classify a face as "TOP", "BOTTOM", etc.?

ikeough avatar Feb 25 '19 17:02 ikeough

top and bottom defined by by being horizontal face and differentiated by z elevation and side is anything that is not a top or bottom.

arif-hanif avatar Feb 26 '19 00:02 arif-hanif

this is really for spaces/rooms so we can extract all faces that are part of solids and if we have a parameter for exterior or interior, it can lead to some simple classifications for different calculations.

arif-hanif avatar Feb 26 '19 00:02 arif-hanif

i can help add if you have a plan in place i like the idea of the surface equations

arif-hanif avatar Feb 26 '19 00:02 arif-hanif

I think it would be nice to have convenience methods like Vector3.IsHorizontal() and Vector3.IsVertical(). Then you could do Face.Surface.NormalAt(...).IsHorizontal.

ikeough avatar Feb 27 '19 17:02 ikeough

+1 for things like Vector3.IsHorizontal() & Vector3.IsVertical()

To help illustrate, we have a scenario where we want to taper a whole building, so we modify the top face & offset it towards its centroid. We're having to query the solid and iterate through all faces to find the right one to offset currently (cc @markthorley)

radumg avatar Mar 04 '19 18:03 radumg

Second some way of classifying the faces of a Space as floor, interior wall, exterior wall, roof/ceiling. Critical for doing any reasonable load calculation.
Also, with Hypar 0.2 getting the area of a space is tricky. Spaces created with a profile don't save the profile, so it's not easy to get the profile area. adding an Area() property on faces would help with this. propose adding

            this.Profile = profile;

to space class at line 65. let me know if I should propose this edit or if there is a different strategy.

wynged avatar Mar 04 '19 19:03 wynged