Example #1
0
 def callback(normal, origin):
     # create the plane for clipping
     plane = generate_plane(normal, origin)
     alg.SetCutFunction(
         plane)  # the the cutter to use the plane we made
     alg.Update()  # Perfrom the Cut
     plane_sliced_mesh.shallow_copy(alg.GetOutput())
Example #2
0
 def callback(normal, origin):
     # create the plane for clipping
     
     plane = generate_plane(normal, origin)
     
     alg.SetCutFunction(plane) # the cutter to use the plane we made
     alg.Update() # Perform the Cut
     
     plane_sliced_mesh.shallow_copy(alg.GetOutput())
     if show_cross_section_area:
         user_slice = plotter.plane_sliced_meshes[0]
         surface = user_slice.delaunay_2d()
         text = f"Cross sectional area : {surface.area:.4f}"+"$m^{-2}$"
         plotter.textActor.SetText(2, text)
Example #3
0
 def callback(normal, origin):
     function = generate_plane(normal, origin)
     alg.SetClipFunction(function)  # the implicit function
     alg.Update()  # Perform the Cut
     plane_clipped_mesh.shallow_copy(alg.GetOutput())