"""
Date created: 2026/06/10
Author: Mishal Mohanlal 

A script which reads surface geometry and fragments all the surfaces so that everything is united

"""
import gmsh

######### inputs ######### 
surface_geom = r"C:\Users\MishalMohanlal\OneDrive - The Project Company\Documents\GitHub\gmsh-tools\geometry\MODEL5 MULTIPLE SURFCACE 1.stp"
######### end of inputs ######### 


gmsh.initialize()
gmsh.model.occ.importShapes(surface_geom)
surfaces = gmsh.model.occ.getEntities(2)
print(surfaces)
frag = gmsh.model.occ.fragment(surfaces, surfaces)
gmsh.model.occ.synchronize()
gmsh.write("fragmented_model.step")

