hexagon logo

How to find all 2D circles in 3D solid geometry?

Hello! 
 
I would like to write a script which does following task:
1. Takes a solid from the active part
2. finds all 2D circles in the solid or edges which make circle
3. fills those circles
4. create a node in the center of each circle
 
The pseudocode would be like that:
 
part_1 = apex.getPart( "get_active_part" )
entities = part_1.getEntities() 
 
for solid in entities
  solid_1 = part_1.getSolid( name = "solid" )
  circle_entities = solid_1.getEdges()
 
  for circle in circle_entities
     apex.geometry.fillerSurface( target = circle )
     apex.mesh.createNodeByCurveArcCenter( target = circle)
 
Regards,
Adam Narozniak