PCL Examples > Geometry Functions > Disassemble Actions
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Disassemble Actions
This section contains examples of some of the functions used to implement the “Disassemble” actions.
   
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_disassemble_chain()
#
#                      In this illustration, a new database is opened
#                      2 lines are created. Then  the two curves are 
#                      joined to create a chain of curves. Finally 
#                      the function is called to disassemble 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 sgm_disassemble_chain()
#  has the following arguments:
#
#  sgm_disassemble_chain
#     (  curve_list,
#        delete_orig )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_list[128]
LOGICAL  l_delete_orig
INTEGER  i_return_value
STRING   sv_asm_create_line_xyz_creat_id[VIRTUAL]
INTEGER  i_sgm_create_curve_cha_seg_id
STRING   sv_sgm_create_curve_ch_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the curves
curve_label(TRUE)
 
#  Create 2 curves
i_return_value =                                 @
   asm_const_line_xyz( "", "<1 0 0><0 1 0>",     @
      "[0 0 0][0 0 0]", "Coord 0",               @
      sv_asm_create_line_xyz_creat_id )
dump i_return_value
 
#  Create a chain of curve using Curve 1 2. Delete the original
#  curves.
i_return_value =                                 @
   sgm_create_curve_chain_v1( "", "Curve 1 2 ",  @
      TRUE, i_sgm_create_curve_cha_seg_id,       @
      sv_sgm_create_curve_ch_creat_id )
$? YES 38000217
dump i_return_value
 
#  Observe the Curve 3. It is a chain.
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Disassemble the Curve 3 into Curve 4 & 5. Delete the Curve 3.
#
s_curve_list = "Curve 3"
l_delete_orig = TRUE
 
i_return_value =                                 @
   sgm_disassemble_chain                         @
      (  s_curve_list,                           @
         l_delete_orig )
$? YES 38000217
dump i_return_value
 
sys_free_string( sv_asm_create_line_xyz_creat_id )
sys_free_string( sv_sgm_create_curve_ch_creat_id )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_disassemble_tsurf()
#
#                      In this illustration, a new database is opened.
#                      A trimmed surface is created. The function is 
#                      called to disassemble the trimmed surface into
#                      its parent surface and edge curves.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function sgm_disassemble_tsurf()
#  has the following arguments:
#
#  sgm_disassemble_tsurf
#     (  surface_list,
#        delete_orig )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_surface_list[128]
LOGICAL  l_delete_orig
INTEGER  i_return_value
STRING   s_output_ids[128]
STRING   s_curveo_list[128]
STRING   s_curvei_list[128]
STRING   s_surface[128]
LOGICAL  l_delete_ocurve
LOGICAL  l_delete_icurve
LOGICAL  l_delete_surf
STRING   sv_created_ids[VIRTUAL]
INTEGER  i_sgm_create_curve_aut_segt_id
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
STRING   sv_asm_create_grid_xyz_creat_id[VIRTUAL]
STRING   sv_asm_line_2point_creat_id[VIRTUAL]
STRING   sv_sgm_create_curve_2d_creat_id[VIRTUAL]
STRING   sv_sgm_creat_cur_creat_curve_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the surfaces and curves.
surface_label(TRUE)
curve_label(TRUE)
 
#  Create a patch.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<10 10 0>",        @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Create 4 points.
i_return_value =                                 @
   asm_const_grid_xyz( "", "[5 0 0] [0 5 0] "//  @
      "[5 10 0][10 5 0]",                        @
      "Coord 0", sv_asm_create_grid_xyz_creat_id )
dump i_return_value
 
#  Create 4 curves.
i_return_value =                                 @
   asm_const_line_2point( "", "Point 5:8 ",      @
      "Point 6 7 8 5", 0, "", 50., 1,            @
      sv_asm_line_2point_creat_id )
dump i_return_value
 
#  Create a circular curve.
i_return_value =                                 @
   sgm_const_curve_2d_circle_v1( "", 1, 1.,      @
      "Coord 0.3", "", "[5 5 0]", TRUE ,         @
      sv_sgm_create_curve_2d_creat_id )
dump i_return_value
 
#  Convert the Curve 1:4 into a chain curve.
i_return_value =                                 @
   sgm_create_curve_chain_v1( "10",              @
   " Curve 1:4", TRUE,                           @
   i_sgm_create_curve_aut_segt_id,               @
   sv_sgm_creat_cur_creat_curve_id )
$? YES 38000217
 
#  Observe the curves and the surface.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to create a trimmed surface inside Surface 1
#  with Curve 10 as outer boundary trim curve and Curve 5 as inner
#  boundary trim curve.
#
s_output_ids = "2"
s_curveo_list = "Curve 10"
s_curvei_list = "Curve 5"
s_surface = "Surface 1"
l_delete_ocurve = TRUE
l_delete_icurve = TRUE
l_delete_surf = TRUE
 
i_return_value =                                 @
   sgm_create_surface_trimmed                    @
      (  s_output_ids,                           @
         s_curveo_list,                          @
         s_curvei_list,                          @
         s_surface,                              @
         l_delete_ocurve,                        @
         l_delete_icurve,                        @
         l_delete_surf,                          @
         sv_created_ids )
$? YES 38000217
$? YES 38000217
$? YES 38000219
dump i_return_value
 
#  Created surface is 
dump sv_created_ids
 
#  Observe the trimmed surface created.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to disassemble the trimmed surface into its
#  parent surface.
#
s_surface_list = "Surface 2"
l_delete_orig = TRUE
 
i_return_value =                                 @
   sgm_disassemble_tsurf                         @
      (  s_surface_list,                         @
         l_delete_orig )
$? YES 38000219
dump i_return_value
 
sys_free_string( sv_created_ids )
sys_free_string( sv_asm_create_patch_xy_creat_id )
sys_free_string( sv_asm_create_grid_xyz_creat_id )
sys_free_string( sv_asm_line_2point_creat_id )
sys_free_string( sv_sgm_create_curve_2d_creat_id )
sys_free_string( sv_sgm_creat_cur_creat_curve_id )
 
