display_angles, display_base_points, [drawing.YELLOW] * ray_count, dense=False, rank_type="base_point") # build the boundaries zero_points = pv.read("./stl/processed_disk_large.stl") zero_points.rotate_y(90) # do the mesh tricks top_parent = graph.get_closest_point(zero_points, (0, 0, 0)) vertex_update_map, accumulator = graph.mesh_parametrization_tools( zero_points, top_parent) vg = boundaries.FromVectorVG((1, 0, 0)) lens = boundaries.ParametricMultiTriangleBoundary( zero_points, vg, [ boundaries.ThicknessConstraint(0.0, "min"), boundaries.ThicknessConstraint(0.2, "min"), ], [True, False], auto_update_mesh=True, material_list=[{ "mat_in": 1, "mat_out": 0 }] * 2, vertex_update_map=vertex_update_map) target = boundaries.ManualTriangleBoundary( mesh=pv.Plane(center=(target_distance, 0, 0), direction=(1, 0, 0),
norm_arrow_length=.2, draw_norm_arrows=True, norm_arrow_visibility=False ) drawer2 = drawing.TriangleDrawer( plot, color="cyan", parameter_arrow_length=.2, draw_parameter_arrows=True, parameter_arrow_visibility=False, norm_arrow_length=.2, draw_norm_arrows=True, norm_arrow_visibility=False ) vg = boundaries.FromVectorVG((0, 0, 1)) multi_boundary = boundaries.ParametricMultiTriangleBoundary( "./stl/processed_disk.stl", vg, [ boundaries.ThicknessConstraint(0.0, "min"), boundaries.ThicknessConstraint(0.5, "min"), ], [True, False], auto_update_mesh=True ) multi_boundary.update() def draw(): drawer1.surface = multi_boundary.surfaces[0]