() |
## Purpose : This file provides an example of two calls to # the function bar_elem_color()## This illustration opens a new database and# creates two nodes in it. Then it creates a bar# element and changes its colour.## 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 bar_elem_color() has the following arguments:# bar_elem_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]STRING sv_fem_create_node__nodes_creat[VIRTUAL]STRING sv_fem_create_elemen_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002 # Create two 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 two nodesi_return_value = @ fem_create_nodes( "Coord 0", "Coord 0", @ TRUE, "1", "Point 1 2 ", @ sv_fem_create_node__nodes_creat )dump i_return_value# Show the label of bar elementbar_elem_label(TRUE)# Create a beam elementi_return_value = @ fem_create_elems( "Bar ", "Bar2", @ "1", "Standard", @ TRUE, "Node 2 ", "Node 1 ", @ "", "", "", "", "", "", @ sv_fem_create_elemen_elem_creat )dump i_return_value# Set the colour of the beam element to Redi_color_value = 1bar_elem_color @ ( i_color_value )# Observe the colour.# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the colour of the beam element to BLUEi_color_value = 4bar_elem_color @ ( i_color_value )sys_free_string( sv_asm_create_grid_xyz_creat_id )sys_free_string( sv_fem_create_node__nodes_creat )sys_free_string( sv_fem_create_elemen_elem_creat )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of two calls to# the function bar_elem_label()## This illustration opens a new database and# creates two nodes in it. Then it creates a bar# element and sets its label on and off.## 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 bar_elem_label() has the following arguments:## bar_elem_label# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]STRING sv_fem_create_node__nodes_creat[VIRTUAL]STRING sv_fem_create_elemen_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Create two 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 two nodesi_return_value = @ fem_create_nodes( "Coord 0", "Coord 0", @ TRUE, "1", "Point 1 2 ", @ sv_fem_create_node__nodes_creat )dump i_return_value# Create a beam elementi_return_value = @ fem_create_elems( "Bar ", "Bar2", @ "1", "Standard", @ TRUE, "Node 2 ", "Node 1 ", @ "", "", "", "", "", "", @ sv_fem_create_elemen_elem_creat )dump i_return_value#---------------------------------------------------------------------# Set the label of the beam element.l_label_status = TRUEbar_elem_label @ ( l_label_status )# Observe the label.# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set off the label of the beam element.l_label_status = FALSEbar_elem_label @ ( l_label_status )sys_free_string( sv_asm_create_grid_xyz_creat_id )sys_free_string( sv_fem_create_node__nodes_creat )sys_free_string( sv_fem_create_elemen_elem_creat )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function body_color()## This illustration opens a new database and# creates a B-Rep solid in it. It changes its# colour to Red and then Blue.## 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 body_color() has the following arguments:## body_color# ( colour_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_colour_valueINTEGER i_return_valueLOGICAL l_label_statusSTRING sv_asm_create_patch_xy_creat_id[VIRTUAL]STRING sv_sgm_create_solid_br_creat_id[VIRTUAL]STRING sv_asm_delete_any_deleted_ids[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Create 6 patches.i_return_value = @ asm_const_patch_xyz( "", "<1 1 0><1 0 1>"// @ "<0 1 1><0 1 1><1 0 1><1 1 0>", @ "[0 0 0][0 0 0][0 0 0][1 0 0]" // @ "[0 1 0][0 0 1]", "Coord 0", @ sv_asm_create_patch_xy_creat_id )dump i_return_valuei_return_value = @ sgm_construct_solid_brep( "1", "Surface 1:6", @ FALSE, sv_sgm_create_solid_br_creat_id )dump i_return_value# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_value# Set the body label ONl_label_status = TRUEi_return_value = @ body_label @ ( l_label_status )dump i_return_value# Delete the Surfacesi_return_value = @ asm_delete_surface( "Surface 1:6 ", @ sv_asm_delete_any_deleted_ids )dump i_return_value# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the body colour to Red (Colour value = 1)#i_colour_value = 1i_return_value = @ body_color @ ( i_colour_value )dump i_return_value# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the body colour to BLUE (Colour value = 4)#i_colour_value = 4i_return_value = @ body_color @ ( i_colour_value )dump i_return_valuesys_free_string( sv_asm_create_patch_xy_creat_id )sys_free_string( sv_sgm_create_solid_br_creat_id )sys_free_string( sv_asm_delete_any_deleted_ids )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function body_label()## This illustration opens a new database and# creates a B-Rep solid in it. It changes its # label ON and OFF.## 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 body_label() has the following arguments:# body_label# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_patch_xy_creat_id[VIRTUAL]STRING sv_sgm_create_solid_br_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Create 6 patches.i_return_value = @ asm_const_patch_xyz( "", "<1 1 0><1 0 1>"// @ "<0 1 1><0 1 1><1 0 1><1 1 0>", @ "[0 0 0][0 0 0][0 0 0][1 0 0]" // @ "[0 1 0][0 0 1]", "Coord 0", @ sv_asm_create_patch_xy_creat_id )dump i_return_valuei_return_value = @ sgm_construct_solid_brep( "1", "Surface 1:6", @ FALSE, sv_sgm_create_solid_br_creat_id )dump i_return_value# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_value# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the body label ON#l_label_status = TRUEi_return_value = @ body_label @ ( l_label_status )dump i_return_value# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the body label OFF#l_label_status = FALSEi_return_value = @ body_label @ ( l_label_status )dump i_return_valuesys_free_string( sv_asm_create_patch_xy_creat_id )sys_free_string( sv_sgm_create_solid_br_creat_id )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of two calls to # the function curve_color()## This illustration opens a new database and# creates a Curve in it. Then the colour of# the Curve is changed.## 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 curve_color() has the following arguments:## curve_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_line_xyz_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Show the labels of the Curvescurve_label(TRUE)# Create a linei_return_value = @ asm_const_line_xyz( "1", "<1 0 0>", @ "[0 0 0]", "Coord 0", @ sv_asm_create_line_xyz_creat_id )dump i_return_value#---------------------------------------------------------------------# Set the curve colour to Redi_color_value = 1curve_color @ ( i_color_value )# Observe the colour.# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the Curve colour to Greeni_color_value = 11curve_color @ ( i_color_value )sys_free_string( sv_asm_create_line_xyz_creat_id )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of two calls to # the function curve_label()## This illustration opens a new database and# creates a Curve in it. Then the label of# the Curve is set on and off.## 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 curve_label() has the following arguments:## curve_label# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_line_xyz_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Create a linei_return_value = @ asm_const_line_xyz( "1", "<1 0 0>", @ "[0 0 0]", "Coord 0", @ sv_asm_create_line_xyz_creat_id )dump i_return_value#---------------------------------------------------------------------# Set the curve labell_label_status = TRUEcurve_label @ ( l_label_status )# Observe the colour.# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set OFF the curve labell_label_status = FALSEcurve_label @ ( l_label_status )sys_free_string( sv_asm_create_line_xyz_creat_id )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function display_deformations()## In this example a field.db is opened and the# deform plot is initialized. Then the function# is called to switch off the deform plot.## Before running this session file run field.ses# to create field.db. Follow the instruction in# the field.ses file for analysis.## 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 display_deformation()# has the following arguments:## display_deformations# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_value#---------------------------------------------------------------------# Open the database "field.db"uil_file_open.go("field.db")# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_value#---------------------------------------------------------------------# Initialize for deform plot.i_return_value = @ res_init_deform_plot( )dump i_return_valuei_return_value = @ res_create_deform_plot_rec2( 1, 2, 1, 3, @ [27, 28, 29, 0, 0, 0], 1, 1, 0., 8, @ 0, 1, 0, [0., 0., 0.] )dump i_return_valuei_return_value = @ res_make_deform_plot( 1, [1], [1], [""], [0.], [ @ "Default, Static Subcase: Displacements,"// @ " Translational -MSC.Nastran"] )dump i_return_valuei_return_value = @ res_deinit_deform_plot( )dump i_return_value# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Switch off the display of deformation#l_label_status = FALSEi_return_value = @ display_deformations @ ( l_label_status )dump i_return_value#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function display_fa_vectors()## In this example a new database is opened and # a patch is created. An LBC is created over the# patch. Then the function is called to switch # off the display of functional assignment # vectors. Again, the vectors are displayed.## 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 display_fa_vectors() has the following arguments:# display_fa_vectors# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_patch_xy_creat_id[VIRTUAL]#---------------------------------------------------------------------# Create a new database and set the preferencesuil_file_new.go("", "./new.db")$? YES 36000002# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_value# Create a Patch.i_return_value = @ asm_const_patch_xyz( "1", "<1 1 0>", "[0 0 0]", "Coord 0", @ sv_asm_create_patch_xy_creat_id )dump i_return_value# Create a LBC.i_return_value = @ loadsbcs_create( "New", "Displacement", "Nodal", "", @ "Static", ["Surface 1"], @ "Geometry", "Coord 0", 1., @ ["< 0 0 0 >", "< 0 0 0 >"], ["", ""] )dump i_return_value# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Switch OFF the display of functional assignment vectors.l_label_status = FALSEi_return_value = @ display_fa_vectors @ ( l_label_status )dump i_return_value# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Switch ON the display of functional assignment vectors.l_label_status = TRUEi_return_value = @ display_fa_vectors @ ( l_label_status )dump i_return_valuesys_free_string( sv_asm_create_patch_xy_creat_id )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function display_result_vectors()## In this example a field.db is opened and the# vector plot is initialized. Then the function# is called to switch off the vector plot.## Before running this session file run field.ses# to create field.db. Follow the instruction in# the field.ses file for analysis.## 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 display_result_vectors()# has the following arguments:## display_result_vectors# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_value#---------------------------------------------------------------------# Open the database "field.db"uil_file_open.go("field.db")# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_value#---------------------------------------------------------------------# Create Vector plot with default optionsi_return_value = @ ga_range_create( "vector_range", 15 )dump i_return_valuei_return_value = @ ga_viewport_range_set( "", "vector_range" )dump i_return_valuei_return_value = @ res_init_vector_plot( )dump i_return_valuei_return_value = @ res_create_vector_plot_rec( 1, 2, 3, @ [27, 28, 29, 0, 0, 0], [1, 1, 1], 1, 1, @ 0, 0, 1, 0., 2, 1, 1, 1 )dump i_return_valuei_return_value = @ res_make_vector_plot( 1, [1], [2], [""], [0.], [ @ "Default, Static Subcase: Displacements,"// @ " Translational -MSC.Nastran"] )dump i_return_valuei_return_value = @ res_deinit_vector_plot( )dump i_return_value# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Switch the vector plot OFF.#l_label_status = FALSEi_return_value = @ display_result_vectors @ ( l_label_status )dump i_return_value#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function hex_elem_color()## This illustration opens a new database and# creates a hyperpatch in it.It creates mesh seed# and meshes with Hexagonal elements. Later it# sets its clour to Red and Blue.## 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 hex_elem_color() has the following arguments:# hex_elem_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_hpat_xyz_creat_id[VIRTUAL]INTEGER i_fem_create_mesh_solid_nu_nodeINTEGER i_fem_create_mesh_solid_nu_elemSTRING sv_fem_create_mesh_s_node_creat[VIRTUAL]STRING sv_fem_create_mesh_s_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002i_return_value = @ asm_const_hpat_xyz( "1", "<1 1 1>", @ "[0 0 0]", "Coord 0", @ sv_asm_create_hpat_xyz_creat_id )dump i_return_value# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_valueui_exec_function( "mesh_seed_display_mgr", "init" )i_return_value = @ mesh_seed_create( "Solid 1.1.3 1.1.4"// @ " 1.2.1 1.2.2 1.1.1 1.1.2 1.2.3 1.4.1 1"// @ ".4.3 1.2.4 1.3.1 1.3.3 ", 1, 2, 0., 0., 0. )dump i_return_valuei_return_value = @ fem_create_mesh_sol_3( "IsoMesh", 0, @ "Solid 1 ", 1, [0.1], "Hex8", "1", "1", @ "Coord 0", "Coord 0", @ i_fem_create_mesh_solid_nu_node, @ i_fem_create_mesh_solid_nu_elem, @ sv_fem_create_mesh_s_node_creat, @ sv_fem_create_mesh_s_elem_creat )dump i_return_value # Set the labels of the hexagonal elements ONi_return_value = @ hex_elem_label @ ( TRUE )dump i_return_value# Session file paused. Press "Resume" to continue....sf_pause()#---------------------------------------------------------------------# Set the colour of the hexagonal elements to Red (Colour value = 1)#i_color_value = 1i_return_value = @ hex_elem_color @ ( i_color_value )dump i_return_value# Session file paused. Press "Resume" to continue....sf_pause()#---------------------------------------------------------------------# Set the colour of the hexagonal elements to Blue (Colour value = 4)#i_color_value = 4i_return_value = @ hex_elem_color @ ( i_color_value )dump i_return_valuesys_free_string( sv_asm_create_hpat_xyz_creat_id )sys_free_string( sv_fem_create_mesh_s_node_creat )sys_free_string( sv_fem_create_mesh_s_elem_creat )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function hex_elem_label()## This illustration opens a new database and# creates a hyperpatch in it.It creates mesh seed# and meshes with Hexagonal elements. Later it# sets its label ON and OFF. ## 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 hex_elem_label() has the following arguments:# hex_elem_label# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_hpat_xyz_creat_id[VIRTUAL]INTEGER i_fem_create_mesh_solid_nu_nodeINTEGER i_fem_create_mesh_solid_nu_elemSTRING sv_fem_create_mesh_s_node_creat[VIRTUAL]STRING sv_fem_create_mesh_s_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002i_return_value = @ asm_const_hpat_xyz( "1", "<1 1 1>", @ "[0 0 0]", "Coord 0", @ sv_asm_create_hpat_xyz_creat_id )dump i_return_value# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_valueui_exec_function( "mesh_seed_display_mgr", "init" )i_return_value = @ mesh_seed_create( "Solid 1.1.3 1.1.4"// @ " 1.2.1 1.2.2 1.1.1 1.1.2 1.2.3 1.4.1 1"// @ ".4.3 1.2.4 1.3.1 1.3.3 ", 1, 2, 0., 0., 0. )dump i_return_valuei_return_value = @ fem_create_mesh_sol_3( "IsoMesh", 0, @ "Solid 1 ", 1, [0.1], "Hex8", "1", "1", @ "Coord 0", "Coord 0", @ i_fem_create_mesh_solid_nu_node, @ i_fem_create_mesh_solid_nu_elem, @ sv_fem_create_mesh_s_node_creat, @ sv_fem_create_mesh_s_elem_creat )dump i_return_value# Session file paused. Press "Resume" to continue....sf_pause()#---------------------------------------------------------------------# Set the labels of the hexagonal elements ON#l_label_status = TRUEi_return_value = @ hex_elem_label @ ( l_label_status )dump i_return_value# Session file paused. Press "Resume" to continue....sf_pause()#---------------------------------------------------------------------# Set the labels of the hexagonal elements OFF#l_label_status = FALSEi_return_value = @ hex_elem_label @ ( l_label_status )dump i_return_valuesys_free_string( sv_asm_create_hpat_xyz_creat_id )sys_free_string( sv_fem_create_mesh_s_node_creat )sys_free_string( sv_fem_create_mesh_s_elem_creat )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function mpc_color()## In this example a mpc.db is opened and the# the colour of the MPCs present in the database# is changed to Red and then Blue.## Before running this session file run mpc.ses# to create mpc.db. The mpc.db contains one MPC.## 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 mpc_color() has the following arguments:# mpc_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_value#---------------------------------------------------------------------# Open the database "mpc.db"uil_file_open.go("mpc.db")# Set the label of the MPCs ON.i_return_value = @ mpc_label @ ( TRUE )dump i_return_value# Session file paused. Press "Resume" to contnue ...sf_pause()#---------------------------------------------------------------------# Set the colour of MPC to Red (Colour value 1)i_color_value = 1i_return_value = @ mpc_color @ ( i_color_value )dump i_return_value# Session file paused. Press "Resume" to contnue ...sf_pause()#---------------------------------------------------------------------# Set the colour of MPC to Blue (Colour value 4)i_color_value = 4i_return_value = @ mpc_color @ ( i_color_value )dump i_return_value#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function mpc_label()## In this example a mpc.db is opened and the# the label of the MPCs present in the database# is set ON and OFF.## Before running this session file run mpc.ses# to create mpc.db. The mpc.db contains one MPC.## 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 mpc_label() has the following arguments:# mpc_label# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_value#---------------------------------------------------------------------# Open the database "mpc.db"uil_file_open.go("mpc.db")# Set the label of the MPCs ON.#l_label_status = TRUEi_return_value = @ mpc_label @ ( l_label_status )dump i_return_value# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the label of the MPCs OFF.#l_label_status = FALSEi_return_value = @ mpc_label @ ( l_label_status )dump i_return_value#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of two calls to # the function node_color()## This illustration opens a new database and# creates a Point in it. Then it creates a node# on it and changes its colour.## 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 node_color() has the following arguments:# node_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]STRING sv_fem_create_nodes__node_creat[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Show the labels of the nodes.node_label(TRUE)i_return_value = @ asm_const_grid_xyz( "1", "[0 0 0]", @ "Coord 0", @ sv_asm_create_grid_xyz_creat_id )dump i_return_value# Create a nodei_return_value = @ fem_create_nodes( "Coord 0", "Coord 0", @ TRUE, "1", "Point 1 ", @ sv_fem_create_nodes__node_creat )dump i_return_value#---------------------------------------------------------------------# Set the colour of node to Redi_color_value = 1 node_color @ ( i_color_value )# Observe the colour.# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the colour of node to Bluei_color_value = 4node_color @ ( i_color_value )sys_free_string( sv_asm_create_grid_xyz_creat_id )sys_free_string( sv_fem_create_nodes__node_creat )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of two calls to # the function node_label()## This illustration opens a new database and# creates a Point in it. Then it creates a node# on the point and changes its label on and off.## 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 node_label() has the following arguments:# node_label# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]STRING sv_fem_create_nodes__node_creat[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002i_return_value = @ asm_const_grid_xyz( "1", "[0 0 0]", @ "Coord 0", @ sv_asm_create_grid_xyz_creat_id )dump i_return_value# Create a nodei_return_value = @ fem_create_nodes( "Coord 0", "Coord 0", @ TRUE, "1", "Point 1 ", @ sv_fem_create_nodes__node_creat )dump i_return_value#---------------------------------------------------------------------# Set the label of node.l_label_status = TRUE node_label @ ( l_label_status )# Observe the label.# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set OFF, the label of node.l_label_status = FALSE node_label @ ( l_label_status )sys_free_string( sv_asm_create_grid_xyz_creat_id )sys_free_string( sv_fem_create_nodes__node_creat )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of two calls to # the function point_elem_color()## This illustration opens a new database and# creates a Point in it. Then it creates a point# element and changes its colour.## 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 point_elem_color() has the following arguments:## point_elem_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]STRING sv_fem_create_nodes__node_creat[VIRTUAL]STRING sv_fem_create_elemen_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Show the labels of the point elements.point_elem_label(TRUE)i_return_value = @ asm_const_grid_xyz( "1", "[0 0 0]", @ "Coord 0", @ sv_asm_create_grid_xyz_creat_id )dump i_return_value# Create a nodei_return_value = @ fem_create_nodes( "Coord 0", "Coord 0", @ TRUE, "1", "Point 1 ", @ sv_fem_create_nodes__node_creat )dump i_return_value# Create a point elementi_return_value = @ fem_create_elems( "Point ", "Point", @ "1", "Standard", TRUE, "Node 1 ", @ "", "", "", "", "", "", "", @ sv_fem_create_elemen_elem_creat )dump i_return_value#---------------------------------------------------------------------# Set the colour of point element to Redi_color_value = 1 point_elem_color @ ( i_color_value )# Observe the colour.# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the colour of point element to Bluei_color_value = 4 point_elem_color @ ( i_color_value )sys_free_string( sv_asm_create_grid_xyz_creat_id )sys_free_string( sv_fem_create_nodes__node_creat )sys_free_string( sv_fem_create_elemen_elem_creat )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of two calls to # the function point_color()## This illustration opens a new database and# creates a Point in it. Then the colour of# the point is changed.## 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 point_color() has the following arguments:# point_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002 # Show the labels of the pointspoint_label(TRUE)i_return_value = @ asm_const_grid_xyz( "1", "[0 0 0]", @ "Coord 0", @ sv_asm_create_grid_xyz_creat_id )dump i_return_value# Set the point color to Redi_color_value = 1point_color @ ( i_color_value )# Observe the colour.# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the point color to Greeni_color_value = 11point_color @ ( i_color_value )sys_free_string( sv_asm_create_grid_xyz_creat_id )#---------------------------------------------------------------------- () |
## Purpose : This file provides an example of two calls to # the function point_elem_label()## This illustration opens a new database and# creates a Point in it. Then it creates a point# element and changes its label on and off.## 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 point_elem_label() has the following arguments:# point_elem_label# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]STRING sv_fem_create_nodes__node_creat[VIRTUAL]STRING sv_fem_create_elemen_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002i_return_value = @ asm_const_grid_xyz( "1", "[0 0 0]", @ "Coord 0", @ sv_asm_create_grid_xyz_creat_id )dump i_return_value# Create a nodei_return_value = @ fem_create_nodes( "Coord 0", "Coord 0", @ TRUE, "1", "Point 1 ", @ sv_fem_create_nodes__node_creat )dump i_return_value# Create a point elementi_return_value = @ fem_create_elems( "Point ", "Point", @ "1", "Standard", TRUE, "Node 1 ", @ "", "", "", "", "", "", "", @ sv_fem_create_elemen_elem_creat )dump i_return_value#---------------------------------------------------------------------# Set the label of the point element.l_label_status = TRUEpoint_elem_label @ ( l_label_status )# Observe the label.# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set OFF, the label of the point element.l_label_status = FALSEpoint_elem_label @ ( l_label_status )sys_free_string( sv_asm_create_grid_xyz_creat_id )sys_free_string( sv_fem_create_nodes__node_creat )sys_free_string( sv_fem_create_elemen_elem_creat )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of two calls to # the function point_label()## This illustration opens a new database and# creates a Point in it. Then the label of# the point is changed.## 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 point_label() has the following arguments:## point_label# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002i_return_value = @ asm_const_grid_xyz( "1", "[0 0 0]", @ "Coord 0", @ sv_asm_create_grid_xyz_creat_id )dump i_return_value# Show the labels of the pointsl_label_status = TRUEpoint_label @ ( l_label_status )# Observe the label.# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Erase the labels of pointsl_label_status = FALSEpoint_label @ ( l_label_status )sys_free_string( sv_asm_create_grid_xyz_creat_id )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function pref_graphics_set()## This function gets the graphic preference # parameters. This file opens a new database# "new.db" and creates a point and node.# Then it gets the graphic preference# parameters.Later it changes the preference# for grid size and node size and finally gets# the graphic preference 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 pref_graphics_set() has the following arguments:## pref_graphics_set# ( disp_meth,# p_color,# s_color,# e_color,# extend,# fit_view,# center,# hard_rend,# anti_alias,# td_vector,# rt_display,# s_light,# p_marker,# s_marker,# m_color,# m_size,# gm_size,# nm_size,# l_format,# nsigd )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_disp_methINTEGER i_p_colorINTEGER i_s_colorINTEGER i_e_colorLOGICAL l_extendLOGICAL l_fit_viewLOGICAL l_centerLOGICAL l_hard_rendLOGICAL l_anti_aliasLOGICAL l_td_vectorLOGICAL l_rt_displayLOGICAL l_s_lightINTEGER i_p_markerINTEGER i_s_markerINTEGER i_m_colorINTEGER i_m_sizeINTEGER i_gm_sizeINTEGER i_nm_sizeINTEGER i_l_formatINTEGER i_nsigdLOGICAL l_set_flag(20)STRING sv_asm_create_grid_xyz_created[VIRTUAL]STRING sv_fem_create_nodes_created[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002# Create a Point and Node.i_return_value = @ asm_const_grid_xyz( "1", "[0 0 0]", "Coord 0", @ sv_asm_create_grid_xyz_created )dump i_return_valuei_return_value = @ fem_create_nodes( "Coord 0", "Coord 0", TRUE, @ "1", " [0 0 0]", @ sv_fem_create_nodes_created )dump i_return_valuei_return_value = @ pref_graphics_get @ ( i_disp_meth, @ i_p_color, @ i_s_color, @ i_e_color, @ l_extend, @ l_fit_view, @ l_center, @ l_hard_rend, @ l_anti_alias, @ l_td_vector, @ l_rt_display, @ l_s_light, @ i_p_marker, @ i_s_marker, @ i_m_color, @ i_m_size, @ i_gm_size, @ i_nm_size, @ i_l_format, @ i_nsigd )dump i_return_value# Display method isdump i_disp_meth# Primary color isdump i_p_color# Secondary color isdump i_s_color# Error color isdump i_e_color# Autoextend Flag isdump l_extend# Autofitview Flag isdump l_fit_view# Autocenter Flag isdump l_center# Hardware rendering Flag isdump l_hard_rend# Anti-Alias flag isdump l_anti_alias# 3-D vector Display Flag isdump l_td_vector# Result Title Display Flag isdump l_rt_display# Symmetric Light Flag isdump l_s_light# Primary marker isdump i_p_marker# Secondary marker isdump i_s_marker# Marker color isdump i_m_color# Marker size isdump i_m_size# Grid marker size isdump i_gm_size# Node marker size isdump i_nm_size# Results label format isdump i_l_format# Number of significant results digits aredump i_nsigd# Session file paused. Press "Resume" to continue...sf_pause()l_set_flag(17) = TRUEl_set_flag(18) = TRUEi_gm_size = 25i_nm_size = 50i_return_value = @ pref_graphics_set @ ( l_set_flag, @ i_disp_meth, @ i_p_color, @ i_s_color, @ i_e_color, @ l_extend, @ l_fit_view, @ l_center, @ l_hard_rend, @ l_anti_alias, @ l_td_vector, @ l_rt_display, @ l_s_light, @ i_p_marker, @ i_s_marker, @ i_m_color, @ i_m_size, @ i_gm_size, @ i_nm_size, @ i_l_format, @ i_nsigd )dump i_return_value# Reset the valuesi_gm_size = 0i_nm_size = 0i_return_value = @ pref_graphics_get @ ( i_disp_meth, @ i_p_color, @ i_s_color, @ i_e_color, @ l_extend, @ l_fit_view, @ l_center, @ l_hard_rend, @ l_anti_alias, @ l_td_vector, @ l_rt_display, @ l_s_light, @ i_p_marker, @ i_s_marker, @ i_m_color, @ i_m_size, @ i_gm_size, @ i_nm_size, @ i_l_format, @ i_nsigd )dump i_return_value# Grid marker size isdump i_gm_size# Node marker size isdump i_nm_sizeSYS_FREE_STRING( sv_asm_create_grid_xyz_created )SYS_FREE_STRING( sv_fem_create_nodes_created )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function quad_elem_color()## This illustration opens a new database and# creates a patch in it. It creates mesh seed# and meshes with quad elements. Later it# sets the colour of the quad elements Red and# then Blue.## 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 quad_elem_color() has the following arguments:# quad_elem_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_patch_xy_creat_id[VIRTUAL]INTEGER i_fem_create_mesh_surfa_nu_nodeINTEGER i_fem_create_mesh_surfa_nu_elemSTRING sv_fem_create_mesh_s_node_creat[VIRTUAL]STRING sv_fem_create_mesh_s_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002i_return_value = @ asm_const_patch_xyz( "1", "<1 1 0>", @ "[0 0 0]", "Coord 0", @ sv_asm_create_patch_xy_creat_id )dump i_return_value# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_valueui_exec_function( "mesh_seed_display_mgr", "init" )i_return_value = @ mesh_seed_create( "Surface 1.1 1.2 1.3 1.4 ", @ 1, 2, 0., 0., 0. )dump i_return_valuei_return_value = @ fem_create_mesh_surf_2( "IsoMesh", 0, @ "Surface 1 ", 1, [0.1], "Quad4", "1", @ "1", "Coord 0", "Coord 0", @ i_fem_create_mesh_surfa_nu_node, @ i_fem_create_mesh_surfa_nu_elem, @ sv_fem_create_mesh_s_node_creat, @ sv_fem_create_mesh_s_elem_creat )dump i_return_value# Set the labels of the Quad elements ONi_return_value = @ quad_elem_label @ ( TRUE )dump i_return_value# Session file paused. Press "Resume" to continue....sf_pause()#---------------------------------------------------------------------# Set the colour of the quad element to Red (Colour value = 1)#i_color_value = 1i_return_value = @ quad_elem_color @ ( i_color_value )dump i_return_value# Session file paused. Press "Resume" to continue....sf_pause()#---------------------------------------------------------------------# Set the colour of the quad element to Blue (Colour value = 4)#i_color_value = 4i_return_value = @ quad_elem_color @ ( i_color_value )dump i_return_valuesys_free_string( sv_asm_create_patch_xy_creat_id )sys_free_string( sv_fem_create_mesh_s_node_creat )sys_free_string( sv_fem_create_mesh_s_elem_creat )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function quad_elem_label()## This illustration opens a new database and# creates a patch in it. It creates mesh seed# and meshes with quad elements. Later it# sets its label ON and OFF.## 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 quad_elem_label() has the following arguments:## quad_elem_label# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_patch_xy_creat_id[VIRTUAL]INTEGER i_fem_create_mesh_surfa_nu_nodeINTEGER i_fem_create_mesh_surfa_nu_elemSTRING sv_fem_create_mesh_s_node_creat[VIRTUAL]STRING sv_fem_create_mesh_s_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002i_return_value = @ asm_const_patch_xyz( "1", "<1 1 0>", @ "[0 0 0]", "Coord 0", @ sv_asm_create_patch_xy_creat_id )dump i_return_value# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_valueui_exec_function( "mesh_seed_display_mgr", "init" )i_return_value = @ mesh_seed_create( "Surface 1.1 1.2 1.3 1.4 ", @ 1, 2, 0., 0., 0. )dump i_return_valuei_return_value = @ fem_create_mesh_surf_2( "IsoMesh", 0, @ "Surface 1 ", 1, [0.1], "Quad4", "1", @ "1", "Coord 0", "Coord 0", @ i_fem_create_mesh_surfa_nu_node, @ i_fem_create_mesh_surfa_nu_elem, @ sv_fem_create_mesh_s_node_creat, @ sv_fem_create_mesh_s_elem_creat )dump i_return_value# Session file paused. Press "Resume" to continue....sf_pause()#---------------------------------------------------------------------# Set the labels of the Quad elements ON#l_label_status = TRUEi_return_value = @ quad_elem_label @ ( l_label_status )dump i_return_value# Session file paused. Press "Resume" to continue....sf_pause()#---------------------------------------------------------------------# Set the labels of the Quad elements OFF#l_label_status = FALSEi_return_value = @ quad_elem_label @ ( l_label_status )dump i_return_valuesys_free_string( sv_asm_create_patch_xy_creat_id )sys_free_string( sv_fem_create_mesh_s_node_creat )sys_free_string( sv_fem_create_mesh_s_elem_creat )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function renderstyle()## This illustration opens a new database and# creates a solid in it. It then shades it .# Then render style is changed to "Hidden Line"# and finally "Shaded flat"## 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 renderstyle() has the following arguments:## renderstyle# ( style )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_style[128]INTEGER i_return_valueSTRING sv_asm_create_hpat_xyz_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_valuei_return_value = @ asm_const_hpat_xyz( "1", "<1 1 1>", @ "[0 0 0]", "Coord 0", @ sv_asm_create_hpat_xyz_creat_id )dump i_return_value# Shade the soliduil_toolbar.shaded_smooth( )# Session file paused. Press "Resume" to continue....sf_pause()#---------------------------------------------------------------------# Change the Renderstyle to "Hidden Line"#s_style = "Hidden Line"i_return_value = @ renderstyle @ ( s_style )dump i_return_value# Session file paused. Press "Resume" to continue....sf_pause()#---------------------------------------------------------------------# Change the Renderstyle to "Shaded/Flat"#s_style = "Shaded/Flat"i_return_value = @ renderstyle @ ( s_style )dump i_return_valuesys_free_string( sv_asm_create_hpat_xyz_creat_id )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function shade_color()## This illustration opens a new database and# creates a solid in it. It then shades it in # different colours.## 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 shade_color() has the following arguments:# shade_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_hpat_xyz_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_valuei_return_value = @ asm_const_hpat_xyz( "1", "<1 1 1>", @ "[0 0 0]", "Coord 0", @ sv_asm_create_hpat_xyz_creat_id )dump i_return_value# Shade the soliduil_toolbar.shaded_smooth( )# Session file paused. Press "Resume" to continue....sf_pause()#---------------------------------------------------------------------# Set the shade color to Red (Colour value = 1)#i_color_value = 1i_return_value = @ shade_color @ ( i_color_value )dump i_return_value# Session file paused. Press "Resume" to continue....sf_pause()#---------------------------------------------------------------------# Set the shade color to Blue (Colour value = 4)#i_color_value = 4i_return_value = @ shade_color @ ( i_color_value )dump i_return_value# Session file paused. Press "Resume" to continue....sf_pause()#---------------------------------------------------------------------# Set the shade color to Cyan (Colour value = 14)#i_color_value = 14i_return_value = @ shade_color @ ( i_color_value )dump i_return_valuesys_free_string( sv_asm_create_hpat_xyz_creat_id )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of 2 calls to the# function solid_color()## In this example a new database is opened and# a solid is created. Then the function is called# to change the colour of solid to Red and then # Blue.## 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 solid_color() has the following arguments:# solid_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_hpat_xyz_creat_id[VIRTUAL]#---------------------------------------------------------------------# Create a new database and set the preferencesuil_file_new.go("", "./new.db")$? YES 36000002# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_valuei_return_value = @ asm_const_hpat_xyz( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @ sv_asm_create_hpat_xyz_creat_id )dump i_return_value# Set the solid label ONsolid_label( TRUE )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the solid colour to Red (Colour value = 1)#i_color_value = 1solid_color ( i_color_value )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the solid colour to Blue (Colour value = 4)#i_color_value = 4solid_color ( i_color_value )sys_free_string( sv_asm_create_hpat_xyz_creat_id )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function solid_label()## In this example a new database is opened and# a solid is created. Then the function is called# to set the solid label to ON and OFF.## 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 solid_label() has the following arguments:# solid_label# ( label_value )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_valueINTEGER i_return_valueSTRING sv_asm_create_hpat_xyz_creat_id[VIRTUAL]#---------------------------------------------------------------------# Create a new database and set the preferencesuil_file_new.go("", "./new.db")$? YES 36000002# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_valuei_return_value = @ asm_const_hpat_xyz( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @ sv_asm_create_hpat_xyz_creat_id )dump i_return_value# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the solid label ON#l_label_value = TRUEsolid_label ( l_label_value )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the solid label OFF#l_label_value = FALSEsolid_label ( l_label_value )sys_free_string( sv_asm_create_hpat_xyz_creat_id )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of 2 calls to the# function surface_color()## In this example a new database is opened and# a surface is created. Then the function is # called to change the colour of surface to Red # and then Blue.## 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 surface_color() has the following arguments:# surface_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_patch_xy_creat_id[VIRTUAL]#---------------------------------------------------------------------# Create a new database and set the preferencesuil_file_new.go("", "./new.db")$? YES 36000002# Set the view.i_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_value# Create a Patchi_return_value = @ asm_const_patch_xyz( "1", "<1 1 0>", "[0 0 0]", "Coord 0", @ sv_asm_create_patch_xy_creat_id )dump i_return_value# Set the surface label ONsurface_label ( TRUE )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the colour of the surface to Red.#i_color_value = 1surface_color ( i_color_value )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the colour of the surface to Blue.#i_color_value = 4surface_color ( i_color_value )sys_free_string( sv_asm_create_patch_xy_creat_id )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function surface_label()## In this example a new database is opened and# a surface is created. Then the function is# called to set the surface label ON and OFF.## 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 surface_label() has the following arguments:# surface_label# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_patch_xy_creat_id[VIRTUAL]#---------------------------------------------------------------------# Create a new database and set the preferencesuil_file_new.go("", "./new.db")$? YES 36000002# Set the view.i_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_value# Create a Patchi_return_value = @ asm_const_patch_xyz( "1", "<1 1 0>", "[0 0 0]", "Coord 0", @ sv_asm_create_patch_xy_creat_id )dump i_return_value# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the surface label ON#l_label_status = TRUEsurface_label ( l_label_status )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the surface label OFF#l_label_status = FALSEsurface_label ( l_label_status )sys_free_string( sv_asm_create_patch_xy_creat_id )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function tet_elem_color()## In this example a new database is opened and# a solid is created. A tetrahedral element is # created inside the solid.Then the function is # called to change the colour of element to Red# and then Blue.## 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 tet_elem_color() has the following arguments:## tet_elem_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_hpat_xyz_creat_id[VIRTUAL]STRING sv_fem_create_elemen_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Create a new database and set the preferencesuil_file_new.go("", "./new.db")$? YES 36000002# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_valuei_return_value = @ asm_const_hpat_xyz( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @ sv_asm_create_hpat_xyz_creat_id )dump i_return_valuei_return_value = @ fem_create_elems( "Tet ", "Tet4", "1", "Standard", @ TRUE, "Point 1 ", "Point 3 ", "Point 8 ", @ "Point 4 ", "", "", "", "", @ sv_fem_create_elemen_elem_creat )dump i_return_value# Set the tetrahedral element label ONtet_elem_label ( TRUE )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the colour of Tetrahedral element to Red.#i_color_value = 1tet_elem_color ( i_color_value )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the colour of Tetrahedral element to Blue.#i_color_value = 4tet_elem_color ( i_color_value )sys_free_string( sv_asm_create_hpat_xyz_creat_id )sys_free_string( sv_fem_create_elemen_elem_creat )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function tet_elem_label()## In this example a new database is opened and# a solid is created. A tetrahedral element is# created inside the solid.Then the function is# called to set the label of tetrahedral element# ON and OFF## 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 tet_elem_label() has the following arguments:# tet_elem_label# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_hpat_xyz_creat_id[VIRTUAL]STRING sv_fem_create_elemen_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Create a new database and set the preferencesuil_file_new.go("", "./new.db")$? YES 36000002# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_valuei_return_value = @ asm_const_hpat_xyz( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @ sv_asm_create_hpat_xyz_creat_id )dump i_return_valuei_return_value = @ fem_create_elems( "Tet ", "Tet4", "1", "Standard", @ TRUE, "Point 1 ", "Point 3 ", "Point 8 ", @ "Point 4 ", "", "", "", "", @ sv_fem_create_elemen_elem_creat )dump i_return_value# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the tetrahedral element label ON#l_label_status = TRUEtet_elem_label ( l_label_status )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the tetrahedral element label OFF#l_label_status = FALSEtet_elem_label ( l_label_status )dump i_return_valuesys_free_string( sv_asm_create_hpat_xyz_creat_id )sys_free_string( sv_fem_create_elemen_elem_creat )#--------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function tri_elem_color()## In this example a new database is opened and# a surface is created. A triangular element is# created inside the surface.Then the function is# called to change the colour of element to Red # and then Blue.## 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 tri_elem_color() has the following arguments:# tri_elem_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_patch_xy_creat_id[VIRTUAL]STRING sv_fem_create_elemen_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Create a new database and set the preferencesuil_file_new.go("", "./new.db")$? YES 36000002# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_value# Create a Patch.i_return_value = @ asm_const_patch_xyz( "1", "<1 1 0>", "[0 0 0]", "Coord 0", @ sv_asm_create_patch_xy_creat_id )dump i_return_value# Create a Tria element.i_return_value = @ fem_create_elems( "Tri ", "Tria3", "1", "Standard", @ TRUE, "Point 1 ", "Point 4 ", "Point 3 ", "", @ "", "", "", "", sv_fem_create_elemen_elem_creat )dump i_return_value# Set the Triangular element label ONtri_elem_label ( TRUE )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the colour of the Triangular element to Red.#i_color_value = 1tri_elem_color ( i_color_value )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the colour of the Triangular element to Blue.#i_color_value = 4tri_elem_color ( i_color_value )sys_free_string( sv_asm_create_patch_xy_creat_id )sys_free_string( sv_fem_create_elemen_elem_creat )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function tri_elem_label()## In this example a new database is opened and# a surface is created. A triangular element is# created inside the surface.Then the function is# called to set the label of Triangular element# ON and OFF## 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 tri_elem_label() has the following arguments:# tri_elem_label# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_patch_xy_creat_id[VIRTUAL]STRING sv_fem_create_elemen_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Create a new database and set the preferencesuil_file_new.go("", "./new.db")$? YES 36000002# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_value# Create a Patch.i_return_value = @ asm_const_patch_xyz( "1", "<1 1 0>", "[0 0 0]", "Coord 0", @ sv_asm_create_patch_xy_creat_id )dump i_return_value# Create a Tria element.i_return_value = @ fem_create_elems( "Tri ", "Tria3", "1", "Standard", @ TRUE, "Point 1 ", "Point 4 ", "Point 3 ", "", @ "", "", "", "", sv_fem_create_elemen_elem_creat )dump i_return_value# Set the colour of the Triangular element to Red(Colour value 1).tri_elem_color ( 1 )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the Triangular element label ON#l_label_status = TRUEtri_elem_label ( l_label_status )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the Triangular element label OFF#l_label_status = FALSEtri_elem_label ( l_label_status )sys_free_string( sv_asm_create_patch_xy_creat_id )sys_free_string( sv_fem_create_elemen_elem_creat )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function trim_surface_color()## In this example a new database is opened and# 2 surfaces are created. One surface is trimmed# from other to create a new trimmed surface.# Then the colour of that surface is changed to# Red and then Blue.## 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 trim_surface_color() has the following arguments:# trim_surface_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_patch_xy_creat_id[VIRTUAL]INTEGER i_sgm_creat_curv_aut_segment_idSTRING sv_sgm_create_cur_creat_curv_id[VIRTUAL]STRING sv_sgm_surfac_trimmed__creat_id[VIRTUAL]STRING sv_asm_delete_surface_delet_ids[VIRTUAL]#---------------------------------------------------------------------# Create a new database and set the preferencesuil_file_new.go("", "./new.db")$? YES 36000002# Create two patches.i_return_value = @ asm_const_patch_xyz( "", "<1 1 0><0.5 0.5 0>",@ "[0 0 0][0.25 0.25 0]", "Coord 0", @ sv_asm_create_patch_xy_creat_id )dump i_return_value# Create chain curvei_return_value = @ sgm_create_curve_chain_v1( "1", @ " Surface 1.2 Surface 1.3 Surface 1.4"// @ " Surface 1.1", TRUE, @ i_sgm_creat_curv_aut_segment_id, @ sv_sgm_create_cur_creat_curv_id )dump i_return_value# Create chain curvei_return_value = @ sgm_create_curve_chain_v1( "2", @ " Surface 2.2 Surface 2.3 Surface 2.4"// @ " Surface 2.1", TRUE, @ i_sgm_creat_curv_aut_segment_id, @ sv_sgm_create_cur_creat_curv_id )dump i_return_value# Create trimmed surfacei_return_value = @ sgm_create_surface_trimmed_v1( "3", @ "Curve 1 ", "Curve 2 ", "Surface 1", @ TRUE, TRUE, TRUE, TRUE, @ sv_sgm_surfac_trimmed__creat_id )$? YES 38000217$? YES 38000217$? YES 38000219dump i_return_value# Delete old surfacei_return_value = @ asm_delete_surface( "Surface 2 ", @ sv_asm_delete_surface_delet_ids )dump i_return_value# Set the trimmed surface label ONtrim_surface_label ( TRUE )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the colour of Trimmed surface to RED.#i_color_value = 1trim_surface_color ( i_color_value )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the colour of Trimmed surface to BLUE.#i_color_value = 4trim_surface_color ( i_color_value )sys_free_string( sv_asm_create_patch_xy_creat_id )sys_free_string( sv_sgm_create_cur_creat_curv_id )sys_free_string( sv_sgm_surfac_trimmed__creat_id )sys_free_string( sv_asm_delete_surface_delet_ids )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function trim_surface_label()## In this example a new database is opened and# 2 surfaces are created. One surface is trimmed# from other to create a new trimmed surface.# Then the label of that surface is switched# ON and OFF.## 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 trim_surface_label() has the following arguments:# trim_surface_label# ( label_status )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_patch_xy_creat_id[VIRTUAL]INTEGER i_sgm_creat_curv_aut_segment_idSTRING sv_sgm_create_cur_creat_curv_id[VIRTUAL]STRING sv_sgm_surfac_trimmed__creat_id[VIRTUAL]STRING sv_asm_delete_surface_delet_ids[VIRTUAL]#---------------------------------------------------------------------# Create a new database and set the preferencesuil_file_new.go("", "./new.db")$? YES 36000002# Create two patches.i_return_value = @ asm_const_patch_xyz( "", "<1 1 0><0.5 0.5 0>",@ "[0 0 0][0.25 0.25 0]", "Coord 0", @ sv_asm_create_patch_xy_creat_id )dump i_return_value# Create a chain curvei_return_value = @ sgm_create_curve_chain_v1( "1", @ " Surface 1.2 Surface 1.3 Surface 1.4"// @ " Surface 1.1", TRUE, @ i_sgm_creat_curv_aut_segment_id, @ sv_sgm_create_cur_creat_curv_id )dump i_return_value# Create a chain curvei_return_value = @ sgm_create_curve_chain_v1( "2", @ " Surface 2.2 Surface 2.3 Surface 2.4"// @ " Surface 2.1", TRUE, @ i_sgm_creat_curv_aut_segment_id, @ sv_sgm_create_cur_creat_curv_id )dump i_return_value# Create trimmed surfacei_return_value = @ sgm_create_surface_trimmed_v1( "3", @ "Curve 1 ", "Curve 2 ", "Surface 1", @ TRUE, TRUE, TRUE, TRUE, @ sv_sgm_surfac_trimmed__creat_id )$? YES 38000217$? YES 38000217$? YES 38000219dump i_return_value# Delete old surfacei_return_value = @ asm_delete_surface( "Surface 2 ", @ sv_asm_delete_surface_delet_ids )dump i_return_value# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the trimmed surface label ON#l_label_status = TRUEtrim_surface_label ( l_label_status )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the trimmed surface label OFF#l_label_status = FALSEtrim_surface_label ( l_label_status )sys_free_string( sv_asm_create_patch_xy_creat_id )sys_free_string( sv_sgm_create_cur_creat_curv_id )sys_free_string( sv_sgm_surfac_trimmed__creat_id )sys_free_string( sv_asm_delete_surface_delet_ids )#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of 2 calls to the# function wedge_elem_color()## In this example a new database is opened and# a solid is created. A wedge element is created# over the solid. Then the function is called# to change the colour of wedge to Blue and then# Red.## 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 wedge_elem_color() has the following arguments:# wedge_elem_color# ( color_value )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_color_valueINTEGER i_return_valueSTRING sv_asm_create_hpat_xyz_creat_id[VIRTUAL]STRING sv_fem_create_elemen_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Create a new database and set the preferencesuil_file_new.go("", "./new.db")$? YES 36000002# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_valuei_return_value = @ asm_const_hpat_xyz( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @ sv_asm_create_hpat_xyz_creat_id )dump i_return_valuei_return_value = @ fem_create_elems( "Wed ", "Wedge6", "1", @ "Standard", TRUE, "Point 1 ", @ "Point 4 ", "Point 3 ", "Point 5 ", "Point 8 ", @ "Point 7 ", "", "", @ sv_fem_create_elemen_elem_creat )dump i_return_value# Set the wedge element label ONwedge_elem_label ( TRUE )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the colour of Wedge Element to Blue.#i_color_value = 4wedge_elem_color ( i_color_value )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the colour of Wedge Element to Red.#i_color_value = 1wedge_elem_color ( i_color_value )sys_free_string( sv_asm_create_hpat_xyz_creat_id )sys_free_string( sv_fem_create_elemen_elem_creat )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function wedge_elem_label()## In this example a new database is opened and# a solid is created. A wedge element is created# over the solid. Then the function is called# to set the label of Wedge element ON and OFF.## 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 wedge_elem_label() has the following arguments:# wedge_elem_label# ( label_status )#---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_label_statusINTEGER i_return_valueSTRING sv_asm_create_hpat_xyz_creat_id[VIRTUAL]STRING sv_fem_create_elemen_elem_creat[VIRTUAL]#---------------------------------------------------------------------# Create a new database and set the preferencesuil_file_new.go("", "./new.db")$? YES 36000002# Set the viewi_return_value = @ ga_view_aa_set @ ( -67., 0., -34. )dump i_return_valuei_return_value = @ asm_const_hpat_xyz( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @ sv_asm_create_hpat_xyz_creat_id )dump i_return_valuei_return_value = @ fem_create_elems( "Wed ", "Wedge6", "1", @ "Standard", TRUE, "Point 1 ", @ "Point 4 ", "Point 3 ", "Point 5 ", "Point 8 ", @ "Point 7 ", "", "", @ sv_fem_create_elemen_elem_creat )dump i_return_value# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the wedge element label ON#l_label_status = TRUEwedge_elem_label ( l_label_status )# Session file paused. Press "Resume" to continue ...sf_pause()#---------------------------------------------------------------------# Set the wedge element label OFF#l_label_status = FALSEwedge_elem_label ( l_label_status )sys_free_string( sv_asm_create_hpat_xyz_creat_id )sys_free_string( sv_fem_create_elemen_elem_creat )#---------------------------------------------------------------------