() |
## Purpose : This file provides an example of a call to the# function asm_const_coord_3point()## This session file will create a new database by# name ’new.db’ and call the above mentioned # function and create two cylindrical coordinate # frames.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_coord_3point()# has the following arguments:## asm_const_coord_3point# ( output_labels,# coord_frame,# coordtype,# point1,# point2,# point3,# created_labels )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_labels[8]STRING s_coord_frame[8]INTEGER i_coordtypeSTRING s_point1[16]STRING s_point2[16]STRING s_point3[16]STRING sv_created_labels[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating two cylindrical coordinate frames with reference to # coordinate frame "Coord 0".s_output_labels = "1"s_coord_frame = "Coord 0"i_coordtype = 2s_point1 = "[1 1 0] [1 0 1]"s_point2 = "[0 0 1]"s_point3 = "[1 0 0] [1 1 0]"#i_return_value = @ asm_const_coord_3point @ ( s_output_labels, @ s_coord_frame, @ i_coordtype, @ s_point1, @ s_point2, @ s_point3, @ sv_created_labels )dump i_return_valuedump sv_created_labelssys_free_string(sv_created_labels)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_coord_axis()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create two spherical coordinate# frames.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_coord_axis()# has the following arguments:## asm_const_coord_axis# ( output_labels,# plane,# coord_frame,# coordtype,# point1,# point2,# point3,# created_labels )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_labels[8]STRING s_plane[8]STRING s_coord_frame[8]INTEGER i_coordtypeSTRING s_point1[32]STRING s_point2[32]STRING s_point3[32]STRING sv_created_labels[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating two spherical coordinate frames with reference to # coordinate frames "Coord 0".s_output_labels = "1"s_plane = "YZ"s_coord_frame = "Coord 0"i_coordtype = 3s_point1 = "[0.75 0.75 0] [0.5 0.5 1]"s_point2 = "[0 1 0] [0 0 1]"s_point3 = "[0 0 1] [0 1 0]"#i_return_value = @ asm_const_coord_axis @ ( s_output_labels, @ s_plane, @ s_coord_frame, @ i_coordtype, @ s_point1, @ s_point2, @ s_point3, @ sv_created_labels )dump i_return_valuedump sv_created_labelssys_free_string(sv_created_labels)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_coord_euler()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create two rectangular coordinate# frames.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_coord_euler()# has the following arguments:## asm_const_coord_euler# ( output_labels,# axis1,# axis2,# axis3,# angle1,# angle2,# angle3,# coord_frame,# coordtype,# point1,# created_labels )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_labels[8]INTEGER i_axis1INTEGER i_axis2INTEGER i_axis3REAL r_angle1REAL r_angle2REAL r_angle3STRING s_coord_frame[16]INTEGER i_coordtypeSTRING s_point1[32]STRING sv_created_labels[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating two rectangular coordinate frames with reference to # coordinate frame "Coord 0"s_output_labels = "1"i_axis1 = 3i_axis2 = 1i_axis3 = 2r_angle1 = 30.r_angle2 = 43.r_angle3 = 100.s_coord_frame = "Coord 0"i_coordtype = 1s_point1 = "[1 1 0] [-0.5 0 -0.5]"#i_return_value = @ asm_const_coord_euler @ ( s_output_labels, @ i_axis1, @ i_axis2, @ i_axis3, @ r_angle1, @ r_angle2, @ r_angle3, @ s_coord_frame, @ i_coordtype, @ s_point1, @ sv_created_labels )dump i_return_valuedump sv_created_labelssys_free_string(sv_created_labels)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_coord_normal()## This session file will create a new database by# name ’new.db’, a surface will be created. The # above mentioned function will be called and a # rectangular coordinate frame will be created.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_coord_normal()# has the following arguments:## asm_const_coord_normal# ( output_labels,# surface,# coordtype,# point,# created_labels )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_labels[8]STRING s_surface[16]INTEGER i_coordtypeSTRING s_point[32]STRING sv_created_labels[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating a rectangular patch in X-Y plane.i_return_value = @ asm_const_patch_xyz( "1", "<3 2 0>","[1 1 0]",@ "Coord 0", sv_asm_create_patch_xy_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Creating two rectangular coordinate frames with reference to # coordinate frame "Coord 0".s_output_labels = "1"s_surface = "Surface 1 "i_coordtype = 1s_point = "[0.5 0.5 0] [1.0 1.0 0]"#i_return_value = @ asm_const_coord_normal @ ( s_output_labels, @ s_surface, @ i_coordtype, @ s_point, @ sv_created_labels )dump i_return_valuedump sv_created_labelssys_free_string(sv_created_labels)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_2d_arc2point()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create four curves.# # This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_2d_arc2point()# has the following arguments:## asm_const_curve_2d_arc2point# ( output_ids,# ncurves,# arc_angle,# plane_list,# center_point_list,# start_point_list,# end_point_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]INTEGER i_ncurvesINTEGER i_arc_angleSTRING s_plane_list[32]STRING s_center_point_list[16]STRING s_start_point_list[16]STRING s_end_point_list[16]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating two curves in X-Y plane each divided in two segments.s_output_ids = "1"i_ncurves = 2i_arc_angle = 1s_plane_list = "Coord 0.3 Coord 0.1"s_center_point_list = "[1 1 1] [2 2 2]"s_start_point_list = "[0 0 0]"s_end_point_list = "[3 3 3]"#i_return_value = @ asm_const_curve_2d_arc2point @ ( s_output_ids, @ i_ncurves, @ i_arc_angle, @ s_plane_list, @ s_center_point_list, @ s_start_point_list, @ s_end_point_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_2d_arc3point()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create four curves.# # This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_2d_arc3point()# has the following arguments:## asm_const_curve_2d_arc3point# ( output_ids,# ncurves,# create_center,# plane_list,# start_list,# mid_list,# end_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]INTEGER i_ncurvesLOGICAL l_create_centerSTRING s_plane_list[16]STRING s_start_list[16]STRING s_mid_list[16]STRING s_end_list[16]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating two curves in X-Y plane each divided in two segments.s_output_ids = "#"i_ncurves = 2l_create_center = TRUEs_plane_list = "Coord 0.3"s_start_list = "[1 1 0] [2 2 0]"s_mid_list = "[1 4 1]"s_end_list = "[3 3 0]"#i_return_value = @ asm_const_curve_2d_arc3point @ ( s_output_ids, @ i_ncurves, @ l_create_center, @ s_plane_list, @ s_start_list, @ s_mid_list, @ s_end_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_2d_circle()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create two circles.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_2d_circle()# has the following arguments:## asm_const_curve_2d_circle# ( output_ids,# ncurves,# radius_method,# radius,# plane_list,# radius_point_list,# center_point_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]INTEGER i_ncurvesINTEGER i_radius_methodREAL r_radiusSTRING s_plane_list[32]STRING s_radius_point_list[32]STRING s_center_point_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Calling function to create two circles in two perpendicular planes# and each divided in 10 segments. Circles are drawn using point# location method to define radius.s_output_ids = "#"i_ncurves = 10i_radius_method = 2s_plane_list = "Coord 0.3 Coord 0.2"s_radius_point_list = "[0 0 0] [1 1 0]"s_center_point_list = "[5 5 0] [0 0 0]"#i_return_value = @ asm_const_curve_2d_circle @ ( s_output_ids, @ i_ncurves, @ i_radius_method, @ r_radius, @ s_plane_list, @ s_radius_point_list, @ s_center_point_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_arc3point()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create two curves in 3D space.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_arc3point()# has the following arguments:## asm_const_curve_arc3point# ( output_ids,# ncurves,# create_center,# start_list,# mid_list,# end_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]INTEGER i_ncurvesLOGICAL l_create_centerSTRING s_start_list[32]STRING s_mid_list[32]STRING s_end_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating two curves in 3D space each divided into 4 segments.s_output_ids = "#"i_ncurves = 4l_create_center = TRUEs_start_list = "[0 0 0] [1 1 0]"s_mid_list = "[-1 -2 0] [1 2 0]"s_end_list = "[-1 1 3] [1 -1 -4]"#i_return_value = @ asm_const_curve_arc3point @ ( s_output_ids, @ i_ncurves, @ l_create_center, @ s_start_list, @ s_mid_list, @ s_end_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_bspline()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create a bspline closed curve.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_bspline()# has the following arguments:## asm_const_curve_bspline# ( output_ids,# ncurves,# point_list,# order,# interpolate,# param_method,# closed,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]INTEGER i_ncurvesSTRING s_point_list[64]INTEGER i_orderLOGICAL l_interpolateINTEGER i_param_methodLOGICAL l_closedSTRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating a four segment fourth order closed piecewise cubic curve.s_output_ids = "#"i_ncurves = 4s_point_list = "[0 0 0][1 1 1][-1 .5 1][0 1 1]"i_order = 4l_interpolate = TRUEi_param_method = 1l_closed = TRUE#i_return_value = @ asm_const_curve_bspline @ ( s_output_ids, @ i_ncurves, @ s_point_list, @ i_order, @ l_interpolate, @ i_param_method, @ l_closed, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_extract()## This session file will create a new database by# name ’new.db’ and create a surface. The above # mentioned function will be called to create a # curve on the surface.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_extract()# has the following arguments:## asm_const_curve_extract# ( output_ids,# surface_list,# direction,# param_pos,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]STRING s_surface_list[16]INTEGER i_directionREAL r_param_posSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating a surface.i_return_value = @ asm_const_patch_xyz( "1", "<1 1 0>","[0 0 0]",@ "Coord 0", sv_asm_create_patch_xy_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Creating a curve on surface along constant U direction.s_output_ids = "#"s_surface_list = "Surface 1"i_direction = 1r_param_pos = 0.4#i_return_value = @ asm_const_curve_extract @ ( s_output_ids, @ s_surface_list, @ i_direction, @ r_param_pos, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_crtd_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_extract_edge()## This session file will create a new database by# name ’new.db’ and create a surface. The above # mentioned function will be called to create # curves on the surface edges.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_extract_edge()# has the following arguments:## asm_const_curve_extract_edge# ( output_ids,# edge_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]STRING s_edge_list[16]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating a surface.i_return_value = @ asm_const_patch_xyz( "1", "<1 1 0>","[0 0 0]",@ "Coord 0", sv_asm_create_patch_xy_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Creating curves on two edges of the surface.s_output_ids = "#"s_edge_list = "Surface 1.1 1.3"#i_return_value = @ asm_const_curve_extract_edge @ ( s_output_ids, @ s_edge_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_crtd_ids)#--------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_intersect()## This session file will create a new database by# name ’new.db’ and create a surface. The above # mentioned function will be called to create a # curve on the surface.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_intersect()# has the following arguments:## asm_const_curve_intersect# ( output_ids,# method,# surface1_list,# surface2_list,# ncurves,# fit_tol,# int_tol,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]INTEGER i_methodSTRING s_surface1_list[16]STRING s_surface2_list[16]INTEGER i_ncurvesREAL r_fit_tolREAL r_int_tolSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Changing view to Isometric View 1.i_return_value = ga_view_aa_set(23., -34., 0)dump i_return_value#---------------------------------------------------------------------# Creating two surfaces.i_return_value = @ asm_const_patch_xyz( "1", "<2 2 0>","[0 0 0]",@ "Coord 0", sv_asm_create_patch_xy_crtd_ids )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "2","<3 2 -5>","[-1 1 3]",@ "Coord 0", sv_asm_create_patch_xy_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Creating a curve where the two surfaces intersect. The curve is # divided in 3 segments.s_output_ids = "#"i_method = 1s_surface1_list = "Surface 1"s_surface2_list = "Surface 2"i_ncurves = 3r_fit_tol = 1e-08r_int_tol = 0.1#i_return_value = @ asm_const_curve_intersect @ ( s_output_ids, @ i_method, @ s_surface1_list, @ s_surface2_list, @ i_ncurves, @ r_fit_tol, @ r_int_tol, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_crtd_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_involute()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create two involutes.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_involute()# has the following arguments:## asm_const_curve_involute# ( output_ids,# axis,# option,# scalar1,# scalar2,# ncurves,# coord_frame,# point,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]STRING s_axis[16]INTEGER i_optionREAL r_scalar1REAL r_scalar2INTEGER i_ncurvesSTRING s_coord_frame[16]STRING s_point[16]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Calling function to create two involutes around Z axis.s_output_ids = "#"s_axis = "Coord 0.3"i_option = 1r_scalar1 = 1.0r_scalar2 = 5.3i_ncurves = 4s_coord_frame = "Coord 0"s_point = "[0 3 0] [0 1 0]"#i_return_value = @ asm_const_curve_involute @ ( s_output_ids, @ s_axis, @ i_option, @ r_scalar1, @ r_scalar2, @ i_ncurves, @ s_coord_frame, @ s_point, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_loft()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create a curve based on end slopes## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_loft()# has the following arguments:## asm_const_curve_loft# ( output_ids,# ncurves,# slope_control,# point_list,# slope_list1,# slope_list2,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]INTEGER i_ncurvesLOGICAL l_slope_controlSTRING s_point_list[64]STRING s_slope_list1[16]STRING s_slope_list2[16]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Setting view to Isometric View 2.i_return_value = ga_view_aa_set(23., 56., 0)dump i_return_value#---------------------------------------------------------------------# Creating a curve divided in four segments and passing through four# points. Curve is also constrained by end slopes.s_output_ids = "#"i_ncurves = 4l_slope_control = TRUEs_point_list = "[0 0 0] [2.5 1 0] [2.3 .6 0] [3 1 1]"s_slope_list1 = "<1 4 0.5>"s_slope_list2 = "<1 -1.5 0>"#i_return_value = @ asm_const_curve_loft @ ( s_output_ids, @ i_ncurves, @ l_slope_control, @ s_point_list, @ s_slope_list1, @ s_slope_list2, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_manifold_2point()## This session file will create a new database by# name ’new.db’ and create a surface. The above # mentioned function will create two curves on # the surface.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_manifold_2point()# has the following arguments:## asm_const_curve_manifold_2point# ( output_ids,# surface_list,# point1_list,# point2_list,# ncurves,# fit_tol,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]STRING s_surface_list[16]STRING s_point1_list[32]STRING s_point2_list[32]INTEGER i_ncurvesREAL r_fit_tolSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_sgm_create_surface_crtd_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating a surface by giving vertex points.i_return_value = @ sgm_const_surface_vertex( "1", "[0 0 0]", @ "[4 1 -.5]", "[3.5 2.1 4]", "[-.5 3 2.2]", @ sv_sgm_create_surface_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Changing view for proper view of the surface.i_return_value = ga_view_aa_set( -105., 0., -30. )dump i_return_value#---------------------------------------------------------------------# Making the surface interior clear on the screen.i_return_value = ga_display_lines_set( "general", 5 )dump i_return_value#---------------------------------------------------------------------# Creating 2 curves on the surface. Number of segments per curve will# be decided by the curve fit tolerance.s_output_ids = "#"s_surface_list = "Surface 1"s_point1_list = "[0 0 0][.5 .5 0]"s_point2_list = "[.75 .35 3] [.1 .9 0]"i_ncurves = 0r_fit_tol = 1e-05#i_return_value = @ asm_const_curve_manifold_2point @ ( s_output_ids, @ s_surface_list, @ s_point1_list, @ s_point2_list, @ i_ncurves, @ r_fit_tol, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_sgm_create_surface_crtd_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_manifold_npoint()## This session file will create a new database by# name ’new.db’ and create a surface. The above # mentioned function will create a curve on the# surface.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_manifold_npoint()# has the following arguments:## asm_const_curve_manifold_npoint# ( output_ids,# surface,# point_list,# ncurves,# fit_tol,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]STRING s_surface[16]STRING s_point_list[64]INTEGER i_ncurvesREAL r_fit_tolSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_sgm_create_surface_crtd_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating a surface by giving vertex points.i_return_value = @ sgm_const_surface_vertex( "1", "[0 0 0]", @ "[4 1 -.5]", "[3.5 2.1 4]", "[-.5 3 2.2]", @ sv_sgm_create_surface_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Changing view for proper view of the surface.i_return_value = ga_view_aa_set( -105., 0., -30. )dump i_return_value#---------------------------------------------------------------------# Making the surface interior clear on the screen.i_return_value = ga_display_lines_set( "general", 5 )dump i_return_value#---------------------------------------------------------------------# Creating 1 curve on the surface. Number of segments for curve will # be decided by the curve fit tolerance.s_output_ids = "#"s_surface = "Surface 1"s_point_list = "[0 0 0] [.75 .35 3] [.5 .5 0] [.1 .9 0]"i_ncurves = 0r_fit_tol = 1e-05#i_return_value = @ asm_const_curve_manifold_npoint @ ( s_output_ids, @ s_surface, @ s_point_list, @ i_ncurves, @ r_fit_tol, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_sgm_create_surface_crtd_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_project()## This session file will create a new database by# name ’new.db’ and create a surface and a curve.# The above mentioned function will project the # curve on the surface and create a curve.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_project()# has the following arguments:## asm_const_curve_project# ( output_ids,# curve_list,# surface_list,# delete_org,# method,# vector,# coord_frame,# ncurves,# prjtol,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]STRING s_curve_list[16]STRING s_surface_list[16]LOGICAL l_delete_orgINTEGER i_methodSTRING s_vector[16]STRING s_coord_frame[16]INTEGER i_ncurvesREAL r_prjtolSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_sgm_create_surface_crtd_ids[VIRTUAL]STRING sv_asm_line_3point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling curve and point label.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating a surface by giving vertex points.i_return_value = @ sgm_const_surface_vertex( "1", "[0 0 0]", @ "[4 1 -.5]", "[3.5 2.1 4]", "[-.5 3 2.2]", @ sv_sgm_create_surface_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Creating a curve by specifying three points.i_return_value = @ asm_const_line_3point( "1", "[1 1 .5]", @ "[.4 -.2 1]", "[3 0 -.1]", 1, 0.5, @ sv_asm_line_3point_created_ids )dump i_return_value#---------------------------------------------------------------------# Changing view for proper view of the surface.i_return_value = ga_view_aa_set( 140., -5., -70. )dump i_return_value#---------------------------------------------------------------------# Making the surface interior clear on the screen.i_return_value = ga_display_lines_set( "general", 5 )dump i_return_value#---------------------------------------------------------------------# Creating a projected curve on the surface without deleting the old.# The number of the segments will depend on the projection tolerance.s_output_ids = "#"s_curve_list = "Curve 1"s_surface_list = "Surface 1"l_delete_org = FALSEi_method = 3s_vector = "<0 1 0>"s_coord_frame = "Coord 0"i_ncurves = 0r_prjtol = 1e-05#i_return_value = @ asm_const_curve_project @ ( s_output_ids, @ s_curve_list, @ s_surface_list, @ l_delete_org, @ i_method, @ s_vector, @ s_coord_frame, @ i_ncurves, @ r_prjtol, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_sgm_create_surface_crtd_ids)sys_free_string(sv_asm_line_3point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_curve_revolve()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create three curves.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_curve_revolve()# has the following arguments:## asm_const_curve_revolve# ( output_ids,# axis,# angle,# offset,# coord_frame,# ncurves,# point,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]STRING s_axis[16]REAL r_angleREAL r_offsetSTRING s_coord_frame[16]INTEGER i_ncurvesSTRING s_point[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling curve and point label.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating three curves by revolving points around Z axis. Each curve# will divided in five segments.s_output_ids = "#"s_axis = "Coord 0.3"r_angle = 120r_offset = 10.0s_coord_frame = "Coord 0"i_ncurves = 5s_point = "[0 1 0] [0 2 2] [0 3 3]"#i_return_value = @ asm_const_curve_revolve @ ( s_output_ids, @ s_axis, @ r_angle, @ r_offset, @ s_coord_frame, @ i_ncurves, @ s_point, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_grid_arccenter()## This session file will create a new database by# name ’new.db’ and create a curve. The above # mentioned function will be called to create a # point at the centre of the curve.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_grid_arccenter()# has the following arguments:## asm_const_grid_arccenter# ( output_ids,# curve_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_curve_list[32]STRING sv_created_ids[VIRTUAL]STRING sv_asm_line_3point_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point label.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating a curve using three point option.i_return_value = @ asm_const_line_3point( "2", @ "[ -0.220241 0.077918 0.215462 ] ", @ "[ 0.099881 0.344888 -0.137155 ] ", @ "[ 0.836730 -0.053878 -0.429993 ] ",1, 0.5,@ sv_asm_line_3point_created_ids )dump i_return_value#---------------------------------------------------------------------# Calling function to create point at the centre of the above line.s_output_ids = ""s_curve_list = "Curve 2 "#i_return_value = @ asm_const_grid_arccenter @ ( s_output_ids, @ s_curve_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_line_3point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_grid_extract()## This session file will create a new database by# name ’new.db’ and create curves. Then the # above mentioned function will be called and # points will be created.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_grid_extract()# has the following arguments:## asm_const_grid_extract# ( output_ids,# curve_list,# param_pos,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_curve_list[32]REAL r_param_posSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_line_3point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point label.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating curves from three points.i_return_value = @ asm_const_line_3point( "1", @ "[ 0.22 0.07 0.21 ] ", @ "[ 0.09 0.34 0.13 ] [ 0 -0.5 0.1 ]", @ "[ 0.83 -0.05 -0.43 ] [ -0.5 0.25 0 ]", 1, @ 0.5, sv_asm_line_3point_created_ids )dump i_return_value#---------------------------------------------------------------------# Creating grid point on the curves.s_output_ids = "#"s_curve_list = "Curve 1 2"r_param_pos = 0.6i_return_value = @ asm_const_grid_extract @ ( s_output_ids, @ s_curve_list, @ r_param_pos, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_line_3point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_grid_extract_v1()## This session file will create a new database by# name ’new.db’ and create curves. Then the # above mentioned function will be called and # points will be created.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_grid_extract_v1()# has the following arguments:## asm_const_grid_extract_v1# ( output_ids,# curve_list,# parametric_pos,# param_method,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_curve_list[32]REAL r_parametric_posINTEGER i_param_methodSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_line_3point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point label.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating curves from three points.i_return_value = @ asm_const_line_3point( "1", @ "[ 0.22 0.07 0.21 ] ", @ "[ 0.09 0.34 0.13 ] [ 0 -0.5 0.1 ]", @ "[ 0.83 -0.05 -0.43 ] [ -0.5 0.25 0 ]", 1, @ 0.5, sv_asm_line_3point_created_ids )dump i_return_value#---------------------------------------------------------------------# Creating grid point on the curves based on arc lengths.s_output_ids = "#"s_curve_list = "Curve 1 2"r_parametric_pos = 0.6i_param_method = 1i_return_value = @ asm_const_grid_extract_v1 @ ( s_output_ids, @ s_curve_list, @ r_parametric_pos, @ i_param_method, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_line_3point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_grid_interp_curve()## This session file will create a new database by# name ’new.db’ and create curves. Then the # above mentioned function will be called and # points will be created.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_grid_interp_curve()# has the following arguments:## asm_const_grid_interp_curve# ( output_ids,# curve_list,# space_ratio,# num_points,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_curve_list[32]REAL r_space_ratioINTEGER i_num_pointsSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_line_3point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point label.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating curves from three points.i_return_value = @ asm_const_line_3point( "1", @ "[ 0.22 0.07 0.21 ] ", @ "[ 0.09 0.34 0.13 ] [ 0 -0.5 0.1 ]", @ "[ 0.83 -0.05 -0.43 ] [ -0.5 0.25 0 ]", 1, @ 0.5, sv_asm_line_3point_created_ids )dump i_return_value#---------------------------------------------------------------------# Creating points from the curvess_output_ids = "#"s_curve_list = "Curve 1 2"r_space_ratio = 1.5i_num_points = 4i_return_value = @ asm_const_grid_interp_curve @ ( s_output_ids, @ s_curve_list, @ r_space_ratio, @ i_num_points, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_line_3point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_grid_interp_curve_v1()## This session file will create a new database by# name ’new.db’ and create curves. Then the # above mentioned function will be called and # points will be created.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_grid_interp_curve_v1()# has the following arguments:## asm_const_grid_interp_curve_v1# ( output_ids,# curve_list,# space_ratio,# num_points,# param_method,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_curve_list[32]REAL r_space_ratioINTEGER i_num_pointsINTEGER i_param_methodSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_line_3point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point label.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating curves from three points.i_return_value = @ asm_const_line_3point( "1", @ "[ 0.22 0.07 0.21 ] ", @ "[ 0.09 0.34 0.13 ] [ 0 -0.5 0.1 ]", @ "[ 0.83 -0.05 -0.43 ] [ -0.5 0.25 0 ]", 1, @ 0.5, sv_asm_line_3point_created_ids )dump i_return_value#---------------------------------------------------------------------# Creating points from the curves based on the parametric values.s_output_ids = "#"s_curve_list = "Curve 1 2"r_space_ratio = 1.5i_num_points = 4i_param_method = 2i_return_value = @ asm_const_grid_interp_curve_v1 @ ( s_output_ids, @ s_curve_list, @ r_space_ratio, @ i_num_points, @ i_param_method, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_line_3point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_grid_interp_point()## This session file will create a new database by# name ’new.db’ and the above mentioned function# will be called and points will be created.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_grid_interp_point()# has the following arguments:## asm_const_grid_interp_point# ( output_ids,# point1_list,# point2_list,# space_ratio,# num_points,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_point1_list[32]STRING s_point2_list[32]REAL r_space_ratioINTEGER i_num_pointsSTRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point label.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Points will be created between two points and origin.s_output_ids = "#"s_point1_list = "[0 0 0]"s_point2_list = "[1 0 0] [1 1 0]"r_space_ratio = 1.33i_num_points = 4#i_return_value = @ asm_const_grid_interp_point @ ( s_output_ids, @ s_point1_list, @ s_point2_list, @ r_space_ratio, @ i_num_points, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_grid_intersect()## This session file will create a new database by# name ’new.db’ and create two curves. Then the # above mentioned function will be called and # points will be created.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_grid_intersect()# has the following arguments:## asm_const_grid_intersect# ( output_ids,# curve1_list,# curve2_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_curve1_list[32]STRING s_curve2_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_line_3point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point label.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating two curves based on three points.i_return_value = @ asm_const_line_3point( "1","[0 0 0][0 0.5 0]",@ "[1 1 0][0.5 .1 0]","[1 -1 0][2 1 0][1 2 0]@ ", 1, 0.5, sv_asm_line_3point_created_ids)dump i_return_value#---------------------------------------------------------------------# Creating point at the intersection of the two curves.s_output_ids = "#"s_curve1_list = "Curve 1"s_curve2_list = "Curve 2 3"#i_return_value = @ asm_const_grid_intersect @ ( s_output_ids, @ s_curve1_list, @ s_curve2_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_line_3point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_grid_offset()## This session file will create a new database by# name ’new.db’ and create a point and a curve # passing through it. Then the above mentioned # function will be called and points will be # created.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_grid_offset()# has the following arguments:## asm_const_grid_offset# ( output_ids,# distance,# point_list,# curvepoint_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]REAL r_distanceSTRING s_point_list[32]STRING s_curvepoint_list[128]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_line_3point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point label.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating a point by giving coordinates.i_return_value = @ asm_const_grid_xyz("1", @ "[ 0.099881 0.344888 -0.137155 ] ", @ "Coord 0", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Creating a curve from three points.i_return_value = @ asm_const_line_3point( "1", @ "[ -0.220241 0.077918 0.215462 ] ", @ " point 1 ", @ "[ 0.836730 -0.053878 -0.429993 ] ", 1, @ 0.5, sv_asm_line_3point_created_ids )dump i_return_value#---------------------------------------------------------------------# Creating a point at a distance from the point created before.s_output_ids = "#"r_distance = 0.33s_point_list = "point 1"s_curvepoint_list = "Construct PointCurveUOnCurve (Evaluate "// @ "Geometry (point 2)) (Evaluate Geometry (Curve 1 ))"i_return_value = @ asm_const_grid_offset @ ( s_output_ids, @ r_distance, @ s_point_list, @ s_curvepoint_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_line_3point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_grid_pierce()## This session file will create a new database by# name ’new.db’. A surface and a curve # intersecting the surface will be created. The # above mentioned function will be called to # create a point at the intersection of the curve# and surface.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_grid_pierce()# has the following arguments:## asm_const_grid_pierce# ( output_ids,# curve_list,# surface_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_curve_list[32]STRING s_surface_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]STRING sv_asm_line_3point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point label.curve_label(TRUE)point_label(TRUE)surface_label(TRUE)#---------------------------------------------------------------------# Changing view to Isometric-1.i_return_value = ga_view_aa_set(23., -34., 0.)dump i_return_value#---------------------------------------------------------------------# Creating a surface.i_return_value = @ asm_const_patch_xyz( "1", "<2 0 1>", @ "[0 0.5 -0.5]", "Coord 0", @ sv_asm_create_patch_xy_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Creating a line by giving 3 points.i_return_value = @ asm_const_line_3point( "1", "[0 0 0]", @ "[1 1 0]", "[1 -1 0]", 1, 0.5, @ sv_asm_line_3point_created_ids )dump i_return_value#---------------------------------------------------------------------# Creating point at the intersection of line and plane.s_output_ids = "#"s_curve_list = "Curve 1"s_surface_list = "Surface 1"#i_return_value = @ asm_const_grid_pierce @ ( s_output_ids, @ s_curve_list, @ s_surface_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_crtd_ids)sys_free_string(sv_asm_line_3point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_grid_xyz()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create points.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_grid_xyz()# has the following arguments:## asm_const_grid_xyz# ( output_ids,# coordinates_list,# coord_frame,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_coordinates_list[32]STRING s_coord_frame[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point label.point_label(TRUE)#---------------------------------------------------------------------# Calling function to create points from coordinates.s_output_ids = "#"s_coordinates_list = "[0 0 0] [1 1 1]"s_coord_frame = "Coord 0"#i_return_value = @ asm_const_grid_xyz @ ( s_output_ids, @ s_coordinates_list, @ s_coord_frame, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_hpat_2surface()## This session file will create a new database by# name ’new.db’ and four surfaces and a solid, as# a manifold, will be created. The four surfaces # in a group of two will be used to create solids# using above mentioned function.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_hpat_2surface()# has the following arguments:## asm_const_hpat_2surface# ( output_ids,# surface1_list,# surface2_list,# manifold_type,# manifold_id,# auto_align,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_surface1_list[32]STRING s_surface2_list[32]INTEGER i_manifold_typeSTRING s_manifold_id[32]LOGICAL l_auto_alignSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set(23.,-34.,0)dump i_return_valuei_return_value = @ ga_group_display_set("default_group","general")dump i_return_valuei_return_value = @ ga_display_lines_set( "general", 2 )dump i_return_valuesolid_label(TRUE)surface_label(TRUE)#---------------------------------------------------------------------# Creating two surfaces.i_return_value = @ asm_const_patch_xyz( "#", "<1 0 1>", @ "[0 0 0] [3 0.1 0]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "#", "<0.5 0 0.5>", @ "[0.25 1 0.25] [3.25 0.9 0.25]", "Coord 0",@ sv_asm_create_patch_xy_created )dump i_return_value#---------------------------------------------------------------------# Creating manifold solid.i_return_value = @ asm_const_hpat_xyz("1", "<4 0.8 3>", @ "[0 0.1 0]", "Coord 0", sv_created_ids)dump i_return_value#---------------------------------------------------------------------# Create solids from the surfaces created and using the solid as # manifold entity.s_output_ids = "#"s_surface1_list = "surface 1 2"s_surface2_list = "surface 3 4"i_manifold_type = 3s_manifold_id = "solid 1"l_auto_align = TRUE#i_return_value = @ asm_const_hpat_2surface @ ( s_output_ids, @ s_surface1_list, @ s_surface2_list, @ i_manifold_type, @ s_manifold_id, @ l_auto_align, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_hpat_3surface()## This session file will create a new database by# name ’new.db’ and six surfaces will be created.# The six surfaces in a group of two will be used# to create solids using above mentioned function## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_hpat_3surface()# has the following arguments:## asm_const_hpat_3surface# ( output_ids,# surface1_list,# surface2_list,# surface3_list,# param_pos,# auto_align,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_surface1_list[32]STRING s_surface2_list[32]STRING s_surface3_list[32]REAL r_param_posLOGICAL l_auto_alignSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set(23.,-34.,0)dump i_return_valuei_return_value = @ ga_group_display_set("default_group","general")dump i_return_valuei_return_value = @ ga_display_lines_set( "general", 2 )dump i_return_valuesolid_label(TRUE)surface_label(TRUE)#---------------------------------------------------------------------# Creating six surfaces.i_return_value = @ asm_const_patch_xyz( "#", "<1 0 1>", @ "[0 0 0] [3 0 0]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "#", "<0.5 0 0.5>", @ "[-0.25 1 0.25] [2 1 -0.5]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "#", "<0.5 0 0.5>", @ "[0.25 2 0.25] [1.5 2 1]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_value#---------------------------------------------------------------------# Creating solids using two groups of three surfaces.s_output_ids = "#"s_surface1_list = "surface 1 2"s_surface2_list = "surface 3 4"s_surface3_list = "surface 5 6"r_param_pos = 0.7l_auto_align = FALSE#i_return_value = @ asm_const_hpat_3surface @ ( s_output_ids, @ s_surface1_list, @ s_surface2_list, @ s_surface3_list, @ r_param_pos, @ l_auto_align, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_asm_create_patch_xy_created)sys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_hpat_4surface()## This session file will create a new database by# name ’new.db’ and eight surfaces will be # created. The eight surfaces in a group of two # will be used to create solids using above # mentioned function## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_hpat_4surface()# has the following arguments:## asm_const_hpat_4surface# ( output_ids,# surface1_list,# surface2_list,# surface3_list,# surface4_list,# param_pos1,# param_pos2,# auto_align,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_surface1_list[32]STRING s_surface2_list[32]STRING s_surface3_list[32]STRING s_surface4_list[32]REAL r_param_pos1REAL r_param_pos2LOGICAL l_auto_alignSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set(23.,-34.,0)dump i_return_valuei_return_value = @ ga_group_display_set("default_group","general")dump i_return_valuei_return_value = @ ga_display_lines_set( "general", 2 )dump i_return_valuesolid_label(TRUE)surface_label(TRUE)#---------------------------------------------------------------------# Creating surfaces.i_return_value = @ asm_const_patch_xyz( "#", "<1 0 1>", @ "[0 0 0] [1 0 0]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "#", "<0.5 0 0.5>", @ "[-0.25 1 0.25] [1 1 0]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "#", "<0.5 0 0.5>", @ "[0.25 2 0.25] [1.33 2 -0.33]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "#", "<1 0 1>", @ "[0.5 3 0.5] [1.75 3.1 1]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_value#---------------------------------------------------------------------# Creating solids by using two groups of four surfaces.s_output_ids = "#"s_surface1_list = "surface 1 2"s_surface2_list = "surface 3 4"s_surface3_list = "surface 5 6"s_surface4_list = "surface 7 8"r_param_pos1 = 0.33r_param_pos2 = 0.66l_auto_align = TRUE#i_return_value = @ asm_const_hpat_4surface @ ( s_output_ids, @ s_surface1_list, @ s_surface2_list, @ s_surface3_list, @ s_surface4_list, @ r_param_pos1, @ r_param_pos2, @ l_auto_align, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_asm_create_patch_xy_created)sys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_hpat_face()## This session file will create a new database by# name ’new.db’ and six surfaces will be created.# The six surfaces will be used to create a solid# using above mentioned function.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_hpat_face()# has the following arguments:## asm_const_hpat_face# ( output_ids,# surface1_list,# surface2_list,# surface3_list,# surface4_list,# surface5_list,# surface6_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_surface1_list[32]STRING s_surface2_list[32]STRING s_surface3_list[32]STRING s_surface4_list[32]STRING s_surface5_list[32]STRING s_surface6_list[128]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_created[VIRTUAL]STRING sv_asm_line_2point_created_ids[VIRTUAL]STRING sv_sgm_surface_4edge_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set(23., -34., 0)dump i_return_value#---------------------------------------------------------------------# Creating three surfaces.i_return_value = @ asm_const_patch_xyz("", @ "<2 0 1><0 1 1><1 0 1>", @ "[0 0 0][0 0 0][0 1 0]","coord 0", @ sv_asm_create_patch_xy_created ) dump i_return_value# Creating two curves.i_return_value = @ asm_const_line_2point( "#", "Point 8 7", @ "Point 3 2", 0, "", 50., 1, @ sv_asm_line_2point_created_ids )dump i_return_value# Creating three surfaces.i_return_value = @ sgm_const_surface_4edge( "", @ "Surface 3.1 Surface 3.3 Surface 3.2 ", @ "Surface 2.4 Surface 2.2 Curve 1 ", @ "Surface 1.1 Surface 1.3 Surface 1.2 ", @ "Curve 2 Curve 1 Curve 2 ", @ sv_sgm_surface_4edge_created )dump i_return_valuesolid_label(TRUE)surface_label(TRUE)#---------------------------------------------------------------------# Creating a Solid with the created six surfaces.s_output_ids = "#"s_surface1_list = "surface 1"s_surface2_list = "surface 2"s_surface3_list = "surface 3"s_surface4_list = "surface 4"s_surface5_list = "surface 5"s_surface6_list = "surface 6"#i_return_value = @ asm_const_hpat_face @ ( s_output_ids, @ s_surface1_list, @ s_surface2_list, @ s_surface3_list, @ s_surface4_list, @ s_surface5_list, @ s_surface6_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)sys_free_string(sv_asm_line_2point_created_ids)sys_free_string(sv_sgm_surface_4edge_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_hpat_vertex()## This session file will create a new database by# name ’new.db’. The above mentioned function # will be used to create a solid from eight point# coordinates.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_hpat_vertex()# has the following arguments:## asm_const_hpat_vertex# ( output_ids,# point1_list,# point2_list,# point3_list,# point4_list,# point5_list,# point6_list,# point7_list,# point8_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_point1_list[32]STRING s_point2_list[32]STRING s_point3_list[32]STRING s_point4_list[32]STRING s_point5_list[32]STRING s_point6_list[32]STRING s_point7_list[32]STRING s_point8_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set(23.,-34.,0)dump i_return_valuei_return_value = @ ga_group_display_set("default_group","general")dump i_return_valuei_return_value = @ ga_display_lines_set( "general", 2 )dump i_return_valuesolid_label(TRUE)#---------------------------------------------------------------------# Creating a solid by giving the vertex locations.s_output_ids = "#"s_point1_list = "[0 0 0]"s_point2_list = "[1 0.1 -0.25]"s_point3_list = "[1.1 0.15 1.25]"s_point4_list = "[0.2 0.05 0.95]"s_point5_list = "[0.25 1.5 0.25]"s_point6_list = "[1.25 1.5 0]"s_point7_list = "[1.35 1 1.6]"s_point8_list = "[0.55 1 1.3]"#i_return_value = @ asm_const_hpat_vertex @ ( s_output_ids, @ s_point1_list, @ s_point2_list, @ s_point3_list, @ s_point4_list, @ s_point5_list, @ s_point6_list, @ s_point7_list, @ s_point8_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_hpat_xyz()## This session file will create a new database by# name ’new.db’. The above mentioned function# will be used to create a solid by giving solid# origin and orientation.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_hpat_xyz()# has the following arguments:## asm_const_hpat_xyz# ( output_ids,# solid_length,# solid_origin,# coord_frame,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]STRING s_solid_length[16]STRING s_solid_origin[16]STRING s_coord_frame[16]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set(23.,-34.,0)dump i_return_valuei_return_value = @ ga_group_display_set("default_group","general")dump i_return_valuei_return_value = @ ga_display_lines_set( "general", 2 )dump i_return_valuesolid_label(TRUE)#---------------------------------------------------------------------# Creating a solid.s_output_ids = "#"s_solid_length = "<1.1 2.2 3.3>"s_solid_origin = "[0.1 0.2 0.3]"s_coord_frame = "Coord 0"#i_return_value = @ asm_const_hpat_xyz @ ( s_output_ids, @ s_solid_length, @ s_solid_origin, @ s_coord_frame, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_2point()## This session file will create a new database by# name ’new.db’ and create a surface. This# surface will be used as manifold entity for # creating lines using the above mentioned # function.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_2point()# has the following arguments:## asm_const_line_2point# ( output_ids,# point1_list,# point2_list,# i_manifold_type,# manifold_id,# num_interp,# num_lines,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_point1_list[32]STRING s_point2_list[32]INTEGER i_manifold_typeSTRING s_manifold_id[32]INTEGER i_num_interpINTEGER i_num_linesSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set(-67., 0., -34.)dump i_return_valuesurface_label(TRUE)curve_label(TRUE)#---------------------------------------------------------------------# Creating a surface to be used as manifold entity.i_return_value = @ asm_const_patch_xyz( "1","<1 0.5 0>","[0 0 0]"@ , "Coord 0", sv_asm_create_patch_xy_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Creating two lines.s_output_ids = "#"s_point1_list = "[-0.25 -0.25 0.5][0.25 0.25 0.5]"s_point2_list = "[1.25 0.25 0.5][0.75 0.25 0.5]"i_manifold_type = 2s_manifold_id = "surface 1"i_num_interp = 6i_num_lines = 6#i_return_value = @ asm_const_line_2point @ ( s_output_ids, @ s_point1_list, @ s_point2_list, @ i_manifold_type, @ s_manifold_id, @ i_num_interp, @ i_num_lines, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_crtd_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_3point()## This session file will create a new database by# name ’new.db’. The above mentioned function # will be called to create two lines.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_3point()# has the following arguments:## asm_const_line_3point# ( output_ids,# point1_list,# point2_list,# point3_list,# param_method,# param_pos,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_point1_list[32]STRING s_point2_list[32]STRING s_point3_list[32]INTEGER i_param_methodREAL r_param_posSTRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------curve_label(TRUE)#---------------------------------------------------------------------# Creating two lines by giving parametric position of midpoint.s_output_ids = "#"s_point1_list = "[-0.25 -0.25 0.5][0.25 0.25 0.5]"s_point2_list = "[1 0.25 0.5][0.75 0.5 0.5]"s_point3_list = "[1.25 0.25 0.5][0.75 0.25 0.5]"i_param_method = 1r_param_pos = 0.6#i_return_value = @ asm_const_line_3point @ ( s_output_ids, @ s_point1_list, @ s_point2_list, @ s_point3_list, @ i_param_method, @ r_param_pos, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_4point()## This session file will create a new database by# name ’new.db’ and above mentioned function will# be called by giving coordinates as input.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_4point()# has the following arguments:## asm_const_line_4point# ( output_ids,# point1_list,# point2_list,# point3_list,# point4_list,# param_method,# param_pos1,# param_pos2,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_point1_list[32]STRING s_point2_list[32]STRING s_point3_list[32]STRING s_point4_list[32]INTEGER i_param_methodREAL r_param_pos1REAL r_param_pos2STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------curve_label(TRUE)#---------------------------------------------------------------------# Creating two lines by giving parametric position of two internal # points.s_output_ids = "#"s_point1_list = "[-0.25 -0.25 0.5][0.25 0.25 0.5]"s_point2_list = "[1 0.25 0.5][0.75 0.5 0.5]"s_point3_list = "[1.25 0.25 0.5][0.75 0.25 0.5]"s_point4_list = "[0.6 0 0.3]"i_param_method = 1r_param_pos1 = 0.3r_param_pos2 = 0.8#i_return_value = @ asm_const_line_4point @ ( s_output_ids, @ s_point1_list, @ s_point2_list, @ s_point3_list, @ s_point4_list, @ i_param_method, @ r_param_pos1, @ r_param_pos2, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_arc3point()## This session file will create a new database by# name ’new.db’ and call the above mentioned # function to create two curves.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_arc3point()# has the following arguments:## asm_const_line_arc3point# ( output_ids,# num_lparc,# point1_list,# point2_list,# point3_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]INTEGER i_num_lparcSTRING s_point1_list[32]STRING s_point2_list[32]STRING s_point3_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------curve_label(TRUE)#---------------------------------------------------------------------# Creating two arcs with 5 lines per arc.s_output_ids = "#"i_num_lparc = 5s_point1_list = "[-0.25 -0.25 0.5][0.25 0.25 0.5]"s_point2_list = "[1 0.25 0.5][0.75 0.5 0.5]"s_point3_list = "[1.25 0.25 0.5][0.75 0.25 0.5]"#i_return_value = @ asm_const_line_arc3point @ ( s_output_ids, @ i_num_lparc, @ s_point1_list, @ s_point2_list, @ s_point3_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_conic()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create an elliptic arc.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_conic()# has the following arguments:## asm_const_line_conic# ( output_ids,# coord_frame,# rho,# point1_list,# point2_list,# point3_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_coord_frame[32]REAL r_rhoSTRING s_point1_list[32]STRING s_point2_list[32]STRING s_point3_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------curve_label(TRUE)#---------------------------------------------------------------------# Creating an elliptic arc.s_output_ids = "#"s_coord_frame = "Coord 0"r_rho = 0.4s_point1_list = "[0 10 0]"s_point2_list = "[-1 .1 0]"s_point3_list = "[2 -.1 0]"#i_return_value = @ asm_const_line_conic @ ( s_output_ids, @ s_coord_frame, @ r_rho, @ s_point1_list, @ s_point2_list, @ s_point3_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_extract()## This session file will create a new database by# name ’new.db’ and two surfaces will be created.# The above mentioned function will be called to # extract the lines.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_extract()# has the following arguments:## asm_const_line_extract# ( output_ids,# surface_list,# line_direction,# param_pos,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_surface_list[32]INTEGER i_line_directionREAL r_param_posSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------surface_label(TRUE)curve_label(TRUE)#---------------------------------------------------------------------# Creating two surfaces.i_return_value = @ asm_const_patch_xyz( "#", "<0.5 0.5 0>", @ "[0.25 1 0.25] [1.25 0.9 0.25]", "Coord 0",@ sv_asm_create_patch_xy_created )dump i_return_value#---------------------------------------------------------------------# Extracting lines from the two surfaces.s_output_ids = "#"s_surface_list = "surface 1 2"i_line_direction = 1r_param_pos = 0.45#i_return_value = @ asm_const_line_extract @ ( s_output_ids, @ s_surface_list, @ i_line_direction, @ r_param_pos, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_fillet()## This session file will create a new database by# name ’new.db’ and create two intersecting # curves. The above mentioned function will be # called to create curves by filleting.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_fillet()# has the following arguments:## asm_const_line_fillet# ( output_ids,# num_fillet,# radius,# fil_tolerance,# trim_original,# point1_list,# point2_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]INTEGER i_num_filletREAL r_radiusREAL r_fil_toleranceLOGICAL l_trim_originalSTRING s_point1_list[128]STRING s_point2_list[128]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_line_2point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating two intersecting curves.i_return_value = @ asm_const_line_2point( "1", "[0 0 0]", @ "[1 0 0][0 1 0]", 0, "", 50., 1, @ sv_asm_line_2point_created_ids )dump i_return_valuecurve_label(TRUE)#---------------------------------------------------------------------# Creating curves by filleting the two intersecting lines created # before.s_output_ids = "#"i_num_fillet = 5r_radius = 0.1r_fil_tolerance = 0.005l_trim_original = TRUEs_point1_list = "Construct PointCurveUOnCurve"//@ "(Evaluate Geometry (Point 1 )) (Evaluate Geometry (Curve 1 ))"s_point2_list = "Construct PointCurveUOnCurve"//@ "(Evaluate Geometry (Point 1 )) (Evaluate Geometry (Curve 2 ))"#i_return_value = @ asm_const_line_fillet @ ( s_output_ids, @ i_num_fillet, @ r_radius, @ r_fil_tolerance, @ l_trim_original, @ s_point1_list, @ s_point2_list, @ sv_created_ids )$? YES 1000047# Deleting the original entities.dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_fit()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create a line passing through a # set of points.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_fit()# has the following arguments:## asm_const_line_fit# ( output_ids,# point_list,# num_lines,# geo_tolerance,# num_iterations,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_point_list[128]INTEGER i_num_linesREAL r_geo_toleranceINTEGER i_num_iterationsSTRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating five lines from ten location coordinates.s_output_ids = "#"s_point_list = "[0 0 0][0.5 1 0][1 0 0]"// @ "[1.5 1 0][2 0 0][2.5 1 0][3 0 0][3.5 1 0][4 0 0][4.5 1 0]"i_num_lines = 10r_geo_tolerance = 0.001i_num_iterations = 10#i_return_value = @ asm_const_line_fit @ ( s_output_ids, @ s_point_list, @ i_num_lines, @ r_geo_tolerance, @ i_num_iterations, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_intersect()## This session file will create a new database by# name ’new.db’ and create two surfaces. The # above mentioned function will be called to # create a line at their intersection.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_intersect()# has the following arguments:## asm_const_line_intersect# ( output_ids,# surface1_list,# surface2_list,# curves_per_int,# geo_tolerance,# flat_tolerance,# int_tolerance,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_surface1_list[32]STRING s_surface2_list[32]INTEGER i_curves_per_intREAL r_geo_toleranceREAL r_flat_toleranceREAL r_int_toleranceSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]STRING sv_asm_line_3point_created_ids[VIRTUAL]STRING sv_sgm_sweep_surface_e_crtd_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_valuei_return_value = @ ga_display_lines_set( "general", 2 )dump i_return_valuesurface_label(TRUE)curve_label(TRUE)#---------------------------------------------------------------------# Creating a surface in Y-Z plane.i_return_value = @ asm_const_patch_xyz( "1", "<0 1 1>", @ "[0 0 0]", "Coord 0", sv_asm_create_patch_xy_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Creating a curve from 3 points and extracting a surface.i_return_value = @ asm_const_line_3point( "1", "Point 1 ", @ "[0 0.35 0.7]", "Point 3 ", 1, 0.5, @ sv_asm_line_3point_created_ids )dump i_return_valuei_return_value = @ sgm_const_surface_extrude( "2", "<1 0 0>", 1.,@ 0., "[0 0 0]", "Coord 0", "Curve 1 ", @ sv_sgm_sweep_surface_e_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Using surface 1 and 2 to create a line at their intersection.s_output_ids = "#"s_surface1_list = "surface 1"s_surface2_list = "surface 2"i_curves_per_int = 5r_geo_tolerance = 0.01r_flat_tolerance = 0.1r_int_tolerance = 0.05#i_return_value = @ asm_const_line_intersect @ ( s_output_ids, @ s_surface1_list, @ s_surface2_list, @ i_curves_per_int, @ r_geo_tolerance, @ r_flat_tolerance, @ r_int_tolerance, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_crtd_ids)sys_free_string(sv_asm_line_3point_created_ids)sys_free_string(sv_sgm_sweep_surface_e_crtd_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_normal()## This session file will create a new database by# name ’new.db’ and create two lines. The above # mentioned function will be called and three # lines perpendicular to these lines will be # created.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_normal()# has the following arguments:## asm_const_line_normal# ( output_ids,# point_list,# line_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_point_list[64]STRING s_line_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_line_2point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating two lines.i_return_value = @ asm_const_line_2point("#", "[0 0 0]", @ "[1 0 0][ 0 1 0]", 0, "", 0, 1, @ sv_asm_line_2point_created_ids)dump i_return_valuecurve_label(TRUE)#---------------------------------------------------------------------# Creating three perpendicular lines to the lines created before.s_output_ids = "#"s_point_list = "[0.25 0.75 0][0.5 0.5 0][0.75 0.25 0]"s_line_list = "curve 1 1 2"#i_return_value = @ asm_const_line_normal @ ( s_output_ids, @ s_point_list, @ s_line_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_project()## This session file will create a new database by# name ’new.db’ and create two surfaces and a # line. The above mentioned function will be # called after a pause, to create lines by # projecting the line on the surfaces.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_project()# has the following arguments:## asm_const_line_project# ( output_ids,# line_list,# surface_list,# delete_original,# project_method,# vector,# coord_frame,# num_lines,# geo_tolerance,# flat_tolerance,# int_tolerance,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_line_list[32]STRING s_surface_list[32]LOGICAL l_delete_originalINTEGER i_project_methodSTRING s_vector[32]STRING s_coord_frame[32]INTEGER i_num_linesREAL r_geo_toleranceREAL r_flat_toleranceREAL r_int_toleranceSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_line_3point_created_ids[VIRTUAL]STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set(-67., 0., -34.)dump i_return_valuesurface_label(TRUE)curve_label(TRUE)#---------------------------------------------------------------------# Creating two surfaces.i_return_value = @ asm_const_patch_xyz( "#","<0 1 1>" @ ,"[0 0 0]", "Coord 0", sv_asm_create_patch_xy_crtd_ids )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "#","<0.25 0.9 1>" @ ,"[0 0 0]", "Coord 0", sv_asm_create_patch_xy_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Creating a curve.i_return_value = @ asm_const_line_3point("#", "[0.25 0.25 0]", @ "[0.25 1 0.5]", "[0.75 0.75 0]", 1, 0.5, @ sv_asm_line_3point_created_ids)dump i_return_value#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Creating lines by projecting the curve on surfaces by giving # projection vector.s_output_ids = "#"s_line_list = "curve 1"s_surface_list = "surface 1 2"l_delete_original = TRUEi_project_method = 2s_vector = "<1 0 0>"s_coord_frame = "coord 0"i_num_lines = 3r_geo_tolerance = 0.01r_flat_tolerance = 0.1r_int_tolerance = 0.05#i_return_value = @ asm_const_line_project @ ( s_output_ids, @ s_line_list, @ s_surface_list, @ l_delete_original, @ i_project_method, @ s_vector, @ s_coord_frame, @ i_num_lines, @ r_geo_tolerance, @ r_flat_tolerance, @ r_int_tolerance, @ sv_created_ids )$? YES 1000021# Deleting the original line.dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_line_3point_created_ids)sys_free_string(sv_asm_create_patch_xy_crtd_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_project_v1()## This session file will create a new database by# name ’new.db’ and create two surfaces and a # line. The above mentioned function will be # called after a pause to create lines by# projecting the line on the surfaces.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_project_v1()# has the following arguments:## asm_const_line_project_v1# ( output_ids,# line_list,# surface_list,# delete_original,# project_method,# vector,# coord_frame,# projection_tolerance,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[128]STRING s_line_list[128]STRING s_surface_list[128]LOGICAL l_delete_originalINTEGER i_project_methodSTRING s_vector[128]STRING s_coord_frame[128]REAL r_projection_toleranceSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_line_3point_created_ids[VIRTUAL]STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set(-67., 0., -34.)dump i_return_valuesurface_label(TRUE)curve_label(TRUE)#---------------------------------------------------------------------# Creating two surfaces.i_return_value = @ asm_const_patch_xyz( "#","<0 1 1>" @ ,"[0 0 0]", "Coord 0", sv_asm_create_patch_xy_crtd_ids )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "#","<0.25 0.9 1>" @ ,"[0 0 0]", "Coord 0", sv_asm_create_patch_xy_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Creating a curve.i_return_value = @ asm_const_line_3point("#", "[0.25 0.25 0]", @ "[0.25 1 0.5]", "[0.75 0.75 0]", 1, 0.5, @ sv_asm_line_3point_created_ids)dump i_return_value#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Creating lines by projecting the curve on surfaces.s_output_ids = "#"s_line_list = "curve 1"s_surface_list = "surface 1 2"l_delete_original = TRUEi_project_method = 3s_vector = "<1 0 0>"s_coord_frame = "coord 0"r_projection_tolerance = 0.05#i_return_value = @ asm_const_line_project_v1 @ ( s_output_ids, @ s_line_list, @ s_surface_list, @ l_delete_original, @ i_project_method, @ s_vector, @ s_coord_frame, @ r_projection_tolerance, @ sv_created_ids )$? YES 1000021# Deleting the original line.dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_line_3point_created_ids)sys_free_string(sv_asm_create_patch_xy_crtd_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_pwl()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create lines passing through ten # points.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_pwl()# has the following arguments:## asm_const_line_pwl# ( output_ids,# point_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_point_list[128]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set(23., -34., 0. )dump i_return_valuecurve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating lines by suppling ten point coordinates.s_output_ids = "#"s_point_list = "[0 0 0][0.5 0 1][1 0 0]"//@ "[1.5 0 1][2 0 0][2.5 0 1][3 0 0][3.5 0 1][4 0 0][4.5 0 1]"#i_return_value = @ asm_const_line_pwl @ ( s_output_ids, @ s_point_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_spline()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create spline passing through ten # points.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_spline()# has the following arguments:## asm_const_line_spline# ( output_ids,# point_list,# end_flag,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_point_list[128]INTEGER i_end_flagSTRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set(23., -34., 0. )dump i_return_valuecurve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating spline by suppling ten point coordinates.s_output_ids = "#"s_point_list = "[0 0 0][0.5 0 1][1 0 0]"//@ "[1.5 0 1][2 0 0][2.5 0 1][3 0 0][3.5 0 1][4 0 0][4.5 0 1]"i_end_flag = 1#i_return_value = @ asm_const_line_spline @ ( s_output_ids, @ s_point_list, @ i_end_flag, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_tancurve()## This session file will create a new database by# name ’new.db’ and create two lines. The above# mentioned function will be called to create a# tangent curve.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_tancurve()# has the following arguments:## asm_const_line_tancurve# ( output_ids,# line1_list,# line2_list,# trim_original,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_line1_list[128]STRING s_line2_list[128]LOGICAL l_trim_originalSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_line_3point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating two lines.i_return_value = @ asm_const_line_3point( "#", "[1 2 0][-1 2 0]", @ "[.75 .25 0][-.75 .25 0]", @ "[.25 1 0][-.25 1 0]", 1, 0.5, @ sv_asm_line_3point_created_ids )dump i_return_valuecurve_label(TRUE)#---------------------------------------------------------------------# Creating a line tangent to the lines drawn before.s_output_ids = "#"l_trim_original = TRUEs_line1_list = "Construct PointCurveUOnCurve "//@ "(Evaluate Geometry ([ 0.719200 0.218000 0.000000 ]))"//@ "(Evaluate Geometry (Curve 1 ))"s_line2_list = "Construct PointCurveUOnCurve "//@ "(Evaluate Geometry ([-0.551050 0.284500 0.000000 ]))"//@ "(Evaluate Geometry (Curve 2 ))"#i_return_value = @ asm_const_line_tancurve @ ( s_output_ids, @ s_line1_list, @ s_line2_list, @ l_trim_original, @ sv_created_ids )$? YESFORALL 1000028# Deleting the original entities.dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_line_3point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_tanpoint()## This session file will create a new database by# name ’new.db’ and create five curves. The above# mentioned function will be called to create # tangents to the curves.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_tanpoint()# has the following arguments:## asm_const_line_tanpoint# ( output_ids,# line_list,# point_list,# closest_only,# trim_original,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_line_list[32]STRING s_point_list[64]LOGICAL l_closest_onlyLOGICAL l_trim_originalSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_line_fit_crtd_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 90., 0., 0. )dump i_return_valuecurve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating five curves.i_return_value = @ asm_const_line_fit( "#", @ "[0 0 0][0.5 0 1][1 0 0][1.5 0 1 ][2 0 0]",@ 5, 0.0049999999, 10, sv_asm_create_line_fit_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Creating tangents to the existing five curves.s_output_ids = "#"s_line_list = "curve 1 2 3 4 5"s_point_list = "[0.35 0 1][1.1 0 -0.15]"// @ "[1.9 0 0][1.5 0 1.050167][1.5 0 1.050167]"l_closest_only = FALSEl_trim_original = FALSE#i_return_value = @ asm_const_line_tanpoint @ ( s_output_ids, @ s_line_list, @ s_point_list, @ l_closest_only, @ l_trim_original, @ sv_created_ids )$? YESFORALL 1000065$? YESFORALL 1000065# Creating all tangents between point and curve.dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_line_fit_crtd_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_line_xyz()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create three curves.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_line_xyz()# has the following arguments:## asm_const_line_xyz# ( output_ids,# line_length,# line_origin,# coord_frame,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]STRING s_line_length[32]STRING s_line_origin[32]STRING s_coord_frame[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------curve_label(TRUE)#---------------------------------------------------------------------# Creating three curves.s_output_ids = "#"s_line_length = "<1 0 0><1 1 0>"s_line_origin = "[0 0 0][0 0 0][1 0 0]"s_coord_frame = "coord 0"#i_return_value = @ asm_const_line_xyz @ ( s_output_ids, @ s_line_length, @ s_line_origin, @ s_coord_frame, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_patch_2curve()## This file opens a new database "new.db" and# creates three curves. Later it creates two# surfaces with three curves using the above# function.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_patch_2curve()# has the following arguments:## asm_const_patch_2curve# ( output_ids,# curve1_list,# curve2_list,# manifold_type,# manifold_id,# ruled_form,# auto_align,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "3 4"STRING s_curve1_list[32]STRING s_curve2_list[32]INTEGER i_manifold_typeSTRING s_manifold_id[32]INTEGER i_ruled_formLOGICAL l_auto_alignSTRING sv_created_ids[VIRTUAL]STRING sv_sgm_create_curve_2d_created[VIRTUAL]STRING sv_asm_line_2point_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create three curves.i_return_value = @ sgm_const_curve_2d_arcangles_v1( "1", 1., @ 30., 150., "Coord 0.3", "[0 0 0]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuei_return_value = @ asm_const_line_2point( "2", "[-0.866 0.5 1]", @ "[0.866 0.5 1]", 0, "", 50., 1, @ sv_asm_line_2point_created_ids )dump i_return_valuei_return_value = @ sgm_const_curve_2d_arcangles_v1( "3", 1., @ 30., 150., "Coord 0.3", "[0 0 2]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuega_view_aa_set( 23.,-60., 0. )ga_group_display_set("default_group","general")ga_display_lines_set( "general", 20 )s_curve1_list = "curve 1 3"s_curve2_list = "curve 2 2"i_manifold_type = 0i_ruled_form = 0l_auto_align = TRUEi_return_value = @ asm_const_patch_2curve @ ( s_output_ids, @ s_curve1_list, @ s_curve2_list, @ i_manifold_type, @ s_manifold_id, @ i_ruled_form, @ l_auto_align, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_sgm_create_curve_2d_created)sys_free_string(sv_asm_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_patch_2curve_v1()## This file opens a new database "new.db" and# creates three curves. Later it creates two# surfaces with three curves using the above# function.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_patch_2curve_v1()# has the following arguments:## asm_const_patch_2curve_v1# ( output_ids,# curve1_list,# curve2_list,# manifold_type,# manifold_id,# auto_align,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "3 4"STRING s_curve1_list[32]STRING s_curve2_list[32]INTEGER i_manifold_typeSTRING s_manifold_id[32]LOGICAL l_auto_alignSTRING sv_created_ids[VIRTUAL]STRING sv_sgm_create_curve_2d_created[VIRTUAL]STRING sv_asm_line_2point_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create three curves.i_return_value = @ sgm_const_curve_2d_arcangles_v1( "1", 1., @ 30., 150., "Coord 0.3", "[0 0 0]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuei_return_value = @ asm_const_line_2point( "2", "[-0.866 0.5 1]", @ "[0.866 0.5 1]", 0, "", 50., 1, @ sv_asm_line_2point_created_ids )dump i_return_valuei_return_value = @ sgm_const_curve_2d_arcangles_v1( "3", 1., @ 30., 150., "Coord 0.3", "[0 0 2]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuega_view_aa_set( 23.,-60., 0. )ga_group_display_set("default_group","general")ga_display_lines_set( "general", 20 )s_curve1_list = "curve 1 3"s_curve2_list = "curve 2 2"i_manifold_type = 0l_auto_align = TRUEi_return_value = @ asm_const_patch_2curve_v1 @ ( s_output_ids, @ s_curve1_list, @ s_curve2_list, @ i_manifold_type, @ s_manifold_id, @ l_auto_align, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_sgm_create_curve_2d_created)sys_free_string(sv_asm_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_patch_3curve()## This file opens a new database "new.db" and# creates five curves. Later it creates two# surfaces with five curves using the above# function. Each surface consists of three# curves.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_patch_3curve()# has the following arguments:## asm_const_patch_3curve# ( output_ids,# curve1_list,# curve2_list,# curve3_list,# param_pos,# auto_align,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "8 9"STRING s_curve1_list[32]STRING s_curve2_list[32]STRING s_curve3_list[32]REAL r_param_posLOGICAL l_auto_alignSTRING sv_created_ids[VIRTUAL]STRING sv_sgm_create_curve_2d_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create five curves.i_return_value = @ sgm_const_curve_2d_arcangles_v1( "1", 1., @ 30., 150., "Coord 0.3", "[0 0 0]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuei_return_value = @ sgm_const_curve_2d_arcangles_v1( "2", 1., @ -150.,-30.,"Coord 0.3", "[0 1 1]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuei_return_value = @ sgm_const_curve_2d_arcangles_v1( "3", 1., @ 30., 150., "Coord 0.3", "[0 0 2]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuei_return_value = @ sgm_const_curve_2d_arcangles_v1( "4", 1., @ -150.,-30.,"Coord 0.3", "[0 1 3]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuei_return_value = @ sgm_const_curve_2d_arcangles_v1( "5", 1., @ 30., 150., "Coord 0.3", "[0 0 4]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuega_view_aa_set( 23.,-60., 0. )ga_group_display_set("default_group","general")ga_display_lines_set( "general", 20 )s_curve1_list = "curve 1 3"s_curve2_list = "curve 2 4"s_curve3_list = "curve 3 5"l_auto_align = TRUEr_param_pos = 0.4# Create two surfaces with ids 8 and 9.# Surface with id 8 has curves 1 ,2 and 3.# Surface with id 9 has curves 3 ,4 and 5.i_return_value = @ asm_const_patch_3curve @ ( s_output_ids, @ s_curve1_list, @ s_curve2_list, @ s_curve3_list, @ r_param_pos, @ l_auto_align, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_sgm_create_curve_2d_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_patch_4curve()## This file opens a new database "new.db" and# creates four curves. Later it creates a# surface with four curves using the above# function.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_patch_4curve()# has the following arguments:## asm_const_patch_4curve# ( output_ids,# curve1_list,# curve2_list,# curve3_list,# curve4_list,# param_pos1,# param_pos2,# auto_align,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "8"STRING s_curve1_list[32]STRING s_curve2_list[32]STRING s_curve3_list[32]STRING s_curve4_list[32]REAL r_param_pos1REAL r_param_pos2LOGICAL l_auto_alignSTRING sv_created_ids[VIRTUAL]STRING sv_sgm_create_curve_2d_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create four curves.i_return_value = @ sgm_const_curve_2d_arcangles_v1( "1", 1., @ 30., 150., "Coord 0.3", "[0 0 0]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuei_return_value = @ sgm_const_curve_2d_arcangles_v1( "2", 1., @ -150.,-30.,"Coord 0.3", "[0 1 1]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuei_return_value = @ sgm_const_curve_2d_arcangles_v1( "3", 1., @ 30., 150., "Coord 0.3", "[0 0 2]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuei_return_value = @ sgm_const_curve_2d_arcangles_v1( "4", 1., @ -150.,-30.,"Coord 0.3", "[0 1 3]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuega_view_aa_set( 23.,-60., 0. )ga_group_display_set("default_group","general")ga_display_lines_set( "general", 20 )s_curve1_list = "curve 1 "s_curve2_list = "curve 2 "s_curve3_list = "curve 3 "s_curve4_list = "curve 4 "l_auto_align = TRUEr_param_pos1 = 0.33r_param_pos2 = 0.66# Create a surface with ids 8 having curves 1,2,3 and 4.i_return_value = @ asm_const_patch_4curve @ ( s_output_ids, @ s_curve1_list, @ s_curve2_list, @ s_curve3_list, @ s_curve4_list, @ r_param_pos1, @ r_param_pos2, @ l_auto_align, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_sgm_create_curve_2d_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_patch_edge()## This file opens a new database "new.db" and# creates four curves. Later it creates a# surface with four bounding curves using the# above function.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_patch_edge()# has the following arguments:## asm_const_patch_edge# ( output_ids,# curve1_list,# curve2_list,# curve3_list,# curve4_list,# manifold_type,# manifold_id,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "8"STRING s_curve1_list[32]STRING s_curve2_list[32]STRING s_curve3_list[32]STRING s_curve4_list[32]INTEGER i_manifold_typeSTRING s_manifold_id[32]STRING sv_created_ids[VIRTUAL]STRING sv_sgm_create_curve_2d_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create four curves.i_return_value = @ sgm_const_curve_2d_arcangles_v1( "1", 1., @ 30., 150., "Coord 0.3", "[0 0 0]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuei_return_value = @ sgm_const_curve_2d_arcangles_v1( "2", 1., @ 90.,270.,"Coord 0.1","[0.866 0.5 1]" @ ,FALSE,sv_sgm_create_curve_2d_created )dump i_return_valuei_return_value = @ sgm_const_curve_2d_arcangles_v1( "3", 1., @ 30., 150., "Coord 0.3", "[0 0 2]", FALSE , @ sv_sgm_create_curve_2d_created )dump i_return_valuei_return_value = @ sgm_const_curve_2d_arcangles_v1( "4", 1., @ 90.,270.,"Coord 0.1", "[-0.866 0.5 1]" @ , FALSE ,sv_sgm_create_curve_2d_created )dump i_return_valuega_view_aa_set( 23.,-60., 0. )ga_group_display_set("default_group","general")ga_display_lines_set( "general", 20 )s_curve1_list = "curve 1 "s_curve2_list = "curve 2 "s_curve3_list = "curve 3 "s_curve4_list = "curve 4 "i_manifold_type = 0# Create a surface with ids 8 having curves 1,2,3 and 4.i_return_value = @ asm_const_patch_edge @ ( s_output_ids, @ s_curve1_list, @ s_curve2_list, @ s_curve3_list, @ s_curve4_list, @ i_manifold_type, @ s_manifold_id, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_sgm_create_curve_2d_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of two calls to# the function asm_const_patch_extract()## This file opens a new database "new.db" and# creates a cubic solid. Later it extracts two# surfaces from this solid in different# parametric planes.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_patch_extract()# has the following arguments:## asm_const_patch_extract# ( output_ids,# hpat_list,# param_plane,# param_pos,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "8"STRING s_hpat_list[32]INTEGER i_param_planeREAL r_param_posSTRING sv_created_ids[VIRTUAL]STRING sv_asm_create_hpat_xyz_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002i_return_value = @ asm_const_hpat_xyz("1","<2 2 2>","[0 0 0]", @ "coord 0", sv_asm_create_hpat_xyz_created )dump i_return_value ga_view_aa_set( 23.,-34.,0.)surface_label(TRUE)s_hpat_list = "Solid 1"# Create a patch by extracting a surface from the solid in# parametric plane 1 and having parametric position 0.75.i_param_plane = 1r_param_pos = 0.75i_return_value = @ asm_const_patch_extract @ ( s_output_ids, @ s_hpat_list, @ i_param_plane, @ r_param_pos, @ sv_created_ids )dump i_return_valuedump sv_created_ids# Create a patch by extracting a surface from the solid in# parametric plane 2 and having parametric position 0.33.s_output_ids = "9"i_param_plane = 2r_param_pos = 0.33i_return_value = @ asm_const_patch_extract @ ( s_output_ids, @ s_hpat_list, @ i_param_plane, @ r_param_pos, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_hpat_xyz_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_patch_fillet()## This file opens a new database "new.db" and# creates two surfaces at right angle to each# other. Later it creates a fillet surface# between these two surfaces.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_patch_fillet()# has the following arguments:## asm_const_patch_fillet# ( output_ids,# radius1,# radius2,# fil_tol,# trim_orig,# surfacepoint1_list,# surfacepoint2_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "8"REAL r_radius1REAL r_radius2REAL r_fil_tolLOGICAL l_trim_origSTRING s_surfacepoint1_list[256]STRING s_surfacepoint2_list[256]STRING sv_created_ids[VIRTUAL]STRING sv_asm_create_patch_xy_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create two surfaces at right angle to each other.i_return_value = @ asm_const_patch_xyz("1","<0 1 1>","[0 0 0]", @ "coord 0" ,sv_asm_create_patch_xy_created)dump i_return_valuei_return_value = @ asm_const_patch_xyz("2","<1 0 1>","[0 0 0]", @ "coord 0", sv_asm_create_patch_xy_created)dump i_return_valuega_view_aa_set(23.,-34.,0.)r_radius1 = 0.2r_radius2 = 0.3r_fil_tol = 0.005l_trim_orig = TRUEs_surfacepoint1_list = "Construct PointSurfaceUVOnSurface" // @"(Evaluate Geometry (Point 4 )) (Evaluate Geometry (Surface 1 ))"s_surfacepoint2_list = "Construct PointSurfaceUVOnSurface" // @"(Evaluate Geometry (Point 5 )) (Evaluate Geometry (Surface 2 ))"# Create fillet surface at the edge of the two surfaces.# Session file paused. Press "Resume" to continue..sf_pause()i_return_value = @ asm_const_patch_fillet @ ( s_output_ids, @ r_radius1, @ r_radius2, @ r_fil_tol, @ l_trim_orig, @ s_surfacepoint1_list, @ s_surfacepoint2_list, @ sv_created_ids )$? YESFORALL 1000049dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_patch_match()## This file opens a new database "new.db" and # creates a square surface. Further it creates# two curves. Later it creates a surface with# these two curves. Finally it constructs a# match surface with two edges of the previously# created surfaces.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_patch_match()# has the following arguments:## asm_const_patch_match# ( output_ids,# surface_list1,# surface_list2,# del_org,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "8"STRING s_surface_list1[32]STRING s_surface_list2[32]LOGICAL l_del_orgSTRING sv_created_ids[VIRTUAL]STRING sv_asm_create_patch_xy_created[VIRTUAL]STRING sv_asm_create_line_xyz_created[VIRTUAL]STRING sv_sgm_create_curve_2d_created[VIRTUAL]STRING sv_sgm_surface_2curve_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create a surface.i_return_value = @ asm_const_patch_xyz( "1", "<1 1 0>","[0 0 0]" @ ,"Coord 0",sv_asm_create_patch_xy_created )dump i_return_value# Create two curves.i_return_value = @ sgm_const_curve_2d_arcangles_v1( "1", 0.5, @ -90., 90., "Coord 0.3", "[1 0.5 0]",TRUE, @ sv_sgm_create_curve_2d_created )dump i_return_valuei_return_value = @ asm_const_line_xyz( "2", "<0 1 0>", "[2 0 0]",@ "Coord 0",sv_asm_create_line_xyz_created )dump i_return_value# Create a surface between the two created curves.i_return_value = @ sgm_const_surface_2curve( "2", "Curve 1 ", @ "Curve 2 ", sv_sgm_surface_2curve_created )dump i_return_values_surface_list1 = "surface 1"s_surface_list2 = "surface 2"l_del_org = TRUEsurface_label(TRUE)# Note the creation of match surface.# Session file paused. Press "Resume" to continue..sf_pause()# Create a match surface with label = 8.i_return_value = @ asm_const_patch_match @ ( s_output_ids, @ s_surface_list1, @ s_surface_list2, @ l_del_org, @ sv_created_ids )$? YES 38000219dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)sys_free_string(sv_asm_create_line_xyz_created)sys_free_string(sv_sgm_create_curve_2d_created)sys_free_string(sv_sgm_surface_2curve_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_patch_vertex()## This file opens a new database "new.db" and# creates seven points. Later it constructs # two surfaces with the created points. Each# surface contains four points.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_patch_vertex()# has the following arguments:## asm_const_patch_vertex# ( output_ids,# point1_list,# point2_list,# point3_list,# point4_list,# manifold_type,# manifold_id,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "1 2"STRING s_point1_list[32]STRING s_point2_list[32]STRING s_point3_list[32]STRING s_point4_list[32]INTEGER i_manifold_typeSTRING s_manifold_id[32]STRING sv_created_ids[VIRTUAL]STRING sv_asm_create_grid_xyz_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create 7 points.i_return_value = @ asm_const_grid_xyz( "","[0 0 0][1 0 0]"// @ "[1 1 0][0 1 0][2 1 0][2 2 0][1 2 0]", @ "coord 0", sv_asm_create_grid_xyz_created )dump i_return_values_point1_list = "point 1 3 "s_point2_list = "point 2 5 "s_point3_list = "point 3 6 "s_point4_list = "point 4 7 "i_manifold_type = 0# Create Surface using the vertex grid points.i_return_value = @ asm_const_patch_vertex @ ( s_output_ids, @ s_point1_list, @ s_point2_list, @ s_point3_list, @ s_point4_list, @ i_manifold_type, @ s_manifold_id, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_grid_xyz_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_patch_xyz()## This file opens a new database "new.db" and# creates a surface with a given origin and# given length.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_patch_xyz()# has the following arguments:## asm_const_patch_xyz# ( output_ids,# surface_length,# surface_origin,# coord_frame,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "4"STRING s_surface_length[32]STRING s_surface_origin[32]STRING s_coord_frame[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create a surface with origin [0 0 0] and length <1 1 0>.s_surface_length = "<1 1 0>"s_surface_origin = "[0 0 0]"s_coord_frame = "coord 0" i_return_value = @ asm_const_patch_xyz @ ( s_output_ids, @ s_surface_length, @ s_surface_origin, @ s_coord_frame, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_solid_5face()## This file opens a new database "new.db" and# creates a triangular prism with five surfaces.# Later it creates a solid with the help of# these five surfaces. ## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_solid_5face()# has the following arguments:## asm_const_solid_5face# ( output_ids,# surface1_list,# surface2_list,# surface3_list,# surface4_list,# surface5_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "8" STRING s_surface1_list[32]STRING s_surface2_list[32]STRING s_surface3_list[32]STRING s_surface4_list[32]STRING s_surface5_list[32]STRING sv_created_ids[VIRTUAL]STRING sv_asm_create_patch_xy_created[VIRTUAL]STRING sv_asm_line_2point_created_ids[VIRTUAL]STRING sv_sgm_surface_3edge_created[VIRTUAL]STRING sv_sgm_surface_4edge_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002ga_view_aa_set(23.,-34.,0.)# Create two surfaces.i_return_value = @ asm_const_patch_xyz("","<1 1 0><0 1 1>", @ "[0 0 0][0 0 0]", "coord 0", @ sv_asm_create_patch_xy_created ) dump i_return_value# Create two curves.i_return_value = @ asm_const_line_2point( "1", "Point 6 ", @ "Point 3 ", 0, "", 50., 1, @ sv_asm_line_2point_created_ids )dump i_return_valuei_return_value = @ asm_const_line_2point( "2", "Point 5 ", @ "Point 4 ", 0, "", 50., 1, @ sv_asm_line_2point_created_ids )dump i_return_value# Create three surfaces.i_return_value = @ sgm_const_surface_3edge( "", @ "Surface 2.3 Surface 2.1 ", @ "Surface 1.2 surface 1.4 ", @ "Curve 1 Curve 2", @ sv_sgm_surface_3edge_created )dump i_return_valuei_return_value = @ sgm_const_surface_4edge( "5", "Surface 2.2 ", @ "Curve 1 ", "Surface 1.3 ", "Curve 2 ", @ sv_sgm_surface_4edge_created )dump i_return_value solid_label(TRUE)s_surface1_list = "surface 1"s_surface2_list = "surface 2"s_surface3_list = "surface 3"s_surface4_list = "surface 4"s_surface5_list = "surface 5"# Create a Solid with the created five surfaces.i_return_value = @ asm_const_solid_5face @ ( s_output_ids, @ s_surface1_list, @ s_surface2_list, @ s_surface3_list, @ s_surface4_list, @ s_surface5_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)sys_free_string(sv_asm_line_2point_created_ids)sys_free_string(sv_sgm_surface_3edge_created)sys_free_string(sv_sgm_surface_4edge_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_solid_6face()## This file opens a new database "new.db" and# creates six surfaces. Later it creates a # solid with the help of these six surfaces. ## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_solid_6face()# has the following arguments:## asm_const_solid_6face# ( output_ids,# surface1_list,# surface2_list,# surface3_list,# surface4_list,# surface5_list,# surface6_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "8"STRING s_surface1_list[32]STRING s_surface2_list[32]STRING s_surface3_list[32]STRING s_surface4_list[32]STRING s_surface5_list[32]STRING s_surface6_list[128]STRING sv_created_ids[VIRTUAL]STRING sv_asm_create_patch_xy_created[VIRTUAL]STRING sv_asm_line_2point_created_ids[VIRTUAL]STRING sv_sgm_surface_4edge_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002ga_view_aa_set(23.,-34.,0.)# Create three surfaces.i_return_value = @ asm_const_patch_xyz("", @ "<2 0 1><0 1 1><1 0 1>", @ "[0 0 0][0 0 0][0 1 0]","coord 0", @ sv_asm_create_patch_xy_created ) dump i_return_value# Create two curves.i_return_value = @ asm_const_line_2point( "1", "Point 8 ", @ "Point 3 ", 0, "", 50., 1, @ sv_asm_line_2point_created_ids )dump i_return_valuei_return_value = @ asm_const_line_2point( "2", "Point 7 ", @ "Point 2 ", 0, "", 50., 1, @ sv_asm_line_2point_created_ids )dump i_return_value# Create three surfaces.i_return_value = @ sgm_const_surface_4edge( "", @ "Surface 3.1 Surface 3.3 Surface 3.2 ", @ "Surface 2.4 Surface 2.2 Curve 1 ", @ "Surface 1.1 Surface 1.3 Surface 1.2 ", @ "Curve 2 Curve 1 Curve 2 ",@ sv_sgm_surface_4edge_created )dump i_return_value solid_label(TRUE)s_surface1_list = "surface 1"s_surface2_list = "surface 2"s_surface3_list = "surface 3"s_surface4_list = "surface 4"s_surface5_list = "surface 5"s_surface6_list = "surface 6"# Create a Solid with the created six surfaces.i_return_value = @ asm_const_solid_6face @ ( s_output_ids, @ s_surface1_list, @ s_surface2_list, @ s_surface3_list, @ s_surface4_list, @ s_surface5_list, @ s_surface6_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)sys_free_string(sv_asm_line_2point_created_ids)sys_free_string(sv_sgm_surface_4edge_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_solid_extrude()## This file opens a new database "new.db" and# creates a cubic solid. Later it extrudes# one of the surface of the solid in a defined# axis with scaling and rotating it# simultaneously and creates three solids.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_solid_extrude()# has the following arguments:## asm_const_solid_extrude# ( output_ids,# delta,# scale,# angle,# origin,# coord_frame,# nsolids,# surface_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "6"STRING s_delta[32]REAL r_scaleREAL r_angleSTRING s_origin[32]STRING s_coord_frame[32]INTEGER i_nsolidsSTRING s_surface_list[32]STRING sv_created_ids[VIRTUAL]STRING sv_asm_create_hpat_xyz_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create a solid.i_return_value = @ asm_const_hpat_xyz( "1","<1 1 1>","[0 0 0]", @ "coord 0",sv_asm_create_hpat_xyz_created)dump i_return_valuega_view_aa_set(23.,-34.,0)solid_label(TRUE)s_delta = "<0 5 0>"r_scale = 2.0r_angle = 30s_origin = "[0.5 1.0 0.5]"s_coord_frame = "coord 0"i_nsolids = 3s_surface_list = "Solid 1.4"# Create three solids.i_return_value = @ asm_const_solid_extrude @ ( s_output_ids, @ s_delta, @ r_scale, @ r_angle, @ s_origin, @ s_coord_frame, @ i_nsolids, @ s_surface_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids# Observe the solids in the top view.# Session file paused. Press "Resume" to continue..sf_pause()ga_view_aa_set(90.,0.,0.)sys_free_string(sv_created_ids)sys_free_string(sv_asm_create_hpat_xyz_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_solid_glide()## This file opens a new database "new.db" and# creates a surface and two curves. Later it# creates a solid by gliding the surface on# these two curves using the above function.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_solid_glide()# has the following arguments:## asm_const_solid_glide# ( output_ids,# scale,# glide_option,# director_surface,# base_surface,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "8 9"REAL r_scaleINTEGER i_glide_optionSTRING s_director_surface[32]STRING s_base_surface[32]STRING sv_created_ids[VIRTUAL]STRING sv_asm_create_patch_xy_created[VIRTUAL]STRING sv_asm_create_line_arc_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002ga_view_aa_set(23.,-34.,0)ga_group_display_set("default_group","general")ga_display_lines_set( "general", 2 )solid_label(TRUE)# Create a surface in the yz plane.i_return_value = @ asm_const_patch_xyz( "1", "<0 0.5 1>", @ "[0 0 0]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_value# Create two curves in the xz plane.i_return_value = @ sgm_const_curve_arc3point( "1", FALSE, @ "[0 0 0]", "[1 0 0.5]", "[2 0 0.8]", @ sv_asm_create_line_arc_created )dump i_return_value i_return_value = @ sgm_const_curve_arc3point( "2", FALSE, @ "[2 0 0.8]", "[2.5 0 1]", "[3 0 1.5]", @ sv_asm_create_line_arc_created )dump i_return_value# Create a solid.s_director_surface = "Curve 1 2"s_base_surface = "Surface 1"r_scale = 0.3i_glide_option = 1i_return_value = @ asm_const_solid_glide @ ( s_output_ids, @ r_scale, @ i_glide_option, @ s_director_surface, @ s_base_surface, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)sys_free_string(sv_asm_create_line_arc_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_solid_normal()## This file opens a new database "new.db" and# creates a surface. Later it creates a solid# with an offset from the created surface.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_solid_normal()# has the following arguments:## asm_const_solid_normal# ( output_ids,# thickness1,# thickness2,# thickness3,# thickness4,# nsolids,# flip,# surface_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "8"STRING s_thickness1[32]STRING s_thickness2[32]STRING s_thickness3[32]STRING s_thickness4[32]INTEGER i_nsolidsLOGICAL l_flipSTRING s_surface_list[32]STRING sv_created_ids[VIRTUAL]STRING sv_asm_create_patch_xy_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002ga_view_aa_set(23.,-34.,0)ga_group_display_set("default_group","general")ga_display_lines_set( "general", 2 )solid_label(TRUE)# Create a surface in the yz plane.i_return_value = @ asm_const_patch_xyz( "1", "<0.5 0 1>", @ "[0 0 0]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_value # Create a Solid.s_thickness1 = "0.5"s_thickness2 = "0.4"s_thickness3 = "0.7"s_thickness4 = "0.3"i_nsolids = 1l_flip = TRUEs_surface_list = "surface 1"i_return_value = @ asm_const_solid_normal @ ( s_output_ids, @ s_thickness1, @ s_thickness2, @ s_thickness3, @ s_thickness4, @ i_nsolids, @ l_flip, @ s_surface_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_solid_revolve()## This file opens a new database "new.db" and# creates two surfaces. Later it creates a # solid, revolving these two surfaces, using the# above function.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_solid_revolve()# has the following arguments:## asm_const_solid_revolve# ( output_ids,# axis,# angle,# offset,# coord_frame,# nsurfaces,# surface_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32] = "8"STRING s_axis[32]REAL r_angleREAL r_offsetSTRING s_coord_frame[32]INTEGER i_nsurfacesSTRING s_surface_list[32]STRING sv_created_ids[VIRTUAL]STRING sv_asm_create_patch_xy_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002ga_view_aa_set(23.,-34.,0)ga_group_display_set("default_group","general")ga_display_lines_set( "general", 2 )solid_label(TRUE)# Create two surfaces.i_return_value = @ asm_const_patch_xyz( "1", "<0 0.2 0.2>", @ "[0 1 0]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "2", "<0 0.3 0.3>", @ "[0 2 0]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_value# Create a solid.s_axis = "coord 0.3"r_angle = 180.0r_offset = 30.0s_coord_frame = "coord 0"i_nsurfaces = 1s_surface_list = "surface 1 2"i_return_value = @ asm_const_solid_revolve @ ( s_output_ids, @ s_axis, @ r_angle, @ r_offset, @ s_coord_frame, @ i_nsurfaces, @ s_surface_list, @ sv_created_ids )dump sv_created_idsdump i_return_valuesys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_solid_2surface()## This file opens a new database "new.db" and# creates two surfaces. Later it creates a # solid with these two surfaces using the # above function.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_solid_2surface()# has the following arguments:## asm_const_solid_2surface# ( output_ids,# auto_orient,# surface1_list,# surface2_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]LOGICAL l_auto_orientSTRING s_surface1_list[32]STRING s_surface2_list[32]STRING sv_created_ids[VIRTUAL]STRING sv_asm_create_patch_xy_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002ga_view_aa_set(23.,-34.,0)ga_group_display_set("default_group","general")ga_display_lines_set( "general", 2 )solid_label(TRUE)s_output_ids = "8"# Create two surfaces.i_return_value = @ asm_const_patch_xyz( "1", "<1 0 1>", @ "[0 0 0]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "2", "<0.5 0 0.5>", @ "[0.25 1 0.25]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_value# Create a solid.l_auto_orient = TRUEs_surface1_list = "surface 1"s_surface2_list = "surface 2"i_return_value = @ asm_const_solid_2surface @ ( s_output_ids, @ l_auto_orient, @ s_surface1_list, @ s_surface2_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_solid_3surface()## This file opens a new database "new.db" and# creates three surfaces. Later it creates a # solid with these three surfaces using the # above function.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_solid_3surface()# has the following arguments:## asm_const_solid_3surface# ( output_ids,# orient,# param_method,# surface1_list,# surface2_list,# surface3_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]LOGICAL l_orientINTEGER i_param_methodSTRING s_surface1_list[32]STRING s_surface2_list[32]STRING s_surface3_list[32]STRING sv_created_ids[VIRTUAL]STRING sv_asm_create_patch_xy_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002ga_view_aa_set(23.,-34.,0)ga_group_display_set("default_group","general")ga_display_lines_set( "general", 2 )solid_label(TRUE)s_output_ids = "8"# Create three surfaces.i_return_value = @ asm_const_patch_xyz( "1", "<1 0 1>", @ "[0 0 0]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "2", "<0.5 0 0.5>", @ "[-0.25 1 0.25]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "3", "<0.5 0 0.5>", @ "[0.25 2 0.25]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_value# Create a solid.l_orient = TRUEi_param_method = 2s_surface1_list = "surface 1"s_surface2_list = "surface 2"s_surface3_list = "surface 3"i_return_value = @ asm_const_solid_3surface @ ( s_output_ids, @ l_orient, @ i_param_method, @ s_surface1_list, @ s_surface2_list, @ s_surface3_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_solid_4surface()## This file opens a new database "new.db" and# creates four surfaces. Later it creates a # solid with these four surfaces using the # above function.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_solid_4surface()# has the following arguments:## asm_const_solid_4surface# ( output_ids,# orient,# param_method,# surface1_list,# surface2_list,# surface3_list,# surface4_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]LOGICAL l_orientINTEGER i_param_methodSTRING s_surface1_list[32]STRING s_surface2_list[32]STRING s_surface3_list[32]STRING s_surface4_list[32]STRING sv_created_ids[VIRTUAL]STRING sv_asm_create_patch_xy_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002ga_view_aa_set(23.,-34.,0)ga_group_display_set("default_group","general")ga_display_lines_set( "general", 2 )solid_label(TRUE)s_output_ids = "8"# Create four surfaces.i_return_value = @ asm_const_patch_xyz( "1", "<1 0 1>", @ "[0 0 0]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "2", "<0.5 0 0.5>", @ "[-0.25 1 0.25]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "3", "<0.5 0 0.5>", @ "[0.25 2 0.25]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_valuei_return_value = @ asm_const_patch_xyz( "4", "<1 0 1>", @ "[0.5 3 0.5]", "Coord 0", @ sv_asm_create_patch_xy_created )dump i_return_value# Create a solid.l_orient = TRUEi_param_method = 2s_surface1_list = "surface 1"s_surface2_list = "surface 2"s_surface3_list = "surface 3"s_surface4_list = "surface 4"i_return_value = @ asm_const_solid_4surface @ ( s_output_ids, @ l_orient, @ i_param_method, @ s_surface1_list, @ s_surface2_list, @ s_surface3_list, @ s_surface4_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_solid_nsurface()## This file opens a new database "new.db" and# creates four surfaces. Later it creates a # solid with these four surfaces using the # above function.## This file can be run by starting a session of# Patran, and running this session file # through the "File","Session","Play" pulldown # menus on the menu bar.## The function asm_const_solid_nsurface()# has the following arguments:## asm_const_solid_nsurface# ( output_ids,# orient,# param_method,# surface_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[32]LOGICAL l_orientINTEGER i_param_methodSTRING s_surface_list[32]STRING sv_created_ids[VIRTUAL]STRING sv_asm_create_patch_xy_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002i_return_value = ga_view_aa_set(23.,-34.,0)dump i_return_valuei_return_value = ga_group_display_set("default_group","general")dump i_return_valuei_return_value = ga_display_lines_set( "general", 2 )dump i_return_valuesolid_label(TRUE)# Create four surfaces.i_return_value = @ asm_const_patch_xyz( "1", @ "<1 0 1><0.5 0 0.5><0.5 0 0.5><1 0 1>", @ "[0 0 0][-.25 1 .25][.25 2 .25][.5 3 .5]", @ "Coord 0", sv_asm_create_patch_xy_created )dump i_return_value# Create a solid.s_output_ids = "8"l_orient = TRUEi_param_method = 2s_surface_list = "surface 1 2 3 4"i_return_value = @ asm_const_solid_nsurface @ ( s_output_ids, @ l_orient, @ i_param_method, @ s_surface_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_surface_2curve()## This function creates parametric bicubic surfa-# ces from 2 set of curves.## In this example a new database is opened and 2# curves are drawn in XZ plane. Then this# function is called to create a surface between# the 2 curves.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_surface_2curve()# has the following arguments:## asm_const_surface_2curve# ( output_ids,# curve1_list,# curve2_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_curve1_list[32]STRING s_curve2_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_line_2point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labeli_return_value = surface_label(TRUE)dump i_return_value#---------------------------------------------------------------------# Create linesi_return_value = @ asm_const_line_2point @ ( "1", "[0 0 0]","[0 0 1]", 0,"",50., 1, @ sv_line_2point_created_ids )dump i_return_valuei_return_value = @ asm_const_line_2point @ ( "2", "[5 0 0]","[3 0 3]", 0,"",50., 1, @ sv_line_2point_created_ids )dump i_return_value#---------------------------------------------------------------------# Create surfaces_output_ids = ""s_curve1_list = "Curve 1"s_curve2_list = "Curve 2"i_return_value = @ asm_const_surface_2curve @ ( s_output_ids, @ s_curve1_list, @ s_curve2_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_surface_3curve()## This function creates parametric bicubic surfa-# ces from 3 set of curves.## In this example a new database is opened and 3# curves are drawn. Then this function is called# to create a surface using the 3 curves.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_surface_3curve()# has the following arguments:## asm_const_surface_3curve# ( output_ids,# param_method,# curve1_list,# curve2_list,# curve3_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]INTEGER i_param_methodSTRING s_curve1_list[32]STRING s_curve2_list[32]STRING s_curve3_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_line_2point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labeli_return_value = surface_label(TRUE)dump i_return_value#---------------------------------------------------------------------# Create linesi_return_value = @ asm_const_line_2point @ ( "1", "[0 0 0]","[1 0 0]", 0,"",50., 1, @ sv_line_2point_created_ids )dump i_return_valuei_return_value = @ asm_const_line_2point @ ( "2", "[0 5 5]","[3 5 5]", 0,"",50., 1, @ sv_line_2point_created_ids )dump i_return_valuei_return_value = @ asm_const_line_2point @ ( "3", "[0 3 10]","[1 3 10]",0,"",50., 1, @ sv_line_2point_created_ids )dump i_return_value#---------------------------------------------------------------------# Create surfaces_output_ids = ""i_param_method = 2s_curve1_list = "Curve 1"s_curve2_list = "Curve 2"s_curve3_list = "Curve 3"i_return_value = @ asm_const_surface_3curve @ ( s_output_ids, @ i_param_method, @ s_curve1_list, @ s_curve2_list, @ s_curve3_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_surface_4curve()## This function creates parametric bicubic surfa-# ces from 4 set of curves.## In this example a new database is opened and 4# curves are drawn. Then this function is called# to create a surface using the 4 curves.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_surface_4curve()# has the following arguments:## asm_const_surface_4curve# ( output_ids,# param_method,# curve1_list,# curve2_list,# curve3_list,# curve4_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]INTEGER i_param_methodSTRING s_curve1_list[32]STRING s_curve2_list[32]STRING s_curve3_list[32]STRING s_curve4_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_line_2point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labeli_return_value = surface_label(TRUE)dump i_return_value#---------------------------------------------------------------------# Create linesi_return_value = @ asm_const_line_2point @ ( "1", "[0 0 0]","[1 0 0]", 0,"",50., 1, @ sv_line_2point_created_ids )dump i_return_valuei_return_value = @ asm_const_line_2point @ ( "2", "[0 5 5]","[3 5 5]", 0,"",50., 1, @ sv_line_2point_created_ids )dump i_return_valuei_return_value = @ asm_const_line_2point @ ( "3", "[0 3 10]","[1 3 10]",0,"",50., 1, @ sv_line_2point_created_ids )dump i_return_valuei_return_value = @ asm_const_line_2point @ ( "4", "[0 10 15]","[3 10 15]",0,"",50.,1,@ sv_line_2point_created_ids )dump i_return_value#---------------------------------------------------------------------# Create surfaces_output_ids = ""i_param_method = 2s_curve1_list = "Curve 1"s_curve2_list = "Curve 2"s_curve3_list = "Curve 3"s_curve4_list = "Curve 4"i_return_value = @ asm_const_surface_4curve @ ( s_output_ids, @ i_param_method, @ s_curve1_list, @ s_curve2_list, @ s_curve3_list, @ s_curve4_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_surface_ncurve()## This function creates parametric bicubic surfa-# ces from a specified set of curves.## In this example a new database is opened and 4# curves are drawn. Then this function is called# to create a surface using the 4 curves.# Approximation of the generated surface is# reported by Patran immediately after creation.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_surface_ncurve()# has the following arguments:## asm_const_surface_ncurve# ( output_ids,# param_method,# curve_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]INTEGER i_param_methodSTRING s_curve_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_line_2point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labeli_return_value = surface_label(TRUE)dump i_return_value#---------------------------------------------------------------------# Create linesi_return_value = @ asm_const_line_2point @ ( "#", "[0 0 0][0 5 5][0 3 10][0 10 15]", @ "[1 0 0][3 5 5][1 3 10][3 10 15]", 0,"",@ 50., 1, sv_line_2point_created_ids )dump i_return_value#---------------------------------------------------------------------# Create surfaces_output_ids = ""i_param_method = 2s_curve_list = "Curve 1:4 "i_return_value = @ asm_const_surface_ncurve @ ( s_output_ids, @ i_param_method, @ s_curve_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_surface_3edge()## This function creates parametric bicubic surfa-# ces from 3 set of curves defining the boundary# of the surfaces.## In this example a new database is opened and 3# curves are drawn. Then this function is called# to create a surface with 3 curves as boundaries# for the surface.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_surface_3edge()# has the following arguments:## asm_const_surface_3edge# ( output_ids,# curve1_list,# curve2_list,# curve3_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_curve1_list[32]STRING s_curve2_list[32]STRING s_curve3_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_line_2point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labeli_return_value = surface_label(TRUE)dump i_return_value#---------------------------------------------------------------------# Create linesi_return_value = @ asm_const_line_2point @ ( "#", "[0 0 0][0 0 0][1 0 0]", @ "[1 0 0][0 0 1][0 0 1]", 0,"",50., 1, @ sv_line_2point_created_ids )dump i_return_value#---------------------------------------------------------------------# Create surfaces_output_ids = ""s_curve1_list = "Curve 1"s_curve2_list = "Curve 2"s_curve3_list = "Curve 3"i_return_value = @ asm_const_surface_3edge @ ( s_output_ids, @ s_curve1_list, @ s_curve2_list, @ s_curve3_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_surface_4edge()## This function creates parametric bicubic surfa-# ces from 4 set of curves defining the boundary# of the surfaces.## In this example a new database is opened and 4# curves are drawn. Then this function is called# to create a surface with 4 curves as boundaries# for the surface.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_surface_4edge()# has the following arguments:## asm_const_surface_4edge# ( output_ids,# curve1_list,# curve2_list,# curve3_list,# curve4_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_curve1_list[32]STRING s_curve2_list[32]STRING s_curve3_list[32]STRING s_curve4_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_line_2point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labeli_return_value = surface_label(TRUE)dump i_return_value#---------------------------------------------------------------------# Create linesi_return_value = @ asm_const_line_2point @ ( "#", "[0 0 0][1 0 0][1 0 1][0 0 1]", @ "[1 0 0][1 0 1][0 0 1][0 0 0]", @ 0,"",50., 1, sv_line_2point_created_ids )dump i_return_value#---------------------------------------------------------------------# Create surfaces_output_ids = ""s_curve1_list = "Curve 1"s_curve2_list = "Curve 2"s_curve3_list = "Curve 3"s_curve4_list = "Curve 4"i_return_value = @ asm_const_surface_4edge @ ( s_output_ids, @ s_curve1_list, @ s_curve2_list, @ s_curve3_list, @ s_curve4_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_surface_extract()## This function creates parametric bicubic surf-# aces by extracting a surface from a solid at# a specified parametric position and in a spec-# ified parametric direction.## In this example a new database is opened and a# cube of 1 unit is created. Then this function# is called to create a surface along u-plane at# the midpoint of the edge by extraction from# cube.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_surface_extract()# has the following arguments:## asm_const_surface_extract# ( output_ids,# solid_list,# param_plane,# param_pos,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_solid_list[32]INTEGER i_param_planeREAL r_param_posSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_create_hpat_xyz_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labeli_return_value = surface_label(TRUE)dump i_return_value#---------------------------------------------------------------------# Create Cube of 1 X 1 X 1i_return_value = @ asm_const_hpat_xyz @ ( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @ sv_create_hpat_xyz_created_ids )#---------------------------------------------------------------------# Create Surfaces_output_ids = ""s_solid_list = "Solid 1"i_param_plane = 1r_param_pos = 0.5i_return_value = @ asm_const_surface_extract @ ( s_output_ids, @ s_solid_list, @ i_param_plane, @ r_param_pos, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_create_hpat_xyz_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_surface_extract_face()## This function creates parametric bicubic surf-# ace by extracting a surface from a face of a# solid## In this example a new database is opened and a# cube of 1 unit is created. Then this function# is called to create a surface by extracting the# top-surface ("Solid 1.4") using this function.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_surface_extract_face()# has the following arguments:## asm_const_surface_extract_face# ( output_ids,# face_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_face_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_create_hpat_xyz_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labeli_return_value = surface_label(TRUE)dump i_return_value#---------------------------------------------------------------------# Create Cube of 1 X 1 X 1i_return_value = @ asm_const_hpat_xyz @ ( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @ sv_create_hpat_xyz_created_ids )#---------------------------------------------------------------------# Create Surfaces_output_ids = ""s_face_list = "Solid 1.4"i_return_value = @ asm_const_surface_extract_face @ ( s_output_ids, @ s_face_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_create_hpat_xyz_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_surface_extrude()## This function creates parametric bicubic# surfaces by moving curves through space along# a defined axis with the option of# simultaneously scaling and rotating the# extruded surfaces.## In this example a new database is opened and a# line is drawn from [0 0 0] to [0 0 1]. Then a# surface is created using this function, by# extrusion of "Curve 1" along vector <10 0 0>.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_surface_extrude()# has the following arguments:## asm_const_surface_extrude# ( output_ids,# delta,# scale,# angle,# origin,# coord_frame,# num_surfaces,# curve_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_delta[32]REAL r_scaleREAL r_angleSTRING s_origin[32]STRING s_coord_frame[32]INTEGER i_num_surfacesSTRING s_curve_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_point_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labelsurface_label(TRUE)#---------------------------------------------------------------------# Create Curve from [0 0 0] to [0 0 1]i_return_value = @ asm_const_line_2point @ ( "1","[0 0 0]","[0 0 1]",0,"",50.,1, @ sv_point_ids )dump i_return_value#---------------------------------------------------------------------# Create Surface by extrusion of "Curve 1"s_output_ids = ""s_delta = "<10 0 0>"r_scale = 1r_angle = 0.0s_origin = "[0 0 0]" s_coord_frame = "Coord 0"i_num_surfaces = 1s_curve_list = "Curve 1 "i_return_value = @ asm_const_surface_extrude @ ( s_output_ids, @ s_delta, @ r_scale, @ r_angle, @ s_origin, @ s_coord_frame, @ i_num_surfaces, @ s_curve_list, @ sv_created_ids )dump i_return_value#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_point_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_surface_glide()## This function creates parametric bicubic surf-# aces by moving base curves along a path defined# by a set of director curves translated to the# origin of the base curves.## In this example a new database is opened and a# base curve is drawn form [0 0 0] to [1 0 0].# 2 director curves are then drawn. And this # function is called to create surfaces by # gliding the "Curve 1" along the director curves# "Curve 2" and "Curve 3".## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_surface_glide()# has the following arguments:## asm_const_surface_glide# ( output_ids,# scale,# glide_option,# director_curve,# basic_curve,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]REAL r_scaleINTEGER i_glide_optionSTRING s_director_curve[32]STRING s_basic_curve[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_create_line_xyz_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labelsurface_label(TRUE)#---------------------------------------------------------------------# Create base curvei_return_value = @ asm_const_line_xyz @ ( "", "<1 0 0>", "[0 0 0]", "Coord 0", @ sv_create_line_xyz_created_ids )dump i_return_value# Create director curvei_return_value = @ asm_const_line_2point @ ( "2", "[0 0 0]", "[0 5 5]", 0, "", 50., @ 1, sv_create_line_xyz_created_ids )dump i_return_valuei_return_value = @ asm_const_line_2point @ ( "3", "[0 5 5]", "[0 0 10]", 0, "", 50., @ 1, sv_create_line_xyz_created_ids )dump i_return_value#---------------------------------------------------------------------# Create Surfacess_output_ids = ""r_scale = 1.0i_glide_option = 0s_director_curve = "Curve 2 3 "s_basic_curve = "Curve 1 "i_return_value = @ asm_const_surface_glide @ ( s_output_ids, @ r_scale, @ i_glide_option, @ s_director_curve, @ s_basic_curve, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_create_line_xyz_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_surface_normal()## This function creates parametric bicubic surf-# aces defined by a set of base curves and an# offset from those curves in the direction of# the curvature . The offset may be constant or# a linear taper.## In this example a new database is opened and a# line is drawn form [0 0 0] to [10 0 0]. Then # surfaces of varying thickness are created using# this function using the initially created curve## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_surface_normal()# has the following arguments:## asm_const_surface_normal# ( output_ids,# thickness1,# thickness2,# origin,# num_surfaces,# normal_rev_direction,# curve_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_thickness1[32]STRING s_thickness2[32]STRING s_origin[32]INTEGER i_num_surfacesLOGICAL l_normal_rev_directionSTRING s_curve_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_point_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labelsurface_label(TRUE)#---------------------------------------------------------------------# Create Curve from [0 0 0] to [10 0 0]i_return_value = @ asm_const_line_2point @ ( "1","[0 0 0]","[10 0 0]",0,"",50.,1, @ sv_point_ids )dump i_return_value#---------------------------------------------------------------------# Create surfacess_output_ids = "1"s_thickness1 = "1.0"s_thickness2 = "5.0"s_origin = ""i_num_surfaces = 3l_normal_rev_direction = TRUEs_curve_list = "Curve 1 "i_return_value = @ asm_const_surface_normal @ ( s_output_ids, @ s_thickness1, @ s_thickness2, @ s_origin, @ i_num_surfaces, @ l_normal_rev_direction, @ s_curve_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_point_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_surface_revolve()## This function creates parametric bicubic surfa-# ces by revolving a curve about an axis of# rotation.## In this example a new database is opened and a# line is drawn form [0 0 0] to [1 0 0]. Then a# set of 4 surfaces are created by revolving this# curve along Z-axis for 45 degrees.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_surface_revolve()# has the following arguments:## asm_const_surface_revolve# ( output_ids,# axis,# angle,# offset,# coord_frame,# num_surfaces,# curve_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_axis[32]REAL r_angleREAL r_offsetSTRING s_coord_frame[32]INTEGER i_num_surfacesSTRING s_curve_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_point_ids[VIRTUAL]STRING sv_line_2point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labelsurface_label(TRUE)#---------------------------------------------------------------------# Create Curvei_return_value = @ asm_const_line_2point @ ( "1","[0 0 0]","[1 0 0]",0,"",50., 1, @ sv_line_2point_created_ids )dump i_return_value#---------------------------------------------------------------------# Create Surfaces_output_ids = "1"s_axis = "Coord 0.3"r_angle = 45.0r_offset = 0.s_coord_frame = "Coord 0"i_num_surfaces = 4s_curve_list = "Curve 1 "i_return_value = @ asm_const_surface_revolve @ ( s_output_ids, @ s_axis, @ r_angle, @ r_offset, @ s_coord_frame, @ i_num_surfaces, @ s_curve_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_point_ids)sys_free_string( sv_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function asm_const_surface_vertex()## This function creates parametric bicubic surfa-# ces which is the quadrilateral formed by four# vertex points.## In this example a new database is opened and 4# points are created on the XZ plane. Then this# function is called to create a surface using# the 4 vertex.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function asm_const_surface_vertex()# has the following arguments:## asm_const_surface_vertex# ( output_ids,# point1_list,# point2_list,# point3_list,# point4_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_point1_list[32]STRING s_point2_list[32]STRING s_point3_list[32]STRING s_point4_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_create_grid_xyz_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labelsurface_label(TRUE)#---------------------------------------------------------------------# Create Pointsi_return_value = @ asm_const_grid_xyz @ ( "1", "[0 0 0]", "Coord 0", @ sv_create_grid_xyz_created_ids )dump i_return_valuei_return_value = @ asm_const_grid_xyz @ ( "2", "[5 0 0]", "Coord 0", @ sv_create_grid_xyz_created_ids )dump i_return_valuei_return_value = @ asm_const_grid_xyz @ ( "3", "[5 0 7]", "Coord 0", @ sv_create_grid_xyz_created_ids )dump i_return_valuei_return_value = @ asm_const_grid_xyz @ ( "4", "[0 0 5]", "Coord 0", @ sv_create_grid_xyz_created_ids )dump i_return_value#---------------------------------------------------------------------# Create Surfaces_output_ids = ""s_point1_list = "Point 1"s_point2_list = "Point 2"s_point3_list = "Point 3"s_point4_list = "Point 4"i_return_value = @ asm_const_surface_vertex @ ( s_output_ids, @ s_point1_list, @ s_point2_list, @ s_point3_list, @ s_point4_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_create_grid_xyz_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_curve_2d_arc3point_v1()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create two curves.# # This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_curve_2d_arc3point_v1()# has the following arguments:## sgm_const_curve_2d_arc3point_v1# ( output_ids,# create_center,# plane_list,# start_list,# mid_list,# end_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]LOGICAL l_create_centerSTRING s_plane_list[16]STRING s_start_list[16]STRING s_mid_list[16]STRING s_end_list[16]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating two curves with the center points in X-Y plane.s_output_ids = "#"l_create_center = TRUEs_plane_list = "Coord 0.3"s_start_list = "[1 1 0] [2 2 0]"s_mid_list = "[1 4 1]"s_end_list = "[3 3 0]"#i_return_value = @ sgm_const_curve_2d_arc3point_v1 @ ( s_output_ids, @ l_create_center, @ s_plane_list, @ s_start_list, @ s_mid_list, @ s_end_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_curve_2d_arc3point_v2()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create two curves.# # This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_curve_2d_arc3point_v2()# has the following arguments:## sgm_const_curve_2d_arc3point_v2# ( output_ids,# create_center,# plane_list,# start_list,# mid_list,# end_list,# project_flag,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]LOGICAL l_create_centerSTRING s_plane_list[16]STRING s_start_list[16]STRING s_mid_list[16]STRING s_end_list[16]LOGICAL l_project_flagSTRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating two curves with the center points in parallel to X-Y plane# and passing through start points.s_output_ids = "#"l_create_center = TRUEs_plane_list = "Coord 0.3"s_start_list = "[0 0 1] [0 0 2]"s_mid_list = "[1 4 1]"s_end_list = "[3 3 0]"#i_return_value = @ sgm_const_curve_2d_arc3point_v2 @ ( s_output_ids, @ l_create_center, @ s_plane_list, @ s_start_list, @ s_mid_list, @ s_end_list, @ l_project_flag, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_curve_arc3point()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create two curves in 3D space.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_curve_arc3point()# has the following arguments:## sgm_const_curve_arc3point# ( output_ids,# create_center,# start_list,# mid_list,# end_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]LOGICAL l_create_centerSTRING s_start_list[32]STRING s_mid_list[32]STRING s_end_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating two curves in 3D space.s_output_ids = "#"l_create_center = TRUEs_start_list = "[0 0 0] [1 1 0]"s_mid_list = "[-1 -2 0] [1 2 0]"s_end_list = "[-1 1 3] [1 -1 -4]"#i_return_value = @ sgm_const_curve_arc3point @ ( s_output_ids, @ l_create_center, @ s_start_list, @ s_mid_list, @ s_end_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_curve_bspline()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create a bspline closed curve.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_curve_bspline()# has the following arguments:## sgm_const_curve_bspline# ( output_ids,# point_list,# order,# interpolate,# param_method,# closed,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]STRING s_point_list[32]INTEGER i_orderLOGICAL l_interpolateINTEGER i_param_methodLOGICAL l_closedSTRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating a fourth order open piecewise cubic curve.s_output_ids = "#"s_point_list = "[0 0 0][1 1 1][-1 .5 1][0 1 1]"i_order = 4i_param_method = 2#i_return_value = @ sgm_const_curve_bspline @ ( s_output_ids, @ s_point_list, @ i_order, @ l_interpolate, @ i_param_method, @ l_closed, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_curve_extract()## This session file will create a new database by# name ’new.db’ and create a surface. The above # mentioned function will be called to create a # curve on the surface.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_curve_extract()# has the following arguments:## sgm_const_curve_extract# ( output_ids,# surface_list,# direction,# param_pos,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]STRING s_surface_list[16]INTEGER i_directionREAL r_param_posSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating a surface.i_return_value = @ asm_const_patch_xyz( "1", "<1 1 0>","[0 0 0]",@ "Coord 0", sv_asm_create_patch_xy_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Creating a curve on surface along constant C1 direction.s_output_ids = "#"s_surface_list = "Surface 1"i_direction = 1r_param_pos = 0.4#i_return_value = @ sgm_const_curve_extract @ ( s_output_ids, @ s_surface_list, @ i_direction, @ r_param_pos, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_crtd_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_curve_extract_edge()## This session file will create a new database by# name ’new.db’ and create a surface. The above # mentioned function will be called to create # curves on the surface edges.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_curve_extract_edge()# has the following arguments:## sgm_const_curve_extract_edge# ( output_ids,# edge_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]STRING s_edge_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating a surface.i_return_value = @ asm_const_patch_xyz( "1", "<1 1 0>","[0 0 0]",@ "Coord 0", sv_asm_create_patch_xy_crtd_ids )dump i_return_value#---------------------------------------------------------------------# Creating curves on two edges of the surface.s_output_ids = "#"s_edge_list = "Surface 1.1 1.3"#i_return_value = @ sgm_const_curve_extract_edge @ ( s_output_ids, @ s_edge_list, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_patch_xy_crtd_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_curve_loft()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create a curve based on end slopes## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_curve_loft()# has the following arguments:## sgm_const_curve_loft# ( output_ids,# slope_control,# point_list,# slope_list1,# slope_list2,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]LOGICAL l_slope_controlSTRING s_point_list[64]STRING s_slope_list1[16]STRING s_slope_list2[16]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling the curve and point labeling.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Setting view to Isometric View 2.i_return_value = ga_view_aa_set(23., 56., 0)dump i_return_value#---------------------------------------------------------------------# Creating a curve passing through four points. Curve is also # constrained by end slopes.s_output_ids = "#"l_slope_control = TRUEs_point_list = "[0 0 0] [2.5 1 0] [2.3 .6 0] [3 1 1]"s_slope_list1 = "<1 4 0.5>"s_slope_list2 = "<1 -1.5 0>"#i_return_value = @ sgm_const_curve_loft @ ( s_output_ids, @ l_slope_control, @ s_point_list, @ s_slope_list1, @ s_slope_list2, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_curve_revolve()## This session file will create a new database by# name ’new.db’ and call the above mentioned# function and create three curves.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_curve_revolve()# has the following arguments:## sgm_const_curve_revolve# ( output_ids,# axis,# angle,# offset,# coord_frame,# point,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[16]STRING s_axis[16]REAL r_angleREAL r_offsetSTRING s_coord_frame[16]STRING s_point[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Enabling curve and point label.curve_label(TRUE)point_label(TRUE)#---------------------------------------------------------------------# Creating three curves by revolving points around Z axis.s_output_ids = "#"s_axis = "Coord 0.3"r_angle = 120r_offset = 10.0s_coord_frame = "Coord 0"s_point = "[0 1 0] [0 2 2] [0 3 3]"#i_return_value = @ sgm_const_curve_revolve @ ( s_output_ids, @ s_axis, @ r_angle, @ r_offset, @ s_coord_frame, @ s_point, @ sv_created_ids )dump i_return_valuedump sv_created_idssys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_surface_3edge()## This function creates bi-parametric surfaces# from 3 set of curves defining the boundary# of the surfaces.## In this example a new database is opened and 3# curves are drawn. Then this function is called# to create a surface with 3 curves as boundaries# for the surface.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_surface_3edge()# has the following arguments:## sgm_const_surface_3edge# ( output_ids,# curve1_list,# curve2_list,# curve3_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_curve1_list[32]STRING s_curve2_list[32]STRING s_curve3_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_line_2point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labeli_return_value = surface_label(TRUE)dump i_return_value#---------------------------------------------------------------------# Create linesi_return_value = @ asm_const_line_2point @ ( "#", "[0 0 0][0 0 0][1 0 0]", @ "[1 0 0][0 0 1][0 0 1]", 0,"",50., 1, @ sv_line_2point_created_ids )dump i_return_value#---------------------------------------------------------------------# Create surfaces_output_ids = ""s_curve1_list = "Curve 1"s_curve2_list = "Curve 2"s_curve3_list = "Curve 3"i_return_value = @ sgm_const_surface_3edge @ ( s_output_ids, @ s_curve1_list, @ s_curve2_list, @ s_curve3_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_surface_3edge_man()## This function creates manifold surfaces from# 3 set of curves defining the boundary of the# parametric or generalized coons surfaces.## In this example a new database is opened and a# inclined surface is drawn using 2 curves. Then# 3 curves, for acting as edges are drawn. Then# this function is called to create a manifold# surface over "Surface 1".## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_surface_3edge_man()# has the following arguments:## sgm_const_surface_3edge_man# ( output_ids,# curve1_list,# curve2_list,# curve3_list,# surface_list,# cubic,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_curve1_list[32]STRING s_curve2_list[32]STRING s_curve3_list[32]STRING s_surface_list[32]LOGICAL l_cubicSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_line_2point_created_ids[VIRTUAL]STRING sv_surface_2curve_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labeli_return_value = surface_label(TRUE)dump i_return_value#---------------------------------------------------------------------# Create Manifold surfacei_return_value = @ asm_const_line_2point @ ( "#","[0 0 0][0 -2 2]","[2 0 0][2 -2 2]",@ 0,"",50., 1, sv_line_2point_created_ids )dump i_return_valuei_return_value = @ sgm_const_surface_2curve @ ( "", "Curve 1 ", "Curve 2 ", @ sv_surface_2curve_created_ids )dump i_return_value#---------------------------------------------------------------------# Create linesi_return_value = @ asm_const_line_2point @ ( "#","[0 0 0][0 0 0][1 0 0]", @ "[1 0 0][0 0 1][0 0 1]", 0,"",50., 1, @ sv_line_2point_created_ids )dump i_return_value#---------------------------------------------------------------------# Create surfaces_output_ids = ""s_curve1_list = "Curve 3"s_curve2_list = "Curve 4"s_curve3_list = "Curve 5"s_surface_list = "Surface 1"l_cubic = TRUEi_return_value = @ sgm_const_surface_3edge_man @ ( s_output_ids, @ s_curve1_list, @ s_curve2_list, @ s_curve3_list, @ s_surface_list, @ l_cubic, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_line_2point_created_ids)sys_free_string( sv_surface_2curve_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_surface_4edge()## This function creates bi-parametric surfaces# from 4 set of curves defining the boundary# of the surfaces.## In this example a new database is opened and 4# curves are drawn. Then this function is called# to create a surface with 4 curves as boundaries# for the surface.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_surface_4edge()# has the following arguments:## sgm_const_surface_4edge# ( output_ids,# curve1_list,# curve2_list,# curve3_list,# curve4_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_curve1_list[32]STRING s_curve2_list[32]STRING s_curve3_list[32]STRING s_curve4_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_line_2point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labeli_return_value = surface_label(TRUE)dump i_return_value#---------------------------------------------------------------------# Create linesi_return_value = @ asm_const_line_2point @ ( "#", "[0 0 0][1 0 0][1 0 1][0 0 1]", @ "[1 0 0][1 0 1][0 0 1][0 0 0]", @ 0,"",50., 1, sv_line_2point_created_ids )dump i_return_value#---------------------------------------------------------------------# Create surfaces_output_ids = ""s_curve1_list = "Curve 1"s_curve2_list = "Curve 2"s_curve3_list = "Curve 3"s_curve4_list = "Curve 4"i_return_value = @ sgm_const_surface_4edge @ ( s_output_ids, @ s_curve1_list, @ s_curve2_list, @ s_curve3_list, @ s_curve4_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_surface_4edge_man()## This function creates manifold surfaces from# 4 set of curves defining the boundary of the# parametric or generalized coons surfaces.## In this example a new database is opened and a# surface is drawn using 2 curves. Then 4 curves# are drawn for acting as edges. Then this# function is called to create a manifold surface# over "Surface 1".## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_surface_4edge_man()# has the following arguments:## sgm_const_surface_4edge_man# ( output_ids,# curve1_list,# curve2_list,# curve3_list,# curve4_list,# surface_list,# cubic,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_curve1_list[32]STRING s_curve2_list[32]STRING s_curve3_list[32]STRING s_curve4_list[32]STRING s_surface_list[32]LOGICAL l_cubicSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_line_2point_created_ids[VIRTUAL]STRING sv_surface_2curve_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labeli_return_value = surface_label(TRUE)dump i_return_value#---------------------------------------------------------------------# Create surfacei_return_value = @ asm_const_line_2point @ ( "#","[0 0 0][0 -2 2]","[2 0 0][2 -2 2]",@ 0,"",50., 1, sv_line_2point_created_ids )dump i_return_valuei_return_value = @ sgm_const_surface_2curve @ ( "", "Curve 1 ", "Curve 2 ", @ sv_surface_2curve_created_ids )dump i_return_value#---------------------------------------------------------------------# Create linesi_return_value = @ asm_const_line_2point @ ( "", "[0 0 0][1 0 0][1 0 1][0 0 1]", @ "[1 0 0][1 0 1][0 0 1][0 0 0]", @ 0,"",50., 1, sv_line_2point_created_ids )dump i_return_value#---------------------------------------------------------------------# Create Manifold surfaces_output_ids = ""s_curve1_list = "Curve 3"s_curve2_list = "Curve 4"s_curve3_list = "Curve 5"s_curve4_list = "Curve 6"s_surface_list = "Surface 1"l_cubic = TRUEi_return_value = @ sgm_const_surface_4edge_man @ ( s_output_ids, @ s_curve1_list, @ s_curve2_list, @ s_curve3_list, @ s_curve4_list, @ s_surface_list, @ l_cubic, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_line_2point_created_ids)sys_free_string( sv_surface_2curve_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_surface_extract_face()## This function creates parametric surface# by extracting a surface from a face of a# solid## In this example a new database is opened and a# cube of 1 unit is created. Then this function# is called to create a surface by extracting the# top-surface ("Solid 1.4") using this function.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_surface_extract_face()# has the following arguments:## sgm_const_surface_extract_face# ( output_ids,# face_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_face_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_create_hpat_xyz_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labelsurface_label(TRUE)#---------------------------------------------------------------------# Create Cube of 1 X 1 X 1i_return_value = @ asm_const_hpat_xyz @ ( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @ sv_create_hpat_xyz_created_ids )#---------------------------------------------------------------------# Create Surfaces_output_ids = ""s_face_list = "Solid 1.4"i_return_value = @ sgm_const_surface_extract_face @ ( s_output_ids, @ s_face_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_create_hpat_xyz_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_surface_extrude()## This function creates bi-parametric surfaces# by moving curves through space along a defined# axis with the option of simultaneously scaling# and rotating the extruded surfaces.## In this example a new database is opened and a# line is drawn from [0 0 0] to [0 0 1]. Then a# surface is created using this function, by# extrusion of "Curve 1" along vector <10 0 0>.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_surface_extrude()# has the following arguments:## sgm_const_surface_extrude# ( output_ids,# delta,# scale,# angle,# origin,# coord_frame,# curve_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_delta[32]REAL r_scaleREAL r_angleSTRING s_origin[32]STRING s_coord_frame[32]STRING s_curve_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_point_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labelsurface_label(TRUE)#---------------------------------------------------------------------# Create Curve from [0 0 0] to [0 0 1]i_return_value = @ asm_const_line_2point @ ( "1","[0 0 0]","[0 0 1]",0,"",50.,1, @ sv_point_ids )dump i_return_value#---------------------------------------------------------------------# Create Surface by extrusion of "Curve 1"s_output_ids = ""s_delta = "<10 0 0>"r_scale = 1r_angle = 0.0s_origin = "[0 0 0]"s_coord_frame = "Coord 0"s_curve_list = "Curve 1 "i_return_value = @ sgm_const_surface_extrude @ ( s_output_ids, @ s_delta, @ r_scale, @ r_angle, @ s_origin, @ s_coord_frame, @ s_curve_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_point_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_surface_revolve()## This function creates surfaces by revolving a # curve about an axis of rotation.## In this example a new database is opened and a# line is drawn form [0 0 0] to [1 0 0]. Then a# surface is created by revolving this curve# along Z-axis for 45 degrees.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_surface_revolve()# has the following arguments:## sgm_const_surface_revolve# ( output_ids,# axis,# angle,# offset,# coord_frame,# curve_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_axis[32]REAL r_angleREAL r_offsetSTRING s_coord_frame[32]STRING s_curve_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_line_2point_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labelsurface_label(TRUE)#---------------------------------------------------------------------# Create Curvei_return_value = @ asm_const_line_2point @ ( "1","[0 0 0]","[1 0 0]",0,"",50., 1, @ sv_line_2point_created_ids )dump i_return_value#---------------------------------------------------------------------# Create Surfaces_output_ids = "1"s_axis = "Coord 0.3"r_angle = 45.0r_offset = 10.s_coord_frame = "Coord 0"s_curve_list = "Curve 1 "i_return_value = @ sgm_const_surface_revolve @ ( s_output_ids, @ s_axis, @ r_angle, @ r_offset, @ s_coord_frame, @ s_curve_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_line_2point_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_vector_2point()## This function creates vector between two sets# of points.## In this example a new database is opened and# vectors are created between 2 sets of points.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_vector_2point()# has the following arguments:## sgm_const_vector_2point# ( output_ids,# base_point_list,# tip_point_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_base_point_list[32]STRING s_tip_point_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create Vectorss_output_ids = ""s_base_point_list = "[0 0 0] [1 1 1]"s_tip_point_list = "[10 0 0] [2.2 3.3 4.4]"i_return_value = @ sgm_const_vector_2point @ ( s_output_ids, @ s_base_point_list, @ s_tip_point_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_vector_intersect()## This function creates vectors at the # intersection of two sets of planes.## In this example a new database is opened and# 2 planes are created along XY and XZ plane# using 3 point option. Then this function is# called to create a vector at the intersection# of the two planes. The created vector appear# on the default viewport.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_vector_intersect()# has the following arguments:## sgm_const_vector_intersect# ( output_ids,# first_plane_list,# second_plane_list,# vector_rev_direction,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_first_plane_list[32]STRING s_second_plane_list[32]LOGICAL l_vector_rev_directionSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_plane_3p_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create Plane along XY planei_return_value = @ sgm_const_plane_3point @ ( "", "[ 0 0 0]", "[ 10 0 0]", @ "[ 10 10 0]", sv_plane_3p_ids )dump i_return_value# Create Plane along XZ planei_return_value = @ sgm_const_plane_3point @ ( "", "[ 0 0 0]", "[ 10 0 0]", @ "[ 10 0 10]", sv_plane_3p_ids )dump i_return_value#---------------------------------------------------------------------# Create Vectors_output_ids = ""s_first_plane_list = "Plane 1 "s_second_plane_list = "Plane 2 "l_vector_rev_direction = FALSEi_return_value = @ sgm_const_vector_intersect @ ( s_output_ids, @ s_first_plane_list, @ s_second_plane_list, @ l_vector_rev_direction, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_plane_3p_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function sgm_const_vector_magnitude()## This function creates a vector from base point# in the specified magnitude and direction.## In this example a new database is opened and# 2 vectors of magnitude 10 and 5 units are# created along X and Z axis respectively, with# [0 0 0] as base point.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_vector_magnitude()# has the following arguments:## sgm_const_vector_magnitude# ( output_ids,# magnitude_list,# direction_list,# base_point_list,# coord_frame,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_magnitude_list[32]STRING s_direction_list[32]STRING s_base_point_list[32]STRING s_coord_frame[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create Vector of Magnitude 10 units along X axiss_output_ids = ""s_magnitude_list = "10.0"s_direction_list = "<1 0 0>"s_base_point_list = "[0 0 0]"s_coord_frame = "Coord 0"i_return_value = @ sgm_const_vector_magnitude @ ( s_output_ids, @ s_magnitude_list, @ s_direction_list, @ s_base_point_list, @ s_coord_frame, @ sv_created_ids )dump i_return_value# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Create Vector of Magnitude 5 units along Z axiss_output_ids = ""s_magnitude_list = "5.0"s_direction_list = "<0 0 1>"s_base_point_list = "[0 0 0]"s_coord_frame = "Coord 0"i_return_value = @ sgm_const_vector_magnitude @ ( s_output_ids, @ s_magnitude_list, @ s_direction_list, @ s_base_point_list, @ s_coord_frame, @ sv_created_ids )dump i_return_value#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_vector_normal()## This function creates vectors that are normal# to specified planes, surfaces or element faces.## In this example a new database is opened and# surface of dimension 4 X 4 is created along# XY plane. Then this function is called to# create a vector perpendicular to the surface# at the its center. The created vector appear # on the default viewport.## This file can be run by starting a session of# Patran, opening a new or existing database,# and running this session file through the# "File","Session","Play" pulldown menus# on the menu bar.## The function sgm_const_vector_normal()# has the following arguments:## sgm_const_vector_normal# ( output_ids,# normal_option,# entity_list,# magnitude_list,# base_point_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]INTEGER i_normal_optionSTRING s_entity_list[32]STRING s_magnitude_list[32]STRING s_base_point_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_xy_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create Surface along XY planei_return_value = @ asm_const_patch_xyz @ ( "1", "<4 0 4>", "[0 0 0]", "Coord 0", @ sv_xy_ids )#---------------------------------------------------------------------# Create Vectors_output_ids = ""i_normal_option = 2s_entity_list = "Surface 1 "s_magnitude_list = "1.0"s_base_point_list = "[2.0 0.0 2.0 ] "i_return_value = @ sgm_const_vector_normal @ ( s_output_ids, @ i_normal_option, @ s_entity_list, @ s_magnitude_list, @ s_base_point_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_xy_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_vector_product()## This function creates product vectors from two# sets of vectors. The generated vectors are# based on the origin points of the first set of# vectors.## In this example a new database is opened and 2# vectors are created along X and Z axis. Then# this function is called to create a vector as# product of vectors "Vector 1" and "Vector 2".## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_vector_product()# has the following arguments:## sgm_const_vector_product# ( output_ids,# vector_list1,# vector_list2,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_vector_list1[32]STRING s_vector_list2[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create Vector along X and Z axisi_return_value = @ sgm_const_vector_2point @ ( "#","[0 0 0]","[10 0 0] [0 0 10]", @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Create Vector - Product of Vectors 1 & 2s_output_ids = ""s_vector_list1 = "Vector 1"s_vector_list2 = "Vector 2"i_return_value = @ sgm_const_vector_product @ ( s_output_ids, @ s_vector_list1, @ s_vector_list2, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_const_surface_vertex()## This function creates bi-parametric surfa-# ces which is the quadrilateral formed by four# vertex points.## In this example a new database is opened and 4# points are created on the XZ plane. Then this# function is called to created a surface using# the 4 vertex.## This file can be run by starting a session of# Patran, and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_const_surface_vertex()# has the following arguments:## sgm_const_surface_vertex# ( output_ids,# point1_list,# point2_list,# point3_list,# point4_list,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[2]STRING s_point1_list[32]STRING s_point2_list[32]STRING s_point3_list[32]STRING s_point4_list[32]STRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_create_grid_xyz_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "new.db" )$? YES 36000002# Set ISO-1 viewingi_return_value = @ ga_view_aa_set @ ( 23., -34., 0. )dump i_return_value# Display Surface Labelsurface_label(TRUE)#---------------------------------------------------------------------# Create Pointsi_return_value = @ asm_const_grid_xyz @ ( "1", "[0 0 0]", "Coord 0", @ sv_create_grid_xyz_created_ids )dump i_return_valuei_return_value = @ asm_const_grid_xyz @ ( "2", "[5 0 0]", "Coord 0", @ sv_create_grid_xyz_created_ids )dump i_return_valuei_return_value = @ asm_const_grid_xyz @ ( "3", "[5 0 7]", "Coord 0", @ sv_create_grid_xyz_created_ids )dump i_return_valuei_return_value = @ asm_const_grid_xyz @ ( "4", "[0 0 5]", "Coord 0", @ sv_create_grid_xyz_created_ids )dump i_return_value#---------------------------------------------------------------------# Create Surfaces_output_ids = ""s_point1_list = "Point 1"s_point2_list = "Point 2"s_point3_list = "Point 3"s_point4_list = "Point 4"i_return_value = @ sgm_const_surface_vertex @ ( s_output_ids, @ s_point1_list, @ s_point2_list, @ s_point3_list, @ s_point4_list, @ sv_created_ids )dump i_return_valuedump sv_created_ids#---------------------------------------------------------------------# Free allocated memorysys_free_string( sv_created_ids)sys_free_string( sv_create_grid_xyz_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_create_curve_boundary()## In this illustration, a new database is opened# 2 points are created. A line is created using# those 2 points.## This file can be run by starting a session of# Patran and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_create_curve_boundary()# has the following arguments:## sgm_create_curve_boundary# ( output_ids,# construct_method,# exist,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[128]STRING s_construct_method[128]INTEGER i_existSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Create 2 Pointsi_return_value = @ asm_const_grid_xyz( "", "[0 0 0 ]"// @ "[10 0 0]", "Coord 0", @ sv_asm_create_grid_xyz_creat_id )dump i_return_value#---------------------------------------------------------------------# Create a line between Point 1 and 2.#s_output_ids = "#"s_construct_method = "Co 2PointCurve ( Ev Geo (G1))( Ev Geo (G2))"i_return_value = @ sgm_create_curve_boundary @ ( s_output_ids, @ s_construct_method, @ i_exist, @ sv_created_ids )dump i_return_valuedump i_exist# The ID of the created curve isdump sv_created_idssys_free_string( sv_asm_create_grid_xyz_creat_id )sys_free_string( sv_created_ids )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of three calls # to the function sgm_create_curve_bspline().## This illustration opens a new database and# creates 3 points in it. It calls the function# to create 3 different B-splines.## This file can be run by starting a session of# Patran and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_create_curve_bspline() has the following # arguments:## sgm_create_curve_bspline# ( output_ids,# point_list,# order,# interpolate,# param_method,# closed,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[128]STRING s_point_list[128]INTEGER i_orderLOGICAL l_interpolateINTEGER i_param_methodLOGICAL l_closedSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Create 3 pointsi_return_value = @ asm_const_grid_xyz @ ( "", "[0 0 0][10 0 0][10 10 0]", @ "Coord 0", @ sv_asm_create_grid_xyz_creat_id )dump i_return_value#---------------------------------------------------------------------# Call the function to create a open B-spline curve with order 3, # without interpolation. s_output_ids = "1"s_point_list = "Point 1:3"i_order = 3l_interpolate = FALSEi_param_method = 1l_closed = FALSEi_return_value = @ sgm_create_curve_bspline @ ( s_output_ids, @ s_point_list, @ i_order, @ l_interpolate, @ i_param_method, @ l_closed, @ sv_created_ids )dump i_return_valuedump sv_created_ids# Session file paused to observe the curve created. Press "Resume"# to continue.sf_pause()#---------------------------------------------------------------------# Call the function to create a open B-spline curve with order 3, # with interpolation. s_output_ids = "2"l_interpolate = TRUEl_closed = FALSEi_return_value = @ sgm_create_curve_bspline @ ( s_output_ids, @ s_point_list, @ i_order, @ l_interpolate, @ i_param_method, @ l_closed, @ sv_created_ids )dump i_return_valuedump sv_created_ids# Session file paused to observe the curve created. Press "Resume"# to continue.sf_pause()#---------------------------------------------------------------------# Call the function to create a closed B-spline curve with order 3, # with interpolation. s_output_ids = "3"l_interpolate = TRUEl_closed = TRUEi_return_value = @ sgm_create_curve_bspline @ ( s_output_ids, @ s_point_list, @ i_order, @ l_interpolate, @ i_param_method, @ l_closed, @ sv_created_ids )dump i_return_value# Created ID listdump sv_created_idssys_free_string(sv_created_ids)sys_free_string(sv_asm_create_grid_xyz_creat_id)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_create_curve_chain()## This illustration opens a new database and # creates 3 points in it. Using these points,# it creates 2 lines. Finally a composite curve# is created using these two lines.# # This file can be run by starting a session of# Patran and running this session file # through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_create_curve_chain() has the following arguments:## sgm_create_curve_chain# ( output_ids,# curve_list,# delete_orig,# created_ids )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_output_ids[128]STRING s_curve_list[128]LOGICAL l_delete_origSTRING sv_created_ids[VIRTUAL]INTEGER i_return_valueSTRING sv_asm_line_2point_created_id[VIRTUAL]STRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Show the labels of Curves and Pointscurve_label( TRUE )point_label( TRUE )# Create 3 Pointsi_return_value = @ asm_const_grid_xyz @ ( "", "[0 0 0][10 0 0][10 10 0]", @ "Coord 0", @ sv_asm_create_grid_xyz_creat_id )dump i_return_value# Create 2 Linesi_return_value = @ asm_const_line_2point( "", "Point 1 2", @ "Point 2 3", @ 0, "", 50., 1, @ sv_asm_line_2point_created_id )dump i_return_value# Session file paused. Observe the two lines created. Press "Resume"# to continue.sf_pause()#---------------------------------------------------------------------# Call the function to construct a composite curve from a list of# 2 curves.s_output_ids = "#"s_curve_list = "Curve 1:2"l_delete_orig = TRUEi_return_value = @ sgm_create_curve_chain @ ( s_output_ids, @ s_curve_list, @ l_delete_orig, @ sv_created_ids )$? YES 38000217dump i_return_value# Created IDsdump sv_created_idssys_free_string( sv_created_ids )sys_free_string( sv_asm_line_2point_created_id )sys_free_string( sv_asm_create_grid_xyz_creat_id )# Note that the third line is created in place of Curve 1 and 2.#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function sgm_create_curve_chain_v1()## This illustration opens a new database and# creates 3 points in it. Using these points,# it creates 2 lines. Finally a composite curve# is created using these two lines and the# original lines are deleted.## This file can be run by starting a session of# Patran and running this session file# through the "File","Session","Play" pulldown# menus on the menu bar.## The function sgm_create_curve_chain_v1()# has the following arguments:## sgm_create_curve_chain_v1# ( output_ids,# curve_list,#