In line with the Initial question. What if after creating the face with a hole I want a second face to cover the hole (see right panel in figure below). I tried simply
ents = Sketchup.active_model.entities
# points to be used in the model
pt1 = [-100, -100, 0]
pt2 = [ 100, -100, 0]
pt3 = [ 100, 100, 0]
pt4 = [-100, 100, 0]
pt5 = [-50, -50, 0]
pt6 = [ 50, -50, 0]
pt7 = [ 50, 50, 0]
pt8 = [-50, 50, 0]
# add outer loop
outerLoop = ents.add_face(pt1, pt2, pt3, pt4)
# add inner loop
innerLoop = ents.add_face(pt5, pt6, pt7, pt8).erase!
# add new surface covering the Hole
ents.add_face(pt5, pt6, pt7, pt8)
But It is not working as I expected. Somehow the second surface that covers the Hole is missing (see left figure below).
I can make it like this:
…
# add outer loop
outerLoop = ents.add_face(pt1, pt2, pt3, pt4)
# add inner loop
innerLoop = ents.add_face(pt5, pt6, pt7, pt8)
but that requires me to now upfront that a hole in a surface with holes will be filled up. But this is not the case since I am reading geometrical information from a text file, where the surfaces covering the holes are independent of the surface with holes.
I could read all the text file and then look for Surfaces that cover a hole in any of the surfaces with holes of the geometry, but I would be happy to avoid this search. Do you have any idea to solve this problem?
Thanks, Carlos