# type: ignorefrompathlibimportPathfromcompas_view2.appimportAppfromcompas.geometryimportBrep# Load the brep from a STEP file# and extract the individual letters.filepath=Path(__file__).parent/"FCA.stp"brep=Brep.from_step(filepath)letters=list(brep.solids)# Make sure the letters are valid solids.forletterinletters:letter.heal()letter.make_solid()# For each letter, exclude the edges that are too short and the edges connected to it,# and fillet the rest.forletterinletters:exclude=[]forloopinletter.loops:do_fillet=Trueforedgeinloop.edges:forvertexinedge.vertices:ifany(e.length<0.01foreinletter.vertex_edges(vertex)):do_fillet=Falsebreakifnotdo_fillet:breakifnotdo_fillet:forvertexinloop.vertices:foredgeinletter.vertex_edges(vertex):exclude.append(edge)letter.fillet(0.1,exclude=exclude)# =============================================================================# Visualization# =============================================================================viewer=App()viewer.view.camera.position=[5,-1,10]viewer.view.camera.look_at([5,2,0])forletterinletters:viewer.add(letter,linewidth=2,opacity=0.7)viewer.run()