#  Press "Refresh Graphics" radio button to repaint the graphics 
#  window.
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_disassemble_solid()
#
#                      In this illustration, a new database is opened.
#                      A solid is created. Then the function is called
#                      to disassemble the solid into its subordinate
#                      surface faces.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function sgm_disassemble_solid()
#  has the following arguments:
#
#  sgm_disassemble_solid
#     (  solid_list,
#        delete_orig,
#        crtd_lab )
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_solid_list[128]
LOGICAL  l_delete_orig
STRING   sv_crtd_lab[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_hpat_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the surfaces and solids.
surface_label(TRUE)
solid_label(TRUE)
 
i_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
 
#  Change the view
ga_view_aa_set( -67., 0., -34. )
 
#  Observe the solid created.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to disassemble the solid into its subordinate
#  surface faces.
#
s_solid_list = " Solid 1"
l_delete_orig = TRUE
 
i_return_value =                                 @
   sgm_disassemble_solid                         @
      (  s_solid_list,                           @
         l_delete_orig,                          @
         sv_crtd_lab )
dump i_return_value
 
#  The surfaces created
dump sv_crtd_lab
 
sys_free_string( sv_crtd_lab )
sys_free_string( sv_asm_create_hpat_xyz_creat_id )
#---------------------------------------------------------------------
 
Associate Actions
This section contains examples of some of the functions used to implement the “Associate” actions.
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_associate_point_curve()
#
#                      This illustration opens a new database and
#                      creates 3 points in it. Using Point 1 and 2,
#                      it creates a line. Finally the function is 
#                      called to associate Point 3 to Curve 1.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function sgm_associate_point_curve()
#  has the following arguments:
#
#  sgm_associate_point_curve
#     (  point_list,
#        curve_list,
#        joined_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_list[128]
STRING   s_curve_list[128]
STRING   sv_joined_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_line_2point_created_id[VIRTUAL]
STRING   sv_asm_create_grid_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of Curves and Points.
curve_label(TRUE)
point_label(TRUE)
 
#  Create 3 points.
i_return_value =                                 @
   asm_const_grid_xyz                            @
      ( "", "[0 0 0][10 0 0][5 0 0]",            @
        "Coord 0",                               @
        sv_asm_create_grid_xyz_creat_id )
dump i_return_value
 
#  Create a line between Point 1 and 2.
i_return_value =                                 @
   asm_const_line_2point( "", "Point 1",         @
      "Point 2", 0, "", 50., 1,                  @
      sv_asm_line_2point_created_id )
dump i_return_value
 
#  Observe the Curve 1 and Point 3 on it. Note that Point 3 is not 
#  associated to the Curve 1.
 
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to associate Point 3 to Curve 1.
#
s_point_list = "Point 3"
s_curve_list = "Curve 1"
 
i_return_value =                                 @
   sgm_associate_point_curve                     @
      (  s_point_list,                           @
         s_curve_list,                           @
         sv_joined_list )
dump i_return_value
 
#  Joined entities are
dump sv_joined_list
 
sys_free_string( sv_joined_list )
sys_free_string( sv_asm_line_2point_created_id )
sys_free_string( sv_asm_create_grid_xyz_creat_id )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_associate_point_surface()
#
#                      This illustration opens a new database and
#                      creates a Patch in it. Four points are created
#                      on that patch. Function is called to associate
#                      the points to the patch.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function sgm_associate_point_surface()
#  has the following arguments:
#
#  sgm_associate_point_surface
#     (  point_list,
#        surface_list,
#        joined_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_list[128]
STRING   s_surface_list[128]
STRING   sv_joined_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_grid_xyz_creat_id[VIRTUAL]
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of Points and Surfaces.
point_label(TRUE)
surface_label(TRUE)
 
#  Create a Patch.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<10 10 0>",        @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Create 4 points.
i_return_value =                                 @
   asm_const_grid_xyz                            @
      ( "", "[5 0 0][10 5 0][0 5 0][5 10 0]",    @
        "Coord 0",                               @
        sv_asm_create_grid_xyz_creat_id )
dump i_return_value
 
#  Observe the Patch and the Points.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to associate Point 5:8 to Surface 1.
#
s_point_list = "Point 5:8"
s_surface_list = "Surface 1"
 
i_return_value =                                 @
   sgm_associate_point_surface                   @
      (  s_point_list,                           @
         s_surface_list,                         @
         sv_joined_list )
dump i_return_value
 
#  List of joined entities
dump sv_joined_list
 
sys_free_string( sv_joined_list )
sys_free_string( sv_asm_create_grid_xyz_creat_id )
sys_free_string( sv_asm_create_patch_xy_creat_id )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_associate_curve_curve()
#
#                      This illustration opens a new database and
#                      creates two curves in it. Then it calls the 
#                      function to associate Curve 1 to Curve 2.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function sgm_associate_curve_curve()
#  has the following arguments:
#
#  sgm_associate_curve_curve
#     (  curve_list1,
#        curve_list2,
#        joined_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_list1[128]
STRING   s_curve_list2[128]
STRING   sv_joined_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_line_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the curve labels.
curve_label(TRUE)
 
#  Create 2 Curves
i_return_value =                                 @
   asm_const_line_xyz( "", "<5 0 0><10 0 0>",    @
      "[0 0 0][0 0 0]", "Coord 0",               @
      sv_asm_create_line_xyz_creat_id )
dump i_return_value
#---------------------------------------------------------------------
#  Associate Curve 1 to Curve 2.
#
s_curve_list1 = "Curve 1"
s_curve_list2 = "Curve 2"
 
i_return_value =                                 @
   sgm_associate_curve_curve                     @
      (  s_curve_list1,                          @
         s_curve_list2,                          @
         sv_joined_list )
dump i_return_value
 
#  Joined curves are
dump sv_joined_list
 
sys_free_string( sv_joined_list )
sys_free_string( sv_asm_create_line_xyz_creat_id )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_associate_curve_surface()
#
#                      This illustration opens a new database and
#                      creates a Curve and a Surface in it. Then it 
#                      calls the function to associate Curve 1 to 
#                      Surface 1.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function sgm_associate_curve_surface()
#  has the following arguments:
#
#  sgm_associate_curve_surface
#     (  curve_list,
#        surface_list,
#        joined_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_list[128]
STRING   s_surface_list[128]
STRING   sv_joined_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_line_xyz_creat_id[VIRTUAL]
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of Curves and Surfaces.
curve_label(TRUE)
surface_label(TRUE)
 
#  Create a Curve.
i_return_value =                                 @
   asm_const_line_xyz( "", "<10 10 0>",          @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_line_xyz_creat_id )
dump i_return_value
 
#  Create a Patch.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<10 10 0>",        @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Observe the Patch and the Curve.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to associate Curve 1 to Surface 1.
#
s_curve_list = " Curve 1"
s_surface_list = " Surface 1 "
 
i_return_value =                                 @
   sgm_associate_curve_surface                   @
      (  s_curve_list,                           @
         s_surface_list,                         @
         sv_joined_list )
dump i_return_value
 
#  Joined entities.
dump sv_joined_list
 
sys_free_string( sv_joined_list )
sys_free_string( sv_asm_create_line_xyz_creat_id )
sys_free_string( sv_asm_create_patch_xy_creat_id )
#---------------------------------------------------------------------
 
Disassociate Actions
This section contains examples of some of the functions used to implement the “Disassociate” actions.
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_disassociate_point()
#
#                      This illustration opens a new database and
#                      creates a patch in it. It calls the function
#                      to disassociate the 4 Points associated with
#                      the patch created.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function sgm_disassociate_point()
#  has the following arguments:
#
#  sgm_disassociate_point
#     (  point_list,
#        entity_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_list[128]
STRING   sv_entity_list[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of Surfaces and Points.
surface_label(TRUE)
point_label(TRUE)
 
#  Create a Patch.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<10 10 0>",        @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Observe the patch created. When Patch is created in XYZ method, 
#  4 points also created and associated with the patch.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to disassociate the Point 1:4 from the Surface 1.
#
s_point_list = "Point 1:4"
 
i_return_value =                                 @
   sgm_disassociate_point                        @
      (  s_point_list,                           @
         sv_entity_list )
dump i_return_value
 
#  List of disassociated entities
dump sv_entity_list
 
sys_free_string( sv_entity_list )
sys_free_string( sv_asm_create_patch_xy_creat_id )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_disassociate_curve()
#
#                      This illustration opens a new database and
#                      creates a curve and a patch in it. It 
#                      associates the curve to the patch. Finally 
#                      it calls the function to disassociate the 
#                      curve from the patch.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function sgm_disassociate_curve()
#  has the following arguments:
#
#  sgm_disassociate_curve
#     (  curve_list,
#        entity_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_list[128]
STRING   sv_entity_list[VIRTUAL]
INTEGER  i_return_value
STRING   s_curve_list[128]
STRING   s_surface_list[128]
STRING   sv_joined_list[VIRTUAL]
STRING   sv_asm_create_line_xyz_creat_id[VIRTUAL]
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of Surfaces and Curves.
surface_label(TRUE)
curve_label(TRUE)
 
#  Create a Curve.
i_return_value =                                 @
   asm_const_line_xyz( "", "<10 10 0>",          @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_line_xyz_creat_id )
dump i_return_value
 
#  Create a Patch.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<10 10 0>",        @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Associate Curve 1 to Surface 1.
#
s_curve_list = " Curve 1"
s_surface_list = " Surface 1 "
 
i_return_value =                                 @
   sgm_associate_curve_surface                   @
      (  s_curve_list,                           @
         s_surface_list,                         @
         sv_joined_list )
dump i_return_value
 
#  Observe that Curve 1 is associated to Surface 1.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to disassociate the Curve 1 from the Surface 1.
#
s_curve_list = "Curve 1"
 
i_return_value =                                 @
   sgm_disassociate_curve                        @
      (  s_curve_list,                           @
         sv_entity_list )
dump i_return_value
 
#  List of the disassociated entities
dump sv_entity_list
 
sys_free_string( sv_joined_list )
sys_free_string( sv_entity_list )
sys_free_string( sv_asm_create_line_xyz_creat_id )
sys_free_string( sv_asm_create_patch_xy_creat_id )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_disassociate_surface()
#
#                      This illustration opens a new database and
#                      creates one curve and Surface in it. It 
#                      associates the curve to the surface. Finally 
#                      it calls the function to disassociate the 
#                      the Surface.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function sgm_disassociate_surface()
#  has the following arguments:
#
#  sgm_disassociate_surface
#     (  surface_list,
#        entity_list )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_surface_list[128]
STRING   sv_entity_list[VIRTUAL]
INTEGER  i_return_value
STRING   s_curve_list[128]
STRING   s_surface_list[128]
STRING   sv_joined_list[VIRTUAL]
STRING   sv_asm_create_line_xyz_creat_id[VIRTUAL]
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of Curves and Surfaces.
curve_label(TRUE)
surface_label(TRUE)
 
#  Create a Curve.
i_return_value =                                 @
   asm_const_line_xyz( "", "<10 10 0>",          @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_line_xyz_creat_id )
dump i_return_value
 
#  Create a Patch.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<10 10 0>",        @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Call the function to associate Curve 1 to Surface 1.
s_curve_list = " Curve 1"
s_surface_list = " Surface 1 "
 
i_return_value =                                 @
   sgm_associate_curve_surface                   @
      (  s_curve_list,                           @
         s_surface_list,                         @
         sv_joined_list )
dump i_return_value
 
#  Observe that the Curve 1 is associated to Surface 1.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to disassociate the Surface 1.
#
s_surface_list = "Surface 1"
 
i_return_value =                                 @
   sgm_disassociate_surface                      @
      (  s_surface_list,                         @
         sv_entity_list )
dump i_return_value
 
#  List of the disassociated entities
dump sv_entity_list
 
sys_free_string( sv_entity_list )
sys_free_string( sv_joined_list )
sys_free_string( sv_asm_create_line_xyz_creat_id )
sys_free_string( sv_asm_create_patch_xy_creat_id )
#---------------------------------------------------------------------
Sweep Actions
This section contains examples of some of the functions used to implement the “Sweep” actions.
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_sweep_hpat_arc()
#
#                      This illustration opens a new database and
#                      creates a Surface in it. Then the Surface is
#                      swept to create the hpat.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function asm_sweep_hpat_arc()
#  has the following arguments:
#
#  asm_sweep_hpat_arc
#     (  hpat_labels,
#        axis,
#        angle,
#        offset,
#        coord_frame,
#        num_hpats,
#        surface_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_hpat_labels[128]
STRING   s_axis[128]
REAL     r_angle
REAL     r_offset
STRING   s_coord_frame[128]
INTEGER  i_num_hpats
STRING   s_surface_list[128]
STRING   sv_created_labels[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the surfaces and solids.
surface_label(TRUE)
solid_label(TRUE)
 
#  Create a patch.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<10 10 0>",        @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Change the view.
ga_view_aa_set( -67., 0., -34. )
 
#  Observe the surface created.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to sweep the Surface 1 about Coord 0.2 to create
#  a hpat.
#
s_hpat_labels = "1"
s_axis = "Coord 0.2"
r_angle = 90.0
r_offset = 0.0
s_coord_frame = "Coord 0"
i_num_hpats = 1
s_surface_list = "Surface 1"
 
i_return_value =                                 @
   asm_sweep_hpat_arc                            @
      (  s_hpat_labels,                          @
         s_axis,                                 @
         r_angle,                                @
         r_offset,                               @
         s_coord_frame,                          @
         i_num_hpats,                            @
         s_surface_list,                         @
         sv_created_labels )
dump i_return_value
 
#  Labels of the hpats created
dump sv_created_labels
 
sys_free_string( sv_created_labels )
sys_free_string( sv_asm_create_patch_xy_creat_id )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function asm_sweep_hpat_extrude()
#
#                      This illustration opens a new database and
#                      creates a Surface in it. Then the Surface is
#                      extruded to create the hpat.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function asm_sweep_hpat_extrude()
#  has the following arguments:
#
#  asm_sweep_hpat_extrude
#     (  hpat_labels,
#        delta,
#        scaleu,
#        scalev,
#        angle,
#        origin,
#        coord_frame,
#        num_hpats,
#        patch_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_hpat_labels[128]
STRING   s_delta[128]
REAL     r_scaleu
REAL     r_scalev
REAL     r_angle
STRING   s_origin[128]
STRING   s_coord_frame[128]
INTEGER  i_num_hpats
STRING   s_patch_list[128]
STRING   sv_created_labels[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the surfaces and solids.
surface_label(TRUE)
solid_label(TRUE)
 
#  Create a patch.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<10 10 0>",        @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Change the view.
ga_view_aa_set( -67., 0., -34. )
 
#  Observe the surface created.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to create hyperpatch by extruding Surface 1.
#
s_hpat_labels = ""
s_delta = "<0 0 10>"
r_scaleu = 1.0
r_scalev = 1.0
r_angle = 0.0
s_origin = "[0 0 0]"
s_coord_frame = "Coord 0"
i_num_hpats = 1
s_patch_list = "Surface 1"
 
i_return_value =                                 @
   asm_sweep_hpat_extrude                        @
      (  s_hpat_labels,                          @
         s_delta,                                @
         r_scaleu,                               @
         r_scalev,                               @
         r_angle,                                @
         s_origin,                               @
         s_coord_frame,                          @
         i_num_hpats,                            @
         s_patch_list,                           @
         sv_created_labels )
dump i_return_value
 
#  Labels of the created hyperpatch
dump sv_created_labels
 
#  Observe the hpat created.
#  Session file paused. Press "Resume" to continue..
sf_pause()
#---------------------------------------------------------------------
#  Call the function to create hyperpatch by extruding Surface 1 with
#  scaling and rotation.
#
s_hpat_labels = ""
s_delta = "<0 0 -10>"
r_scaleu = 0.5
r_scalev = 0.5
r_angle = 30.0
s_origin = "[5 5 0]"
s_coord_frame = "Coord 0"
i_num_hpats = 1
s_patch_list = "Surface 1"
 
i_return_value =                                 @
   asm_sweep_hpat_extrude                        @
      (  s_hpat_labels,                          @
         s_delta,                                @
         r_scaleu,                               @
         r_scalev,                               @
         r_angle,                                @
         s_origin,                               @
         s_coord_frame,                          @
         i_num_hpats,                            @
         s_patch_list,                           @
         sv_created_labels )
dump i_return_value
 
#  Labels of the created hyperpatch
dump sv_created_labels
 
sys_free_string( sv_asm_create_patch_xy_creat_id )
sys_free_string( sv_created_labels )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_sweep_hpat_glide()
#
#                      This illustration opens a new database and
#                      creates a Surface and a line in it. Then the 
#                      Surface is glided to create the hpat.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function asm_sweep_hpat_glide()
#  has the following arguments:
#
#  asm_sweep_hpat_glide
#     (  hpat_labels,
#        scale,
#        glide_option,
#        director_line,
#        base_patch,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_hpat_labels[128]
REAL     r_scale
INTEGER  i_glide_option
STRING   s_director_line[128]
STRING   s_base_patch[128]
STRING   sv_created_labels[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
STRING   sv_asm_create_line_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the curves, surfaces and solids.
curve_label(TRUE)
surface_label(TRUE)
solid_label(TRUE)
 
#  Create a patch.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<10 10 0>",        @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "1", "< 0 5 10>",         @
      "[5 5 0]", "Coord 0",                      @
      sv_asm_create_line_xyz_creat_id )
 
#  Change the view.
ga_view_aa_set( -67., 0., -34. )
 
#  Observe the surface and line created.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to create the hyperpatch by gliding Surface 1 
#  along  Line 1.
#
s_hpat_labels = ""
r_scale = 1.0
i_glide_option = 0
s_director_line = "Line 1"
s_base_patch = "Surface 1"
 
i_return_value =                                 @
   asm_sweep_hpat_glide                          @
      (  s_hpat_labels,                          @
         r_scale,                                @
         i_glide_option,                         @
         s_director_line,                        @
         s_base_patch,                           @
         sv_created_labels )
dump i_return_value
 
#  Label of the hyperpatch created
dump sv_created_labels
 
sys_free_string( sv_created_labels )
sys_free_string( sv_asm_create_patch_xy_creat_id )
sys_free_string( sv_asm_create_line_xyz_creat_id )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function asm_sweep_hpat_normal()
#
#                      This illustration opens a new database and
#                      creates a Surface in it. Then hyperpatch is
#                      created with the various thickness.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function asm_sweep_hpat_normal()
#  has the following arguments:
#
#  asm_sweep_hpat_normal
#     (  hpat_labels,
#        thickness1,
#        thickness2,
#        thickness3,
#        thickness4,
#        num_patch,
#        flip,
#        surface_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_hpat_labels[128]
STRING   s_thickness1[128]
STRING   s_thickness2[128]
STRING   s_thickness3[128]
STRING   s_thickness4[128]
INTEGER  i_num_patch
LOGICAL  l_flip
STRING   s_surface_list[128]
STRING   sv_created_labels[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the  surfaces and solids.
surface_label(TRUE)
solid_label(TRUE)
 
#  Create a patch.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<10 10 0>",        @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Change the view.
ga_view_aa_set( -67., 0., -34. )
 
#  Observe the surface created.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to create a hyperpatch with varying thickness and
#  flip is set to FALSE.
#
s_hpat_labels = ""
s_thickness1 = "1.0"
s_thickness2 = "2.0"
s_thickness3 = "3.0"
s_thickness4 = "4.0"
i_num_patch = 1
l_flip = FALSE
s_surface_list = "Surface 1"
 
i_return_value =                                 @
   asm_sweep_hpat_normal                         @
      (  s_hpat_labels,                          @
         s_thickness1,                           @
         s_thickness2,                           @
         s_thickness3,                           @
         s_thickness4,                           @
         i_num_patch,                            @
         l_flip,                                 @
         s_surface_list,                         @
         sv_created_labels )
dump i_return_value
 
#  Label of the hyperpatch created
dump sv_created_labels
 
#  Observe the hpat created.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to create a hyperpatch with varying thickness 
#  with flip is set to TRUE.
#
s_thickness1 = "4.0"
s_thickness2 = "3.0"
s_thickness3 = "2.0"
s_thickness4 = "1.0"
l_flip = TRUE
 
i_return_value =                                 @
   asm_sweep_hpat_normal                         @
      (  s_hpat_labels,                          @
         s_thickness1,                           @
         s_thickness2,                           @
         s_thickness3,                           @
         s_thickness4,                           @
         i_num_patch,                            @
         l_flip,                                 @
         s_surface_list,                         @
         sv_created_labels )
dump i_return_value
 
#  Label of the hyperpatch created
dump sv_created_labels
 
sys_free_string( sv_created_labels )
sys_free_string( sv_asm_create_patch_xy_creat_id )
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_sweep_line_arc()
#
#                      This illustration opens a new database and
#                      creates a point in it. Then the point is
#                      arced to create a line.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function asm_sweep_line_arc()
#  has the following arguments:
#
#  asm_sweep_line_arc
#     (  line_labels,
#        axis,
#        angle,
#        offset,
#        coord_frame,
#        num_lines,
#        point_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_line_labels[128]
STRING   s_axis[128]
REAL     r_angle
REAL     r_offset
STRING   s_coord_frame[128]
INTEGER  i_num_lines
STRING   s_point_list[128]
STRING   sv_created_labels[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_grid_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the curves.
curve_label(TRUE)
 
#  Change the view.
ga_view_aa_set( -67., 0., -34. )
 
#  Create a point.
i_return_value =                                 @
   asm_const_grid_xyz( "", "[10 0 0 ] ",         @
      "Coord 0",                                 @
      sv_asm_create_grid_xyz_creat_id )
dump i_return_value
#---------------------------------------------------------------------
#  Call the function to create 2 lines by arcing the point 1
#
s_line_labels = ""
s_axis = "Coord 0.3"
r_angle = 180.0
r_offset = 0.0
s_coord_frame = "Coord 0"
i_num_lines = 2
s_point_list = "Point 1"
 
i_return_value =                                 @
   asm_sweep_line_arc                            @
      (  s_line_labels,                          @
         s_axis,                                 @
         r_angle,                                @
         r_offset,                               @
         s_coord_frame,                          @
         i_num_lines,                            @
         s_point_list,                           @
         sv_created_labels )
dump i_return_value
 
#  Labels of the lines created
dump sv_created_labels
 
sys_free_string( sv_created_labels )
sys_free_string( sv_asm_create_grid_xyz_creat_id )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function asm_sweep_line_involute()
#
#                      This illustration opens a new database and
#                      creates a line by involute option with angle
#                      method. Again it calls the function to create
#                      another line using involute option with radii
#                      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 asm_sweep_line_involute()
#  has the following arguments:
#
#  asm_sweep_line_involute
#     (  line_labels,
#        axis,
#        option,
#        scalar1,
#        scalar2,
#        num_lines,
#        coord_frame,
#        point_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_line_labels[128]
STRING   s_axis[128]
INTEGER  i_option
REAL     r_scalar1
REAL     r_scalar2
INTEGER  i_num_lines
STRING   s_coord_frame[128]
STRING   s_point_list[128]
STRING   sv_created_labels[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the curves.
curve_label(TRUE)
 
#  Change the view.
ga_view_aa_set( -67., 0., -34. )
#---------------------------------------------------------------------
#  Call the function to create a line by involute option with angle
#  method.
#
s_line_labels = ""
s_axis = "Coord 0.3"
i_option = 0
r_scalar1 = 360.0
r_scalar2 = 0.0
i_num_lines = 1
s_coord_frame = "Coord 0"
s_point_list = "[10 0 0]"
 
i_return_value =                                 @
   asm_sweep_line_involute                       @
      (  s_line_labels,                          @
         s_axis,                                 @
         i_option,                               @
         r_scalar1,                              @
         r_scalar2,                              @
         i_num_lines,                            @
         s_coord_frame,                          @
         s_point_list,                           @
         sv_created_labels )
dump i_return_value
 
#  Created Curve
dump sv_created_labels
 
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to create a line by involute option with radii
#  method.
#
s_line_labels = ""
s_axis = "Coord 0.3"
i_option = 1
r_scalar1 = 5.0
r_scalar2 = 120.0
i_num_lines = 1
s_coord_frame = "Coord 0"
s_point_list = "[10 0 0]"
 
i_return_value =                                 @
   asm_sweep_line_involute                       @
      (  s_line_labels,                          @
         s_axis,                                 @
         i_option,                               @
         r_scalar1,                              @
         r_scalar2,                              @
         i_num_lines,                            @
         s_coord_frame,                          @
         s_point_list,                           @
         sv_created_labels )
dump i_return_value
 
#  Created Curve
dump sv_created_labels
 
sys_free_string( sv_created_labels )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_sweep_patch_arc()
#
#                      This illustration opens a new database and
#                      creates a line in it. Then that line is
#                      arced to create two patches.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function asm_sweep_patch_arc() has the following arguments:
#
#  asm_sweep_patch_arc
#     (  patch_labels,
#        axis,
#        angle,
#        offset,
#        coord_frame,
#        num_patch,
#        curve_list,
#        created_labels )
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_patch_labels[128]
STRING   s_axis[128]
REAL     r_angle
REAL     r_offset
STRING   s_coord_frame[128]
INTEGER  i_num_patch
STRING   s_curve_list[128]
STRING   sv_created_labels[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_line_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the curves and surfaces.
curve_label(TRUE)
surface_label(TRUE)
 
#  Change the view.
ga_view_aa_set( -67., 0., -34. )
 
#  Create a Line
i_return_value =                                 @
   asm_const_line_xyz( "1", "<10 0 0>",          @
      "[10 0 0]", "Coord 0",                     @
      sv_asm_create_line_xyz_creat_id )
dump i_return_value
 
#  Observe the line created.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to arc the line to create two patches.
#
s_patch_labels = ""
s_axis = "Coord 0.3"
r_angle = 180.0
r_offset = 0.0
s_coord_frame = "Coord 0"
i_num_patch = 2
s_curve_list = "Curve 1"
 
i_return_value =                                 @
   asm_sweep_patch_arc                           @
      (  s_patch_labels,                         @
         s_axis,                                 @
         r_angle,                                @
         r_offset,                               @
         s_coord_frame,                          @
         i_num_patch,                            @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
 
#  Labels of the created patches.
dump sv_created_labels
 
sys_free_string( sv_created_labels )
sys_free_string( sv_asm_create_line_xyz_creat_id )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_sweep_patch_extrude()
#
#                      This illustration opens a new database and
#                      creates a Line in it. Then the line is
#                      extruded to create the patch.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function asm_sweep_patch_extrude()
#  has the following arguments:
#
#  asm_sweep_patch_extrude
#     (  patch_labels,
#        delta,
#        scale,
#        angle,
#        origin,
#        coord_frame,
#        num_patches,
#        curve_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_patch_labels[128]
STRING   s_delta[128]
REAL     r_scale
REAL     r_angle
STRING   s_origin[128]
STRING   s_coord_frame[128]
INTEGER  i_num_patches
STRING   s_curve_list[128]
STRING   sv_created_labels[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_line_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the curves and surfaces.
curve_label(TRUE)
surface_label(TRUE)
 
#  Change the view.
ga_view_aa_set( -67., 0., -34. )
 
#  Create a Line
i_return_value =                                 @
   asm_const_line_xyz( "1", "<10 0 0>",          @
      "[10 0 0]", "Coord 0",                     @
      sv_asm_create_line_xyz_creat_id )
dump i_return_value
 
#  Observe the surface created.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to create a patch by extruding Line 1.
#
s_patch_labels = ""
s_delta = "<0 0 10>"
r_scale = 1.0
r_angle = 0.0
s_origin = "[0 0 0]"
s_coord_frame = "Coord 0"
i_num_patches = 1
s_curve_list = "Curve 1"
 
i_return_value =                                 @
   asm_sweep_patch_extrude                       @
      (  s_patch_labels,                         @
         s_delta,                                @
         r_scale,                                @
         r_angle,                                @
         s_origin,                               @
         s_coord_frame,                          @
         i_num_patches,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
 
#  Labels of the created patches.
dump sv_created_labels
 
sys_free_string( sv_created_labels )
sys_free_string( sv_asm_create_line_xyz_creat_id )
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_sweep_patch_glide()
#
#                      This illustration opens a new database and
#                      creates two Curves in it. Then one Curve is 
#                      glided  along the other to create the patch.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function asm_sweep_patch_glide()
#  has the following arguments:
#
#  asm_sweep_patch_glide
#     (  patch_labels,
#        scale,
#        glide_option,
#        director_line,
#        base_line,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_patch_labels[128]
REAL     r_scale
INTEGER  i_glide_option
STRING   s_director_line[128]
STRING   s_base_line[128]
STRING   sv_created_labels[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_line_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the curves, surfaces.
curve_label(TRUE)
surface_label(TRUE)
 
#  Create a line
i_return_value =                                 @
   asm_const_line_xyz( "", "< 3 4 0 >< 0 5 10>", @
      "[3 0 0][5 5 0]", "Coord 0",               @
      sv_asm_create_line_xyz_creat_id )
dump i_return_value
 
#  Change the view.
ga_view_aa_set( -67., 0., -34. )
 
#  Observe the line created.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to create a patch by gliding Curve 1 along
#  Curve 2.
#
s_patch_labels = ""
r_scale = 1.0
i_glide_option = 0
s_director_line = "Curve 2"
s_base_line = "Curve 1"
 
i_return_value =                                 @
   asm_sweep_patch_glide                         @
      (  s_patch_labels,                         @
         r_scale,                                @
         i_glide_option,                         @
         s_director_line,                        @
         s_base_line,                            @
         sv_created_labels )
dump i_return_value
 
#  Label of the patch created
dump sv_created_labels
 
sys_free_string( sv_created_labels )
sys_free_string( sv_asm_create_line_xyz_creat_id )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_sweep_patch_normal()
#
#                      This illustration opens a new database and
#                      creates a  line in it. Then the function is 
#                      called to create a patch normal to the line
#                      created.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function asm_sweep_patch_normal()
#  has the following arguments:
#
#  asm_sweep_patch_normal
#     (  patch_labels,
#        thickness1,
#        thickness2,
#        origin,
#        num_patch,
#        flip,
#        curve_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_patch_labels[128]
STRING   s_thickness1[128]
STRING   s_thickness2[128]
STRING   s_origin[128]
INTEGER  i_num_patch
LOGICAL  l_flip
STRING   s_curve_list[128]
STRING   sv_created_labels[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_line_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the  surfaces and curves.
surface_label(TRUE)
curve_label(TRUE)
 
#  Create a line
i_return_value =                                 @
   asm_const_line_xyz( "", "< 10 5 0>",          @
      "[5 5 0]", "Coord 0",                      @
      sv_asm_create_line_xyz_creat_id )
dump i_return_value
 
#  Change the view.
ga_view_aa_set( -67., 0., -34. )
 
#  Observe the curve created.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to create a patch with varying thickness and
#  flip is set to TRUE.
#
s_patch_labels = ""
s_thickness1 = "10.0"
s_thickness2 = "20.0"
s_origin = "[0 0 0]"
i_num_patch = 1
l_flip = TRUE
s_curve_list = "Curve 1"
 
i_return_value =                                 @
   asm_sweep_patch_normal                        @
      (  s_patch_labels,                         @
         s_thickness1,                           @
         s_thickness2,                           @
         s_origin,                               @
         i_num_patch,                            @
         l_flip,                                 @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
 
#  Label of the patch created
dump sv_created_labels
 
sys_free_string( sv_created_labels )
sys_free_string( sv_asm_create_line_xyz_creat_id )
#---------------------------------------------------------------------
 
Transform Actions
This section contains examples of some of the functions used to implement the “Transform” actions.
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_cord_rotate()
#
#                      This file opens a new database "new.db" and
#                      creates a coordinate frame with label = 8
#                      by rotating the reference coordinate frame
#                      by 45 degrees about the "[0 0 0][1 1 1]" axis.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_transform_cord_rotate()
#  has the following arguments:
#
#  asm_transform_cord_rotate
#     (  output_labels,
#        axis,
#        angle,
#        offset,
#        coord_frame,
#        nrepeat,
#        delete_orig,
#        coord_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_output_labels[32]
STRING   s_axis[32]
REAL     r_angle
REAL     r_offset
STRING   s_coord_frame[32]
INTEGER  i_nrepeat
LOGICAL  l_delete_orig
STRING   s_coord_list[32]
STRING   sv_created_labels[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
ga_view_aa_set(23.,-34.,0.)
 
s_output_labels ="8"
s_axis          = "{[0 0 0] [1 1 1]}"
r_angle         = 45.0
r_offset        = 0.0
s_coord_frame   = "coord 0"
i_nrepeat       = 1
l_delete_orig   = FALSE
s_coord_list    = "coord 0"
 
i_return_value =                                 @
   asm_transform_cord_rotate                     @
      (  s_output_labels,                        @
         s_axis,                                 @
         r_angle,                                @
         r_offset,                               @
         s_coord_frame,                          @
         i_nrepeat,                              @
         l_delete_orig,                          @
         s_coord_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_cord_translate()
#
#                      This file opens a new database "new.db" and
#                      creates two coordinate frames with label = 8
#                      and 9 by translating the reference coordinate
#                      frame.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_transform_cord_translate()
#  has the following arguments:
#
#  asm_transform_cord_translate
#     (  output_labels,
#        delta,
#        coord_frame,
#        nrepeat,
#        delete_orig,
#        coord_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_output_labels[32]
STRING   s_delta[32]
STRING   s_coord_frame[32]
INTEGER  i_nrepeat
LOGICAL  l_delete_orig
STRING   s_coord_list[32]
STRING   sv_created_labels[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
ga_view_aa_set(23.,-34.,0.)
 
s_output_labels = "8 9"
s_delta         = "<0.5 0 0>"
s_coord_frame   = "coord 0"
i_nrepeat       = 2
l_delete_orig   = FALSE
s_coord_list    = "coord 0"
#
i_return_value =                                 @
   asm_transform_cord_translate                  @
      (  s_output_labels,                        @
         s_delta,                                @
         s_coord_frame,                          @
         i_nrepeat,                              @
         l_delete_orig,                          @
         s_coord_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_curve_vsum()
#
#                      This file opens a new database "new.db" and
#                      creates 4 curves to form a circle and 4 lines
#                      normal to the circle. Later it creates 4 curves
#                      by vector summing the four curves and lines.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_transform_curve_vsum()
#  has the following arguments:
#
#  asm_transform_curve_vsum
#     (  curve_ids,
#        origin_1,
#        origin_2,
#        scales_1,
#        scales_2,
#        curve_list1,
#        curve_list2,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_ids[32]
STRING   s_origin_1[32]
STRING   s_origin_2[32]
REAL     ra_scales_1(3)
REAL     ra_scales_2(3)
STRING   s_curve_list1[32]
STRING   s_curve_list2[32]
STRING   sv_created_ids[VIRTUAL]
STRING   sv_sgm_create_curve_2d_created[VIRTUAL]
STRING   sv_asm_line_2point_created_ids[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
s_curve_ids = "9"
ga_view_aa_set(23.,-34.,0.)
curve_label(TRUE)
 
#  Create 4 curves and 4 lines.
i_return_value =                                 @
   sgm_const_curve_2d_arcangles_v1( "1", 1., 0., @
      90., "Coord 0.2", "[0 0 0]", TRUE,         @
      sv_sgm_create_curve_2d_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_curve_2d_arcangles_v1( "2", 1.,90., @
      180., "Coord 0.2", "[0 0 0]", TRUE,        @
      sv_sgm_create_curve_2d_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_curve_2d_arcangles_v1( "3", 1.,180.,@
      270., "Coord 0.2", "[0 0 0]", TRUE,        @
      sv_sgm_create_curve_2d_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_curve_2d_arcangles_v1( "4", 1.,270.,@
      360., "Coord 0.2", "[0 0 0]", TRUE,        @
      sv_sgm_create_curve_2d_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_2point( "5",                   @
      "[0 0 0][0 0.2 0][0 0.4 0][0 0.6 0]",      @
      "[0 0.2 0][0 0.4 0][0 0.6 0][0 0.8 0]",    @
      0, "", 50., 1,                             @
      sv_asm_line_2point_created_ids )
dump i_return_value
 
 
#  Transform the two set of curves.
s_origin_1    = "[0 0 0]"
s_origin_2    = "[0 0 0]"
ra_scales_1   = [ 1.0 1.0 1.0 ]
ra_scales_2   = [ 1.0 1.0 1.0 ]
s_curve_list1 = "curve 1:4"
s_curve_list2 = "curve 5:8"
 
i_return_value =                                 @
   asm_transform_curve_vsum                      @
      (  s_curve_ids,                            @
         s_origin_1,                             @
         s_origin_2,                             @
         ra_scales_1,                            @
         ra_scales_2,                            @
         s_curve_list1,                          @
         s_curve_list2,                          @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_sgm_create_curve_2d_created)
sys_free_string(sv_asm_line_2point_created_ids)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_grid_mcord()
#
#                      This file opens a new database "new.db" and
#                      creates four points. Later it creates a
#                      coordinate frame with label = 100. Finally it
#                      transforms the points from the reference 
#                      coordinate frame to the created coordinate
#                      frame.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_transform_grid_mcord()
#  has the following arguments:
#
#  asm_transform_grid_mcord
#     (  point_labels,
#        coord_frame_1,
#        coord_frame_2,
#        delete_orig,
#        point_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_labels[32]
STRING   s_coord_frame_1[32]
STRING   s_coord_frame_2[32]
LOGICAL  l_delete_orig
STRING   s_point_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_cord_3po_created[VIRTUAL]
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
point_label(TRUE)
 
#  Create 4 point with labels 1,2,3  and 4.
i_return_value =                                 @
   asm_const_grid_xyz( "1",                      @
      "[.5 .5 0.][1. .5 0.][1.5 .5 0.][2. .5 0.]"@
      ,"coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
#  Create a coordinate with label = 100.
i_return_value =                                 @
   asm_const_coord_3point( "100", "Coord 0", 1,  @
      "[1  1 1]", "[1 1 2]", "[2 1 1]",          @
      sv_asm_create_cord_3po_created )
dump i_return_value
 
s_point_labels  = "8 9 10 11"
s_coord_frame_1 = "coord 0"
s_coord_frame_2 = "coord 100"
l_delete_orig   = FALSE
s_point_list    = "point 1:4"
 
#  Transform the points. 
i_return_value =                                 @
   asm_transform_grid_mcord                      @
      (  s_point_labels,                         @
         s_coord_frame_1,                        @
         s_coord_frame_2,                        @
         l_delete_orig,                          @
         s_point_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_cord_3po_created)
sys_free_string(sv_asm_create_grid_xyz_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_grid_mirror()
#
#                      This file opens a new database "new.db" and
#                      creates 4 points. Later it transforms these
#                      points by mirroring them about a particular
#                      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 asm_transform_grid_mirror()
#  has the following arguments:
#
#  asm_transform_grid_mirror
#     (  point_labels,
#        plane,
#        offset,
#        delete_orig,
#        point_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_labels[32]
STRING   s_plane[32]
REAL     r_offset
LOGICAL  l_delete_orig
STRING   s_point_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
point_label(TRUE)
 
#  Create 4 point with labels 1,2,3  and 4.
i_return_value =                                 @
   asm_const_grid_xyz( "1", "[.5 .5 0.]"//       @
      "[1. 1. 0.][1.2 1.5 0.][.7 2. 0.]"         @
      ,"coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
 
s_point_labels = "8 9 10 11"
s_plane        = "coord 0.1"
r_offset       = 0.0
l_delete_orig  = FALSE
s_point_list   = "point 1:4"
 
#  Transform the points. 
i_return_value =                                 @
   asm_transform_grid_mirror                     @
      (  s_point_labels,                         @
         s_plane,                                @
         r_offset,                               @
         l_delete_orig,                          @
         s_point_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_grid_xyz_created)
#---------------------------------------------------------------------
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_grid_mscale()
#
#                      This file opens a new database "new.db" and
#                      creates 5 points. Later it transforms these
#                      points by rotation and translation.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_transform_grid_mscale()
#  has the following arguments:
#
#  asm_transform_grid_mscale
#     (  point_labels,
#        coord_frame,
#        origin,
#        translation,
#        rotation_matrix,
#        delete_orig,
#        point_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_labels[32]
STRING   s_coord_frame[32]
STRING   s_origin[32]
STRING   s_translation[32]
REAL     raa_rotation_matrix(3,3) = [-1, 0, 0, 0, 1, 0, 0, 0, 1]
LOGICAL  l_delete_orig
STRING   s_point_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
point_label(TRUE)
 
#  Create 5 point with labels 1,2,3 4 and 5.
i_return_value =                                 @
   asm_const_grid_xyz( "1",                      @
      "[0.2 0.5 0.][1.0 1.0 0.][1.2 1.5 0.]",    @
      "coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_grid_xyz( "4",                      @
      "[0.9 1.7 0.][0.5 2.0 0.]",                @
      "coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
s_point_labels = "8 9 10 11 12"
s_coord_frame  = "coord 0"
s_origin       = "[0 0 0]"
s_translation  = "<3 0 0>"
l_delete_orig  = FALSE
s_point_list   = "point 1:5"
 
#  Transform the points. 
i_return_value =                                 @
   asm_transform_grid_mscale                     @
      (  s_point_labels,                         @
         s_coord_frame,                          @
         s_origin,                               @
         s_translation,                          @
         raa_rotation_matrix,                    @
         l_delete_orig,                          @
         s_point_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_grid_xyz_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_grid_pivot()
#
#                      This file opens a new database "new.db" and
#                      creates 4 points. Later it pivots these
#                      points about origin.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_transform_grid_pivot()
#  has the following arguments:
#
#  asm_transform_grid_pivot
#     (  point_labels,
#        pivot_point_1,
#        pivot_point_2,
#        pivot_point_3,
#        delete_orig,
#        point_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_labels[32]
STRING   s_pivot_point_1[32]
STRING   s_pivot_point_2[32]
STRING   s_pivot_point_3[32]
LOGICAL  l_delete_orig
STRING   s_point_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
point_label(TRUE)
 
#  Create 4 point with labels 100,200,3 and 4.
i_return_value =                                 @
   asm_const_grid_xyz( "100","[0.5 0.5 0.]",     @
      "coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_grid_xyz( "200","[0.7 1.0 0.]",     @
      "coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_grid_xyz( "3 4",                    @
      "[1.5 1.5 0.][2.0 2.0 0.]",                @
      "coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
s_point_labels  = "8 9"
s_pivot_point_1 = "[0 0 0]"
s_pivot_point_2 = "point 100"
s_pivot_point_3 = "point 200"
l_delete_orig   = FALSE
s_point_list    = "point 3 4"
 
#  Transform the points. 
i_return_value =                                 @
   asm_transform_grid_pivot                      @
      (  s_point_labels,                         @
         s_pivot_point_1,                        @
         s_pivot_point_2,                        @
         s_pivot_point_3,                        @
         l_delete_orig,                          @
         s_point_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_grid_xyz_created)
#---------------------------------------------------------------------
  
()
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_grid_position()
#
#                      This file opens a new database "new.db" and
#                      creates 2 points. Later it transforms these
#                      points by position transformation.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_transform_grid_position()
#  has the following arguments:
#
#  asm_transform_grid_position
#     (  point_labels,
#        point_1,
#        point_2,
#        point_3,
#        point_4,
#        point_5,
#        point_6,
#        delete_orig,
#        point_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_labels[32]
STRING   s_point_1[32]
STRING   s_point_2[32]
STRING   s_point_3[32]
STRING   s_point_4[32]
STRING   s_point_5[32]
STRING   s_point_6[32]
LOGICAL  l_delete_orig
STRING   s_point_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
point_label(TRUE)
 
#  Create 2 point with labels 100 and 200.
i_return_value =                                 @
   asm_const_grid_xyz( "100 200",                @
      "[0.5 0.5 0.][0.7 1.0 0.]",                @
      "coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
s_point_labels = "8 9"
s_point_1      = "[0 0 0]"
s_point_2      = "[0 1 0]"
s_point_3      = "[1 0 0]"
s_point_4      = "[-1 1 0]"
s_point_5      = "[-2 1 0]"
s_point_6      = "[-1 2 0]"
l_delete_orig  = FALSE
s_point_list   = "point 100 200 "
 
#  Transform the points. 
i_return_value =                                 @
   asm_transform_grid_position                   @
      (  s_point_labels,                         @
         s_point_1,                              @
         s_point_2,                              @
         s_point_3,                              @
         s_point_4,                              @
         s_point_5,                              @
         s_point_6,                              @
         l_delete_orig,                          @
         s_point_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_grid_xyz_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_grid_rotate()
#
#                      This file opens a new database "new.db" and
#                      creates 2 points. Later it transforms these
#                      points by 30 degrees with a initial offset
#                      angle of 60 degrees and repeating the operation
#                      four times about the z axis.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_transform_grid_rotate()
#  has the following arguments:
#
#  asm_transform_grid_rotate
#     (  point_labels,
#        axis,
#        angle,
#        offset,
#        coord_frame,
#        nrepeat,
#        delete_orig,
#        point_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_labels[32]
STRING   s_axis[32]
REAL     r_angle
REAL     r_offset
STRING   s_coord_frame[32]
INTEGER  i_nrepeat
LOGICAL  l_delete_orig
STRING   s_point_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
point_label(TRUE)
 
#  Create 2 point with labels 100 and 200.
i_return_value =                                 @
   asm_const_grid_xyz( "100 200",                @
      "[0.5 0.5 0.][0.7 1.0 0.]",                @
      "coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
s_point_labels = "8 9 10 11 12 13 14 15"
s_axis         = "coord 0.3"
r_angle        = 60.0
r_offset       = 30.0
s_coord_frame  = "coord 0"
i_nrepeat      = 4
l_delete_orig  = FALSE
s_point_list   = "point 100 200 "
 
#  Transform the points. 
i_return_value =                                 @
   asm_transform_grid_rotate                     @
      (  s_point_labels,                         @
         s_axis,                                 @
         r_angle,                                @
         r_offset,                               @
         s_coord_frame,                          @
         i_nrepeat,                              @
         l_delete_orig,                          @
         s_point_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_grid_xyz_created)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_grid_scale()
#
#                      This file opens a new database "new.db" and
#                      creates 4 points. Later it transforms these
#                      points by scaling them in the x and y
#                      direction, with [ 0 0 0 ] as the origin.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_transform_grid_scale()
#  has the following arguments:
#
#  asm_transform_grid_scale
#     (  point_labels,
#        origin,
#        scale,
#        coord_frame,
#        nrepeat,
#        trans_type,
#        delete_orig,
#        point_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_labels[32]
STRING   s_origin[32]
REAL     ra_scale(3)
STRING   s_coord_frame[32]
INTEGER  i_num_repeat
LOGICAL  l_trans_type
LOGICAL  l_delete_orig
STRING   s_point_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
point_label(TRUE)
 
#  Create 4 point with labels 100 and 200.
i_return_value =                                 @
   asm_const_grid_xyz( "100 200",                @
      "[.5 .5 0.][-.5 .5 0.]",                   @
      "coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_grid_xyz( "300 400",                @
      "[-.5 -.5 0.][.5 -.5 0.]",                 @
      "coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
s_point_labels = "8 9 10 11 12 13 14 15"
s_origin       = "[0 0 0]"
ra_scale(1)    = 2
ra_scale(2)    = 2
ra_scale(3)    = 1
s_coord_frame  = "coord 0"
i_num_repeat   = 2
l_trans_type   = FALSE
l_delete_orig  = FALSE
s_point_list   = "point 100 200 300 400 "
 
#  Transform the points. 
i_return_value =                                 @
   asm_transform_grid_scale                      @
      (  s_point_labels,                         @
         s_origin,                               @
         ra_scale,                               @
         s_coord_frame,                          @
         i_num_repeat,                           @
         l_trans_type,                           @
         l_delete_orig,                          @
         s_point_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_grid_xyz_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_grid_translate()
#
#                      This file opens a new database "new.db" and
#                      creates 4 points. Later it transforms these
#                      points using curvilinear coordinate frame,
#                      translating radially by 2 units.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_transform_grid_translate()
#  has the following arguments:
#
#  asm_transform_grid_translate
#     (  point_labels,
#        delta,
#        coord_frame,
#        nrepeat,
#        trans_type,
#        delete_orig,
#        point_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_labels[32]
STRING   s_delta[32]
STRING   s_coord_frame[32]
INTEGER  i_num_repeat
LOGICAL  l_trans_type
LOGICAL  l_delete_orig
STRING   s_point_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
STRING   sv_asm_create_cord_3po_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
point_label(TRUE)
 
#  Create 4 point with labels 100 and 200.
i_return_value =                                 @
   asm_const_grid_xyz( "100 200",                @
      "[0.75 0.75 0.][1.0 0.5 0.]",              @
      "coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_grid_xyz( "300 400",                @
      "[-0.75 0.75 0.][-1.0 0.5 0.]",            @
      "coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
#  Create a cylindrical coordinate system.
i_return_value =                                 @
   asm_const_coord_3point( "1", "Coord 0", 2,    @
      "[0 0 0]", "[0 0 1]", "[1 0 0]",           @
      sv_asm_create_cord_3po_created )
dump i_return_value
 
s_point_labels = "8 9 10 11 12 13 14 15"
s_delta        = "<3 0 0>"
s_coord_frame  = "coord 1"
i_num_repeat   = 2
l_trans_type   = TRUE
l_delete_orig  = FALSE
s_point_list   = "point 100 200 300 400 "
 
#  Transform the points. 
i_return_value =                                 @
   asm_transform_grid_translate                  @
      (  s_point_labels,                         @
         s_delta,                                @
         s_coord_frame,                          @
         i_num_repeat,                           @
         l_trans_type,                           @
         l_delete_orig,                          @
         s_point_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_grid_xyz_created)
sys_free_string(sv_asm_create_cord_3po_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_grid_vsum()
#
#                      This file opens a new database "new.db" and
#                      creates 4 points. Later it creates grids
#                      by performing vector sum of two existing
#                      set of points.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_transform_grid_vsum()
#  has the following arguments:
#
#  asm_transform_grid_vsum
#     (  point_labels,
#        origin_1,
#        origin_2,
#        scale_1,
#        scale_2,
#        point_list1,
#        point_list2,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_labels[32]
STRING   s_origin_1[32]
STRING   s_origin_2[32]
REAL     ra_scale_1(3)
REAL     ra_scale_2(3)
STRING   s_point_list1[32]
STRING   s_point_list2[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
point_label(TRUE)
 
#  Create 4 point with labels 100,200,300 and 400.
i_return_value =                                 @
   asm_const_grid_xyz( "100 200",                @
      "[0.75 0.75 0.][1.0 0.5 0.]",              @
      "coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_grid_xyz( "300 400",                @
      "[0.75 2.5 0.][1.0 1.5 0.]",               @
      "coord 0",sv_asm_create_grid_xyz_created)
dump i_return_value
 
s_point_labels = "8 9"
s_origin_1     = "[0 0 0]"
s_origin_2     = "[0 0 0]"
ra_scale_1(1)  = 1
ra_scale_1(2)  = 1
ra_scale_1(3)  = 1
ra_scale_2(1)  = 2
ra_scale_2(2)  = 2
ra_scale_2(3)  = 2
s_point_list1  = "point 100 200"
s_point_list2  = "point 300 400"
 
#  Transform the points. 
i_return_value =                                 @
   asm_transform_grid_vsum                       @
      (  s_point_labels,                         @
         s_origin_1,                             @
         s_origin_2,                             @
         ra_scale_1,                             @
         ra_scale_2,                             @
         s_point_list1,                          @
         s_point_list2,                          @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_grid_xyz_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_line_mirror()
#
#                      This file opens a new database "new.db" and
#                      creates two curves. Later it transforms these
#                      curves by mirroring them about a 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 asm_transform_line_mirror()
#  has the following arguments:
#
#  asm_transform_line_mirror
#     (  line_labels,
#        plane,
#        offset,
#        reverse,
#        delete_orig,
#        curve_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_line_labels[32]
STRING   s_plane[32]
REAL     r_offset
LOGICAL  l_reverse
LOGICAL  l_delete_orig
STRING   s_curve_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_line_3point_created_ids[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
curve_label(TRUE)
 
#  Create two curves.
i_return_value =                                 @
   asm_const_line_3point( "1", "[0.0 0.8 0.0]",  @
      "[0.6 1.0 0]", "[0 0 0]", 1, 0.5,          @
      sv_asm_line_3point_created_ids )
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_3point( "2", "[0.0 0.7 0.0]",  @
      "[0.5 0.9 0]", "[0 0.1 0]", 1, 0.5,        @
      sv_asm_line_3point_created_ids )
dump i_return_value
 
s_line_labels = "8 9"
s_plane       = "coord 0.1"
r_offset      = 0.0
l_reverse     = FALSE
l_delete_orig = FALSE
s_curve_list  = "curve 1 2"
 
#  Transform the curves. 
i_return_value =                                 @
   asm_transform_line_mirror                     @
      (  s_line_labels,                          @
         s_plane,                                @
         r_offset,                               @
         l_reverse,                              @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_line_3point_created_ids)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_patch_mirror()
#
#                      This file opens a new database "new.db" and
#                      creates two surfaces. Later it transforms these
#                      surfaces by mirroring them about a 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 asm_transform_patch_mirror()
#  has the following arguments:
#
#  asm_transform_patch_mirror
#     (  patch_labels,
#        plane,
#        offset,
#        reverse,
#        delete_orig,
#        surface_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_patch_labels[32]
STRING   s_plane[32]
REAL     r_offset
LOGICAL  l_reverse
LOGICAL  l_delete_orig
STRING   s_surface_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
surface_label(TRUE)
 
i_return_value =                                 @
   ga_view_aa_set(24.,-34.,0.)
dump i_return_value
 
#  Create two surfaces.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 1 1>",          @
      "[0 0 0]" , "Coord 0",                     @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "2", "<1 0 1>",          @
      "[0 1 0]" , "Coord 0",                     @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
s_patch_labels = "8 9"
s_plane        = "coord 0.1"
r_offset       = 0.0
l_reverse      = FALSE
l_delete_orig  = FALSE
s_surface_list = "surface 1 2"
 
#  Transform the surface. 
i_return_value =                                 @
   asm_transform_patch_mirror                    @
      (  s_patch_labels,                         @
         s_plane,                                @
         r_offset,                               @
         l_reverse,                              @
         l_delete_orig,                          @
         s_surface_list,                         @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_patch_xy_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function sgm_transform_mcord()
#
#                      This file opens a new database "new.db" and
#                      creates a curve and surface. Later it creates
#                      a coordinate frame with label = 1. Finally it
#                      transforms the surface and curve from the
#                      reference coordinate frame to the created
#                      coordinate frame.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_transform_mcord()
#  has the following arguments:
#
#  sgm_transform_mcord
#     (  entity_labels,
#        entity_type,
#        coord_frame_1,
#        coord_frame_2,
#        delete_orig,
#        curve_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_entity_labels[32]
STRING   s_entity_type[32]
STRING   s_coord_frame_1[32]
STRING   s_coord_frame_2[32]
LOGICAL  l_delete_orig
STRING   s_curve_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_line_2point_created_ids[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_asm_create_cord_3po_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
surface_label(TRUE)
curve_label(TRUE)
 
#  Create a surface with label 100.
i_return_value =                                 @
   asm_const_patch_xyz( "100", "<0.8 0.8 0>",    @
      "[0.5 0.5 0]", "Coord 0",                  @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
#  Create a line with label 300.
i_return_value =                                 @
   asm_const_line_2point( "300", "[0.2 0.2 0]",  @
      "[1.0 0.5 0.]", 0, "", 50., 1,             @
      sv_asm_line_2point_created_ids )
dump i_return_value
 
#  Create a coordinate with label = 1.
i_return_value =                                 @
   asm_const_coord_3point( "1", "Coord 0", 1,    @
      "[1  1 1]", "[1 1 2]", "[2 1 1]",          @
      sv_asm_create_cord_3po_created )
dump i_return_value
 
s_entity_labels = "8"
s_coord_frame_1 = "coord 0"
s_coord_frame_2 = "coord 1"
l_delete_orig   = FALSE
s_curve_list    = "surface 100"
s_entity_type   = "surface"
 
#  Transform the surface. 
i_return_value =                                 @
   sgm_transform_mcord                           @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         s_coord_frame_1,                        @
         s_coord_frame_2,                        @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
s_curve_list  = "curve 300"
s_entity_type = "curve"
 
#  Transform the curve. 
i_return_value =                                 @
   sgm_transform_mcord                           @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         s_coord_frame_1,                        @
         s_coord_frame_2,                        @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_line_2point_created_ids)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_asm_create_cord_3po_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function sgm_transform_mirror()
#
#                      This file opens a new database "new.db" and
#                      creates two surfaces and two curves. Later it
#                      transforms these surfaces and curves by
#                      mirroring them about a 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 sgm_transform_mirror()
#  has the following arguments:
#
#  sgm_transform_mirror
#     (  entity_labels,
#        entity_type,
#        plane,
#        offset,
#        reverse,
#        delete_orig,
#        curve_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_entity_labels[32]
STRING   s_entity_type[32]
STRING   s_plane[32]
REAL     r_offset
LOGICAL  l_reverse
LOGICAL  l_delete_orig
STRING   s_curve_list[128]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_asm_line_3point_created_ids[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
surface_label(TRUE)
curve_label(TRUE)
 
i_return_value =                                 @
   ga_view_aa_set(24.,-34.,0.)
dump i_return_value
 
#  Create two surfaces.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 1 1><1 0 1>",   @
      "[0 0 0][0 1 0]" , "Coord 0",              @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
#  Create two curves.
i_return_value =                                 @
   asm_const_line_3point( "1", "[0.0 0.8 0.0]",  @
      "[0.6 1.0 0]", "[0 0 0]", 1, 0.5,          @
      sv_asm_line_3point_created_ids )
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_3point( "2", "[0.0 0.7 0.0]",  @
      "[0.5 0.9 0]", "[0 0.1 0]", 1, 0.5,        @
      sv_asm_line_3point_created_ids )
dump i_return_value
 
s_entity_labels = "8 9"
s_plane         = "coord 0.1"
r_offset        = 0.0
l_reverse       = FALSE
l_delete_orig   = FALSE
s_curve_list    = "surface 1 2"
s_entity_type   = "surface"
 
#  Transform the surface. 
i_return_value =                                 @
   sgm_transform_mirror                          @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         s_plane,                                @
         r_offset,                               @
         l_reverse,                              @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
#---------------------------------------------------------------------
 
s_curve_list  = "curve 1 2"
s_entity_type = "curve"
 
#  Transform the curves. 
i_return_value =                                 @
   sgm_transform_mirror                          @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         s_plane,                                @
         r_offset,                               @
         l_reverse,                              @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_asm_line_3point_created_ids)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function sgm_transform_pivot()
#
#                      This file opens a new database "new.db" and
#                      creates a surface and curve.Later it transforms
#                      these surface and curve by pivoting 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 sgm_transform_pivot()
#  has the following arguments:
#
#  sgm_transform_pivot
#     (  entity_labels,
#        entity_type,
#        pivot_point_1,
#        pivot_point_2,
#        pivot_point_3,
#        delete_orig,
#        curve_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_entity_labels[32]
STRING   s_entity_type[32]
STRING   s_pivot_point_1[32]
STRING   s_pivot_point_2[32]
STRING   s_pivot_point_3[32]
LOGICAL  l_delete_orig
STRING   s_curve_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_asm_line_2point_created_ids[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
surface_label(TRUE)
curve_label(TRUE)
 
#  Create a surface with label 100.
i_return_value =                                 @
   asm_const_patch_xyz( "100", "<0.8 0.8 0>",    @
      "[0.5 0.5 0]", "Coord 0",                  @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
#  Create a line with label 300.
i_return_value =                                 @
   asm_const_line_2point( "300", "[0.2 0.2 0]",  @
      "[1.0 0.5 0.]", 0, "", 50., 1,             @
      sv_asm_line_2point_created_ids )
dump i_return_value
 
s_entity_labels = "8"
s_pivot_point_1 = "[0 0 0]"
s_pivot_point_2 = "[1 1 1]"
s_pivot_point_3 = "[-1 1 1]"
l_delete_orig   = FALSE
s_curve_list    = "surface 100"
s_entity_type   = "surface"
 
#  Transform the surface. 
i_return_value =                                 @
   sgm_transform_pivot                           @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         s_pivot_point_1,                        @
         s_pivot_point_2,                        @
         s_pivot_point_3,                        @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
s_curve_list  = "curve 300"
s_entity_type = "curve"
 
#  Transform the curve. 
i_return_value =                                 @
   sgm_transform_pivot                           @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         s_pivot_point_1,                        @
         s_pivot_point_2,                        @
         s_pivot_point_3,                        @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_asm_line_2point_created_ids)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_transform_position()
#
#                      This file opens a new database "new.db" and
#                      creates a surface and a curve. Later it
#                      transforms these surface and curve by position
#                      transformation.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_transform_position()
#  has the following arguments:
#
#  sgm_transform_position
#     (  entity_labels,
#        entity_type,
#        point_1,
#        point_2,
#        point_3,
#        point_4,
#        point_5,
#        point_6,
#        delete_orig,
#        curve_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_entity_labels[32]
STRING   s_entity_type[32]
STRING   s_point_1[32]
STRING   s_point_2[32]
STRING   s_point_3[32]
STRING   s_point_4[32]
STRING   s_point_5[32]
STRING   s_point_6[32]
LOGICAL  l_delete_orig
STRING   s_curve_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_asm_line_2point_created_ids[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
curve_label(TRUE)
surface_label(TRUE)
 
#  Create a surface with label 100.
i_return_value =                                 @
   asm_const_patch_xyz( "100", "<0.8 0.8 0>",    @
      "[0.5 0.5 0]", "Coord 0",                  @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
#  Create a line with label 300.
i_return_value =                                 @
   asm_const_line_2point( "300", "[0.2 0.2 0]",  @
      "[1.0 0.5 0.]", 0, "", 50., 1,             @
      sv_asm_line_2point_created_ids )
dump i_return_value
 
s_entity_labels = "8"
s_point_1       = "[0 0 0]"
s_point_2       = "[0 1 0]"
s_point_3       = "[1 0 0]"
s_point_4       = "[-1 1 0]"
s_point_5       = "[-2 1 0]"
s_point_6       = "[-1 2 0]"
l_delete_orig   = FALSE
s_curve_list    = "surface 100 "
s_entity_type   = "surface"
 
#  Transform the surface. 
i_return_value =                                 @
   sgm_transform_position                        @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         s_point_1,                              @
         s_point_2,                              @
         s_point_3,                              @
         s_point_4,                              @
         s_point_5,                              @
         s_point_6,                              @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
s_curve_list  = "curve 300 "
s_entity_type = "curve"
 
#  Transform the curve. 
i_return_value =                                 @
   sgm_transform_position                        @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         s_point_1,                              @
         s_point_2,                              @
         s_point_3,                              @
         s_point_4,                              @
         s_point_5,                              @
         s_point_6,                              @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_asm_line_2point_created_ids)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of two calls to 
#                      the function sgm_transform_rotate()
#
#                      This file opens a new database "new.db" and
#                      creates a curve and a surface. Later it 
#                      transforms these surface and curve by 30 
#                      degrees with a initial offset angle of 60 
#                      degrees and repeating the operation four times
#                      about the z axis.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_transform_rotate()
#  has the following arguments:
#
#  sgm_transform_rotate
#     (  entity_labels,
#        entity_type,
#        axis,
#        angle,
#        offset,
#        coord_frame,
#        nrepeat,
#        delete_orig,
#        curve_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_entity_labels[32]
STRING   s_entity_type[32]
STRING   s_axis[32]
REAL     r_angle
REAL     r_offset
STRING   s_coord_frame[32]
INTEGER  i_num_repeat
LOGICAL  l_delete_orig
STRING   s_curve_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
STRING   sv_asm_line_2point_created_ids[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
surface_label(TRUE)
curve_label(TRUE)
 
#  Create a surface with label 100.
i_return_value =                                 @
   asm_const_patch_xyz( "100", "<0.8 0.8 0>",    @
      "[0.5 0.5 0]", "Coord 0",                  @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
#  Create a line with label 300.
i_return_value =                                 @
   asm_const_line_2point( "300", "[0.2 0.2 0]",  @
      "[1.0 0.5 0.]", 0, "", 50., 1,             @
      sv_asm_line_2point_created_ids )
dump i_return_value
 
s_entity_labels = "8 9 10 11"
s_axis          = "coord 0.3"
r_angle         = 60.0
r_offset        = 30.0
s_coord_frame   = "coord 0"
i_num_repeat    = 4
l_delete_orig   = FALSE
s_curve_list    = "surface 100"
s_entity_type   = "surface"
 
#  Transform the points. 
i_return_value =                                 @
   sgm_transform_rotate                          @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         s_axis,                                 @
         r_angle,                                @
         r_offset,                               @
         s_coord_frame,                          @
         i_num_repeat,                           @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
#---------------------------------------------------------------------
 
s_curve_list  = "curve 300 "
s_entity_type = "curve"
 
#  Transform the curve. 
i_return_value =                                 @
   sgm_transform_rotate                          @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         s_axis,                                 @
         r_angle,                                @
         r_offset,                               @
         s_coord_frame,                          @
         i_num_repeat,                           @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_create_grid_xyz_created)
sys_free_string(sv_asm_line_2point_created_ids)
sys_free_string(sv_asm_create_patch_xy_created)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_transform_scale()
#
#                      This file opens a new database "new.db" and
#                      creates curve and surface. Later it transforms
#                      these curve and surface by scaling them in the
#                      x and y direction, with [0 0 0] as the origin.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_transform_scale()
#  has the following arguments:
#
#  sgm_transform_scale
#     (  entity_labels,
#        entity_type,
#        scale,
#        origin,
#        coord_frame,
#        nrepeat,
#        delete_orig,
#        curve_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_entity_labels[32]
STRING   s_entity_type[32]
REAL     ra_scale(3)
STRING   s_origin[32]
STRING   s_coord_frame[32]
INTEGER  i_num_repeat
LOGICAL  l_delete_orig
STRING   s_curve_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_line_2point_created_ids[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
curve_label(TRUE)
surface_label(TRUE)
 
#  Create a surface with label 100.
i_return_value =                                 @
   asm_const_patch_xyz( "100", "<0.8 0.8 0>",    @
      "[0.5 0.5 0]", "Coord 0",                  @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
#  Create a line with label 300.
i_return_value =                                 @
   asm_const_line_2point( "300", "[0.2 0.2 0]",  @
      "[1.0 0.5 0.]", 0, "", 50., 1,             @
      sv_asm_line_2point_created_ids )
dump i_return_value
 
s_entity_labels =  "8 9"
s_origin        = "[0 0 0]"
ra_scale(1)     = 2
ra_scale(2)     = 2
ra_scale(3)     = 1
s_coord_frame   = "coord 0"
i_num_repeat    = 2
l_delete_orig   = FALSE
s_curve_list    = "surface 100"
s_entity_type   = "surface"
 
#  Transform the surface. 
i_return_value =                                 @
   sgm_transform_scale                           @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         ra_scale,                               @
         s_origin,                               @
         s_coord_frame,                          @
         i_num_repeat,                           @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
s_curve_list  = "curve 300"
s_entity_type = "curve"
 
#  Transform the curve. 
i_return_value =                                 @
   sgm_transform_scale                           @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         ra_scale,                               @
         s_origin,                               @
         s_coord_frame,                          @
         i_num_repeat,                           @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_line_2point_created_ids)
sys_free_string(sv_asm_create_patch_xy_created)
#---------------------------------------------------------------------
 
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_solid_vsum()
#
#                      This file opens a new database "new.db" and
#                      creates 2 solids. Later it creates a solid
#                      by vector summing the 2 solids.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_transform_solid_vsum()
#  has the following arguments:
#
#  asm_transform_solid_vsum
#     (  solid_ids,
#        origin_1,
#        origin_2,
#        scales_1,
#        scales_2,
#        solid_list1,
#        solid_list2,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_solid_ids[32]
STRING   s_origin_1[32]
STRING   s_origin_2[32]
REAL     ra_scales_1(3)
REAL     ra_scales_2(3)
STRING   s_solid_list1[32]
STRING   s_solid_list2[32]
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_hpat_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
i_return_value =                                 @
   ga_view_aa_set(23.,-34.,0.)
dump i_return_value
 
solid_label(TRUE)
 
#  Create two solids.
i_return_value =                                 @
   asm_const_hpat_xyz( "1", "<1 1 1>",           @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_hpat_xyz_created )
dump i_return_value
i_return_value =                                 @
   asm_const_hpat_xyz( "2", "<0.5 0.5 0.5>",     @
      "[2 1 1]", "Coord 0",                      @
      sv_asm_create_hpat_xyz_created )
dump i_return_value
 
#  Transform the solids.
s_solid_ids   = "8"
s_origin_1    = "[0 0 0]"
s_origin_2    = "[0 0 0]"
ra_scales_1   = [ 2.0 2.0 2.0 ]
ra_scales_2   = [ 2.0 2.0 2.0 ]
s_solid_list1 = "solid 1"
s_solid_list2 = "solid 2"
 
i_return_value =                                 @
   asm_transform_solid_vsum                      @
      (  s_solid_ids,                            @
         s_origin_1,                             @
         s_origin_2,                             @
         ra_scales_1,                            @
         ra_scales_2,                            @
         s_solid_list1,                          @
         s_solid_list2,                          @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_hpat_xyz_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_transform_surface_vsum()
#
#                      This file opens a new database "new.db" and
#                      creates 2 surfaces. Later it creates a surface
#                      by vector summing the 2 surfaces.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_transform_surface_vsum()
#  has the following arguments:
#
#  asm_transform_surface_vsum
#     (  surface_ids,
#        origin_1,
#        origin_2,
#        scales_1,
#        scales_2,
#        surface_list1,
#        surface_list2,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_surface_ids[32]
STRING   s_origin_1[32]
STRING   s_origin_2[32]
REAL     ra_scales_1(3)
REAL     ra_scales_2(3)
STRING   s_surface_list1[32]
STRING   s_surface_list2[32]
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
i_return_value =                                 @
   ga_view_aa_set(23.,-34.,0.)
dump i_return_value
 
surface_label(TRUE)
 
#  Create two surfaces.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 0 1>",          @
      "[0 1 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value =                                 @
   asm_const_patch_xyz( "2", "<0.5 0 0.5>",      @
      "[0 0.5 0]", "Coord 0",                    @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
#  Transform the surfaces.
s_surface_ids   = "8"
s_origin_1      = "[0 0 0]"
s_origin_2      = "[0 0 0]"
ra_scales_1     = [ 1.0 1.0 1.0 ]
ra_scales_2     = [ 1.0 1.0 1.0 ]
s_surface_list1 = "surface 1"
s_surface_list2 = "surface 2"
 
i_return_value =                                 @
   asm_transform_surface_vsum                    @
      (  s_surface_ids,                          @
         s_origin_1,                             @
         s_origin_2,                             @
         ra_scales_1,                            @
         ra_scales_2,                            @
         s_surface_list1,                        @
         s_surface_list2,                        @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_transform_translate()
#
#                      This file opens a new database "new.db" and
#                      creates a curve and surface. Later it
#                      transforms these surface and curve using
#                      curvilinear coordinate frame,translating 
#                      radially by 2 units.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_transform_translate()
#  has the following arguments:
#
#  sgm_transform_translate
#     (  entity_labels,
#        entity_type,
#        delta,
#        coord_frame,
#        nrepeat,
#        delete_orig,
#        curve_list,
#        created_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_entity_labels[32]
STRING   s_entity_type[32]
STRING   s_delta[32]
STRING   s_coord_frame[32]
INTEGER  i_num_repeat
LOGICAL  l_delete_orig
STRING   s_curve_list[32]
STRING   sv_created_labels[VIRTUAL]
STRING   sv_asm_line_2point_created_ids[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_asm_create_cord_3po_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
curve_label(TRUE)
surface_label(TRUE)
 
#  Create a surface with label 100.
i_return_value =                                 @
   asm_const_patch_xyz( "100", "<0.8 0.8 0>",    @
      "[0.5 0.5 0]", "Coord 0",                  @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
#  Create a line with label 300.
i_return_value =                                 @
   asm_const_line_2point( "300", "[0.2 0.2 0]",  @
      "[1.0 0.5 0.]", 0, "", 50., 1,             @
      sv_asm_line_2point_created_ids )
dump i_return_value
 
#  Create a cylindrical coordinate system.
i_return_value =                                 @
   asm_const_coord_3point( "1", "Coord 0", 2,    @
      "[0 0 0]", "[0 0 1]", "[1 0 0]",           @
      sv_asm_create_cord_3po_created )
dump i_return_value
 
s_entity_labels = "8 9"
s_delta         = "<3 3 0>"
s_coord_frame   = "coord 1"
i_num_repeat    = 2
l_delete_orig   = FALSE
s_curve_list    = "surface 100"
s_entity_type   = "surface"
 
#  Transform the surface. 
i_return_value =                                 @
   sgm_transform_translate                       @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         s_delta,                                @
         s_coord_frame,                          @
         i_num_repeat,                           @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
s_curve_list  = "curve 300"
s_entity_type = "curve"
 
#  Transform the curve. 
i_return_value =                                 @
   sgm_transform_translate                       @
      (  s_entity_labels,                        @
         s_entity_type,                          @
         s_delta,                                @
         s_coord_frame,                          @
         i_num_repeat,                           @
         l_delete_orig,                          @
         s_curve_list,                           @
         sv_created_labels )
dump i_return_value
dump sv_created_labels
 
sys_free_string(sv_created_labels)
sys_free_string(sv_asm_line_2point_created_ids)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_asm_create_cord_3po_created)
#---------------------------------------------------------------------
 
Edit Actions
This section contains examples of some of the functions used to implement the “Edit” actions.
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_edit_curve_blend()
#
#                      This file opens a new database "new.db" and 
#                      creates five lines. Later it blends the curves
#                      such that first derivative continuity is
#                      enforced at the boundaries.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_edit_curve_blend()
#  has the following arguments:
#
#  asm_edit_curve_blend
#     (  curve_ids,
#        weights,
#        curve_list,
#        delete_orig,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_ids[32]
STRING   s_weights[32]
STRING   s_curve_list[32]
LOGICAL  l_delete_orig
STRING   sv_asm_create_line_xyz_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
 
s_curve_ids = "#"
#  Create five lines with sharp edges.
i_return_value =                                 @
   asm_const_line_xyz( "1", "<1 1 0>", "[0 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "2", "<1 0 0>", "[1 1 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "3", "<1 -1 0>","[2 1 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "4", "<1 0 0>", "[3 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "5", "<1 1 0>", "[4 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
s_weights = "1e-6 1.0 1.0 1e6"
s_curve_list = "curve 1:5"
l_delete_orig = FALSE
 
i_return_value =                                 @
   asm_edit_curve_blend                          @
      (  s_curve_ids,                            @
         s_weights,                              @
         s_curve_list,                           @
         l_delete_orig,                          @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_line_xyz_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_edit_curve_merge()
#
#                      This file opens a new database "new.db" and 
#                      creates five lines. Later it merges the curves
#                      to three cubic curves.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_edit_curve_merge()
#  has the following arguments:
#
#  asm_edit_curve_merge
#     (  curve_ids,
#        curve_list,
#        ncurves,
#        geotol,
#        niterations,
#        delete_orig,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_ids[32]
STRING   s_curve_list[32]
INTEGER  i_ncurves
REAL     r_geotol
INTEGER  i_niterations
LOGICAL  l_delete_orig
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_line_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
s_curve_ids = "#"
curve_label(TRUE)
 
#  Create five curves.
i_return_value =                                 @
   asm_const_line_xyz( "1", "<1 1 0>", "[0 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "2", "<1 0 0>", "[1 1 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "3", "<1 -1 0>","[2 1 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "4", "<1 0 0>", "[3 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "5", "<1 1 0>", "[4 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
s_curve_list = "curve 1:5"
i_ncurves = 3
r_geotol = 0.005
i_niterations = 0
l_delete_orig = FALSE
 
i_return_value =                                 @
   asm_edit_curve_merge                          @
      (  s_curve_ids,                            @
         s_curve_list,                           @
         i_ncurves,                              @
         r_geotol,                               @
         i_niterations,                          @
         l_delete_orig,                          @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_line_xyz_created)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_edit_solid_blend()
#
#                      This file opens a new database "new.db" and
#                      creates three solids. Later it blends the
#                      solids such that first derivative continuity
#                      is enforced at the boundaries.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_edit_solid_blend()
#  has the following arguments:
#
#  asm_edit_solid_blend
#     (  solid_ids,
#        weights,
#        solid_list,
#        delete_orig,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_solid_ids[32]
STRING   s_weights[32]
STRING   s_solid_list[32]
LOGICAL  l_delete_orig
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_hpat_xyz_created[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_sgm_solid_2surface_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
solid_label(TRUE)
s_solid_ids = "#"
 
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Create three surfaces.
i_return_value =                                 @
   asm_const_patch_xyz("1","<0 2 1>","[0 0 0]",  @
      "Coord 0",sv_asm_create_patch_xy_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "2","<0 1 1>","[1 0 0]", @
      "Coord 0",sv_asm_create_patch_xy_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "3","<0 1 1>","[2 0 0]", @
      "Coord 0",sv_asm_create_patch_xy_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "4","<0 .2 1>","[3 0 0]",@
      "Coord 0",sv_asm_create_patch_xy_created)
dump i_return_value
 
i_return_value =                                 @
   sgm_const_solid_2surface_v1( "1", TRUE,       @
      "Surface 1 ", "Surface 2 ",                @
      sv_sgm_solid_2surface_created)
dump i_return_value
 
i_return_value =                                 @
   sgm_const_solid_2surface_v1( "2", TRUE,       @
      "Surface 2 ", "Surface 3 ",                @
      sv_sgm_solid_2surface_created)
dump i_return_value
 
i_return_value =                                 @
   sgm_const_solid_2surface_v1( "3", TRUE,       @
      "Surface 3 ", "Surface 4 ",                @
      sv_sgm_solid_2surface_created)
dump i_return_value
 
s_weights = "1 "
s_solid_list = "solid 1:3"
l_delete_orig = TRUE
 
#  Blend the solids.
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
i_return_value =                                 @
   asm_edit_solid_blend                          @
      (  s_solid_ids,                            @
         s_weights,                              @
         s_solid_list,                           @
         l_delete_orig,                          @
         sv_created_ids )
$? YES 38000221
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_hpat_xyz_created)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_sgm_solid_2surface_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_edit_surface_blend()
#
#                      This file opens a new database "new.db" and 
#                      creates three surfaces. Later it blends the
#                      surfaces such that first derivative continuity
#                      is enforced at the boundaries.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_edit_surface_blend()
#  has the following arguments:
#
#  asm_edit_surface_blend
#     (  surface_ids,
#        edge_list,
#        weights,
#        surface_list,
#        delete_orig,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_surface_ids[32]
STRING   s_edge_list[32]
STRING   s_weights[32]
STRING   s_surface_list[32]
LOGICAL  l_delete_orig
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_sgm_surface_2curve_created[VIRTUAL]
STRING   sv_asm_create_line_xyz_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
 
surface_label(TRUE)
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
s_surface_ids = "#"
 
#  Create three surfaces.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 0 1>",          @
      "[0 4 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "1", "<0 0 1>",           @
      "[2 3 0]", "Coord 0",                      @
      sv_asm_create_line_xyz_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "2", "<0 0 1>",           @
      "[7 2 0]", "Coord 0",                      @
      sv_asm_create_line_xyz_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_surface_2curve( "2", "surface 1.2 ",@
      "Curve 1 ",sv_sgm_surface_2curve_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_surface_2curve( "3", "Curve 1 ",    @
      "Curve 2 ",sv_sgm_surface_2curve_created )
dump i_return_value
 
s_weights = "1e-6 0.8 0.5"
s_edge_list = "Surface 1.2 2.2 3.2"
s_surface_list = "surface 1:3"
l_delete_orig = FALSE
 
#  Blend the surfaces.
i_return_value =                                 @
   asm_edit_surface_blend                        @
      (  s_surface_ids,                          @
         s_edge_list,                            @
         s_weights,                              @
         s_surface_list,                         @
         l_delete_orig,                          @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_asm_create_line_xyz_created)
sys_free_string(sv_sgm_surface_2curve_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_edit_hpat_blend()
#
#                      This file opens a new database "new.db" and
#                      creates a three hpats. Later it blends the 
#                      hpats such that the first derivative continuity
#                      is enforced across surface boundaries between 
#                      adjacent hpats.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_edit_hpat_blend()
#  has the following arguments:
#
#  asm_edit_hpat_blend
#     (  hpat_ids,
#        weights,
#        hpat_list,
#        delete_orig,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_hpat_ids[32] = "#"
STRING   s_weights[32]
STRING   s_hpat_list[32]
LOGICAL  l_delete_orig
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_hpat_xyz_created[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_sgm_solid_2surface_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
solid_label(TRUE)
 
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
s_hpat_ids = "#"
 
#  Create three solid surfaces.
i_return_value =                                 @
   asm_const_patch_xyz("1","<0 2 1>","[0 0 0]",  @
      "Coord 0",sv_asm_create_patch_xy_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "2","<0 1 1>","[1 0 0]", @
      "Coord 0",sv_asm_create_patch_xy_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "3","<0 1 1>","[2 0 0]", @
      "Coord 0",sv_asm_create_patch_xy_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "4","<0 .2 1>","[3 0 0]",@
      "Coord 0",sv_asm_create_patch_xy_created)
dump i_return_value
 
i_return_value =                                 @
   sgm_const_solid_2surface_v1( "1", TRUE,       @
      "Surface 1 ", "Surface 2 ",                @
      sv_sgm_solid_2surface_created)
dump i_return_value
 
i_return_value =                                 @
   sgm_const_solid_2surface_v1( "2", TRUE,       @
      "Surface 2 ", "Surface 3 ",                @
      sv_sgm_solid_2surface_created)
dump i_return_value
 
i_return_value =                                 @
   sgm_const_solid_2surface_v1( "3", TRUE,       @
      "Surface 3 ", "Surface 4 ",                @
      sv_sgm_solid_2surface_created)
dump i_return_value
 
s_weights = "1 "
s_hpat_list = "solid 1:3"
l_delete_orig = TRUE
 
#  Blend the solids.
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Blend the surfaces.
i_return_value =                                 @
   asm_edit_hpat_blend                           @
      (  s_hpat_ids,                             @
         s_weights,                              @
         s_hpat_list,                            @
         l_delete_orig,                          @
         sv_created_ids )
$? YES 1000031
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_hpat_xyz_created)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_sgm_solid_2surface_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of three calls
#                      to the function asm_edit_hpat_break()
#
#                      This file opens a new database "new.db" and
#                      creates a solid,a surface intersecting the 
#                      solid and a curve on one of the surfaces.
#                      Later it breaks the solid by using break type
#                      surface,curve and parametric position.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_edit_hpat_break()
#  has the following arguments:
#
#  asm_edit_hpat_break
#     (  hpat_ids,
#        break_type,
#        break_entity_list,
#        param_pos,
#        delete_orig,
#        solid_list,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_hpat_ids[32] = "8"
INTEGER  i_break_type
STRING   s_break_entity_list[32]
REAL     ra_param_pos(3)
LOGICAL  l_delete_orig
STRING   s_solid_list[32]
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_sgm_solid_2surface_created[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_asm_line_2point_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
solid_label(TRUE)
s_hpat_ids = "8"
 
#  Create a solid ,surface and a curve.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 0 1>",          @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "2", "<0.5 0 0.5>",      @
      "[0.5 2 0]", "Coord 0",                    @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_solid_2surface_v1( "1", TRUE,       @
      "Surface 1 ", "Surface 2 ",                @
      sv_sgm_solid_2surface_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "3", "<-2.5 0 -2.5>",    @
      "[2 1 2]", "Coord 0",                      @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_2point( "1", "[1 0 0.5]",      @
      "Point 7 ", 0, "", 50., 1,                 @
      sv_asm_line_2point_created )
dump i_return_value
 
l_delete_orig  = FALSE
 
#  Break the hpat with break type surface.
i_break_type = 3
s_break_entity_list = "surface 3"
s_solid_list = "solid 1"
i_return_value =                                 @
   asm_edit_hpat_break                           @
      (  s_hpat_ids,                             @
         i_break_type,                           @
         s_break_entity_list,                    @
         ra_param_pos,                           @
         l_delete_orig,                          @
         s_solid_list,                           @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
#  Break the hpat with break type curve.
s_hpat_ids = "100"
i_break_type = 2
s_break_entity_list = "curve 1"
s_solid_list = "solid 8"
i_return_value =                                 @
   asm_edit_hpat_break                           @
      (  s_hpat_ids,                             @
         i_break_type,                           @
         s_break_entity_list,                    @
         ra_param_pos,                           @
         l_delete_orig,                          @
         s_solid_list,                           @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
#  Break the hpat with break type parametric position.
s_hpat_ids = "200"
i_break_type = 0
s_solid_list = "solid 9"
ra_param_pos(1) = 0.0
ra_param_pos(2) = 0.0
ra_param_pos(3) = 0.5
 
i_return_value =                                 @
   asm_edit_hpat_break                           @
      (  s_hpat_ids,                             @
         i_break_type,                           @
         s_break_entity_list,                    @
         ra_param_pos,                           @
         l_delete_orig,                          @
         s_solid_list,                           @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_sgm_solid_2surface_created)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_asm_line_2point_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_edit_hpat_reverse()
#
#                      This file opens a new database "new.db" and
#                      creates a solid. Later it reverses the
#                      parametric directions of the solid using the
#                      above function.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_edit_hpat_reverse()
#  has the following arguments:
#
#  asm_edit_hpat_reverse
#     (  hpat_list,
#        reversed_labels )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_hpat_list[32]
STRING   sv_reversed_labels[VIRTUAL]
STRING   sv_asm_create_hpat_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
i_return_value =                                 @
   ga_group_display_set("default_group","general")
dump i_return_value
 
i_return_value =                                 @
   ga_display_parametric_set("general",1)
dump i_return_value
 
#  Create a Solid.
i_return_value =                                 @
   asm_const_hpat_xyz( "1", "<1 1 1>",           @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_hpat_xyz_created )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Reverse the Solid.
s_hpat_list = "solid 1"
i_return_value =                                 @
   asm_edit_hpat_reverse                         @
      (  s_hpat_list,                            @
         sv_reversed_labels )
dump i_return_value
dump sv_reversed_labels
 
#  Note the change of parametric directions.
 
sys_free_string(sv_reversed_labels)
sys_free_string(sv_asm_create_hpat_xyz_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_edit_line_blend()
#
#                      This file opens a new database "new.db" and 
#                      creates five lines. Later it blends the curves
#                      such that first derivative continuity is
#                      enforced at the boundaries.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_edit_line_blend()
#  has the following arguments:
#
#  asm_edit_line_blend
#     (  line_ids,
#        weights,
#        curve_list,
#        delete_orig,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_line_ids[32]
STRING   s_weights[32]
STRING   s_curve_list[32]
LOGICAL  l_delete_orig
STRING   sv_asm_create_line_xyz_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
 
curve_label(TRUE)
s_line_ids = "#"
 
#  Create five lines with sharp edges.
i_return_value =                                 @
   asm_const_line_xyz( "1", "<1 1 0>", "[0 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "2", "<1 0 0>", "[1 1 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "3", "<1 -1 0>","[2 1 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "4", "<1 0 0>", "[3 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "5", "<1 1 0>", "[4 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
s_weights = "1e-6 1.0 1.0 1e6"
s_curve_list = "curve 1:5"
l_delete_orig = FALSE
 
i_return_value =                                 @
   asm_edit_line_blend                           @
      (  s_line_ids,                             @
         s_weights,                              @
         s_curve_list,                           @
         l_delete_orig,                          @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_line_xyz_created)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_edit_line_merge()
#
#                      This file opens a new database "new.db" and 
#                      creates five lines. Later it merges the lines
#                      to three lines curves.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_edit_line_merge()
#  has the following arguments:
#
#  asm_edit_line_merge
#     (  line_ids,
#        curve_list,
#        nlines,
#        geotol,
#        niterations,
#        delete_orig,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_line_ids[32]
STRING   s_curve_list[32]
INTEGER  i_nlines
REAL     r_geotol
INTEGER  i_niterations
LOGICAL  l_delete_orig
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_line_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
s_line_ids = "#"
curve_label(TRUE)
 
#  Create five curves.
i_return_value =                                 @
   asm_const_line_xyz( "1", "<1 1 0>", "[0 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "2", "<1 0 0>", "[1 1 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "3", "<1 -1 0>","[2 1 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "4", "<1 0 0>", "[3 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "5", "<1 1 0>", "[4 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
s_curve_list = "curve 1:5"
i_nlines = 3
r_geotol = 0.005
i_niterations = 0
l_delete_orig = FALSE
 
i_return_value =                                 @
   asm_edit_line_merge                           @
      (  s_line_ids,                             @
         s_curve_list,                           @
         i_nlines,                               @
         r_geotol,                               @
         i_niterations,                          @
         l_delete_orig,                          @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_line_xyz_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_edit_patch_blend()
#
#                      This file opens a new database "new.db" and 
#                      creates three surfaces. Later it blends the
#                      surfaces such that first derivative continuity
#                      is enforced at the boundaries.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_edit_patch_blend()
#  has the following arguments:
#
#  asm_edit_patch_blend
#     (  patch_ids,
#        weights,
#        surface_list,
#        delete_orig,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_patch_ids[32]
STRING   s_edge_list[32]
STRING   s_weights[32]
STRING   s_surface_list[32]
LOGICAL  l_delete_orig
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_sgm_surface_2curve_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
s_patch_ids = "#"
surface_label(TRUE)
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
 
#  Create three surfaces.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 0 1>",          @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "2", "<1 0 1>",          @
      "[3 1 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_surface_2curve( "3", "surface 1.2", @
      "surface 2.4",sv_sgm_surface_2curve_created)
dump i_return_value
 
s_weights = "0.5"
s_edge_list = ""
s_surface_list = "surface 1:3"
l_delete_orig = TRUE
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Blend the surfaces.
i_return_value =                                 @
   asm_edit_patch_blend                          @
      (  s_patch_ids,                            @
         s_edge_list,                            @
         s_weights,                              @
         s_surface_list,                         @
         l_delete_orig,                          @
         sv_created_ids )
$? YES 1000030
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_sgm_surface_2curve_created)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_edit_patch_break()
#
#                      This file opens a new database "new.db" and
#                      creates a surface. Later it breaks it by
#                      parametric option. Finally it breaks one
#                      of the divided surface by point option.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_edit_patch_break()
#  has the following arguments:
#
#  asm_edit_patch_break
#     (  patch_ids,
#        break_type,
#        break_entity_list,
#        param_pos,
#        delete_orig,
#        surface_list,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_patch_ids[32]
INTEGER  i_break_type
STRING   s_break_entity_list[32]
REAL     ra_param_pos(2)
LOGICAL  l_delete_orig
STRING   s_surface_list[32]
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
surface_label(TRUE)
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
s_patch_ids = "8"
 
#  Create surface.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 1 0>",          @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
l_delete_orig  = FALSE
 
#  Break the patch with break type parametric position.
i_break_type = 0
s_surface_list = "surface 1"
ra_param_pos(1) = 0.3
ra_param_pos(2) = 0.3
 
i_return_value =                                 @
   asm_edit_patch_break                          @
      (  s_patch_ids,                            @
         i_break_type,                           @
         s_break_entity_list,                    @
         ra_param_pos,                           @
         l_delete_orig,                          @
         s_surface_list,                         @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
#  Break the patch with break type point option.
s_patch_ids = "200"
i_break_type = 1
s_surface_list = "surface 8"
s_break_entity_list = "point 1"
 
i_return_value =                                 @
   asm_edit_patch_break                          @
      (  s_patch_ids,                            @
         i_break_type,                           @
         s_break_entity_list,                    @
         ra_param_pos,                           @
         l_delete_orig,                          @
         s_surface_list,                         @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_brep_break_plane()
#
#                      This file opens a new database "new.db" and
#                      creates a solid and a plane. Later it breaks
#                      the surface along the plane using the above 
#                      function.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_brep_break_plane()
#  has the following arguments:
#
#  sgm_edit_brep_break_plane
#     (  solid_list,
#        plane_list,
#        delete_flag,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_solid_list[32]
STRING   s_plane_list[32]
LOGICAL  l_delete_flag
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_hpat_xyz_created[VIRTUAL]
STRING   sv_sgm_create_plane_3p_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
solid_label(TRUE)
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
#  Create a Solid.
i_return_value =                                 @
   asm_const_hpat_xyz( "1", "<1 1 1>",           @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_hpat_xyz_created )
dump i_return_value
 
#  Create a Plane.
i_return_value =                                 @
   sgm_const_plane_3point( "1", "[0.5 0.5 0.5]", @
      "[0.85 0.25 0.25]", "[0.25 0.25 0.85]",    @
      sv_sgm_create_plane_3p_created )
dump i_return_value
 
s_solid_list = "solid 1"
s_plane_list = "plane 1"
l_delete_flag = FALSE
 
#  Break the solid with a plane.
i_return_value =                                 @
   sgm_edit_brep_break_plane                     @
      (  s_solid_list,                           @
         s_plane_list,                           @
         l_delete_flag,                          @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_hpat_xyz_created)
sys_free_string(sv_sgm_create_plane_3p_created)
#---------------------------------------------------------------------
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_brep_break_surface()
#
#                      This file opens a new database "new.db" and
#                      creates a solid and a surface. Later it breaks
#                      the solid along the surface using the above 
#                      function.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_brep_break_surface()
#  has the following arguments:
#
#  sgm_edit_brep_break_surface
#     (  solid_list,
#        surface_list,
#        delete_flag,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_solid_list[32]
STRING   s_surface_list[32]
LOGICAL  l_delete_flag
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_hpat_xyz_created[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
solid_label(TRUE)
 
#  Create a Solid.
i_return_value =                                 @
   asm_const_hpat_xyz( "1", "<1 1 1>",           @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_hpat_xyz_created )
dump i_return_value
 
#  Create a Surface.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 1.5 1.2>",      @
      "[0.3 0 -0.5]", "Coord 0",                 @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
s_solid_list = "solid 1"
s_surface_list = "surface 1"
l_delete_flag = FALSE
 
#  Break the solid with a surface.
i_return_value =                                 @
   sgm_edit_brep_break_surface                   @
      (  s_solid_list,                           @
         s_surface_list,                         @
         l_delete_flag,                          @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_hpat_xyz_created)
sys_free_string(sv_asm_create_patch_xy_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_curve_break_parametric()
#
#                      This file opens a new database "new.db" and
#                      creates two circular curves. Later it breaks
#                      the curves at a parametric value of 0.4.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_curve_break_parametric()
#  has the following arguments:
#
#  sgm_edit_curve_break_parametric
#     (  curve_ids,
#        c_pos,
#        curve_list,
#        delete_orig,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_ids[32]
REAL     r_c_pos
STRING   s_curve_list[32]
LOGICAL  l_delete_orig
STRING   sv_created_ids[VIRTUAL]
STRING   sv_sgm_create_curve_2d_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
curve_label(TRUE)
s_curve_ids = "#"
 
r_c_pos =  0.4
s_curve_list = "curve 1 2"
l_delete_orig = TRUE
 
#  Create two curves.
i_return_value =                                 @
   sgm_const_curve_2d_circle_v1( "1", 1, 1.,     @
      "Coord 0.3", "", "[0 0 0]", TRUE,          @
      sv_sgm_create_curve_2d_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_curve_2d_circle_v1( "2", 1, 0.7,    @
      "Coord 0.3", "", "[0 0 0]", TRUE,          @
      sv_sgm_create_curve_2d_created )
dump i_return_value
 
#  Break the Curve.
i_return_value =                                 @
   sgm_edit_curve_break_parametric               @
      (  s_curve_ids,                            @
         r_c_pos,                                @
         s_curve_list,                           @
         l_delete_orig,                          @
         sv_created_ids )
$? YES 38000217
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_sgm_create_curve_2d_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_curve_break_plane()
#
#                      This file opens a new database "new.db" and
#                      creates two circular curves and a plane. Later
#                      it breaks the curves using the created 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 sgm_edit_curve_break_plane()
#  has the following arguments:
#
#  sgm_edit_curve_break_plane
#     (  curve_ids,
#        plane_list,
#        curve_list,
#        delete_flag,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_ids[32]
STRING   s_plane_list[32] 
STRING   s_curve_list[32]
LOGICAL  l_delete_flag
STRING   sv_created_ids[VIRTUAL]
STRING   sv_sgm_create_curve_2d_created[VIRTUAL]
STRING   sv_sgm_create_plane_3p_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
curve_label(TRUE)
s_curve_ids = "#"
 
#  Create two curves.
i_return_value =                                 @
   sgm_const_curve_2d_circle_v1( "1", 1, 1.,     @
      "Coord 0.3", "", "[0 0 0]", TRUE,          @
      sv_sgm_create_curve_2d_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_curve_2d_circle_v1( "2", 1, 0.7,    @
      "Coord 0.3", "", "[0 0 0]", TRUE,          @
      sv_sgm_create_curve_2d_created )
dump i_return_value
 
#  Create  a Plane.
i_return_value =                                 @
   sgm_const_plane_3point( "1", "[0.2 0.2 0.2]", @
      "[0.85 0.25 0.25]", "[0.25 0.25 0.85]",    @
      sv_sgm_create_plane_3p_created )
dump i_return_value
 
s_plane_list = "plane 1"
s_curve_list = "curve 1 2"
l_delete_flag = TRUE
 
#  Break the Curve.
i_return_value =                                 @
   sgm_edit_curve_break_plane                    @
      (  s_curve_ids,                            @
         s_plane_list,                           @
         s_curve_list,                           @
         l_delete_flag,                          @
         sv_created_ids )
$? YESFORALL 38000217
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_sgm_create_plane_3p_created)
sys_free_string(sv_sgm_create_curve_2d_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_curve_break_point()
#
#                      This file opens a new database "new.db" and
#                      creates two circular curves. Later it breaks
#                      the curves at two points.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_curve_break_point()
#  has the following arguments:
#
#  sgm_edit_curve_break_point
#     (  curve_ids,
#        point_list,
#        curve_list,
#        delete_orig,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_ids[32]
STRING   s_point_list[32]
STRING   s_curve_list[32]
LOGICAL  l_delete_orig
STRING   sv_created_ids[VIRTUAL]
STRING   sv_sgm_create_curve_2d_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
curve_label(TRUE)
s_curve_ids = "#"
 
#  Create two curves.
i_return_value =                                 @
   sgm_const_curve_2d_circle_v1( "1", 1, 1.,     @
      "Coord 0.3", "", "[0 0 0]", TRUE,          @
      sv_sgm_create_curve_2d_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_curve_2d_circle_v1( "2", 1, 0.7,    @
      "Coord 0.3", "", "[0 0 0]", TRUE,          @
      sv_sgm_create_curve_2d_created )
dump i_return_value
 
s_point_list = "[-1 0 0] [0.7 0 0]"
s_curve_list = "curve 1 2"
l_delete_orig = TRUE
 
#  Break the Curve.
i_return_value =                                 @
   sgm_edit_curve_break_point                    @
      (  s_curve_ids,                            @
         s_point_list,                           @
         s_curve_list,                           @
         l_delete_orig,                          @
         sv_created_ids )
$? YES 38000217
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_sgm_create_curve_2d_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_curve_disassemble()
#
#                      In this illustration, a new database is opened
#                      2 lines are created. Then  the two curves are 
#                      joined to create a chain of curves. Finally 
#                      the function is called to disassemble 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 sgm_edit_curve_disassemble()
#  has the following arguments:
#
#  sgm_edit_curve_disassemble
#     (  curve_list,
#        delete_original )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_list[32]
LOGICAL  l_delete_original
STRING   sv_asm_create_line_xyz_creat_id[VIRTUAL]
INTEGER  i_sgm_create_curve_cha_seg_id
STRING   sv_sgm_create_curve_ch_creat_id[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the curves
curve_label(TRUE)
 
#  Create 2 curves
i_return_value =                                 @
   asm_const_line_xyz( "", "<1 0 0><0 1 0>",     @
      "[0 0 0][0 0 0]", "Coord 0",               @
      sv_asm_create_line_xyz_creat_id )
dump i_return_value
 
#  Create a chain of curve using Curve 1 2. Delete the original
#  curves.
i_return_value =                                 @
   sgm_create_curve_chain_v1( "", "Curve 1 2 ",  @
      TRUE, i_sgm_create_curve_cha_seg_id,       @
      sv_sgm_create_curve_ch_creat_id )
$? YES 38000217
dump i_return_value
 
#  Observe the Curve 3. It is a chain.
#  Session file paused. Press "Resume" to continue....
sf_pause()
#---------------------------------------------------------------------
#  Disassemble the Curve 3 into Curve 4 & 5. Delete the Curve 3.
#
s_curve_list = "Curve 3"
l_delete_original = TRUE
 
i_return_value =                                 @
   sgm_edit_curve_disassemble                    @
      (  s_curve_list,                           @
         l_delete_original )
$? YES 38000217
 
dump i_return_value
 
sys_free_string( sv_asm_create_line_xyz_creat_id )
sys_free_string( sv_sgm_create_curve_ch_creat_id )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_curve_extend_1curve()
#
#                      This file opens a new database "new.db" and
#                      creates a semi circular curve. Later it 
#                      extends the curve using the above function.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_curve_extend_1curve()
#  has the following arguments:
#
#  sgm_edit_curve_extend_1curve
#     (  curve_ids,
#        extend_type,
#        length_type,
#        curve_length,
#        curveextendpoint,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_ids[32]
INTEGER  i_extend_type
INTEGER  i_length_type
REAL     r_curve_length
STRING   s_curveextendpoint[256]
STRING   sv_created_ids[VIRTUAL]
STRING   sv_sgm_create_curve_2d_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
curve_label(TRUE)
s_curve_ids = "#"
 
#  Create a semi-circular curve.
i_return_value =                                       @
   sgm_const_curve_2d_arcangles_v1( "1", 1.,90.,       @
      270., "Coord 0.3", "[0 0 0]",                    @
      TRUE, sv_sgm_create_curve_2d_created )
dump i_return_value
 
i_extend_type = 2
i_length_type = 2
r_curve_length = 0.5
s_curveextendpoint = "Construct PointCurveUOnCurve     @
   (Evaluate Geometry (Point 1 )) (Evaluate Geo" //    @
   "metry (Curve 1 ))"
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Extend the curve
i_return_value =                                       @
   sgm_edit_curve_extend_1curve                        @
      (  s_curve_ids,                                  @
         i_extend_type,                                @
         i_length_type,                                @
         r_curve_length,                               @
         s_curveextendpoint,                           @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_sgm_create_curve_2d_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_curve_extend_2curve()
#
#                      This file opens a new database "new.db" and
#                      creates two curves. Later it extends the 
#                      curves upto their intersection point.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_curve_extend_2curve()
#  has the following arguments:
#
#  sgm_edit_curve_extend_2curve
#     (  curve_ids,
#        curve1_list,
#        curve2_list,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_ids[32]
STRING   s_curve1_list[32]
STRING   s_curve2_list[32]
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_line_3point_created_ids[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
curve_label(TRUE)
s_curve_ids = "#"
 
#  Create two curves.
i_return_value =                                 @
   asm_const_line_3point( "1", "[0.5 0.8 0.0]",  @
      "[1.1 1.0 0]", "[0.5 0 0]", 1, 0.5,        @
      sv_asm_line_3point_created_ids )
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_3point( "2", "[-0.5 0.8 0.0]", @
      "[-1.1 1.0 0]", "[-0.5 0 0]", 1, 0.5,      @
      sv_asm_line_3point_created_ids )
dump i_return_value
 
s_curve1_list = "curve 1"
s_curve2_list = "curve 2"
 
# Session file paused.Press resume to continue.
sf_pause()
 
#  Extend the two curves till their intersection point.
i_return_value =                                 @
   sgm_edit_curve_extend_2curve                  @
      (  s_curve_ids,                            @
         s_curve1_list,                          @
         s_curve2_list,                          @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_line_3point_created_ids)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_curve_extend_circle()
#
#                      This file opens a new database "new.db" and
#                      creates a curve. Later it extends the curve
#                      by creating a full circle.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_curve_extend_circle()
#  has the following arguments:
#
#  sgm_edit_curve_extend_circle
#     (  curve_ids,
#        curveextendpoint,
#        delete_orig,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_ids[32]
STRING   s_curveextendpoint[256]
LOGICAL  l_delete_orig
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_line_3point_created_ids[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
curve_label(TRUE)
s_curve_ids = "#"
 
#  Create a curve.
i_return_value =                                             @
   asm_const_line_3point( "1", "[0.5 0.8 0.0]",              @
      "[1.1 1.0 0]", "[0.5 0 0]", 1, 0.5,                    @
      sv_asm_line_3point_created_ids )
dump i_return_value
 
s_curveextendpoint = " Construct PointCurveUOnCurve(Evaluate @
   Geometry (Point 1 )) (Evaluate Geometry (Curve 1 ))"
 
l_delete_orig = FALSE
 
#  Session file paused. Press "Resume" to continue...
sf_pause()
 
# Extend the curve by creating a full circle.
i_return_value =                                             @
   sgm_edit_curve_extend_circle                              @
      (  s_curve_ids,                                        @
         s_curveextendpoint,                                 @
         l_delete_orig,                                      @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_line_3point_created_ids)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_curve_extend_points()
#
#                      This file opens a new database "new.db" and
#                      creates a curve and two points. Later it
#                      extends the curve through the created points. 
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_curve_extend_points()
#  has the following arguments:
#
#  sgm_edit_curve_extend_points
#     (  curve_ids,
#        curve,
#        point_list,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_ids[32]
STRING   s_curve[32]
STRING   s_point_list[32]
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_line_xyz_created[VIRTUAL]
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Create a curve and two points.
i_return_value =                                   @
   asm_const_line_xyz( "1", "<1 1 0>", "[0 0 0]",  @
      "Coord 0", sv_asm_create_line_xyz_created )
dump i_return_value
 
i_return_value =                                   @
   asm_const_grid_xyz("3 4","[1.3 1.1 0][.8 .9 0]",@
      "Coord 0",sv_asm_create_grid_xyz_created )
dump i_return_value
 
s_curve = "curve 1"
s_point_list = "point 3 4 "
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Extend the curve.
i_return_value =                                   @
   sgm_edit_curve_extend_points                    @
      (  s_curve_ids,                              @
         s_curve,                                  @
         s_point_list,                             @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_line_xyz_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_curve_merge()
#
#                      This file opens a new database "new.db" and 
#                      creates five lines. Later it merges the curves
#                      to three cubic curves.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_curve_merge()
#  has the following arguments:
#
#  sgm_edit_curve_merge
#     (  curve_ids,
#        curve_list,
#        num_curves,
#        merge_tol,
#        delete_original,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_ids[32]
STRING   s_curve_list[32]
INTEGER  i_num_curves
REAL     r_merge_tol
LOGICAL  l_delete_original
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_line_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
curve_label(TRUE)
s_curve_ids = "#"
 
#  Create five curves.
i_return_value =                                 @
   asm_const_line_xyz( "1", "<1 1 0>", "[0 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "2", "<1 0 0>", "[1 1 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "3", "<1 -1 0>","[2 1 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "4", "<1 0 0>", "[3 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_xyz( "5", "<1 1 0>", "[4 0 0]",@
      "Coord 0",sv_asm_create_line_xyz_created)
dump i_return_value
 
s_curve_list = "curve 1:5"
i_num_curves = 3
r_merge_tol = 0.005
l_delete_original = FALSE
 
i_return_value =                                 @
   sgm_edit_curve_merge                          @
      (  s_curve_ids,                            @
         s_curve_list,                           @
         i_num_curves,                           @
         r_merge_tol,                            @
         l_delete_original,                      @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_line_xyz_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_curve_refit()
#
#                      This file opens a new database "new.db" and
#                      creates a curve. Later it refits this curve 
#                      using the above function.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_curve_refit()
#  has the following arguments:
#
#  sgm_edit_curve_refit
#     (  curve_ids,
#        curve_list,
#        refit_method,
#        refit_tolerance,
#        ncurves,
#        delete_original,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_ids[32] 
STRING   s_curve_list[32]
INTEGER  i_refit_method
REAL     r_refit_tolerance
INTEGER  i_ncurves
LOGICAL  l_delete_original
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_line_3point_created_ids[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
s_curve_ids = "8"
curve_label(TRUE)
 
#  Create a Curve.
i_return_value =                                 @
   asm_const_line_3point( "1", "[0 0 0]",        @
      "[0.5 0.5 0]", "[1 0.4 0]", 1, 0.5,        @
      sv_asm_line_3point_created_ids )
dump i_return_value
 
s_curve_list = "curve 1"
i_refit_method = 2
r_refit_tolerance = 0.005
i_ncurves = 2
l_delete_original = FALSE
 
#  Refit the curve.
i_return_value =                                 @
   sgm_edit_curve_refit                          @
      (  s_curve_ids,                            @
         s_curve_list,                           @
         i_refit_method,                         @
         r_refit_tolerance,                      @
         i_ncurves,                              @
         l_delete_original,                      @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_line_3point_created_ids)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_curve_reverse()
#
#                      This file opens a new database "new.db" and
#                      creates a curve and sets the display for 
#                      parametric direction. Later it reverses the
#                      parametric direction using the above function. 
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_curve_reverse()
#  has the following arguments:
#
#  sgm_edit_curve_reverse
#     (  reverse_mesh,
#        curve_list,
#        reversed_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_reverse_mesh
STRING   s_curve_list[32]
STRING   sv_reversed_ids[VIRTUAL]
STRING   sv_asm_line_3point_created_ids[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
i_return_value =                                 @
   ga_group_display_set("default_group","general")
dump i_return_value
 
i_return_value =                                 @
   ga_display_parametric_set("general",1)
dump i_return_value
 
#  Create one curve.
i_return_value =                                 @
   asm_const_line_3point( "1", "[0 0 0 ]",       @
      "[0.5 0.5 0]", "[1.0 0.8 0]", 1, 0.5,      @
      sv_asm_line_3point_created_ids )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Reverse the parameterization of the curve.
l_reverse_mesh = FALSE
s_curve_list = "curve 1"
 
i_return_value =                                 @
   sgm_edit_curve_reverse                        @
      (  l_reverse_mesh,                         @
         s_curve_list,                           @
         sv_reversed_ids )
dump i_return_value
dump sv_reversed_ids
 
sys_free_string(sv_reversed_ids)
sys_free_string(sv_asm_line_3point_created_ids )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_curve_trim_parametric()
#
#                      This file opens a new database "new.db" and
#                      creates a curve. Later it trims the curve
#                      at parametric position of 0.5.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_curve_trim_parametric()
#  has the following arguments:
#
#  sgm_edit_curve_trim_parametric
#     (  c_pos,
#        curve_trimpoint,
#        trimmed_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
REAL     r_c_pos
STRING   s_curve_trimpoint[256]
STRING   sv_trimmed_ids[VIRTUAL]
STRING   sv_asm_line_3point_created_ids[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Create a curve.
i_return_value =                                                @
   asm_const_line_3point( "1", "[0 0 0 ]",                      @
      "[0.5 0.5 0]", "[1.0 0.0 0]", 1, 0.5,                     @
      sv_asm_line_3point_created_ids )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
r_c_pos = 0.5
s_curve_trimpoint = "Construct PointCurveUOnCurve (Evaluate" // @
" Geometry (Point 2 )) (Evaluate Geometry (Curve 1 ))"
 
#  Trim the curve.
i_return_value =                                                @
   sgm_edit_curve_trim_parametric                               @
      (  r_c_pos,                                               @
         s_curve_trimpoint,                                     @
         sv_trimmed_ids )
dump i_return_value
dump sv_trimmed_ids
 
sys_free_string(sv_trimmed_ids)
sys_free_string(sv_asm_line_3point_created_ids )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_curve_trim_point()
#
#                      This file opens a new database "new.db" and
#                      creates a curve. Later it trims the curve
#                      at a particular point.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_curve_trim_point()
#  has the following arguments:
#
#  sgm_edit_curve_trim_point
#     (  trimpoint,
#        curve_trimpoint,
#        trimmed_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_trimpoint[32]
STRING   s_curve_trimpoint[256]
STRING   sv_trimmed_ids[VIRTUAL]
STRING   sv_asm_line_3point_created_ids[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Create a curve.
i_return_value =                                                @
   asm_const_line_3point( "1", "[0 0 0 ]",                      @
      "[0.5 0.5 0]", "[1.0 0.0 0]", 1, 0.5,                     @
      sv_asm_line_3point_created_ids )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
s_trimpoint = "[0.6 0.48 0]"
s_curve_trimpoint = "Construct PointCurveUOnCurve (Evaluate" // @
" Geometry (Point 2 )) (Evaluate Geometry (Curve 1 ))"
 
#  Trim the curve.
i_return_value =                                                @
   sgm_edit_curve_trim_point                                    @
      (  s_trimpoint,                                           @
         s_curve_trimpoint,                                     @
         sv_trimmed_ids )
dump i_return_value
dump sv_trimmed_ids
 
sys_free_string(sv_trimmed_ids)
sys_free_string(sv_asm_line_3point_created_ids )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_solid_break_v1()
#
#                      This file opens a new database "new.db" and
#                      creates a solid,a surface intersecting the 
#                      solid and a curve on one of the surfaces.
#                      Later it breaks the solid by using break type
#                      surface,curve and parametric position.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_solid_break_v1()
#  has the following arguments:
#
#  sgm_edit_solid_break_v1
#     (  solid_ids,
#        break_type,
#        break_entity_list,
#        param_pos,
#        delete_orig,
#        solid_list,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_solid_ids[32]
INTEGER  i_break_type
STRING   s_break_entity_list[32]
REAL     ra_param_pos(3)
LOGICAL  l_delete_orig
STRING   s_solid_list[32]
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_sgm_solid_2surface_created[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_asm_line_2point_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
solid_label(TRUE)
s_solid_ids = "8"
 
#  Create a solid ,surface and a curve.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 0 1>",          @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "2", "<0.5 0 0.5>",      @
      "[0.5 2 0]", "Coord 0",                    @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_solid_2surface_v1( "1", TRUE,       @
      "Surface 1 ", "Surface 2 ",                @
      sv_sgm_solid_2surface_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "3", "<-2.5 0 -2.5>",    @
      "[2 1 2]", "Coord 0",                      @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_2point( "1", "[1 0 0.5]",      @
      "Point 7 ", 0, "", 50., 1,                 @
      sv_asm_line_2point_created )
dump i_return_value
 
l_delete_orig  = FALSE
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Break the solid with break type surface.
i_break_type = 4
s_break_entity_list = "surface 3"
s_solid_list = "solid 1"
i_return_value =                                 @
   sgm_edit_solid_break_v1                       @
      (  s_solid_ids,                            @
         i_break_type,                           @
         s_break_entity_list,                    @
         ra_param_pos,                           @
         l_delete_orig,                          @
         s_solid_list,                           @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Break the solid with break type curve.
s_solid_ids = "100"
i_break_type = 3
s_break_entity_list = "curve 1"
s_solid_list = "solid 8"
i_return_value =                                 @
   sgm_edit_solid_break_v1                       @
      (  s_solid_ids,                            @
         i_break_type,                           @
         s_break_entity_list,                    @
         ra_param_pos,                           @
         l_delete_orig,                          @
         s_solid_list,                           @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Break the solid with break type parametric position.
s_solid_ids = "200"
i_break_type = 1
s_solid_list = "solid 9"
ra_param_pos(1) = 0.0
ra_param_pos(2) = 0.0
ra_param_pos(3) = 0.5
 
i_return_value =                                 @
   sgm_edit_solid_break_v1                       @
      (  s_solid_ids,                            @
         i_break_type,                           @
         s_break_entity_list,                    @
         ra_param_pos,                           @
         l_delete_orig,                          @
         s_solid_list,                           @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_sgm_solid_2surface_created)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_asm_line_2point_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_solid_disassemble()
#
#                      In this illustration, a new database is opened.
#                      A solid is created. Then the function is called
#                      to disassemble the solid into its subordinate
#                      surface faces.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function sgm_edit_solid_disassemble()
#  has the following arguments:
#
#  sgm_edit_solid_disassemble
#     (  solid_list,
#        delete_orig,
#        crtd_lab )
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_solid_list[32]
LOGICAL  l_delete_orig
STRING   sv_crtd_lab[VIRTUAL]
INTEGER  i_return_value
STRING   sv_asm_create_hpat_xyz_creat_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the surfaces and solids.
surface_label(TRUE)
solid_label(TRUE)
 
# Create a solid.
i_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
 
#  Change the view
i_return_value =                                 @
   ga_view_aa_set( -67., 0., -34. )
dump i_return_value
 
#  Observe the solid created.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to disassemble the solid into its subordinate
#  surface faces.
#
s_solid_list = " Solid 1"
l_delete_orig = TRUE
 
i_return_value =                                 @
   sgm_edit_solid_disassemble                    @
      (  s_solid_list,                           @
         l_delete_orig,                          @
         sv_crtd_lab )
$? YES 38000221
dump i_return_value
 
#  The surfaces created
dump sv_crtd_lab
 
sys_free_string( sv_crtd_lab )
sys_free_string( sv_asm_create_hpat_xyz_creat_id )
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_surface_break()
#
#                      This file opens a new database "new.db" and
#                      creates a surface and a curve. Later it breaks
#                      it by parametric option. Then it breaks one
#                      of the divided surface by point option.Finally
#                      it breaks other divided surface by curve
#                      option.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_surface_break()
#  has the following arguments:
#
#  sgm_edit_surface_break
#     (  surface_ids,
#        surface,
#        delete_orig,
#        break_method,
#        iuv,
#        uv,
#        point1,
#        point2,
#        curve,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_surface_ids[32]
STRING   s_surface[32]
LOGICAL  l_delete_orig
INTEGER  i_break_method
INTEGER  i_iuv
REAL     r_uv
STRING   s_point1[32]
STRING   s_point2[32]
STRING   s_curve[32]
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_asm_line_2point_created_ids[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
surface_label(TRUE)
s_surface_ids = "8"
 
#  Create surface and a curve.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 1 0>",          @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_2point( "1", "[-0.3 0.2 0.0]", @
      "[1.2 0.2 0.0]", 0, "", 50., 1,            @
      sv_asm_line_2point_created_ids )
dump i_return_value
 
l_delete_orig  = FALSE
 
#  Break the patch with break type parametric position.
s_surface =  "surface 1"
i_break_method = 1
i_iuv = 2
r_uv = 0.3
 
i_return_value =                                 @
   sgm_edit_surface_break                        @
      (  s_surface_ids,                          @
         s_surface,                              @
         l_delete_orig,                          @
         i_break_method,                         @
         i_iuv,                                  @
         r_uv,                                   @
         s_point1,                               @
         s_point2,                               @
         s_curve,                                @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Break the patch with break type point option.
s_surface_ids = "100"
s_surface =  "surface 9"
i_break_method = 2
s_point1 = "[0.0 0.7 0.0] "
s_point2 = "[1.0 0.9 0.0] "
 
i_return_value =                                 @
   sgm_edit_surface_break                        @
      (  s_surface_ids,                          @
         s_surface,                              @
         l_delete_orig,                          @
         i_break_method,                         @
         i_iuv,                                  @
         r_uv,                                   @
         s_point1,                               @
         s_point2,                               @
         s_curve,                                @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Break the patch with break type curve option.
s_surface_ids = "200"
s_surface =  "surface 8"
i_break_method = 3
s_curve = "curve 1"
i_return_value =                                 @
   sgm_edit_surface_break                        @
      (  s_surface_ids,                          @
         s_surface,                              @
         l_delete_orig,                          @
         i_break_method,                         @
         i_iuv,                                  @
         r_uv,                                   @
         s_point1,                               @
         s_point2,                               @
         s_curve,                                @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_asm_line_2point_created_ids)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_surface_break_v1()
#
#                      This file opens a new database "new.db" and
#                      creates three surfaces and a curve. Later it
#                      breaks the two surfaces using the surface
#                      option. Later it breaks the divided surface
#                      using curve option
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_surface_break_v1()
#  has the following arguments:
#
#  sgm_edit_surface_break_v1
#     (  surface_ids,
#        surface_list,
#        delete_orig,
#        break_type,
#        iuv
#        uv,
#        point1_list,
#        point2_list,
#        break_entity_list,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_surface_ids[32]
STRING   s_surface_list[32]
LOGICAL  l_delete_orig
INTEGER  i_break_type
INTEGER  i_iuv
REAL     r_uv
STRING   s_point1_list[32]
STRING   s_point2_list[32]
STRING   s_break_entity_list[32]
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_asm_line_2point_created_ids[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
surface_label(TRUE)
s_surface_ids = "8"
 
#  Create surface and a curve.
i_return_value =                                 @
   asm_const_patch_xyz( "1 2 3",                 @
      "<1 1 0><1 1 0><3.0 0 2.2>",               @
      "[0 0 0][1.2 0 0][-0.2 0.6 0]", "Coord 0", @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_2point( "1", "[-0.3 0.2 0.0]", @
      "[2.5 0.2 0.0]", 0, "", 50., 1,            @
      sv_asm_line_2point_created_ids )
dump i_return_value
 
l_delete_orig  = TRUE
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Break the surface with break type surface option.
s_surface_list =  "surface 1 2"
i_break_type = 4
s_break_entity_list = "surface 3 3"
i_return_value =                                 @
   sgm_edit_surface_break_v1                     @
      (  s_surface_ids,                          @
         s_surface_list,                         @
         l_delete_orig,                          @
         i_break_type,                           @
         i_iuv,                                  @
         r_uv,                                   @
         s_point1_list,                          @
         s_point2_list,                          @
         s_break_entity_list,                    @
         sv_created_ids )
$? YES 38000219
dump i_return_value
dump sv_created_ids
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Break the surface with break type curve option.
s_surface_ids = "100"
s_surface_list =  "surface 8 10"
i_break_type = 3
s_break_entity_list = "curve 1 1"
i_return_value =                                 @
   sgm_edit_surface_break_v1                     @
      (  s_surface_ids,                          @
         s_surface_list,                         @
         l_delete_orig,                          @
         i_break_type,                           @
         i_iuv,                                  @
         r_uv,                                   @
         s_point1_list,                          @
         s_point2_list,                          @
         s_break_entity_list,                    @
         sv_created_ids )
$? YES 38000219
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_asm_line_2point_created_ids)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_surface_break_plane()
#
#                      This file opens a new database "new.db" and
#                      creates two surfaces and a plane. Later
#                      it breaks the surfaces using the created 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 sgm_edit_surface_break_plane()
#  has the following arguments:
#
#  sgm_edit_surface_break_plane
#     (  surface_ids,
#        surface_list,
#        plane_list,
#        delete_flag,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_surface_ids[32]
STRING   s_plane_list[32]
STRING   s_surface_list[32]
LOGICAL  l_delete_flag
STRING   sv_created_ids[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
STRING   sv_sgm_create_plane_3p_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
surface_label(TRUE)
s_surface_ids = "8"
 
#  Create two surfaces.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 1 0>",          @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "2", "<1 1 0>",          @
      "[1.1 0 0]", "Coord 0",                    @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
#  Create  a Plane.
i_return_value =                                 @
   sgm_const_plane_3point( "1", "[0 0.2 0]",     @
      "[0.25 0.25 -0.25]", "[0.25 0.25 0.25]",   @
      sv_sgm_create_plane_3p_created )
dump i_return_value
 
s_plane_list = "plane 1 1"
s_surface_list = "surface 1 2" 
l_delete_flag = TRUE
 
#  Break the surface.
i_return_value =                                 @
   sgm_edit_surface_break_plane                  @
      (  s_surface_ids,                          @
         s_surface_list,                         @
         s_plane_list,                           @
         l_delete_flag,                          @
         sv_created_ids )
$? YESFORALL 38000219
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_sgm_create_plane_3p_created)
sys_free_string(sv_asm_create_patch_xy_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_surface_disassemble()
#
#                      In this illustration, a new database is opened.
#                      A trimmed surface is created. The function is 
#                      called to disassemble the trimmed surface into
#                      its parent surface and edge curves.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function sgm_edit_surface_disassemble()
#  has the following arguments:
#
#  sgm_edit_surface_disassemble
#     (  surface_list,
#        delete_orig )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_surface_list[128]
LOGICAL  l_delete_orig
INTEGER  i_return_value
STRING   s_output_ids[128]
STRING   s_curveo_list[128]
STRING   s_curvei_list[128]
STRING   s_surface[128]
LOGICAL  l_delete_ocurve
LOGICAL  l_delete_icurve
LOGICAL  l_delete_surf
STRING   s_created_ids[128]
INTEGER  i_sgm_create_curve_aut_segt_id
STRING   sv_asm_create_patch_xy_creat_id[VIRTUAL]
STRING   sv_asm_create_grid_xyz_creat_id[VIRTUAL]
STRING   sv_asm_line_2point_creat_id[VIRTUAL]
STRING   sv_sgm_create_curve_2d_creat_id[VIRTUAL]
STRING   sv_sgm_creat_cur_creat_curve_id[VIRTUAL]
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Show the labels of the surfaces and curves.
surface_label(TRUE)
curve_label(TRUE)
 
#  Create a patch.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<10 10 0>",        @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_creat_id )
dump i_return_value
 
#  Create 4 points.
i_return_value =                                 @
   asm_const_grid_xyz( "", "[5 0 0] [0 5 0] "//  @
      "[5 10 0][10 5 0]",                        @
      "Coord 0", sv_asm_create_grid_xyz_creat_id )
dump i_return_value
 
#  Create 4 curves.
i_return_value =                                 @
   asm_const_line_2point( "", "Point 5:8 ",      @
      "Point 6 7 8 5", 0, "", 50., 1,            @
      sv_asm_line_2point_creat_id )
dump i_return_value
 
#  Create a circular curve.
i_return_value =                                 @
   sgm_const_curve_2d_circle_v1( "", 1, 1.,      @
      "Coord 0.3", "", "[5 5 0]", TRUE ,         @
      sv_sgm_create_curve_2d_creat_id )
dump i_return_value
 
#  Convert the Curve 1:4 into a chain curve.
i_return_value =                                 @
   sgm_create_curve_chain_v1( "10",              @
   " Curve 1:4", TRUE,                           @
   i_sgm_create_curve_aut_segt_id,               @
   sv_sgm_creat_cur_creat_curve_id )
$? YES 38000217
 
#  Observe the curves and the surface.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to create a trimmed surface inside Surface 1
#  with Curve 10 as outer boundary trim curve and Curve 5 as inner
#  boundary trim curve.
#
s_output_ids = "2"
s_curveo_list = "Curve 10"
s_curvei_list = "Curve 5"
s_surface = "Surface 1"
l_delete_ocurve = TRUE
l_delete_icurve = TRUE
l_delete_surf = TRUE
 
i_return_value =                                 @
   sgm_create_surface_trimmed                    @
      (  s_output_ids,                           @
         s_curveo_list,                          @
         s_curvei_list,                          @
         s_surface,                              @
         l_delete_ocurve,                        @
         l_delete_icurve,                        @
         l_delete_surf,                          @
         s_created_ids )
$? YES 38000217
$? YES 38000217
$? YES 38000219
dump i_return_value
 
#  Created surface is 
dump s_created_ids
 
#  Observe the trimmed surface created.
#  Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
#  Call the function to disassemble the trimmed surface into its
#  parent surface.
#
s_surface_list = "Surface 2"
l_delete_orig = TRUE
 
i_return_value =                                 @
   sgm_edit_surface_disassemble                  @
      (  s_surface_list,                         @
         l_delete_orig )
$? YES 38000219
dump i_return_value
 
sys_free_string( sv_asm_create_patch_xy_creat_id )
sys_free_string( sv_asm_create_grid_xyz_creat_id )
sys_free_string( sv_asm_line_2point_creat_id )
sys_free_string( sv_sgm_create_curve_2d_creat_id )
sys_free_string( sv_sgm_creat_cur_creat_curve_id )
 
#  Press "Refresh Graphics" radio button to repaint the graphics 
#  window.
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_surface_refit()
#
#                      This file opens a new database "new.db" and
#                      creates a surface. Later it refits the surface 
#                      using the above function.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_surface_refit()
#  has the following arguments:
#
#  sgm_edit_surface_refit
#     (  curve_ids,
#        refit_to_nurbs,
#        refit_tolerance,
#        delete_original,
#        surface_list,
#        created_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_ids[32]
LOGICAL  l_refit_to_nurbs
REAL     r_refit_tolerance
LOGICAL  l_delete_original
STRING   s_surface_list[32]
STRING   sv_created_ids[VIRTUAL]
STRING   sv_sgm_create_curve_2d_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
surface_label(TRUE)
s_curve_ids = "#"
 
#  Create two surfaces.
i_return_value =                                 @
   sgm_const_curve_2d_arcangles_v1( "1", 1.,     @
      30., 150., "Coord 0.3", "[0 0 0]", FALSE , @
      sv_sgm_create_curve_2d_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_surface_revolve("1","coord 0.1",90.,@
      0.,"coord 0","curve 1",sv_created_ids)
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
s_surface_list = "surface 1"
l_refit_to_nurbs = FALSE
r_refit_tolerance = 0.005
l_delete_original = FALSE
 
#  Refit the curve.
i_return_value =                                 @
   sgm_edit_surface_refit                        @
      (  s_curve_ids,                            @
         l_refit_to_nurbs,                       @
         r_refit_tolerance,                      @
         l_delete_original,                      @
         s_surface_list,                         @
         sv_created_ids )
dump i_return_value
dump sv_created_ids
 
sys_free_string(sv_created_ids)
sys_free_string(sv_sgm_create_curve_2d_created)
#---------------------------------------------------------------------
 
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function sgm_edit_surface_reverse()
#
#                      This file opens a new database "new.db" and
#                      creates a surface and sets the display for
#                      parametric direction. Later it reverses the
#                      parametric direction using the above function.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function sgm_edit_surface_reverse()
#  has the following arguments:
#
#  sgm_edit_surface_reverse
#     (  reverse_mesh,
#        surface_list,
#        reversed_ids )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_reverse_mesh
STRING   s_surface_list[32]
STRING   sv_reversed_ids[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
i_return_value =                                 @
   ga_view_aa_set( 23., -34., 0. )
dump i_return_value
 
i_return_value =                                 @
   ga_group_display_set("default_group","general")
dump i_return_value
 
i_return_value =                                 @
   ga_display_parametric_set("general",1)
dump i_return_value
 
#  Create a Surface.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<1 1 0>","[0 0 0]",@
      "Coord 0",sv_asm_create_patch_xy_created )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Reverse the  parameterization of the surface.
l_reverse_mesh = FALSE
s_surface_list = "surface 1"
i_return_value =                                 @
   sgm_edit_surface_reverse                      @
      (  l_reverse_mesh,                         @
         s_surface_list,                         @
         sv_reversed_ids )
dump i_return_value
dump sv_reversed_ids
 
sys_free_string(sv_reversed_ids)
sys_free_string(sv_asm_create_patch_xy_created)
#---------------------------------------------------------------------
 
 Delete Actions
This section contains examples of some of the functions used to implement the “Delete” actions.
   
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_delete_coord()
#
#                      This file opens a new database "new.db" and
#                      creates two coordinate frames. Later it
#                      deletes these coordinates using the above
#                      function. 
#                    
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_delete_coord()
#  has the following arguments:
#
#  asm_delete_coord
#     (  coord_list,
#        deleted_coords )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_coord_list[32]
STRING   sv_deleted_coords[VIRTUAL]
STRING   sv_asm_create_cord_3po_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Creating two coordinate frames.
i_return_value =                                 @
   asm_const_coord_3point( "1", "Coord 0", 1,    @
      "[.3 .3 .3]", "[.3 .3 2]", "[2 .3 .3]",    @
      sv_asm_create_cord_3po_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_coord_3point( "2", "Coord 0", 2,    @
      "[.5 .5 .5]", "[.5 .5 2]","[2 .5 .5]"      @
      , sv_asm_create_cord_3po_created )
dump i_return_value
 
s_coord_list = "coord 1 2"
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Delete the coordinate frames.
i_return_value =                                 @
   asm_delete_coord                              @
      (  s_coord_list,                           @
         sv_deleted_coords )
dump i_return_value
dump sv_deleted_coords
 
sys_free_string(sv_deleted_coords)
sys_free_string(sv_asm_create_cord_3po_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_delete_curve()
#
#                      This file opens a new database "new.db" and
#                      creates two curves. Later it deletes these 
#                      curves using the above function. 
#                    
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_delete_curve()
#  has the following arguments:
#
#  asm_delete_curve
#     (  curve_list,
#        deleted_curves )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_list[32]
STRING   sv_deleted_curves[VIRTUAL]
STRING   sv_sgm_create_curve_2d_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
curve_label(TRUE)
 
#  Creating two curves.
i_return_value =                                 @
   sgm_const_curve_2d_circle_v1( "1", 1, 1.,     @
      "Coord 0.3", "", "[0 0 0]", TRUE,          @
      sv_sgm_create_curve_2d_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_curve_2d_circle_v1( "2", 1, 0.8,    @
      "Coord 0.3", "", "[0 0 0]", TRUE,          @
      sv_sgm_create_curve_2d_created )
dump i_return_value
 
s_curve_list = "curve 1 2"
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Delete the curves.
i_return_value =                                 @
   asm_delete_curve                              @
      (  s_curve_list,                           @
         sv_deleted_curves )
dump i_return_value
dump sv_deleted_curves
 
sys_free_string(sv_deleted_curves)
sys_free_string(sv_sgm_create_curve_2d_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_delete_grid()
#
#                      This file opens a new database "new.db" and
#                      creates two grids. Later it deletes these 
#                      grids using the above function. 
#                    
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_delete_grid()
#  has the following arguments:
#
#  asm_delete_grid
#     (  point_list,
#        deleted_points )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_list[32]
STRING   sv_deleted_points[VIRTUAL]
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
point_label(TRUE)
 
#  Creating two grids.
i_return_value =                                 @
   asm_const_grid_xyz( "100", "[0.5 0.5 0]",     @
      "Coord 0", sv_asm_create_grid_xyz_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_grid_xyz( "200", "[0.7 0.7 0]",     @
      "Coord 0",sv_asm_create_grid_xyz_created )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
s_point_list = "point 100 200"
 
#  Delete the grids.
i_return_value =                                 @
   asm_delete_grid                               @
      (  s_point_list,                           @
         sv_deleted_points )
dump i_return_value
dump sv_deleted_points
 
sys_free_string(sv_deleted_points)
sys_free_string(sv_asm_create_grid_xyz_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_delete_hpat()
#
#                      This file opens a new database "new.db" and
#                      creates two hpats. Later it deletes the hpats
#                      using the above function.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_delete_hpat()
#  has the following arguments:
#
#  asm_delete_hpat
#     (  solid_list,
#        deleted_solids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_solid_list[32]
STRING   sv_deleted_solids[VIRTUAL]
STRING   sv_asm_create_hpat_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
solid_label(TRUE)
 
i_return_value =                                 @
   ga_view_aa_set(23.,-34.,0)
dump i_return_value
 
#  Create 2 hpats.
i_return_value =                                 @
   asm_const_hpat_xyz( "100", "<0.3 0.3 0.3>",   @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_hpat_xyz_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_hpat_xyz( "200", "<0.4 0.4 0.4>",   @
      "[0.3 0.3 0.3]", "Coord 0",                @
      sv_asm_create_hpat_xyz_created )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
s_solid_list = "solid 100 200"
 
#  Delete 2 hpats.
i_return_value =                                 @
   asm_delete_hpat                               @
      (  s_solid_list,                           @
         sv_deleted_solids )
dump i_return_value
dump sv_deleted_solids
 
sys_free_string( sv_deleted_solids )
sys_free_string( sv_asm_create_hpat_xyz_created )
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_delete_line()
#
#                      This file opens a new database "new.db" and
#                      creates two lines. Later it deletes these 
#                      lines using the above function. 
#                    
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_delete_line()
#  has the following arguments:
#
#  asm_delete_line
#     (  curve_list,
#        deleted_curves )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_curve_list[32]
STRING   sv_deleted_curves[VIRTUAL]
STRING   sv_asm_line_3point_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
curve_label(TRUE)
 
#  Creating two lines.
i_return_value =                                 @
   asm_const_line_3point( "1", "[0 0.7 0]",      @
      "[0.5 1 0]", "[0 0 0 ]", 1, 0.5,           @
      sv_asm_line_3point_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_line_3point( "2", "[0 0.7 0]",      @
      "[-0.5 1 0]", "[0 0 0 ]", 1, 0.5,          @
      sv_asm_line_3point_created )
dump i_return_value
 
s_curve_list = "line 1 2"
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
#  Delete the lines.
i_return_value =                                 @
   asm_delete_curve                              @
      (  s_curve_list,                           @
         sv_deleted_curves )
dump i_return_value
dump sv_deleted_curves
 
sys_free_string(sv_deleted_curves)
sys_free_string(sv_asm_line_3point_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_delete_patch()
#
#                      This file opens a new database "new.db" and
#                      and creates a two patches. Later it deletes 
#                      the created patches.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_delete_patch()
#  has the following arguments:
#
#  asm_delete_patch
#     (  surface_list,
#        deleted_surfaces )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_surface_list[32]
STRING   sv_deleted_surfaces[VIRTUAL]
STRING   sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
surface_label(TRUE)
 
#  Create 2 patches.
i_return_value =                                 @
   asm_const_patch_xyz( "1", "<0.3 0.3 0>",      @
      "[0 0 0]", "Coord 0",                      @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_patch_xyz( "2", "<0.4 0.4 0>",      @
      "[0.3 0.3 0]", "Coord 0",                  @
      sv_asm_create_patch_xy_created )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
s_surface_list = "patch 1 2"
 
#  Delete the 2 patches.
i_return_value =                                 @
   asm_delete_patch                              @
      (  s_surface_list,                         @
         sv_deleted_surfaces )
dump i_return_value
dump sv_deleted_surfaces
 
sys_free_string(sv_deleted_surfaces)
sys_free_string(sv_asm_create_patch_xy_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_delete_plane()
#
#                      This file opens a new database "new.db" and
#                      creates two planes. Later it deletes the 
#                      created planes.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_delete_plane()
#  has the following arguments:
#
#  asm_delete_plane
#     (  plane_list,
#        deleted_planes )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_plane_list[32]
STRING   sv_deleted_planes[VIRTUAL]
STRING   sv_sgm_create_plane_3p_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Create two planes.
i_return_value =                                 @
   sgm_const_plane_3point( "1", "[0 0 0]",       @
      "[0.5 1 0]", "[1 0 0]",                    @
      sv_sgm_create_plane_3p_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_plane_3point( "2", "[0.3 0.3 0]",   @
      "[2 2 2]", "[3 3 3]",                      @
      sv_sgm_create_plane_3p_created )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
s_plane_list = "plane 1 2"
 
#  Delete the planes.
i_return_value =                                 @
   asm_delete_plane                              @
      (  s_plane_list,                           @
         sv_deleted_planes )
dump i_return_value
dump sv_deleted_planes
 
sys_free_string(sv_deleted_planes)
sys_free_string(sv_sgm_create_plane_3p_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_delete_point()
#
#                      This file opens a new database "new.db" and
#                      creates two points. Later it deletes these 
#                      points using the above function. 
#                    
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_delete_point()
#  has the following arguments:
#
#  asm_delete_point
#     (  point_list,
#        deleted_points )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_point_list[32]
STRING   sv_deleted_points[VIRTUAL]
STRING   sv_asm_create_grid_xyz_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
point_label(TRUE)
 
#  Creating two points.
i_return_value =                                 @
   asm_const_grid_xyz( "100", "[0.5 0.5 0]",     @
      "Coord 0", sv_asm_create_grid_xyz_created )
dump i_return_value
 
i_return_value =                                 @
   asm_const_grid_xyz( "200", "[0.7 0.7 0]",     @
      "Coord 0",sv_asm_create_grid_xyz_created )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
 
s_point_list = "point 100 200"
 
#  Delete the points.
i_return_value =                                 @
   asm_delete_point                              @
      (  s_point_list,                           @
         sv_deleted_points )
dump i_return_value
dump sv_deleted_points
 
sys_free_string(sv_deleted_points)
sys_free_string(sv_asm_create_grid_xyz_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_delete_solid()
#
#                      This file opens a new database "new.db" and
#                      creates two solids. Later it deletes the 
#                      solids using the above function.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_delete_solid()
#  has the following arguments:
#
#  asm_delete_solid
#     (  solid_list,
#        deleted_solids )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_solid_list[32]
STRING   sv_deleted_solids[VIRTUAL]
STRING   sv_sgm_create_surface_created[VIRTUAL]
STRING   sv_sgm_sweep_solid_rev_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
solid_label(TRUE)
 
#  Create two solids.
i_return_value =                                 @
   sgm_const_surface_vertex( "1", "[1 1 1]",     @
      "[2 1 1]", "[2 2  1]", "[1 2 1]",          @
      sv_sgm_create_surface_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_solid_revolve( "1", "Coord 0.3",    @
      90., 0., "Coord 0", "Surface 1 ",          @
      sv_sgm_sweep_solid_rev_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_solid_revolve( "2", "Coord 0.3",    @
      90., 180., "Coord 0", "Surface 1 ",        @
      sv_sgm_sweep_solid_rev_created )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
s_solid_list = "solid 1 2"
 
#  Delete the solids.
i_return_value =                                 @
   asm_delete_solid                              @
      (  s_solid_list,                           @
         sv_deleted_solids )
dump i_return_value
dump sv_deleted_solids
 
sys_free_string(sv_deleted_solids)
sys_free_string(sv_sgm_create_surface_created)
sys_free_string(sv_sgm_sweep_solid_rev_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_delete_surface()
#
#                      This file opens a new database "new.db" and
#                      and creates a two surfaces. Later it deletes 
#                      the created surfaces.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_delete_surface()
#  has the following arguments:
#
#  asm_delete_surface
#     (  surface_list,
#        deleted_surfaces )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_surface_list[32]
STRING   sv_deleted_surfaces[VIRTUAL]
STRING   sv_sgm_create_surface_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
surface_label(TRUE)
 
#  Create 2 surfaces.
i_return_value =                                 @
   sgm_const_surface_vertex( "1", "[1 1 1]",     @
      "[2 1 1]", "[2 2  1]", "[1 2 1]",          @
      sv_sgm_create_surface_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_surface_vertex( "2", "[0 0 0]",     @
      "[1 0 0]", "[1 1  0]", "[0 1 0]",          @
      sv_sgm_create_surface_created )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
s_surface_list = "surface 1 2"
 
#  Delete the 2 surfaces.
i_return_value =                                 @
   asm_delete_surface                            @
      (  s_surface_list,                         @
         sv_deleted_surfaces )
dump i_return_value
dump sv_deleted_surfaces
 
sys_free_string(sv_deleted_surfaces)
sys_free_string(sv_sgm_create_surface_created)
#---------------------------------------------------------------------
  
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function asm_delete_vector()
#
#                      This file opens a new database "new.db" and
#                      creates two vectors. Later it deletes these
#                      vectors using the above function.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file 
#                      through the "File","Session","Play" pulldown 
#                      menus on the menu bar.
#
#  The function asm_delete_vector()
#  has the following arguments:
#
#  asm_delete_vector
#     (  vector_list,
#        deleted_vectors )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_vector_list[32]
STRING   sv_deleted_vectors[VIRTUAL]
STRING   sv_sgm_create_vector_m_created[VIRTUAL]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
 
#  Create two vectors.
i_return_value =                                 @
   sgm_const_vector_magnitude( "1", "2.0",       @
      "<1 0 0>", "[0 0 0]", "Coord 0",           @
      sv_sgm_create_vector_m_created )
dump i_return_value
 
i_return_value =                                 @
   sgm_const_vector_magnitude( "2", "4.0",       @
      "<2 2 2>", "[1 1 1]", "Coord 0",           @
      sv_sgm_create_vector_m_created )
dump i_return_value
 
#  Session file paused. Press "Resume" to continue..
sf_pause()
s_vector_list = "vector 1 2"
 
#  Delete the vectors.
i_return_value =                                 @
   asm_delete_vector                             @
      (  s_vector_list,                          @
         sv_deleted_vectors )
dump i_return_value
dump sv_deleted_vectors
 
sys_free_string(sv_deleted_vectors)
sys_free_string(sv_sgm_create_vector_m_created)
#---------------------------------------------------------------------