rad = 0 obj = Geom_ConicalSurface(axs, np.deg2rad(deg), rad) surf = BRepBuilderAPI_MakeFace(obj, -np.pi / 2, np.pi / 2, -100, 100, 1e-6).Face() display.DisplayShape(surf) display.DisplayShape(obj) #display.DisplayShape(axs_pln(axs)) display.FitAll() start_display() init = "surf1" surf = ["surf2", "surf3", "surf4"] surf1 = SurfSystem("../input/", "surf1") surf2 = SurfSystem("../input/", "surf2") h_surf = BRep_Tool.Surface(surf1.srf) second_derivative(h_surf, 0.5, 0.5) second_derivative(h_surf, 0.5, 0.0) second_derivative(h_surf, 0.0, 0.5) """h_surf = BRep_Tool.Surface(surf2.srf) second_derivative(h_surf, 0.5, 0.5) second_derivative(h_surf, 0.5, 0.0) second_derivative(h_surf, 0.0, 0.5) second_derivative(h_surf, 0.0, 0.0)""" """print(surf1.name, surf1.axs.Location()) print(surf2.name, surf2.axs.Location()) print(surf2.srf) loc_surf = surf2.srf
rad = 0 obj = Geom_ConicalSurface(axs, np.deg2rad(deg), rad) surf = BRepBuilderAPI_MakeFace(obj, -np.pi / 2, np.pi / 2, -100, 100, 1e-6).Face() display.DisplayShape(surf) display.DisplayShape(obj) display.DisplayShape(axs_pln(axs)) display.FitAll() start_display() init = "surf1" surf = ["surf2", "surf3", "surf4"] surf1 = SurfSystem("./", "surf1") surf2 = SurfSystem("./", "surf2") h_surf = BRep_Tool.Surface(surf1.srf) second_derivative(h_surf, 0.5, 0.5) second_derivative(h_surf, 0.5, 0.0) second_derivative(h_surf, 0.0, 0.5) """h_surf = BRep_Tool.Surface(surf2.srf) second_derivative(h_surf, 0.5, 0.5) second_derivative(h_surf, 0.5, 0.0) second_derivative(h_surf, 0.0, 0.5) second_derivative(h_surf, 0.0, 0.0)""" """print(surf1.name, surf1.axs.Location()) print(surf2.name, surf2.axs.Location()) print(surf2.srf) loc_surf = surf2.srf
ax1 = obj.tar.Move_Axs(obj.tar.beam_left, obj.tar.axs, gp_Ax3()) ax2 = obj.tar.Move_Axs(obj.tar.beam_uppr, obj.tar.axs, gp_Ax3()) ax3 = obj.tar.Move_Axs(obj.tar.beam_bott, obj.tar.axs, gp_Ax3()) print(ax.Location()) print(ax0.Location()) print(ax1.Location()) print(ax2.Location()) print(ax3.Location()) obj.Display_Shape(["BLUE", "GREEN"]) print(obj.tar.beam.Location()) for idx, name in enumerate(surf[:-1]): print(name) obj.ini = obj.tar obj.tar = SurfSystem("./", surf[idx + 1]) print(obj.ini.beam.Location()) obj.MultiReflect() print(obj.tar.beam.Location()) print(obj.tar.beam_rght.Location()) print(obj.tar.beam_left.Location()) print(obj.tar.beam_uppr.Location()) print(obj.tar.beam_bott.Location()) obj.Display_Shape(["BLUE", "GREEN"]) obj.display.FitAll() obj.start_display()
ax1 = obj.tar.Move_Axs(obj.tar.beam_left, obj.tar.axs, gp_Ax3()) ax2 = obj.tar.Move_Axs(obj.tar.beam_uppr, obj.tar.axs, gp_Ax3()) ax3 = obj.tar.Move_Axs(obj.tar.beam_bott, obj.tar.axs, gp_Ax3()) print(ax.Location()) print(ax0.Location()) print(ax1.Location()) print(ax2.Location()) print(ax3.Location()) obj.Display_Shape(["BLUE", "GREEN"]) print(obj.tar.beam.Location()) for idx, name in enumerate(surf[:-1]): print(name) obj.ini = obj.tar obj.tar = SurfSystem("../input/", surf[idx + 1]) print(obj.ini.beam.Location()) obj.MultiReflect() print(obj.tar.beam.Location()) print(obj.tar.beam_rght.Location()) print(obj.tar.beam_left.Location()) print(obj.tar.beam_uppr.Location()) print(obj.tar.beam_bott.Location()) obj.Display_Shape(["BLUE", "GREEN"]) obj.display.FitAll() obj.start_display()