How can create a face same as SU?

Dear friends,
In SU when we have a closed edges in one sheet and we redraw one of the edges automatically a face creates. How can we do the same in Ruby SU?

After you create the edge you have to call this method on that edge:
Edgel#find_faces instance_method

model = Sketchup.active_model
entities = model.active_entities
point1 =,0,0)
point2 =,20,20)
point3 =,0,20)
edge1 = entities.add_edges point1, point2
edge2 = entities.add_edges point2, point3
edge3 = entities.add_edges point3, point1

You are great!! Thank you so much

1 Like