() |
## Purpose : This file provides an example of a call to the# function fem_create_nodes_1()## This session file create a new database by name# new.db. A point will be created and this point# will be used for creating a node.## 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 fem_create_nodes()# has the following arguments:## fem_create_nodes_1# ( ref_coord_frame,# anly_coord_frame,# flag_geometry,
# node_select,# point_select )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_ref_coord_frame[32]STRING s_anly_coord_frame[32]INTEGER i_flag_geometry
STRING s_node_select[32]STRING s_point_select[32]STRING sv_fem_nodes_created[VIRTUAL]STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# A point is created by giving ’xyz’ coordinates.i_return_value = @ asm_const_grid_xyz("1", "[0 0 0]", "Coord 0", sv_created_ids)dump i_return_valuenode_label( TRUE )point_label( TRUE )#---------------------------------------------------------------------# Calling function to create node at the point.s_ref_coord_frame = "Coord 0"s_anly_coord_frame = "Coord 0"i_flag_geometry = TRUEs_node_select = "11"s_point_select = "Point 1"#i_return_value = @ fem_create_nodes @ ( s_ref_coord_frame, @ s_anly_coord_frame, @i_flag_geometry, @
s_node_select, @ s_point_select, @ sv_fem_nodes_created )dump i_return_valuedump sv_fem_nodes_createdsys_free_string(sv_fem_nodes_created)sys_free_string(sv_created_ids)#----------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_create_elems_1()## This session file will create a new database by# name new.db and nodes will be created. The # nodes will be used to create elements.## 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 fem_create_elems()# has the following arguments:## fem_create_elems_1# ( shape,# element_type,# element_select,# connection_pattern,# flag,
# corner1_node_select,# corner2_node_select,# corner3_node_select,# corner4_node_select,# corner5_node_select,# corner6_node_select,# corner7_node_select,# corner8_node_select,# fem_elements_created )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_shape[32]STRING s_element_type[32]STRING s_element_select[32]STRING s_connection_pattern[32]INTEGER i_flag
STRING s_corner1_node_select[32]STRING s_corner2_node_select[32]STRING s_corner3_node_select[32]STRING s_corner4_node_select[32]STRING s_corner5_node_select[32]STRING s_corner6_node_select[32]STRING s_corner7_node_select[32]STRING s_corner8_node_select[32]STRING s_fem_elements_created[260]INTEGER i_return_valueSTRING sv_fem_nodes_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating 16 nodes without using any geometry.i_return_value = @ fem_create_nodes("Coord 0", "Coord 0", FALSE, @ "1", "[0 0 0][0 1 0][1 0 0][0.5 1 0]"// @ "[1 0 1][0.5 1 1][0 0 1][0 1 1][0 1 0]"// @ "[0 2 0][1 1 0][0.5 2 0][1 1 1][0.5 2 1]"//@ "[0 1 1][0 2 1]", sv_fem_nodes_created)dump i_return_value#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set(23., -34., 0.)dump i_return_valuenode_label( TRUE )hex_elem_label( TRUE )#---------------------------------------------------------------------# Calling function to create 2 HEX27 elements.s_shape = "Hex"s_element_type = "Hex27"s_element_select = "1 10"s_connection_pattern = "Standard"i_flag = TRUE
s_corner1_node_select = "Node 1 2"s_corner2_node_select = "Node 3 4"s_corner3_node_select = "Node 5 6"s_corner4_node_select = "Node 7 8"s_corner5_node_select = "Node 9 10"s_corner6_node_select = "Node 11 12"s_corner7_node_select = "Node 13 14"s_corner8_node_select = "Node 15 16"#i_return_value = @fem_create_elems_1 @
( s_shape, @ s_element_type, @ s_element_select, @ s_connection_pattern, @i_flag, @
s_corner1_node_select, @ s_corner2_node_select, @ s_corner3_node_select, @ s_corner4_node_select, @ s_corner5_node_select, @ s_corner6_node_select, @ s_corner7_node_select, @ s_corner8_node_select, @ s_fem_elements_created )dump i_return_valuedump s_fem_elements_createdsys_free_string(sv_fem_nodes_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_create_mpc_nodal()## This session file will create a new database by# name new.db. Two 2D circle will be created.# These two curves will be meshed and the above# mentioned function will be called to create a# mpc between two nodes.## 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 fem_create_mpc_nodal()# has the following arguments:## fem_create_mpc_nodal# ( mpc_id,# mpc_type,# constant,# num_terms,# dependancy_state,# term_coefficients,# node_select,# freedom_select )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_mpc_idSTRING s_mpc_type[32]REAL r_constantINTEGER i_num_termsLOGICAL la_dependancy_state(3)REAL ra_term_coefficients(3)STRING saa_node_select[16](3)STRING saa_freedom_select[4](3)INTEGER i_return_valueSTRING sv_created_ids[VIRTUAL]INTEGER i_num_nodesINTEGER i_num_elemsSTRING sv_nodes_created[VIRTUAL]STRING sv_elems_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating two circles.i_return_value = @ sgm_const_curve_2d_circle_v1( "1", 1, 1., @ "Coord 0.3", "", "[0 0 0][0 0 0.1]", FALSE, sv_created_ids )dump i_return_value# Meshing the two curves with Bar elements.i_return_value = @ fem_create_mesh_curv( "Curve 1 2 ", 0.2, @ "Bar2", "1", "1", "Coord 0" , "Coord 0", @ i_num_nodes, i_num_elems, sv_nodes_created, sv_elems_created )dump i_return_value#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_valuenode_label( TRUE )mpc_label( TRUE )#---------------------------------------------------------------------# Calling function to create a mpc between two nodes.i_mpc_id = 1s_mpc_type = "Explicit"r_constant = 1.11i_num_terms = 3la_dependancy_state = [TRUE, FALSE, FALSE]ra_term_coefficients = [0., 2., 2.]saa_node_select(1) = "Node 4"saa_node_select(2) = "Node 37"saa_node_select(3) = "Node 35"saa_freedom_select(1)= "UX"saa_freedom_select(2)= "UX"saa_freedom_select(3)= "UX"#i_return_value = @ fem_create_mpc_nodal @ ( i_mpc_id, @ s_mpc_type, @ r_constant, @ i_num_terms, @ la_dependancy_state, @ ra_term_coefficients, @ saa_node_select, @ saa_freedom_select )dump i_return_valuesys_free_string(sv_created_ids)sys_free_string(sv_nodes_created)sys_free_string(sv_elems_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_create_mpc_sliding_surface()## This session file will create a new database by# name new.db. A surface and a solid will be # created and meshed. The above mentioned # function will be called to create mpc between # the surface and solid.## 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 fem_create_mpc_sliding_surface()# has the following arguments:## fem_create_mpc_sliding_surface# ( mpc_id,# tolerance,# coord_option,# coord_frame,# normal_axis,# dependent_region,# independent_region )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_mpc_idREAL r_toleranceSTRING s_coord_option[32]STRING s_coord_frame[32]STRING s_normal_axis[32]STRING s_dependent_region[32]STRING s_independent_region[32]INTEGER i_return_valueSTRING sv_created_ids[VIRTUAL]INTEGER i_num_nodesINTEGER i_num_elemsSTRING sv_nodes_created[VIRTUAL]STRING sv_elems_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating a patch and meshing it with Quad elements.i_return_value = @ asm_const_patch_xyz( "1", "<1 0 01>", @ "[0 0 0]", "Coord 0", sv_created_ids )dump i_return_valuei_return_value = @ fem_create_mesh_surf_2( "IsoMesh", 0, @ "Surface 1 ", 1, [0.2], "Quad4", "1", "1", @ "Coord 0", "Coord 0", i_num_nodes, @ i_num_elems, sv_nodes_created, sv_elems_created )dump i_return_value#---------------------------------------------------------------------# Creating a hpat and meshing it with Hex elements.i_return_value = @ asm_const_hpat_xyz( "1", "<1 1 1>", @ "[0 0.1 0]", "Coord 0", sv_created_ids )dump i_return_valuei_return_value = @ fem_create_mesh_sol_3( "IsoMesh", 0, "Solid 1"@ , 1, [0.2], "Hex8", "37", "26", "Coord 0", @ "Coord 0", i_num_nodes, i_num_elems, @ sv_nodes_created, sv_elems_created )dump i_return_value#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_valuempc_label( TRUE )surface_label( TRUE )solid_label( TRUE )#---------------------------------------------------------------------# Calling function to create sliding surface mpc between the surface# and one face of the solid.i_mpc_id = 1r_tolerance = 0.15s_coord_option = "User Specified"s_coord_frame = "Coord 0"s_normal_axis = "Axis 2"s_dependent_region = "Surface 1"s_independent_region = "Solid 1.3"#i_return_value = @ fem_create_mpc_sliding_surface @ ( i_mpc_id, @ r_tolerance, @ s_coord_option, @ s_coord_frame, @ s_normal_axis, @ s_dependent_region, @ s_independent_region )dump i_return_valuesys_free_string(sv_created_ids)sys_free_string(sv_nodes_created)sys_free_string(sv_elems_created)#--------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_create_mesh_2curve_1()## This session file will create a new database by# name new.db and create two 2D circles. The # above mentioned function will be called to mesh# the space between the 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 fem_create_mesh_2curve_1()# has the following arguments:## i_return_value =# fem_create_mesh_2curve_1(# s_curve1_select,# s_curve2_select,# i_size_method,# i_flag,# r_global_edge_length,# i_num_along_curve,# i_num_across_curve,# s_element_topology,# s_node_select,# s_element_select,# s_anly_coord_frame,# s_ref_coord_frame,# i_num_fem_nodes,# i_num_fem_elements,# sv_fem_nodes_created,# sv_fem_elements_created )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_curve1_select[32]STRING s_curve2_select[32]INTEGER i_size_methodINTEGER i_flag
REAL r_global_edge_lengthINTEGER i_num_along_curveINTEGER i_num_across_curveSTRING s_element_topology[32]STRING s_node_select[32]STRING s_element_select[32]STRING s_anly_coord_frame[32]STRING s_ref_coord_frame[32]INTEGER i_num_fem_nodesINTEGER i_num_fem_elementsSTRING sv_fem_nodes_created[VIRTUAL]STRING sv_fem_elements_created[VIRTUAL]INTEGER i_return_valueSTRING sv_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating two circles.i_return_value = @ sgm_const_curve_2d_circle_v1( "1", 1, 1., @ "Coord 0.3", "", "[0 0 0][0 0 0.5]", FALSE, sv_created_ids )dump i_return_value#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_valuenode_label( TRUE )surface_label( TRUE )quad_elem_label( TRUE )#---------------------------------------------------------------------# Meshing the space between the two curves with Quad elements.s_curve1_select = "Curve 1"s_curve2_select = "Curve 2"i_size_method = 1r_global_edge_length = 0.0i_num_along_curve = 20i_num_across_curve = 4s_element_topology = "Quad4"s_node_select = ""s_element_select = ""s_anly_coord_frame = "Coord 0"s_ref_coord_frame = "Coord 0"#i_return_value = @ fem_create_mesh_2curve_1( @ s_curve1_select, @ s_curve2_select, @ i_size_method, @ i_flag, @ r_global_edge_length, @ i_num_along_curve, @ i_num_across_curve, @ s_element_topology, @ s_node_select, @ s_element_select, @ s_anly_coord_frame, @ s_ref_coord_frame, @ i_num_fem_nodes, @ i_num_fem_elements, @ sv_fem_nodes_created, @ sv_fem_elements_created )dump i_return_valuedump i_num_fem_nodesdump i_num_fem_elementsdump sv_fem_nodes_createddump sv_fem_elements_createdsys_free_string(sv_created_ids)sys_free_string(sv_fem_nodes_created)sys_free_string(sv_fem_elements_created)#--------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_create_mesh_curv_1()## This session file will create a new database by# name new.db and create two 2D circles. The # above mentioned function will be called to # mesh 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 fem_create_mesh_curv_1()# has the following arguments:## fem_create_mesh_curv_1(# s_curve_select,# i_flag,# r_global_edge_length,# s_element_topology,# s_node_select,# s_element_select,# s_anly_coord_frame,# s_ref_coord_frame,# i_num_fem_nodes,# i_num_fem_element,# sv_fem_nodes_created,# sv_fem_elements_created )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_curve_select[32]INTEGER i_flag
REAL r_global_edge_lengthSTRING s_element_topology[32]STRING s_node_select[32]STRING s_element_select[32]STRING s_anly_coord_frame[32]STRING s_ref_coord_frame[32]INTEGER i_num_fem_nodesINTEGER i_num_fem_elementSTRING sv_fem_nodes_created[VIRTUAL]STRING sv_fem_elements_created[VIRTUAL]INTEGER i_return_valueSTRING sv_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating two circles.i_return_value = @ sgm_const_curve_2d_circle_v1( "1", 1, 1., @ "Coord 0.3", "", "[0 0 0][0 0 0.5]", FALSE, sv_created_ids )dump i_return_value#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_valuenode_label( TRUE )bar_elem_label( TRUE )#---------------------------------------------------------------------# Meshing the two curves with Bar elements.s_curve_select = "Curve 1 2"r_global_edge_length = 0.5s_element_topology = "Bar4"s_node_select = "3"s_element_select = "10"s_anly_coord_frame = "Coord 0"s_ref_coord_frame = "Coord 0"#fem_create_mesh_curv_1( @ s_curve_select, @ i_flag, @ r_global_edge_length, @ s_element_topology, @ s_node_select, @ s_element_select, @ s_anly_coord_frame, @ s_ref_coord_frame, @ i_num_fem_nodes, @ i_num_fem_element, @ sv_fem_nodes_created, @ sv_fem_elements_created )dump i_num_fem_nodesdump i_num_fem_elementdump sv_fem_nodes_createddump sv_fem_elements_createdsys_free_string(sv_created_ids)sys_free_string(sv_fem_nodes_created)sys_free_string(sv_fem_elements_created)#--------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_create_mesh_sol_3()## This session file will create a new database by# name new.db and create a hpat solid. This solid# will be meshed using 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 fem_create_mesh_sol_3()# has the following arguments:## fem_create_mesh_sol_3(# s_mesher,# i_options_control,# s_solid_select,# i_num_values,# ra_value_array,# s_element_topology,# s_node_select,# s_element_select,# s_anly_coord_frame,# s_ref_coord_frame,# i_num_fem_nodes,# i_num_fem_element,# sv_fem_nodes_created,# sv_fem_elements_created )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_mesher[32]INTEGER i_options_controlSTRING s_solid_select[32]INTEGER i_num_valuesREAL ra_value_array(32)STRING s_element_topology[32]STRING s_node_select[32]STRING s_element_select[32]STRING s_anly_coord_frame[32]STRING s_ref_coord_frame[32]INTEGER i_num_fem_nodesINTEGER i_num_fem_elementSTRING sv_fem_nodes_created[VIRTUAL]STRING sv_fem_elements_created[VIRTUAL]INTEGER i_return_valueSTRING sv_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating a hpat solid.i_return_value = @ asm_const_hpat_xyz( "1", "<1 1 1>", @ "[0 0.1 0]", "Coord 0", sv_created_ids )dump i_return_value#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_valuesolid_label( TRUE )node_label( TRUE )hex_elem_label( TRUE )#---------------------------------------------------------------------# Meshing the solid with Hex elements.s_mesher = "IsoMesh"i_options_control = 16384s_solid_select = "Solid 1"i_num_values = 1ra_value_array(1) = 0.25s_element_topology = "Hex8"s_node_select = ""s_element_select = ""s_anly_coord_frame = "Coord 0"s_ref_coord_frame = "Coord 0"#fem_create_mesh_sol_3( @ s_mesher, @ i_options_control, @ s_solid_select, @ i_num_values, @ ra_value_array, @ s_element_topology, @ s_node_select, @ s_element_select, @ s_anly_coord_frame, @ s_ref_coord_frame, @ i_num_fem_nodes, @ i_num_fem_element, @ sv_fem_nodes_created, @ sv_fem_elements_created )dump i_num_fem_nodesdump i_num_fem_elementdump sv_fem_nodes_createddump sv_fem_elements_createdsys_free_string(sv_fem_nodes_created)sys_free_string(sv_fem_elements_created)sys_free_string(sv_created_ids)#---------------------------------------------------------------------fem_create_mesh_sol_5 | () |
#---------------------------------------------------------------------## Purpose : This file provides an example of a call to the# function fem_create_mesh_sol_5()## This session file will create a new database by# name new.db and create a hpat solid. This solid# will be meshed using 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 fem_create_mesh_sol_5()# has the following arguments:## fem_create_mesh_sol_5(# s_solid_list,# s_mesher_pick,# s_elem_topo,# i_mesher_val_qtt,# sa_mesher_val,# i_flags,# i_FMF_perform,# i_FMF_make_dup_node,# i_FMF_stop_when_interf_meshed,# i_FMF_use_prox_tol,# r_FMF_prox_tol,# s_FMF_solid_neighbors,# s_node_list,# s_elem_list,# s_a_coord_frame,# s_r_coord_frame,# i_num_nodes,# i_num_elems,# sv_nodes_created,# sv_elems_created )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_solid_list[1001]STRING s_mesher_pick[32]STRING s_elem_topo[32]INTEGER i_mesher_val_qttSTRING sa_mesher_val[32](4)INTEGER i_flagsINTEGER i_FMF_performINTEGER i_FMF_make_dup_nodeINTEGER i_FMF_stop_when_interf_meshedINTEGER i_FMF_use_prox_tolREAL r_FMF_prox_tolSTRING s_FMF_solid_neighbors[1001]STRING s_node_list[32]STRING s_elem_list[32]STRING s_a_coord_frame[32]STRING s_r_coord_frame[32]INTEGER i_num_nodesINTEGER i_num_elemsSTRING sv_nodes_created[VIRTUAL]STRING sv_elems_created[VIRTUAL]INTEGER i_return_valueSTRING sv_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating a hpat solid.i_return_value = @ asm_const_hpat_xyz( "1", "<1 1 1>", @ "[0 0.1 0]", "Coord 0", sv_created_ids )dump i_return_value#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_valuesolid_label( TRUE )node_label( TRUE )hex_elem_label( TRUE )#---------------------------------------------------------------------# Meshing the solid with Hex elements.s_solid_list = "Solid 1"s_mesher_pick = "IsoMesh"s_elem_topo = "Hex8"i_mesher_val_qtt = 4sa_mesher_val(1) = "0.25"sa_mesher_val(2) = "0.05"sa_mesher_val(3) = "0.1"sa_mesher_val(4) = "0.0"i_flags = 16384 /* FEM_MF_USE_NEW_NUMBERING_CONTROL_F */ + @ 1048576 /* FEM_MF_GRADE_MESH_F */ + @ 16 /* FEM_MF_CURVATURE_CHECK_F */$ Developer's note: /src/fem/mesh/free/NEW6/include/fem_publ_mf_defs.h
i_FMF_perform = 0i_FMF_make_dup_node = 0i_FMF_stop_when_interf_meshed = 0i_FMF_use_prox_tol = 0r_FMF_prox_tol = 0.1s_FMF_solid_neighbors= ""s_node_list = ""s_elem_list = ""s_a_coord_frame = "Coord 0"s_r_coord_frame = "Coord 0"#fem_create_mesh_sol_5( @ s_solid_list, @ s_mesher_pick, @ s_elem_topo, @ i_mesher_val_qtt, @ sa_mesher_val, @ i_flags, @ i_FMF_perform, @ i_FMF_make_dup_node, @ i_FMF_stop_when_interf_meshed, @ i_FMF_use_prox_tol, @ r_FMF_prox_tol, @ s_FMF_solid_neighbors, @ s_node_list, @ s_elem_list, @ s_a_coord_frame, @ s_r_coord_frame, @ i_num_nodes, @ i_num_elems, @ sv_nodes_created, @ sv_elems_created )dump i_num_nodesdump i_num_elemsdump sv_nodes_createddump sv_elems_createdsys_free_string(sv_nodes_created)sys_free_string(sv_elems_created)sys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_create_mesh_surf_3()## This session file will create a new database by# name new.db and create a curved surface. This # surface will be meshed by calling 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 fem_create_mesh_surf_3()# has the following arguments:## fem_create_mesh_surf_3(# s_mesher,# i_options_control,# s_surface_select,# i_num_values,# sa_value_array,# s_element_topology,# s_node_select,# s_element_select,# s_anly_coord_frame,# s_ref_coord_frame,# i_num_fem_nodes,# i_num_fem_element,# sv_fem_nodes_created,# sv_fem_elements_created )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_mesher[32]INTEGER i_options_controlSTRING s_surface_select[32]INTEGER i_num_valuesSTRING sa_value_array[32](32)STRING s_element_topology[32]STRING s_node_select[32]STRING s_element_select[32]STRING s_anly_coord_frame[32]STRING s_ref_coord_frame[32]INTEGER i_num_fem_nodesINTEGER i_num_fem_elementSTRING sv_fem_nodes_created[VIRTUAL]STRING sv_fem_elements_created[VIRTUAL]INTEGER i_return_valueSTRING sv_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating a curved surface by extruding a curve.i_return_value = @ asm_const_line_3point( "1", "[0 0 0]", @ "[0.5 -1 0]", "[1 0 0]", 1, 0.5, sv_created_ids )dump i_return_valuei_return_value = @ sgm_const_surface_extrude( "3", "<0 0 1>", 1.,@ 0., "[0 0 0]", "Coord 0", "Curve 1 ", sv_created_ids )dump i_return_value#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_valuesurface_label( TRUE )node_label( TRUE )quad_elem_label( TRUE )#---------------------------------------------------------------------# Meshing the two surfaces using Paver with Quad elements. Only the # check about the 'global space' is not performed on the mesh.s_mesher = "Paver"i_options_control = 8724s_surface_select = "Surface 3"i_num_values = 4sa_value_array(1) = "0.5"sa_value_array(2) = "0.1"sa_value_array(3) = "0.11"sa_value_array(4) = "0.13"s_element_topology = "Quad4"s_node_select = ""s_element_select = ""s_anly_coord_frame = "Coord 0"s_ref_coord_frame = "Coord 0"#fem_create_mesh_surf_3( @ s_mesher, @ i_options_control, @ s_surface_select, @ i_num_values, @ sa_value_array, @ s_element_topology, @ s_node_select, @ s_element_select, @ s_anly_coord_frame, @ s_ref_coord_frame, @ i_num_fem_nodes, @ i_num_fem_element, @ sv_fem_nodes_created, @ sv_fem_elements_created )dump i_num_fem_nodesdump i_num_fem_elementdump sv_fem_nodes_createddump sv_fem_elements_createdsys_free_string(sv_created_ids)sys_free_string(sv_fem_nodes_created)sys_free_string(sv_fem_elements_created)#---------------------------------------------------------------------fem_create_mesh_surf_4 | () |
## Purpose : This file provides an example of a call to the# function fem_create_mesh_surf_4()## This session file will create a new database by# name new.db and create a curved surface. This # surface will be meshed by calling 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 fem_create_mesh_surf_4()# has the following arguments:## fem_create_mesh_surf_4(# s_mesher_pick,# i_flag,# s_surface_list,# i_num_val,# sa_val_array_str,# s_elem_topo,# s_node_list,# s_elem_list,# s_a_coord_frame,# s_r_coord_frame,# i_num_nodes,# i_num_elems,# sv_nodes_created,# sv_elems_created )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_mesher_pick[32]INTEGER i_flagSTRING s_surface_list[32]INTEGER i_num_valSTRING sa_val_array_str[32](4)STRING s_elem_topo[32]STRING s_node_list[32]STRING s_elem_list[32]STRING s_a_coord_frame[32]STRING s_r_coord_frame[32]INTEGER i_num_nodesINTEGER i_num_elemsSTRING sv_nodes_created[VIRTUAL]STRING sv_elems_created[VIRTUAL]INTEGER i_return_valueSTRING sv_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating a curved surface by extruding a curve.i_return_value = @ asm_const_line_3point( "1", "[0 0 0]", @ "[0.5 -1 0]", "[1 0 0]", 1, 0.5, sv_created_ids )dump i_return_valuei_return_value = @ sgm_const_surface_extrude( "3", "<0 0 1>", 1.,@ 0., "[0 0 0]", "Coord 0", "Curve 1 ", sv_created_ids )dump i_return_value#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_valuesurface_label( TRUE )node_label( TRUE )quad_elem_label( TRUE )#---------------------------------------------------------------------# Meshing the two surfaces using Paver with Quad elements. Only the # check about the 'global space' is not performed on the mesh.s_mesher_pick = "Paver"i_flag = 4 + 16 + 512 + 8192 s_surface_list = "Surface 3"i_num_val = 4sa_val_array_str(1) = "0.5"sa_val_array_str(2) = "0.1"sa_val_array_str(3) = "0.11"sa_val_array_str(4) = "0.13"s_elem_topo = "Quad4"s_node_list = ""s_elem_list = ""s_a_coord_frame = "Coord 0"s_r_coord_frame = "Coord 0"#fem_create_mesh_surf_4( @ s_mesher_pick, @ i_flag, @ s_surface_list, @ i_num_val, @ sa_val_array_str, @ s_elem_topo, @ s_node_list, @ s_elem_list, @ s_a_coord_frame, @ s_r_coord_frame, @ i_num_nodes, @ i_num_elems, @ sv_nodes_created, @ sv_elems_created )dump i_num_nodesdump i_num_elemsdump sv_nodes_createddump sv_elems_createdsys_free_string(sv_created_ids)sys_free_string(sv_nodes_created)sys_free_string(sv_elems_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_create_surface_mesh_control()## This session file will create a new database by# name new.db and create a curved surface. This # surface will be meshed using Paver. The above# mentioned function will be called to change the# mesh parameters. The surface will be remeshed.## 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 fem_create_surface_mesh_control()# has the following arguments:## fem_create_surface_mesh_control# ( surface_list,# num_int_arg,# num_float_arg,# float_arg_list )##---------------------------------------------------------------------# Variable DeclarationsSTRING sv_surface_list[VIRTUAL]INTEGER i_num_int_argINTEGER ia_int_arg_list(4)INTEGER i_num_float_argREAL ra_float_arg_list(3)INTEGER i_return_valueINTEGER i_num_fem_nodesINTEGER i_num_fem_elementSTRING sv_fem_nodes_created[VIRTUAL]STRING sv_fem_elements_created[VIRTUAL]STRING sv_created_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating a curved surface by extruding a curve.i_return_value = @ asm_const_line_3point( "1", "[0 0 0]", @ "[0.5 -1 0]", "[1 0 0]", 1, 0.5, sv_created_ids )dump i_return_valuei_return_value = @ sgm_const_surface_extrude( "3", "<0 0 1>", 1.,@ 0., "[0 0 0]", "Coord 0", "Curve 1 ", sv_created_ids )dump i_return_value#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Meshing the surface using Paver with Quad elements.i_return_value = @ fem_create_mesh_surf_2("Paver", 8724, @ "Surface 3", 4, [0.5, 0.1, 0.11, 0.13], @ "Quad4", "", "", "Coord 0", "Coord 0", @ i_num_fem_nodes, i_num_fem_element, @ sv_fem_nodes_created, sv_fem_elements_created )dump i_return_value#---------------------------------------------------------------------# Calling function to set mesh control parameters.sv_surface_list = "surface 3"i_num_int_arg = 0ia_int_arg_list = [0, 0, 0, 0]i_num_float_arg = 1ra_float_arg_list = [0.1, 0.0, 0.0]#i_return_value = @ fem_create_surface_mesh_control @ ( sv_surface_list, @ i_num_int_arg, @ ia_int_arg_list, @ i_num_float_arg, @ ra_float_arg_list )$? YES 2001026# Delete the originally existing mesh seed.dump i_return_value#---------------------------------------------------------------------# Remeshing the surface with same arguments.i_return_value = @ fem_create_mesh_surf_2("Paver", 8724, @ "Surface 3", 4, [0.5, 0.1, 0.11, 0.13], @ "Quad4", "", "", "Coord 0", "Coord 0", @ i_num_fem_nodes, i_num_fem_element, @ sv_fem_nodes_created, sv_fem_elements_created )$? YESFORALL 2001103# Delete the existing mesh.dump i_return_valuesys_free_string(sv_surface_list)sys_free_string(sv_created_ids)sys_free_string(sv_fem_nodes_created)sys_free_string(sv_fem_elements_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_prj_nod_surf_norm()## This session file will create a new database by# name new.db and create a curved surface. By # calling the above mentioned function after a # pause the nodes will be moved to 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 fem_prj_nod_surf_norm()# has the following arguments:## fem_prj_nod_surf_norm# ( node_select,# surface_select )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_node_select[32]STRING s_surface_select[32]INTEGER i_return_valueSTRING sv_created_ids[VIRTUAL]STRING sv_fem_nodes_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating a curved surface by extruding a curve.i_return_value = @ asm_const_line_3point( "1", "[0 0 0]", @ "[0.5 -1 0]", "[1 0 0]", 1, 0.5, sv_created_ids )dump i_return_valuei_return_value = @ sgm_const_surface_extrude( "1", "<0 0 1>", 1.,@ 0., "[0 0 0]", "Coord 0", "Curve 1 ", sv_created_ids )dump i_return_value#---------------------------------------------------------------------# Calling function to create nodes.i_return_value = @ fem_create_nodes( "Coord 0", "Coord 0", @ FALSE, "1", "[3 1 0][-2 0 0.5][0 -1 1]", sv_fem_nodes_created )dump i_return_value#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_valuei_return_value = @ ga_display_lines_set( "general", 4 )dump i_return_valuenode_label( TRUE )#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Calling function to move nodes to the surface.s_node_select = "Node 1:3"s_surface_select = "Surface 1"#i_return_value = @ fem_prj_nod_surf_norm @ ( s_node_select, @ s_surface_select )dump i_return_valuesys_free_string(sv_created_ids)sys_free_string(sv_fem_nodes_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_prj_nod_surf_vect()## This session file will create a new database by# name new.db and create a curved surface.# These nodes will be moved onto the surface# by calling the above mentioned function after # a pause. The nodes will be moved to the surface# by using the vector projection method.## 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 fem_prj_nod_surf_vect()# has the following arguments:## fem_prj_nod_surf_vect# ( node_select,# surface_select,# projection_option,# projection_vector,# coord_frame )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_node_select[32]STRING s_surface_select[32]INTEGER i_projection_optionSTRING s_projection_vector[32]STRING s_coord_frame[32]INTEGER i_return_valueSTRING sv_created_ids[VIRTUAL]STRING sv_nodes_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Creating a curved surface by extruding a curve.i_return_value = @ asm_const_line_3point( "1", "[0 0 0]", @ "[0.5 -1 0]", "[1 0 0]", 1, 0.5, sv_created_ids )dump i_return_valuei_return_value = @ sgm_const_surface_extrude( "1", "<0 0 1>", 1.,@ 0., "[0 0 0]", "Coord 0", "Curve 1 ", sv_created_ids )dump i_return_value#---------------------------------------------------------------------# Calling function to create nodes.i_return_value = @ fem_create_nodes( "Coord 0", "Coord 0", @ FALSE, "1", "[0.3 0.1 0][2 0.5 0.5][0 -1 1]", sv_nodes_created )dump i_return_value#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_valuei_return_value = @ ga_display_lines_set( "general", 4 )dump i_return_valuenode_label( TRUE )#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Calling function to move the nodes to the surface by specifying a # vector.s_node_select = "Node 1:3"s_surface_select = "Surface 1"i_projection_option = 2s_projection_vector = "<1 1 0>"s_coord_frame = "Coord 0"#i_return_value = @ fem_prj_nod_surf_vect @ ( s_node_select, @ s_surface_select, @ i_projection_option, @ s_projection_vector, @ s_coord_frame )dump i_return_valuesys_free_string(sv_created_ids)sys_free_string(sv_nodes_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_prj_nod_curve_norm()## This session file will create a new database by# name new.db and create nodes and curve. After # resuming from the pause the above mentioned # function will be called to move the nodes to# 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 fem_prj_nod_curve_norm()# has the following arguments:## fem_prj_nod_curve_norm# ( node_select,# curve_select )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_node_select[32]STRING s_curve_select[32]INTEGER i_return_valueSTRING sv_created_ids[VIRTUAL]STRING sv_fem_nodes_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Calling function to create nodes.i_return_value = @ fem_create_nodes( "Coord 0", "Coord 0", @ FALSE, "1", "[3 1 0][-2 0 0][0 -1 0]", sv_fem_nodes_created )dump i_return_value#---------------------------------------------------------------------# Creating a curve.i_return_value = @ asm_const_line_3point( "1", "[0 0 0]", @ "[0.5 -1 0]", "[1 0 0]", 1, 0.5, sv_created_ids )dump i_return_value#---------------------------------------------------------------------i_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_valuenode_label( TRUE )#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Calling function to move nodes to the curve.s_node_select = "Node 1:3"s_curve_select = "Curve 1"#i_return_value = @ fem_prj_nod_curve_norm @ ( s_node_select, @ s_curve_select )dump i_return_valuesys_free_string(sv_created_ids)sys_free_string(sv_fem_nodes_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function fem_prj_nod_cplane()## This session file will create a new database by# name new.db and create nodes. After resuming # from pause the above mentioned function will be# called to move the nodes to X=1.0 plane.## 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 fem_prj_nod_cplane()# has the following arguments:## fem_prj_nod_cplane# ( node_select,# direction,# constant_value,# coord_frame )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_node_select[32]INTEGER i_directionREAL r_constant_valueSTRING s_coord_frame[32]INTEGER i_return_valueSTRING sv_fem_nodes_created[VIRTUAL]#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------node_label( TRUE )#---------------------------------------------------------------------# Calling function to create nodes.i_return_value = @ fem_create_nodes( "Coord 0", "Coord 0", @ FALSE, "1", "[3 1 0][-2 0 0][0 -1 0]", sv_fem_nodes_created )dump i_return_value#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Calling function to move nodes to plane X=1.0s_node_select = "Node 1:3"i_direction = 1r_constant_value = 1.0s_coord_frame = "Coord 0"#i_return_value = @ fem_prj_nod_cplane @ ( s_node_select, @ i_direction, @ r_constant_value, @ s_coord_frame )dump i_return_valuesys_free_string(sv_fem_nodes_created)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function mesh_seed_create()## This session file will create a new database by# name new.db and create a circular arc. The # above mentioned function will be called to# create and display a mesh seed on the curve# based on a one-way bias mesh seed spacing.## 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 mesh_seed_create()# has the following arguments:## mesh_seed_create# ( curve_select,# seed_option,# num_seeds,# ratio,# length_1,# length_2 )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_curve_select[32]INTEGER i_seed_optionINTEGER i_num_seedsREAL r_ratioREAL r_length_1REAL r_length_2STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create a circular curvei_return_value = @ sgm_const_curve_2d_arcangles @ ( "1", 3., 70., 100., "Coord 0.3", @ "[0 0 0]", sv_created_ids )dump i_return_value#---------------------------------------------------------------------# Create a mesh seed on the curve#s_curve_select = "Curve 1 "i_seed_option = 3i_num_seeds = 6r_ratio = 2.r_length_1 = 0.r_length_2 = 0.i_return_value = @ mesh_seed_create @ ( s_curve_select, @ i_seed_option, @ i_num_seeds, @ r_ratio, @ r_length_1, @ r_length_2 )dump i_return_valuesys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function mesh_seed_create_curv_based()## This session file will create a new database by# name new.db and create a circular arc.The above# mentioned function will be called to create and# display a mesh seed on the curve based on the# allowable curve error and length of an element.## 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 mesh_seed_create_curv_based()# has the following arguments:## mesh_seed_create_curv_based# ( curve_select,# element_length_type,# allow_curve_error,# constraint_option,# minimum_id_length,# maximum_id_length,# minimum_number,# maximum_number )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_curve_select[32]STRING s_element_length_type[32]REAL r_allow_curve_errorSTRING s_constraint_option[32]REAL r_minimum_id_lengthREAL r_maximum_id_lengthINTEGER i_minimum_numberINTEGER i_maximum_numberSTRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create a circular curvei_return_value = @ sgm_const_curve_2d_arcangles @ ( "1", 3., 70., 100., "Coord 0.3", @ "[0 0 0]", sv_created_ids )dump i_return_value#---------------------------------------------------------------------# Create a mesh seed on the curve#s_curve_select = "Curve 1 "s_element_length_type = "Uniform"r_allow_curve_error = 0.01s_constraint_option = "Length"r_minimum_id_length = 0.1r_maximum_id_length = 0.2i_minimum_number = 0i_maximum_number = 0mesh_seed_create_curv_based @ ( s_curve_select, @ s_element_length_type, @ r_allow_curve_error, @ s_constraint_option, @ r_minimum_id_length, @ r_maximum_id_length, @ i_minimum_number, @ i_maximum_number )sys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function mesh_seed_create_tabular()## This session file will create a new database by# name new.db and create a circular arc.The above# mentioned function will be called to create and# display a mesh seed at specific points on the# curve using a table of arc length percentages.## 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 mesh_seed_create_tabular()# has the following arguments:## mesh_seed_create_tabular# ( curve_select,# coord_type,# num_entries,# table_of_values )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_curve_select[32]STRING s_coord_type[32]INTEGER i_num_entriesREAL ra_table_of_values(7)INTEGER i_return_valueSTRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create a circular curvei_return_value = @ sgm_const_curve_2d_arcangles @ ( "1", 3., 70., 100., "Coord 0.3", @ "[0 0 0]", sv_created_ids )dump i_return_value#---------------------------------------------------------------------# Create a mesh seed on the curve#s_curve_select = "Curve 1 "s_coord_type = "Arc_Length"i_num_entries = 5ra_table_of_values = [ .2, .3, .6, .7, .9, 0., 0. ]i_return_value = @ mesh_seed_create_tabular @ ( s_curve_select, @ s_coord_type, @ i_num_entries, @ ra_table_of_values )dump i_return_valuesys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function mesh_seed_create_tabular_points()## This session file will create a new database by# name new.db and create a circular arc. The # above mentioned function will be called to# create and display a mesh seed at the specified# points and locations on 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 mesh_seed_create_tabular_points()# has the following arguments:## mesh_seed_create_tabular_points# ( curve_list,# point_list,# tolerance )##---------------------------------------------------------------------# Variable DeclarationsSTRING sv_curve_list[VIRTUAL]STRING sv_point_list[VIRTUAL]STRING sv_created_ids[VIRTUAL]REAL r_toleranceINTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create a circular curvei_return_value = @ sgm_const_curve_2d_arcangles @ ( "1", 3., 70., 100., "Coord 0.3", @ "[0 0 0]", sv_created_ids )dump i_return_value#---------------------------------------------------------------------# Create a mesh seed on the curve#sv_curve_list = "Curve 1"sv_point_list = " Point 1:2, [ 0., 3., 0.], @ [ 0.450, 2.95, 0.], @ [ 0.755, 2.90, 0.], @ [ 0.210, 2.99, 0.], @ [ -0.27, 2.99, 0.] "r_tolerance = .03i_return_value = @ mesh_seed_create_tabular_points @ ( sv_curve_list, @ sv_point_list, @ r_tolerance )dump i_return_valuesys_free_string(sv_curve_list)sys_free_string(sv_point_list)sys_free_string(sv_created_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function mesh_seed_display_mgr.init()## This session file creates a new database# "new.db", creates an arc and a mesh seed on it.# The above mentioned function is called to# initialize the mesh seed display manager. The# mesh seed is then erased to verify.## 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 mesh_seed_display_mgr.init() has no arguments.##---------------------------------------------------------------------# Variable DeclarationsSTRING s_curve_select[32]INTEGER i_seed_optionINTEGER i_num_seedsREAL r_ratioREAL r_length_1REAL r_length_2STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create a circular curvei_return_value = @ sgm_const_curve_2d_arcangles @ ( "1", 3., 70., 100., "Coord 0.3", @ "[0 0 0]", sv_created_ids )dump i_return_value#---------------------------------------------------------------------# Create a mesh seed on the curve#s_curve_select = "Curve 1 "i_seed_option = 3i_num_seeds = 6r_ratio = 2.r_length_1 = 0.r_length_2 = 0.i_return_value = @ mesh_seed_create @ ( s_curve_select, @ i_seed_option, @ i_num_seeds, @ r_ratio, @ r_length_1, @ r_length_2 )dump i_return_valuesys_free_string(sv_created_ids)#---------------------------------------------------------------------# Session file paused. Press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Initialize the mesh seed display managermesh_seed_display_mgr.init()#---------------------------------------------------------------------# Erase the mesh seed from the viewportmesh_seed_display_mgr.erase()#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function mesh_seed_display_mgr.plot()## This session file creates a new database# "new.db", creates an arc and a mesh seed on it.# The mesh seed display manager is initialized &# mesh seed is erased. Above mentioned function# is called to display the mesh seed again.## 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 mesh_seed_display_mgr.plot() has no arguments.##---------------------------------------------------------------------# Variable DeclarationsSTRING s_curve_select[32]INTEGER i_seed_optionINTEGER i_num_seedsREAL r_ratioREAL r_length_1REAL r_length_2STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create a circular curvei_return_value = @ sgm_const_curve_2d_arcangles @ ( "1", 3., 70., 100., "Coord 0.3", @ "[0 0 0]", sv_created_ids )dump i_return_value#---------------------------------------------------------------------# Create a mesh seed on the curve#s_curve_select = "Curve 1 "i_seed_option = 3i_num_seeds = 6r_ratio = 2.r_length_1 = 0.r_length_2 = 0.i_return_value = @ mesh_seed_create @ ( s_curve_select, @ i_seed_option, @ i_num_seeds, @ r_ratio, @ r_length_1, @ r_length_2 )dump i_return_valuesys_free_string(sv_created_ids)#---------------------------------------------------------------------# Initialize the mesh seed display manager & erase the mesh seedmesh_seed_display_mgr.init()mesh_seed_display_mgr.erase()#---------------------------------------------------------------------# Session file paused. Press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Plot the mesh seed in the viewportmesh_seed_display_mgr.plot()#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function mesh_seed_display_mgr.erase()## This session file creates a new database# "new.db", creates an arc and a mesh seed on it.# The mesh seed display manager is initialized.# The above mentioned function is called to erase# the mesh seed from the 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 mesh_seed_display_mgr.erase() has no arguments.##---------------------------------------------------------------------# Variable DeclarationsSTRING s_curve_select[32]INTEGER i_seed_optionINTEGER i_num_seedsREAL r_ratioREAL r_length_1REAL r_length_2STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create a circular curvei_return_value = @ sgm_const_curve_2d_arcangles @ ( "1", 3., 70., 100., "Coord 0.3", @ "[0 0 0]", sv_created_ids )dump i_return_value#---------------------------------------------------------------------# Create a mesh seed on the curve#s_curve_select = "Curve 1 "i_seed_option = 3i_num_seeds = 6r_ratio = 2.r_length_1 = 0.r_length_2 = 0.i_return_value = @ mesh_seed_create @ ( s_curve_select, @ i_seed_option, @ i_num_seeds, @ r_ratio, @ r_length_1, @ r_length_2 )dump i_return_valuesys_free_string(sv_created_ids)#---------------------------------------------------------------------# Session file paused. Press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Initialize the mesh seed display managermesh_seed_display_mgr.init()#---------------------------------------------------------------------# Erase the mesh seed from the viewportmesh_seed_display_mgr.erase()#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function mesh_seed_display_mgr.refresh()## This session file creates a new database# "new.db", creates a solid and a mesh seed on# one of its edge. The solid is then shaded. The# above mentioned function is called to refresh# the mesh seed shown in the 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 mesh_seed_display_mgr.refresh() has no arguments.##---------------------------------------------------------------------# Variable DeclarationsSTRING s_curve_select[32]INTEGER i_seed_optionINTEGER i_num_seedsREAL r_ratioREAL r_length_1REAL r_length_2STRING sv_created_ids[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Construct a solidi_return_value = @ asm_const_hpat_xyz @ ( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @ sv_created_ids )dump i_return_valuedump sv_created_idsi_return_value = @ ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create a mesh seed on one edge of the solid#s_curve_select = "Solid 1.5.4"i_seed_option = 1i_num_seeds = 4r_ratio = 0.r_length_1 = 0.r_length_2 = 0.i_return_value = @ mesh_seed_create @ ( s_curve_select, @ i_seed_option, @ i_num_seeds, @ r_ratio, @ r_length_1, @ r_length_2 )dump i_return_valuesys_free_string(sv_created_ids)#---------------------------------------------------------------------# Plot the mesh seedmesh_seed_display_mgr.plot()#---------------------------------------------------------------------# Shade the solidrenderstyle( "Shaded/Smooth" )#---------------------------------------------------------------------# Session file paused. Press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Refresh the mesh seed shown in the viewportmesh_seed_display_mgr.refresh()#---------------------------------------------------------------------