I’m trying to add a hole using two components, hinge and door, however, I’m having problem with rotation orientation of one of the holes, in this code:
entities = model.entities
# Function to draw the circle inside the given entities (target component entities)
def desenhar_circulo(entities, center, normal, radius, segments = 24)
circle = entities.add_circle(center, normal, raio.mm, segments) # Create circle in mm directly
face = circle.first.find_faces
# Remove the face of the circle, leaving only the edges
face.erase! if face & face.is_a? (Sketchup::Face)
puts "Circle created in the center: #{center} with radius: #{radius} mm inside the target component."
End
# Function to detect components with attribute "pcusinage" and value "transferhole"
def find_transfer_hole_components(entities)
usinagem_components = []
entities.each of the |entity|
if entity.is_a? (Sketchup::ComponentInstance) || entity.is_a? (Sketchup::Group ```
![Door|472x500](upload://jN6lQWeHTzf5M1L0GLOHspnbPhi.png)