The order of the vertices in outer loop of the face determining the face normal. (Or the other way around, they are closely related)
The face have a front side and back side. The normal vector of face is perpendicular to face and show the front direction.
There is no “definition” for reversed. The mentioning of “reversed” is relative, however you can reverse! the face if you do not like how it is oriented…
You can study something like this:
#create an edge representing a face normal
# at first vertex of face
def add_normal(ent, face)
pt_face = face.vertices[0].position
pt_norm = pt_face.offset(face.normal)
ent.entities.add_edges(pt_face, pt_norm)
end
def add_faces
model = Sketchup.active_model
ents = model.active_entities
pt0 = [0, 0, 0]
pt1 = [1, 1, 0]
pt2 = [0, 2, 2]
#add face to separate group in order pt0-pt1-pt2
gr0_2 = ents.add_group
face_pt0_2 = gr0_2.entities.add_face(pt0, pt1, pt2)
gr0_2.entities.add_text "face_pt0_2", pt2
add_normal(gr0_2, face_pt0_2)
gr0_2.name = "gr0_2"
#add face to separate group in order pt2-pt1-pt0
gr2_0 = ents.add_group
face_pt2_0 = gr2_0.entities.add_face(pt2, pt1, pt0)
gr2_0.entities.add_text "face_pt2_0", pt2
add_normal(gr2_0, face_pt2_0)
gr2_0.name = "gr2_0"
# move the gr2_0 group a little to see...
vector = Geom::Vector3d.new(0, 2, 0)
tr = Geom::Transformation.translation(vector)
ents.transform_entities(tr, gr2_0)
end
add_faces
