() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_coord_3point()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two cylindrical coordinate
# frames.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_coord_3point()
# has the following arguments:
#
# asm_const_coord_3point
# ( output_labels,
# coord_frame,
# coordtype,
# point1,
# point2,
# point3,
# created_labels )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_labels[8]
STRING s_coord_frame[8]
INTEGER i_coordtype
STRING s_point1[16]
STRING s_point2[16]
STRING s_point3[16]
STRING sv_created_labels[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Creating two cylindrical coordinate frames with reference to
# coordinate frame "Coord 0".
s_output_labels = "1"
s_coord_frame = "Coord 0"
i_coordtype = 2
s_point1 = "[1 1 0] [1 0 1]"
s_point2 = "[0 0 1]"
s_point3 = "[1 0 0] [1 1 0]"
#
i_return_value = @
asm_const_coord_3point @
( s_output_labels, @
s_coord_frame, @
i_coordtype, @
s_point1, @
s_point2, @
s_point3, @
sv_created_labels )
dump i_return_value
dump sv_created_labels
sys_free_string(sv_created_labels)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_coord_axis()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two spherical coordinate
# frames.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_coord_axis()
# has the following arguments:
#
# asm_const_coord_axis
# ( output_labels,
# plane,
# coord_frame,
# coordtype,
# point1,
# point2,
# point3,
# created_labels )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_labels[8]
STRING s_plane[8]
STRING s_coord_frame[8]
INTEGER i_coordtype
STRING s_point1[32]
STRING s_point2[32]
STRING s_point3[32]
STRING sv_created_labels[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Creating two spherical coordinate frames with reference to
# coordinate frames "Coord 0".
s_output_labels = "1"
s_plane = "YZ"
s_coord_frame = "Coord 0"
i_coordtype = 3
s_point1 = "[0.75 0.75 0] [0.5 0.5 1]"
s_point2 = "[0 1 0] [0 0 1]"
s_point3 = "[0 0 1] [0 1 0]"
#
i_return_value = @
asm_const_coord_axis @
( s_output_labels, @
s_plane, @
s_coord_frame, @
i_coordtype, @
s_point1, @
s_point2, @
s_point3, @
sv_created_labels )
dump i_return_value
dump sv_created_labels
sys_free_string(sv_created_labels)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_coord_euler()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two rectangular coordinate
# frames.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_coord_euler()
# has the following arguments:
#
# asm_const_coord_euler
# ( output_labels,
# axis1,
# axis2,
# axis3,
# angle1,
# angle2,
# angle3,
# coord_frame,
# coordtype,
# point1,
# created_labels )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_labels[8]
INTEGER i_axis1
INTEGER i_axis2
INTEGER i_axis3
REAL r_angle1
REAL r_angle2
REAL r_angle3
STRING s_coord_frame[16]
INTEGER i_coordtype
STRING s_point1[32]
STRING sv_created_labels[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Creating two rectangular coordinate frames with reference to
# coordinate frame "Coord 0"
s_output_labels = "1"
i_axis1 = 3
i_axis2 = 1
i_axis3 = 2
r_angle1 = 30.
r_angle2 = 43.
r_angle3 = 100.
s_coord_frame = "Coord 0"
i_coordtype = 1
s_point1 = "[1 1 0] [-0.5 0 -0.5]"
#
i_return_value = @
asm_const_coord_euler @
( s_output_labels, @
i_axis1, @
i_axis2, @
i_axis3, @
r_angle1, @
r_angle2, @
r_angle3, @
s_coord_frame, @
i_coordtype, @
s_point1, @
sv_created_labels )
dump i_return_value
dump sv_created_labels
sys_free_string(sv_created_labels)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_coord_normal()
#
# This session file will create a new database by
# name ’new.db’, a surface will be created. The
# above mentioned function will be called and a
# rectangular coordinate frame will be created.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_coord_normal()
# has the following arguments:
#
# asm_const_coord_normal
# ( output_labels,
# surface,
# coordtype,
# point,
# created_labels )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_labels[8]
STRING s_surface[16]
INTEGER i_coordtype
STRING s_point[32]
STRING sv_created_labels[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Creating a rectangular patch in X-Y plane.
i_return_value = @
asm_const_patch_xyz( "1", "<3 2 0>","[1 1 0]",@
"Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating two rectangular coordinate frames with reference to
# coordinate frame "Coord 0".
s_output_labels = "1"
s_surface = "Surface 1 "
i_coordtype = 1
s_point = "[0.5 0.5 0] [1.0 1.0 0]"
#
i_return_value = @
asm_const_coord_normal @
( s_output_labels, @
s_surface, @
i_coordtype, @
s_point, @
sv_created_labels )
dump i_return_value
dump sv_created_labels
sys_free_string(sv_created_labels)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_2d_arc2point()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create four curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_2d_arc2point()
# has the following arguments:
#
# asm_const_curve_2d_arc2point
# ( output_ids,
# ncurves,
# arc_angle,
# plane_list,
# center_point_list,
# start_point_list,
# end_point_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
INTEGER i_ncurves
INTEGER i_arc_angle
STRING s_plane_list[32]
STRING s_center_point_list[16]
STRING s_start_point_list[16]
STRING s_end_point_list[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Creating two curves in X-Y plane each divided in two segments.
s_output_ids = "1"
i_ncurves = 2
i_arc_angle = 1
s_plane_list = "Coord 0.3 Coord 0.1"
s_center_point_list = "[1 1 1] [2 2 2]"
s_start_point_list = "[0 0 0]"
s_end_point_list = "[3 3 3]"
#
i_return_value = @
asm_const_curve_2d_arc2point @
( s_output_ids, @
i_ncurves, @
i_arc_angle, @
s_plane_list, @
s_center_point_list, @
s_start_point_list, @
s_end_point_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_2d_arc3point()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create four curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_2d_arc3point()
# has the following arguments:
#
# asm_const_curve_2d_arc3point
# ( output_ids,
# ncurves,
# create_center,
# plane_list,
# start_list,
# mid_list,
# end_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
INTEGER i_ncurves
LOGICAL l_create_center
STRING s_plane_list[16]
STRING s_start_list[16]
STRING s_mid_list[16]
STRING s_end_list[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating two curves in X-Y plane each divided in two segments.
s_output_ids = "#"
i_ncurves = 2
l_create_center = TRUE
s_plane_list = "Coord 0.3"
s_start_list = "[1 1 0] [2 2 0]"
s_mid_list = "[1 4 1]"
s_end_list = "[3 3 0]"
#
i_return_value = @
asm_const_curve_2d_arc3point @
( s_output_ids, @
i_ncurves, @
l_create_center, @
s_plane_list, @
s_start_list, @
s_mid_list, @
s_end_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_2d_circle()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two circles.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_2d_circle()
# has the following arguments:
#
# asm_const_curve_2d_circle
# ( output_ids,
# ncurves,
# radius_method,
# radius,
# plane_list,
# radius_point_list,
# center_point_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
INTEGER i_ncurves
INTEGER i_radius_method
REAL r_radius
STRING s_plane_list[32]
STRING s_radius_point_list[32]
STRING s_center_point_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Calling function to create two circles in two perpendicular planes
# and each divided in 10 segments. Circles are drawn using point
# location method to define radius.
s_output_ids = "#"
i_ncurves = 10
i_radius_method = 2
s_plane_list = "Coord 0.3 Coord 0.2"
s_radius_point_list = "[0 0 0] [1 1 0]"
s_center_point_list = "[5 5 0] [0 0 0]"
#
i_return_value = @
asm_const_curve_2d_circle @
( s_output_ids, @
i_ncurves, @
i_radius_method, @
r_radius, @
s_plane_list, @
s_radius_point_list, @
s_center_point_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_arc3point()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two curves in 3D space.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_arc3point()
# has the following arguments:
#
# asm_const_curve_arc3point
# ( output_ids,
# ncurves,
# create_center,
# start_list,
# mid_list,
# end_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
INTEGER i_ncurves
LOGICAL l_create_center
STRING s_start_list[32]
STRING s_mid_list[32]
STRING s_end_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating two curves in 3D space each divided into 4 segments.
s_output_ids = "#"
i_ncurves = 4
l_create_center = TRUE
s_start_list = "[0 0 0] [1 1 0]"
s_mid_list = "[-1 -2 0] [1 2 0]"
s_end_list = "[-1 1 3] [1 -1 -4]"
#
i_return_value = @
asm_const_curve_arc3point @
( s_output_ids, @
i_ncurves, @
l_create_center, @
s_start_list, @
s_mid_list, @
s_end_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_bspline()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create a bspline closed curve.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_bspline()
# has the following arguments:
#
# asm_const_curve_bspline
# ( output_ids,
# ncurves,
# point_list,
# order,
# interpolate,
# param_method,
# closed,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
INTEGER i_ncurves
STRING s_point_list[64]
INTEGER i_order
LOGICAL l_interpolate
INTEGER i_param_method
LOGICAL l_closed
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a four segment fourth order closed piecewise cubic curve.
s_output_ids = "#"
i_ncurves = 4
s_point_list = "[0 0 0][1 1 1][-1 .5 1][0 1 1]"
i_order = 4
l_interpolate = TRUE
i_param_method = 1
l_closed = TRUE
#
i_return_value = @
asm_const_curve_bspline @
( s_output_ids, @
i_ncurves, @
s_point_list, @
i_order, @
l_interpolate, @
i_param_method, @
l_closed, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_extract()
#
# This session file will create a new database by
# name ’new.db’ and create a surface. The above
# mentioned function will be called to create a
# curve on the surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_extract()
# has the following arguments:
#
# asm_const_curve_extract
# ( output_ids,
# surface_list,
# direction,
# param_pos,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_surface_list[16]
INTEGER i_direction
REAL r_param_pos
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a surface.
i_return_value = @
asm_const_patch_xyz( "1", "<1 1 0>","[0 0 0]",@
"Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating a curve on surface along constant U direction.
s_output_ids = "#"
s_surface_list = "Surface 1"
i_direction = 1
r_param_pos = 0.4
#
i_return_value = @
asm_const_curve_extract @
( s_output_ids, @
s_surface_list, @
i_direction, @
r_param_pos, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_extract_edge()
#
# This session file will create a new database by
# name ’new.db’ and create a surface. The above
# mentioned function will be called to create
# curves on the surface edges.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_extract_edge()
# has the following arguments:
#
# asm_const_curve_extract_edge
# ( output_ids,
# edge_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_edge_list[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a surface.
i_return_value = @
asm_const_patch_xyz( "1", "<1 1 0>","[0 0 0]",@
"Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating curves on two edges of the surface.
s_output_ids = "#"
s_edge_list = "Surface 1.1 1.3"
#
i_return_value = @
asm_const_curve_extract_edge @
( s_output_ids, @
s_edge_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_crtd_ids)
#--------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_intersect()
#
# This session file will create a new database by
# name ’new.db’ and create a surface. The above
# mentioned function will be called to create a
# curve on the surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_intersect()
# has the following arguments:
#
# asm_const_curve_intersect
# ( output_ids,
# method,
# surface1_list,
# surface2_list,
# ncurves,
# fit_tol,
# int_tol,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
INTEGER i_method
STRING s_surface1_list[16]
STRING s_surface2_list[16]
INTEGER i_ncurves
REAL r_fit_tol
REAL r_int_tol
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Changing view to Isometric View 1.
i_return_value = ga_view_aa_set(23., -34., 0)
dump i_return_value
#---------------------------------------------------------------------
# Creating two surfaces.
i_return_value = @
asm_const_patch_xyz( "1", "<2 2 0>","[0 0 0]",@
"Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "2","<3 2 -5>","[-1 1 3]",@
"Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating a curve where the two surfaces intersect. The curve is
# divided in 3 segments.
s_output_ids = "#"
i_method = 1
s_surface1_list = "Surface 1"
s_surface2_list = "Surface 2"
i_ncurves = 3
r_fit_tol = 1e-08
r_int_tol = 0.1
#
i_return_value = @
asm_const_curve_intersect @
( s_output_ids, @
i_method, @
s_surface1_list, @
s_surface2_list, @
i_ncurves, @
r_fit_tol, @
r_int_tol, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_involute()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two involutes.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_involute()
# has the following arguments:
#
# asm_const_curve_involute
# ( output_ids,
# axis,
# option,
# scalar1,
# scalar2,
# ncurves,
# coord_frame,
# point,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_axis[16]
INTEGER i_option
REAL r_scalar1
REAL r_scalar2
INTEGER i_ncurves
STRING s_coord_frame[16]
STRING s_point[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Calling function to create two involutes around Z axis.
s_output_ids = "#"
s_axis = "Coord 0.3"
i_option = 1
r_scalar1 = 1.0
r_scalar2 = 5.3
i_ncurves = 4
s_coord_frame = "Coord 0"
s_point = "[0 3 0] [0 1 0]"
#
i_return_value = @
asm_const_curve_involute @
( s_output_ids, @
s_axis, @
i_option, @
r_scalar1, @
r_scalar2, @
i_ncurves, @
s_coord_frame, @
s_point, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_loft()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create a curve based on end slopes
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_loft()
# has the following arguments:
#
# asm_const_curve_loft
# ( output_ids,
# ncurves,
# slope_control,
# point_list,
# slope_list1,
# slope_list2,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
INTEGER i_ncurves
LOGICAL l_slope_control
STRING s_point_list[64]
STRING s_slope_list1[16]
STRING s_slope_list2[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Setting view to Isometric View 2.
i_return_value = ga_view_aa_set(23., 56., 0)
dump i_return_value
#---------------------------------------------------------------------
# Creating a curve divided in four segments and passing through four
# points. Curve is also constrained by end slopes.
s_output_ids = "#"
i_ncurves = 4
l_slope_control = TRUE
s_point_list = "[0 0 0] [2.5 1 0] [2.3 .6 0] [3 1 1]"
s_slope_list1 = "<1 4 0.5>"
s_slope_list2 = "<1 -1.5 0>"
#
i_return_value = @
asm_const_curve_loft @
( s_output_ids, @
i_ncurves, @
l_slope_control, @
s_point_list, @
s_slope_list1, @
s_slope_list2, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_manifold_2point()
#
# This session file will create a new database by
# name ’new.db’ and create a surface. The above
# mentioned function will create two curves on
# the surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_manifold_2point()
# has the following arguments:
#
# asm_const_curve_manifold_2point
# ( output_ids,
# surface_list,
# point1_list,
# point2_list,
# ncurves,
# fit_tol,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_surface_list[16]
STRING s_point1_list[32]
STRING s_point2_list[32]
INTEGER i_ncurves
REAL r_fit_tol
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_sgm_create_surface_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a surface by giving vertex points.
i_return_value = @
sgm_const_surface_vertex( "1", "[0 0 0]", @
"[4 1 -.5]", "[3.5 2.1 4]", "[-.5 3 2.2]", @
sv_sgm_create_surface_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Changing view for proper view of the surface.
i_return_value = ga_view_aa_set( -105., 0., -30. )
dump i_return_value
#---------------------------------------------------------------------
# Making the surface interior clear on the screen.
i_return_value = ga_display_lines_set( "general", 5 )
dump i_return_value
#---------------------------------------------------------------------
# Creating 2 curves on the surface. Number of segments per curve will
# be decided by the curve fit tolerance.
s_output_ids = "#"
s_surface_list = "Surface 1"
s_point1_list = "[0 0 0][.5 .5 0]"
s_point2_list = "[.75 .35 3] [.1 .9 0]"
i_ncurves = 0
r_fit_tol = 1e-05
#
i_return_value = @
asm_const_curve_manifold_2point @
( s_output_ids, @
s_surface_list, @
s_point1_list, @
s_point2_list, @
i_ncurves, @
r_fit_tol, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_sgm_create_surface_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_manifold_npoint()
#
# This session file will create a new database by
# name ’new.db’ and create a surface. The above
# mentioned function will create a curve on the
# surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_manifold_npoint()
# has the following arguments:
#
# asm_const_curve_manifold_npoint
# ( output_ids,
# surface,
# point_list,
# ncurves,
# fit_tol,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_surface[16]
STRING s_point_list[64]
INTEGER i_ncurves
REAL r_fit_tol
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_sgm_create_surface_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a surface by giving vertex points.
i_return_value = @
sgm_const_surface_vertex( "1", "[0 0 0]", @
"[4 1 -.5]", "[3.5 2.1 4]", "[-.5 3 2.2]", @
sv_sgm_create_surface_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Changing view for proper view of the surface.
i_return_value = ga_view_aa_set( -105., 0., -30. )
dump i_return_value
#---------------------------------------------------------------------
# Making the surface interior clear on the screen.
i_return_value = ga_display_lines_set( "general", 5 )
dump i_return_value
#---------------------------------------------------------------------
# Creating 1 curve on the surface. Number of segments for curve will
# be decided by the curve fit tolerance.
s_output_ids = "#"
s_surface = "Surface 1"
s_point_list = "[0 0 0] [.75 .35 3] [.5 .5 0] [.1 .9 0]"
i_ncurves = 0
r_fit_tol = 1e-05
#
i_return_value = @
asm_const_curve_manifold_npoint @
( s_output_ids, @
s_surface, @
s_point_list, @
i_ncurves, @
r_fit_tol, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_sgm_create_surface_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_project()
#
# This session file will create a new database by
# name ’new.db’ and create a surface and a curve.
# The above mentioned function will project the
# curve on the surface and create a curve.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_project()
# has the following arguments:
#
# asm_const_curve_project
# ( output_ids,
# curve_list,
# surface_list,
# delete_org,
# method,
# vector,
# coord_frame,
# ncurves,
# prjtol,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_curve_list[16]
STRING s_surface_list[16]
LOGICAL l_delete_org
INTEGER i_method
STRING s_vector[16]
STRING s_coord_frame[16]
INTEGER i_ncurves
REAL r_prjtol
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_sgm_create_surface_crtd_ids[VIRTUAL]
STRING sv_asm_line_3point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a surface by giving vertex points.
i_return_value = @
sgm_const_surface_vertex( "1", "[0 0 0]", @
"[4 1 -.5]", "[3.5 2.1 4]", "[-.5 3 2.2]", @
sv_sgm_create_surface_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating a curve by specifying three points.
i_return_value = @
asm_const_line_3point( "1", "[1 1 .5]", @
"[.4 -.2 1]", "[3 0 -.1]", 1, 0.5, @
sv_asm_line_3point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Changing view for proper view of the surface.
i_return_value = ga_view_aa_set( 140., -5., -70. )
dump i_return_value
#---------------------------------------------------------------------
# Making the surface interior clear on the screen.
i_return_value = ga_display_lines_set( "general", 5 )
dump i_return_value
#---------------------------------------------------------------------
# Creating a projected curve on the surface without deleting the old.
# The number of the segments will depend on the projection tolerance.
s_output_ids = "#"
s_curve_list = "Curve 1"
s_surface_list = "Surface 1"
l_delete_org = FALSE
i_method = 3
s_vector = "<0 1 0>"
s_coord_frame = "Coord 0"
i_ncurves = 0
r_prjtol = 1e-05
#
i_return_value = @
asm_const_curve_project @
( s_output_ids, @
s_curve_list, @
s_surface_list, @
l_delete_org, @
i_method, @
s_vector, @
s_coord_frame, @
i_ncurves, @
r_prjtol, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_sgm_create_surface_crtd_ids)
sys_free_string(sv_asm_line_3point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_curve_revolve()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create three curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_curve_revolve()
# has the following arguments:
#
# asm_const_curve_revolve
# ( output_ids,
# axis,
# angle,
# offset,
# coord_frame,
# ncurves,
# point,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_axis[16]
REAL r_angle
REAL r_offset
STRING s_coord_frame[16]
INTEGER i_ncurves
STRING s_point[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating three curves by revolving points around Z axis. Each curve
# will divided in five segments.
s_output_ids = "#"
s_axis = "Coord 0.3"
r_angle = 120
r_offset = 10.0
s_coord_frame = "Coord 0"
i_ncurves = 5
s_point = "[0 1 0] [0 2 2] [0 3 3]"
#
i_return_value = @
asm_const_curve_revolve @
( s_output_ids, @
s_axis, @
r_angle, @
r_offset, @
s_coord_frame, @
i_ncurves, @
s_point, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_grid_arccenter()
#
# This session file will create a new database by
# name ’new.db’ and create a curve. The above
# mentioned function will be called to create a
# point at the centre of the curve.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_grid_arccenter()
# has the following arguments:
#
# asm_const_grid_arccenter
# ( output_ids,
# curve_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_curve_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_line_3point_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a curve using three point option.
i_return_value = @
asm_const_line_3point( "2", @
"[ -0.220241 0.077918 0.215462 ] ", @
"[ 0.099881 0.344888 -0.137155 ] ", @
"[ 0.836730 -0.053878 -0.429993 ] ",1, 0.5,@
sv_asm_line_3point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Calling function to create point at the centre of the above line.
s_output_ids = ""
s_curve_list = "Curve 2 "
#
i_return_value = @
asm_const_grid_arccenter @
( s_output_ids, @
s_curve_list, @
sv_created_ids )
dump i_return_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 asm_const_grid_extract()
#
# This session file will create a new database by
# name ’new.db’ and create curves. Then the
# above mentioned function will be called and
# points will be created.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_grid_extract()
# has the following arguments:
#
# asm_const_grid_extract
# ( output_ids,
# curve_list,
# param_pos,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_curve_list[32]
REAL r_param_pos
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_line_3point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating curves from three points.
i_return_value = @
asm_const_line_3point( "1", @
"[ 0.22 0.07 0.21 ] ", @
"[ 0.09 0.34 0.13 ] [ 0 -0.5 0.1 ]", @
"[ 0.83 -0.05 -0.43 ] [ -0.5 0.25 0 ]", 1, @
0.5, sv_asm_line_3point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating grid point on the curves.
s_output_ids = "#"
s_curve_list = "Curve 1 2"
r_param_pos = 0.6
i_return_value = @
asm_const_grid_extract @
( s_output_ids, @
s_curve_list, @
r_param_pos, @
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 asm_const_grid_extract_v1()
#
# This session file will create a new database by
# name ’new.db’ and create curves. Then the
# above mentioned function will be called and
# points will be created.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_grid_extract_v1()
# has the following arguments:
#
# asm_const_grid_extract_v1
# ( output_ids,
# curve_list,
# parametric_pos,
# param_method,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_curve_list[32]
REAL r_parametric_pos
INTEGER i_param_method
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_line_3point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating curves from three points.
i_return_value = @
asm_const_line_3point( "1", @
"[ 0.22 0.07 0.21 ] ", @
"[ 0.09 0.34 0.13 ] [ 0 -0.5 0.1 ]", @
"[ 0.83 -0.05 -0.43 ] [ -0.5 0.25 0 ]", 1, @
0.5, sv_asm_line_3point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating grid point on the curves based on arc lengths.
s_output_ids = "#"
s_curve_list = "Curve 1 2"
r_parametric_pos = 0.6
i_param_method = 1
i_return_value = @
asm_const_grid_extract_v1 @
( s_output_ids, @
s_curve_list, @
r_parametric_pos, @
i_param_method, @
sv_created_ids )
dump i_return_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 asm_const_grid_interp_curve()
#
# This session file will create a new database by
# name ’new.db’ and create curves. Then the
# above mentioned function will be called and
# points will be created.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_grid_interp_curve()
# has the following arguments:
#
# asm_const_grid_interp_curve
# ( output_ids,
# curve_list,
# space_ratio,
# num_points,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_curve_list[32]
REAL r_space_ratio
INTEGER i_num_points
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_line_3point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating curves from three points.
i_return_value = @
asm_const_line_3point( "1", @
"[ 0.22 0.07 0.21 ] ", @
"[ 0.09 0.34 0.13 ] [ 0 -0.5 0.1 ]", @
"[ 0.83 -0.05 -0.43 ] [ -0.5 0.25 0 ]", 1, @
0.5, sv_asm_line_3point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating points from the curves
s_output_ids = "#"
s_curve_list = "Curve 1 2"
r_space_ratio = 1.5
i_num_points = 4
i_return_value = @
asm_const_grid_interp_curve @
( s_output_ids, @
s_curve_list, @
r_space_ratio, @
i_num_points, @
sv_created_ids )
dump i_return_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 asm_const_grid_interp_curve_v1()
#
# This session file will create a new database by
# name ’new.db’ and create curves. Then the
# above mentioned function will be called and
# points will be created.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_grid_interp_curve_v1()
# has the following arguments:
#
# asm_const_grid_interp_curve_v1
# ( output_ids,
# curve_list,
# space_ratio,
# num_points,
# param_method,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_curve_list[32]
REAL r_space_ratio
INTEGER i_num_points
INTEGER i_param_method
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_line_3point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating curves from three points.
i_return_value = @
asm_const_line_3point( "1", @
"[ 0.22 0.07 0.21 ] ", @
"[ 0.09 0.34 0.13 ] [ 0 -0.5 0.1 ]", @
"[ 0.83 -0.05 -0.43 ] [ -0.5 0.25 0 ]", 1, @
0.5, sv_asm_line_3point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating points from the curves based on the parametric values.
s_output_ids = "#"
s_curve_list = "Curve 1 2"
r_space_ratio = 1.5
i_num_points = 4
i_param_method = 2
i_return_value = @
asm_const_grid_interp_curve_v1 @
( s_output_ids, @
s_curve_list, @
r_space_ratio, @
i_num_points, @
i_param_method, @
sv_created_ids )
dump i_return_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 asm_const_grid_interp_point()
#
# This session file will create a new database by
# name ’new.db’ and the above mentioned function
# will be called and points will be created.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_grid_interp_point()
# has the following arguments:
#
# asm_const_grid_interp_point
# ( output_ids,
# point1_list,
# point2_list,
# space_ratio,
# num_points,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_point1_list[32]
STRING s_point2_list[32]
REAL r_space_ratio
INTEGER i_num_points
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Points will be created between two points and origin.
s_output_ids = "#"
s_point1_list = "[0 0 0]"
s_point2_list = "[1 0 0] [1 1 0]"
r_space_ratio = 1.33
i_num_points = 4
#
i_return_value = @
asm_const_grid_interp_point @
( s_output_ids, @
s_point1_list, @
s_point2_list, @
r_space_ratio, @
i_num_points, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_grid_intersect()
#
# This session file will create a new database by
# name ’new.db’ and create two curves. Then the
# above mentioned function will be called and
# points will be created.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_grid_intersect()
# has the following arguments:
#
# asm_const_grid_intersect
# ( output_ids,
# curve1_list,
# curve2_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_line_3point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating two curves based on three points.
i_return_value = @
asm_const_line_3point( "1","[0 0 0][0 0.5 0]",@
"[1 1 0][0.5 .1 0]","[1 -1 0][2 1 0][1 2 0]@
", 1, 0.5, sv_asm_line_3point_created_ids)
dump i_return_value
#---------------------------------------------------------------------
# Creating point at the intersection of the two curves.
s_output_ids = "#"
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2 3"
#
i_return_value = @
asm_const_grid_intersect @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
sv_created_ids )
dump i_return_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 asm_const_grid_offset()
#
# This session file will create a new database by
# name ’new.db’ and create a point and a curve
# passing through it. Then the above mentioned
# function will be called and points will be
# created.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_grid_offset()
# has the following arguments:
#
# asm_const_grid_offset
# ( output_ids,
# distance,
# point_list,
# curvepoint_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
REAL r_distance
STRING s_point_list[32]
STRING s_curvepoint_list[128]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_line_3point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a point by giving coordinates.
i_return_value = @
asm_const_grid_xyz("1", @
"[ 0.099881 0.344888 -0.137155 ] ", @
"Coord 0", sv_created_ids)
dump i_return_value
#---------------------------------------------------------------------
# Creating a curve from three points.
i_return_value = @
asm_const_line_3point( "1", @
"[ -0.220241 0.077918 0.215462 ] ", @
" point 1 ", @
"[ 0.836730 -0.053878 -0.429993 ] ", 1, @
0.5, sv_asm_line_3point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating a point at a distance from the point created before.
s_output_ids = "#"
r_distance = 0.33
s_point_list = "point 1"
s_curvepoint_list = "Construct PointCurveUOnCurve (Evaluate "// @
"Geometry (point 2)) (Evaluate Geometry (Curve 1 ))"
i_return_value = @
asm_const_grid_offset @
( s_output_ids, @
r_distance, @
s_point_list, @
s_curvepoint_list, @
sv_created_ids )
dump i_return_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 asm_const_grid_pierce()
#
# This session file will create a new database by
# name ’new.db’. A surface and a curve
# intersecting the surface will be created. The
# above mentioned function will be called to
# create a point at the intersection of the curve
# and surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_grid_pierce()
# has the following arguments:
#
# asm_const_grid_pierce
# ( output_ids,
# curve_list,
# surface_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_curve_list[32]
STRING s_surface_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]
STRING sv_asm_line_3point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point label.
curve_label(TRUE)
point_label(TRUE)
surface_label(TRUE)
#---------------------------------------------------------------------
# Changing view to Isometric-1.
i_return_value = ga_view_aa_set(23., -34., 0.)
dump i_return_value
#---------------------------------------------------------------------
# Creating a surface.
i_return_value = @
asm_const_patch_xyz( "1", "<2 0 1>", @
"[0 0.5 -0.5]", "Coord 0", @
sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating a line by giving 3 points.
i_return_value = @
asm_const_line_3point( "1", "[0 0 0]", @
"[1 1 0]", "[1 -1 0]", 1, 0.5, @
sv_asm_line_3point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating point at the intersection of line and plane.
s_output_ids = "#"
s_curve_list = "Curve 1"
s_surface_list = "Surface 1"
#
i_return_value = @
asm_const_grid_pierce @
( s_output_ids, @
s_curve_list, @
s_surface_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_crtd_ids)
sys_free_string(sv_asm_line_3point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_grid_xyz()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create points.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_grid_xyz()
# has the following arguments:
#
# asm_const_grid_xyz
# ( output_ids,
# coordinates_list,
# coord_frame,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_coordinates_list[32]
STRING s_coord_frame[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point label.
point_label(TRUE)
#---------------------------------------------------------------------
# Calling function to create points from coordinates.
s_output_ids = "#"
s_coordinates_list = "[0 0 0] [1 1 1]"
s_coord_frame = "Coord 0"
#
i_return_value = @
asm_const_grid_xyz @
( s_output_ids, @
s_coordinates_list, @
s_coord_frame, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_hpat_2surface()
#
# This session file will create a new database by
# name ’new.db’ and four surfaces and a solid, as
# a manifold, will be created. The four surfaces
# in a group of two will be used to create solids
# using above mentioned function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_hpat_2surface()
# has the following arguments:
#
# asm_const_hpat_2surface
# ( output_ids,
# surface1_list,
# surface2_list,
# manifold_type,
# manifold_id,
# auto_align,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_surface1_list[32]
STRING s_surface2_list[32]
INTEGER i_manifold_type
STRING s_manifold_id[32]
LOGICAL l_auto_align
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_created[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
i_return_value = @
ga_view_aa_set(23.,-34.,0)
dump i_return_value
i_return_value = @
ga_group_display_set("default_group","general")
dump i_return_value
i_return_value = @
ga_display_lines_set( "general", 2 )
dump i_return_value
solid_label(TRUE)
surface_label(TRUE)
#---------------------------------------------------------------------
# Creating two surfaces.
i_return_value = @
asm_const_patch_xyz( "#", "<1 0 1>", @
"[0 0 0] [3 0.1 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "#", "<0.5 0 0.5>", @
"[0.25 1 0.25] [3.25 0.9 0.25]", "Coord 0",@
sv_asm_create_patch_xy_created )
dump i_return_value
#---------------------------------------------------------------------
# Creating manifold solid.
i_return_value = @
asm_const_hpat_xyz("1", "<4 0.8 3>", @
"[0 0.1 0]", "Coord 0", sv_created_ids)
dump i_return_value
#---------------------------------------------------------------------
# Create solids from the surfaces created and using the solid as
# manifold entity.
s_output_ids = "#"
s_surface1_list = "surface 1 2"
s_surface2_list = "surface 3 4"
i_manifold_type = 3
s_manifold_id = "solid 1"
l_auto_align = TRUE
#
i_return_value = @
asm_const_hpat_2surface @
( s_output_ids, @
s_surface1_list, @
s_surface2_list, @
i_manifold_type, @
s_manifold_id, @
l_auto_align, @
sv_created_ids )
dump i_return_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 asm_const_hpat_3surface()
#
# This session file will create a new database by
# name ’new.db’ and six surfaces will be created.
# The six surfaces in a group of two will be used
# to create solids using above mentioned function
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_hpat_3surface()
# has the following arguments:
#
# asm_const_hpat_3surface
# ( output_ids,
# surface1_list,
# surface2_list,
# surface3_list,
# param_pos,
# auto_align,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING s_surface3_list[32]
REAL r_param_pos
LOGICAL l_auto_align
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_created[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
i_return_value = @
ga_view_aa_set(23.,-34.,0)
dump i_return_value
i_return_value = @
ga_group_display_set("default_group","general")
dump i_return_value
i_return_value = @
ga_display_lines_set( "general", 2 )
dump i_return_value
solid_label(TRUE)
surface_label(TRUE)
#---------------------------------------------------------------------
# Creating six surfaces.
i_return_value = @
asm_const_patch_xyz( "#", "<1 0 1>", @
"[0 0 0] [3 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "#", "<0.5 0 0.5>", @
"[-0.25 1 0.25] [2 1 -0.5]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "#", "<0.5 0 0.5>", @
"[0.25 2 0.25] [1.5 2 1]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
#---------------------------------------------------------------------
# Creating solids using two groups of three surfaces.
s_output_ids = "#"
s_surface1_list = "surface 1 2"
s_surface2_list = "surface 3 4"
s_surface3_list = "surface 5 6"
r_param_pos = 0.7
l_auto_align = FALSE
#
i_return_value = @
asm_const_hpat_3surface @
( s_output_ids, @
s_surface1_list, @
s_surface2_list, @
s_surface3_list, @
r_param_pos, @
l_auto_align, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_hpat_4surface()
#
# This session file will create a new database by
# name ’new.db’ and eight surfaces will be
# created. The eight surfaces in a group of two
# will be used to create solids using above
# mentioned function
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_hpat_4surface()
# has the following arguments:
#
# asm_const_hpat_4surface
# ( output_ids,
# surface1_list,
# surface2_list,
# surface3_list,
# surface4_list,
# param_pos1,
# param_pos2,
# auto_align,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING s_surface3_list[32]
STRING s_surface4_list[32]
REAL r_param_pos1
REAL r_param_pos2
LOGICAL l_auto_align
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_created[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
i_return_value = @
ga_view_aa_set(23.,-34.,0)
dump i_return_value
i_return_value = @
ga_group_display_set("default_group","general")
dump i_return_value
i_return_value = @
ga_display_lines_set( "general", 2 )
dump i_return_value
solid_label(TRUE)
surface_label(TRUE)
#---------------------------------------------------------------------
# Creating surfaces.
i_return_value = @
asm_const_patch_xyz( "#", "<1 0 1>", @
"[0 0 0] [1 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "#", "<0.5 0 0.5>", @
"[-0.25 1 0.25] [1 1 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "#", "<0.5 0 0.5>", @
"[0.25 2 0.25] [1.33 2 -0.33]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "#", "<1 0 1>", @
"[0.5 3 0.5] [1.75 3.1 1]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
#---------------------------------------------------------------------
# Creating solids by using two groups of four surfaces.
s_output_ids = "#"
s_surface1_list = "surface 1 2"
s_surface2_list = "surface 3 4"
s_surface3_list = "surface 5 6"
s_surface4_list = "surface 7 8"
r_param_pos1 = 0.33
r_param_pos2 = 0.66
l_auto_align = TRUE
#
i_return_value = @
asm_const_hpat_4surface @
( s_output_ids, @
s_surface1_list, @
s_surface2_list, @
s_surface3_list, @
s_surface4_list, @
r_param_pos1, @
r_param_pos2, @
l_auto_align, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_asm_create_patch_xy_created)
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_hpat_face()
#
# This session file will create a new database by
# name ’new.db’ and six surfaces will be created.
# The six surfaces will be used to create a solid
# using above mentioned function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_hpat_face()
# has the following arguments:
#
# asm_const_hpat_face
# ( output_ids,
# surface1_list,
# surface2_list,
# surface3_list,
# surface4_list,
# surface5_list,
# surface6_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING s_surface3_list[32]
STRING s_surface4_list[32]
STRING s_surface5_list[32]
STRING s_surface6_list[128]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_created[VIRTUAL]
STRING sv_asm_line_2point_created_ids[VIRTUAL]
STRING sv_sgm_surface_4edge_created[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
i_return_value = @
ga_view_aa_set(23., -34., 0)
dump i_return_value
#---------------------------------------------------------------------
# Creating three surfaces.
i_return_value = @
asm_const_patch_xyz("", @
"<2 0 1><0 1 1><1 0 1>", @
"[0 0 0][0 0 0][0 1 0]","coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Creating two curves.
i_return_value = @
asm_const_line_2point( "#", "Point 8 7", @
"Point 3 2", 0, "", 50., 1, @
sv_asm_line_2point_created_ids )
dump i_return_value
# Creating three surfaces.
i_return_value = @
sgm_const_surface_4edge( "", @
"Surface 3.1 Surface 3.3 Surface 3.2 ", @
"Surface 2.4 Surface 2.2 Curve 1 ", @
"Surface 1.1 Surface 1.3 Surface 1.2 ", @
"Curve 2 Curve 1 Curve 2 ", @
sv_sgm_surface_4edge_created )
dump i_return_value
solid_label(TRUE)
surface_label(TRUE)
#---------------------------------------------------------------------
# Creating a Solid with the created six surfaces.
s_output_ids = "#"
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
s_surface3_list = "surface 3"
s_surface4_list = "surface 4"
s_surface5_list = "surface 5"
s_surface6_list = "surface 6"
#
i_return_value = @
asm_const_hpat_face @
( s_output_ids, @
s_surface1_list, @
s_surface2_list, @
s_surface3_list, @
s_surface4_list, @
s_surface5_list, @
s_surface6_list, @
sv_created_ids )
dump i_return_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)
sys_free_string(sv_sgm_surface_4edge_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_hpat_vertex()
#
# This session file will create a new database by
# name ’new.db’. The above mentioned function
# will be used to create a solid from eight point
# coordinates.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_hpat_vertex()
# has the following arguments:
#
# asm_const_hpat_vertex
# ( output_ids,
# point1_list,
# point2_list,
# point3_list,
# point4_list,
# point5_list,
# point6_list,
# point7_list,
# point8_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_point1_list[32]
STRING s_point2_list[32]
STRING s_point3_list[32]
STRING s_point4_list[32]
STRING s_point5_list[32]
STRING s_point6_list[32]
STRING s_point7_list[32]
STRING s_point8_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
i_return_value = @
ga_view_aa_set(23.,-34.,0)
dump i_return_value
i_return_value = @
ga_group_display_set("default_group","general")
dump i_return_value
i_return_value = @
ga_display_lines_set( "general", 2 )
dump i_return_value
solid_label(TRUE)
#---------------------------------------------------------------------
# Creating a solid by giving the vertex locations.
s_output_ids = "#"
s_point1_list = "[0 0 0]"
s_point2_list = "[1 0.1 -0.25]"
s_point3_list = "[1.1 0.15 1.25]"
s_point4_list = "[0.2 0.05 0.95]"
s_point5_list = "[0.25 1.5 0.25]"
s_point6_list = "[1.25 1.5 0]"
s_point7_list = "[1.35 1 1.6]"
s_point8_list = "[0.55 1 1.3]"
#
i_return_value = @
asm_const_hpat_vertex @
( s_output_ids, @
s_point1_list, @
s_point2_list, @
s_point3_list, @
s_point4_list, @
s_point5_list, @
s_point6_list, @
s_point7_list, @
s_point8_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_hpat_xyz()
#
# This session file will create a new database by
# name ’new.db’. The above mentioned function
# will be used to create a solid by giving solid
# origin and orientation.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_hpat_xyz()
# has the following arguments:
#
# asm_const_hpat_xyz
# ( output_ids,
# solid_length,
# solid_origin,
# coord_frame,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_solid_length[16]
STRING s_solid_origin[16]
STRING s_coord_frame[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
i_return_value = @
ga_view_aa_set(23.,-34.,0)
dump i_return_value
i_return_value = @
ga_group_display_set("default_group","general")
dump i_return_value
i_return_value = @
ga_display_lines_set( "general", 2 )
dump i_return_value
solid_label(TRUE)
#---------------------------------------------------------------------
# Creating a solid.
s_output_ids = "#"
s_solid_length = "<1.1 2.2 3.3>"
s_solid_origin = "[0.1 0.2 0.3]"
s_coord_frame = "Coord 0"
#
i_return_value = @
asm_const_hpat_xyz @
( s_output_ids, @
s_solid_length, @
s_solid_origin, @
s_coord_frame, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_2point()
#
# This session file will create a new database by
# name ’new.db’ and create a surface. This
# surface will be used as manifold entity for
# creating lines using the above mentioned
# function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_2point()
# has the following arguments:
#
# asm_const_line_2point
# ( output_ids,
# point1_list,
# point2_list,
# i_manifold_type,
# manifold_id,
# num_interp,
# num_lines,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_point1_list[32]
STRING s_point2_list[32]
INTEGER i_manifold_type
STRING s_manifold_id[32]
INTEGER i_num_interp
INTEGER i_num_lines
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
i_return_value = @
ga_view_aa_set(-67., 0., -34.)
dump i_return_value
surface_label(TRUE)
curve_label(TRUE)
#---------------------------------------------------------------------
# Creating a surface to be used as manifold entity.
i_return_value = @
asm_const_patch_xyz( "1","<1 0.5 0>","[0 0 0]"@
, "Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating two lines.
s_output_ids = "#"
s_point1_list = "[-0.25 -0.25 0.5][0.25 0.25 0.5]"
s_point2_list = "[1.25 0.25 0.5][0.75 0.25 0.5]"
i_manifold_type = 2
s_manifold_id = "surface 1"
i_num_interp = 6
i_num_lines = 6
#
i_return_value = @
asm_const_line_2point @
( s_output_ids, @
s_point1_list, @
s_point2_list, @
i_manifold_type, @
s_manifold_id, @
i_num_interp, @
i_num_lines, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_3point()
#
# This session file will create a new database by
# name ’new.db’. The above mentioned function
# will be called to create two lines.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_3point()
# has the following arguments:
#
# asm_const_line_3point
# ( output_ids,
# point1_list,
# point2_list,
# point3_list,
# param_method,
# param_pos,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_point1_list[32]
STRING s_point2_list[32]
STRING s_point3_list[32]
INTEGER i_param_method
REAL r_param_pos
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
curve_label(TRUE)
#---------------------------------------------------------------------
# Creating two lines by giving parametric position of midpoint.
s_output_ids = "#"
s_point1_list = "[-0.25 -0.25 0.5][0.25 0.25 0.5]"
s_point2_list = "[1 0.25 0.5][0.75 0.5 0.5]"
s_point3_list = "[1.25 0.25 0.5][0.75 0.25 0.5]"
i_param_method = 1
r_param_pos = 0.6
#
i_return_value = @
asm_const_line_3point @
( s_output_ids, @
s_point1_list, @
s_point2_list, @
s_point3_list, @
i_param_method, @
r_param_pos, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_4point()
#
# This session file will create a new database by
# name ’new.db’ and above mentioned function will
# be called by giving coordinates as input.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_4point()
# has the following arguments:
#
# asm_const_line_4point
# ( output_ids,
# point1_list,
# point2_list,
# point3_list,
# point4_list,
# param_method,
# param_pos1,
# param_pos2,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_point1_list[32]
STRING s_point2_list[32]
STRING s_point3_list[32]
STRING s_point4_list[32]
INTEGER i_param_method
REAL r_param_pos1
REAL r_param_pos2
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
curve_label(TRUE)
#---------------------------------------------------------------------
# Creating two lines by giving parametric position of two internal
# points.
s_output_ids = "#"
s_point1_list = "[-0.25 -0.25 0.5][0.25 0.25 0.5]"
s_point2_list = "[1 0.25 0.5][0.75 0.5 0.5]"
s_point3_list = "[1.25 0.25 0.5][0.75 0.25 0.5]"
s_point4_list = "[0.6 0 0.3]"
i_param_method = 1
r_param_pos1 = 0.3
r_param_pos2 = 0.8
#
i_return_value = @
asm_const_line_4point @
( s_output_ids, @
s_point1_list, @
s_point2_list, @
s_point3_list, @
s_point4_list, @
i_param_method, @
r_param_pos1, @
r_param_pos2, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_arc3point()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function to create two curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_arc3point()
# has the following arguments:
#
# asm_const_line_arc3point
# ( output_ids,
# num_lparc,
# point1_list,
# point2_list,
# point3_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
INTEGER i_num_lparc
STRING s_point1_list[32]
STRING s_point2_list[32]
STRING s_point3_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
curve_label(TRUE)
#---------------------------------------------------------------------
# Creating two arcs with 5 lines per arc.
s_output_ids = "#"
i_num_lparc = 5
s_point1_list = "[-0.25 -0.25 0.5][0.25 0.25 0.5]"
s_point2_list = "[1 0.25 0.5][0.75 0.5 0.5]"
s_point3_list = "[1.25 0.25 0.5][0.75 0.25 0.5]"
#
i_return_value = @
asm_const_line_arc3point @
( s_output_ids, @
i_num_lparc, @
s_point1_list, @
s_point2_list, @
s_point3_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_conic()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create an elliptic arc.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_conic()
# has the following arguments:
#
# asm_const_line_conic
# ( output_ids,
# coord_frame,
# rho,
# point1_list,
# point2_list,
# point3_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_coord_frame[32]
REAL r_rho
STRING s_point1_list[32]
STRING s_point2_list[32]
STRING s_point3_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
curve_label(TRUE)
#---------------------------------------------------------------------
# Creating an elliptic arc.
s_output_ids = "#"
s_coord_frame = "Coord 0"
r_rho = 0.4
s_point1_list = "[0 10 0]"
s_point2_list = "[-1 .1 0]"
s_point3_list = "[2 -.1 0]"
#
i_return_value = @
asm_const_line_conic @
( s_output_ids, @
s_coord_frame, @
r_rho, @
s_point1_list, @
s_point2_list, @
s_point3_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_extract()
#
# This session file will create a new database by
# name ’new.db’ and two surfaces will be created.
# The above mentioned function will be called to
# extract the lines.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_extract()
# has the following arguments:
#
# asm_const_line_extract
# ( output_ids,
# surface_list,
# line_direction,
# param_pos,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_surface_list[32]
INTEGER i_line_direction
REAL r_param_pos
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_created[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
surface_label(TRUE)
curve_label(TRUE)
#---------------------------------------------------------------------
# Creating two surfaces.
i_return_value = @
asm_const_patch_xyz( "#", "<0.5 0.5 0>", @
"[0.25 1 0.25] [1.25 0.9 0.25]", "Coord 0",@
sv_asm_create_patch_xy_created )
dump i_return_value
#---------------------------------------------------------------------
# Extracting lines from the two surfaces.
s_output_ids = "#"
s_surface_list = "surface 1 2"
i_line_direction = 1
r_param_pos = 0.45
#
i_return_value = @
asm_const_line_extract @
( s_output_ids, @
s_surface_list, @
i_line_direction, @
r_param_pos, @
sv_created_ids )
dump i_return_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 asm_const_line_fillet()
#
# This session file will create a new database by
# name ’new.db’ and create two intersecting
# curves. The above mentioned function will be
# called to create curves by filleting.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_fillet()
# has the following arguments:
#
# asm_const_line_fillet
# ( output_ids,
# num_fillet,
# radius,
# fil_tolerance,
# trim_original,
# point1_list,
# point2_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
INTEGER i_num_fillet
REAL r_radius
REAL r_fil_tolerance
LOGICAL l_trim_original
STRING s_point1_list[128]
STRING s_point2_list[128]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Creating two intersecting curves.
i_return_value = @
asm_const_line_2point( "1", "[0 0 0]", @
"[1 0 0][0 1 0]", 0, "", 50., 1, @
sv_asm_line_2point_created_ids )
dump i_return_value
curve_label(TRUE)
#---------------------------------------------------------------------
# Creating curves by filleting the two intersecting lines created
# before.
s_output_ids = "#"
i_num_fillet = 5
r_radius = 0.1
r_fil_tolerance = 0.005
l_trim_original = TRUE
s_point1_list = "Construct PointCurveUOnCurve"//@
"(Evaluate Geometry (Point 1 )) (Evaluate Geometry (Curve 1 ))"
s_point2_list = "Construct PointCurveUOnCurve"//@
"(Evaluate Geometry (Point 1 )) (Evaluate Geometry (Curve 2 ))"
#
i_return_value = @
asm_const_line_fillet @
( s_output_ids, @
i_num_fillet, @
r_radius, @
r_fil_tolerance, @
l_trim_original, @
s_point1_list, @
s_point2_list, @
sv_created_ids )
$? YES 1000047
# Deleting the original entities.
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_fit()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create a line passing through a
# set of points.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_fit()
# has the following arguments:
#
# asm_const_line_fit
# ( output_ids,
# point_list,
# num_lines,
# geo_tolerance,
# num_iterations,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_point_list[128]
INTEGER i_num_lines
REAL r_geo_tolerance
INTEGER i_num_iterations
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)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating five lines from ten location coordinates.
s_output_ids = "#"
s_point_list = "[0 0 0][0.5 1 0][1 0 0]"// @
"[1.5 1 0][2 0 0][2.5 1 0][3 0 0][3.5 1 0][4 0 0][4.5 1 0]"
i_num_lines = 10
r_geo_tolerance = 0.001
i_num_iterations = 10
#
i_return_value = @
asm_const_line_fit @
( s_output_ids, @
s_point_list, @
i_num_lines, @
r_geo_tolerance, @
i_num_iterations, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_intersect()
#
# This session file will create a new database by
# name ’new.db’ and create two surfaces. The
# above mentioned function will be called to
# create a line at their intersection.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_intersect()
# has the following arguments:
#
# asm_const_line_intersect
# ( output_ids,
# surface1_list,
# surface2_list,
# curves_per_int,
# geo_tolerance,
# flat_tolerance,
# int_tolerance,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_surface1_list[32]
STRING s_surface2_list[32]
INTEGER i_curves_per_int
REAL r_geo_tolerance
REAL r_flat_tolerance
REAL r_int_tolerance
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]
STRING sv_asm_line_3point_created_ids[VIRTUAL]
STRING sv_sgm_sweep_surface_e_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
i_return_value = @
ga_view_aa_set( 23., -34., 0. )
dump i_return_value
i_return_value = @
ga_display_lines_set( "general", 2 )
dump i_return_value
surface_label(TRUE)
curve_label(TRUE)
#---------------------------------------------------------------------
# Creating a surface in Y-Z plane.
i_return_value = @
asm_const_patch_xyz( "1", "<0 1 1>", @
"[0 0 0]", "Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating a curve from 3 points and extracting a surface.
i_return_value = @
asm_const_line_3point( "1", "Point 1 ", @
"[0 0.35 0.7]", "Point 3 ", 1, 0.5, @
sv_asm_line_3point_created_ids )
dump i_return_value
i_return_value = @
sgm_const_surface_extrude( "2", "<1 0 0>", 1.,@
0., "[0 0 0]", "Coord 0", "Curve 1 ", @
sv_sgm_sweep_surface_e_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Using surface 1 and 2 to create a line at their intersection.
s_output_ids = "#"
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
i_curves_per_int = 5
r_geo_tolerance = 0.01
r_flat_tolerance = 0.1
r_int_tolerance = 0.05
#
i_return_value = @
asm_const_line_intersect @
( s_output_ids, @
s_surface1_list, @
s_surface2_list, @
i_curves_per_int, @
r_geo_tolerance, @
r_flat_tolerance, @
r_int_tolerance, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_crtd_ids)
sys_free_string(sv_asm_line_3point_created_ids)
sys_free_string(sv_sgm_sweep_surface_e_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_normal()
#
# This session file will create a new database by
# name ’new.db’ and create two lines. The above
# mentioned function will be called and three
# lines perpendicular to these lines will be
# created.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_normal()
# has the following arguments:
#
# asm_const_line_normal
# ( output_ids,
# point_list,
# line_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_point_list[64]
STRING s_line_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Creating two lines.
i_return_value = @
asm_const_line_2point("#", "[0 0 0]", @
"[1 0 0][ 0 1 0]", 0, "", 0, 1, @
sv_asm_line_2point_created_ids)
dump i_return_value
curve_label(TRUE)
#---------------------------------------------------------------------
# Creating three perpendicular lines to the lines created before.
s_output_ids = "#"
s_point_list = "[0.25 0.75 0][0.5 0.5 0][0.75 0.25 0]"
s_line_list = "curve 1 1 2"
#
i_return_value = @
asm_const_line_normal @
( s_output_ids, @
s_point_list, @
s_line_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_project()
#
# This session file will create a new database by
# name ’new.db’ and create two surfaces and a
# line. The above mentioned function will be
# called after a pause, to create lines by
# projecting the line on the surfaces.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_project()
# has the following arguments:
#
# asm_const_line_project
# ( output_ids,
# line_list,
# surface_list,
# delete_original,
# project_method,
# vector,
# coord_frame,
# num_lines,
# geo_tolerance,
# flat_tolerance,
# int_tolerance,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_line_list[32]
STRING s_surface_list[32]
LOGICAL l_delete_original
INTEGER i_project_method
STRING s_vector[32]
STRING s_coord_frame[32]
INTEGER i_num_lines
REAL r_geo_tolerance
REAL r_flat_tolerance
REAL r_int_tolerance
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_line_3point_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
i_return_value = @
ga_view_aa_set(-67., 0., -34.)
dump i_return_value
surface_label(TRUE)
curve_label(TRUE)
#---------------------------------------------------------------------
# Creating two surfaces.
i_return_value = @
asm_const_patch_xyz( "#","<0 1 1>" @
,"[0 0 0]", "Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "#","<0.25 0.9 1>" @
,"[0 0 0]", "Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating a curve.
i_return_value = @
asm_const_line_3point("#", "[0.25 0.25 0]", @
"[0.25 1 0.5]", "[0.75 0.75 0]", 1, 0.5, @
sv_asm_line_3point_created_ids)
dump i_return_value
#---------------------------------------------------------------------
# Session file paused. Press "Resume" to continue..
sf_pause()
#---------------------------------------------------------------------
# Creating lines by projecting the curve on surfaces by giving
# projection vector.
s_output_ids = "#"
s_line_list = "curve 1"
s_surface_list = "surface 1 2"
l_delete_original = TRUE
i_project_method = 2
s_vector = "<1 0 0>"
s_coord_frame = "coord 0"
i_num_lines = 3
r_geo_tolerance = 0.01
r_flat_tolerance = 0.1
r_int_tolerance = 0.05
#
i_return_value = @
asm_const_line_project @
( s_output_ids, @
s_line_list, @
s_surface_list, @
l_delete_original, @
i_project_method, @
s_vector, @
s_coord_frame, @
i_num_lines, @
r_geo_tolerance, @
r_flat_tolerance, @
r_int_tolerance, @
sv_created_ids )
$? YES 1000021
# Deleting the original line.
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_line_3point_created_ids)
sys_free_string(sv_asm_create_patch_xy_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_project_v1()
#
# This session file will create a new database by
# name ’new.db’ and create two surfaces and a
# line. The above mentioned function will be
# called after a pause to create lines by
# projecting the line on the surfaces.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_project_v1()
# has the following arguments:
#
# asm_const_line_project_v1
# ( output_ids,
# line_list,
# surface_list,
# delete_original,
# project_method,
# vector,
# coord_frame,
# projection_tolerance,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[128]
STRING s_line_list[128]
STRING s_surface_list[128]
LOGICAL l_delete_original
INTEGER i_project_method
STRING s_vector[128]
STRING s_coord_frame[128]
REAL r_projection_tolerance
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_line_3point_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
i_return_value = @
ga_view_aa_set(-67., 0., -34.)
dump i_return_value
surface_label(TRUE)
curve_label(TRUE)
#---------------------------------------------------------------------
# Creating two surfaces.
i_return_value = @
asm_const_patch_xyz( "#","<0 1 1>" @
,"[0 0 0]", "Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "#","<0.25 0.9 1>" @
,"[0 0 0]", "Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating a curve.
i_return_value = @
asm_const_line_3point("#", "[0.25 0.25 0]", @
"[0.25 1 0.5]", "[0.75 0.75 0]", 1, 0.5, @
sv_asm_line_3point_created_ids)
dump i_return_value
#---------------------------------------------------------------------
# Session file paused. Press "Resume" to continue..
sf_pause()
#---------------------------------------------------------------------
# Creating lines by projecting the curve on surfaces.
s_output_ids = "#"
s_line_list = "curve 1"
s_surface_list = "surface 1 2"
l_delete_original = TRUE
i_project_method = 3
s_vector = "<1 0 0>"
s_coord_frame = "coord 0"
r_projection_tolerance = 0.05
#
i_return_value = @
asm_const_line_project_v1 @
( s_output_ids, @
s_line_list, @
s_surface_list, @
l_delete_original, @
i_project_method, @
s_vector, @
s_coord_frame, @
r_projection_tolerance, @
sv_created_ids )
$? YES 1000021
# Deleting the original line.
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_line_3point_created_ids)
sys_free_string(sv_asm_create_patch_xy_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_pwl()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create lines passing through ten
# points.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_pwl()
# has the following arguments:
#
# asm_const_line_pwl
# ( output_ids,
# point_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_point_list[128]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
i_return_value = @
ga_view_aa_set(23., -34., 0. )
dump i_return_value
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating lines by suppling ten point coordinates.
s_output_ids = "#"
s_point_list = "[0 0 0][0.5 0 1][1 0 0]"//@
"[1.5 0 1][2 0 0][2.5 0 1][3 0 0][3.5 0 1][4 0 0][4.5 0 1]"
#
i_return_value = @
asm_const_line_pwl @
( s_output_ids, @
s_point_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_spline()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create spline passing through ten
# points.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_spline()
# has the following arguments:
#
# asm_const_line_spline
# ( output_ids,
# point_list,
# end_flag,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_point_list[128]
INTEGER i_end_flag
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
i_return_value = @
ga_view_aa_set(23., -34., 0. )
dump i_return_value
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating spline by suppling ten point coordinates.
s_output_ids = "#"
s_point_list = "[0 0 0][0.5 0 1][1 0 0]"//@
"[1.5 0 1][2 0 0][2.5 0 1][3 0 0][3.5 0 1][4 0 0][4.5 0 1]"
i_end_flag = 1
#
i_return_value = @
asm_const_line_spline @
( s_output_ids, @
s_point_list, @
i_end_flag, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_tancurve()
#
# This session file will create a new database by
# name ’new.db’ and create two lines. The above
# mentioned function will be called to create a
# tangent curve.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_tancurve()
# has the following arguments:
#
# asm_const_line_tancurve
# ( output_ids,
# line1_list,
# line2_list,
# trim_original,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_line1_list[128]
STRING s_line2_list[128]
LOGICAL l_trim_original
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_line_3point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Creating two lines.
i_return_value = @
asm_const_line_3point( "#", "[1 2 0][-1 2 0]", @
"[.75 .25 0][-.75 .25 0]", @
"[.25 1 0][-.25 1 0]", 1, 0.5, @
sv_asm_line_3point_created_ids )
dump i_return_value
curve_label(TRUE)
#---------------------------------------------------------------------
# Creating a line tangent to the lines drawn before.
s_output_ids = "#"
l_trim_original = TRUE
s_line1_list = "Construct PointCurveUOnCurve "//@
"(Evaluate Geometry ([ 0.719200 0.218000 0.000000 ]))"//@
"(Evaluate Geometry (Curve 1 ))"
s_line2_list = "Construct PointCurveUOnCurve "//@
"(Evaluate Geometry ([-0.551050 0.284500 0.000000 ]))"//@
"(Evaluate Geometry (Curve 2 ))"
#
i_return_value = @
asm_const_line_tancurve @
( s_output_ids, @
s_line1_list, @
s_line2_list, @
l_trim_original, @
sv_created_ids )
$? YESFORALL 1000028
# Deleting the original entities.
dump i_return_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 asm_const_line_tanpoint()
#
# This session file will create a new database by
# name ’new.db’ and create five curves. The above
# mentioned function will be called to create
# tangents to the curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_tanpoint()
# has the following arguments:
#
# asm_const_line_tanpoint
# ( output_ids,
# line_list,
# point_list,
# closest_only,
# trim_original,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_line_list[32]
STRING s_point_list[64]
LOGICAL l_closest_only
LOGICAL l_trim_original
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_line_fit_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
i_return_value = @
ga_view_aa_set( 90., 0., 0. )
dump i_return_value
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating five curves.
i_return_value = @
asm_const_line_fit( "#", @
"[0 0 0][0.5 0 1][1 0 0][1.5 0 1 ][2 0 0]",@
5, 0.0049999999, 10, sv_asm_create_line_fit_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating tangents to the existing five curves.
s_output_ids = "#"
s_line_list = "curve 1 2 3 4 5"
s_point_list = "[0.35 0 1][1.1 0 -0.15]"// @
"[1.9 0 0][1.5 0 1.050167][1.5 0 1.050167]"
l_closest_only = FALSE
l_trim_original = FALSE
#
i_return_value = @
asm_const_line_tanpoint @
( s_output_ids, @
s_line_list, @
s_point_list, @
l_closest_only, @
l_trim_original, @
sv_created_ids )
$? YESFORALL 1000065
$? YESFORALL 1000065
# Creating all tangents between point and curve.
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_line_fit_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_line_xyz()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create three curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_line_xyz()
# has the following arguments:
#
# asm_const_line_xyz
# ( output_ids,
# line_length,
# line_origin,
# coord_frame,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_line_length[32]
STRING s_line_origin[32]
STRING s_coord_frame[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
curve_label(TRUE)
#---------------------------------------------------------------------
# Creating three curves.
s_output_ids = "#"
s_line_length = "<1 0 0><1 1 0>"
s_line_origin = "[0 0 0][0 0 0][1 0 0]"
s_coord_frame = "coord 0"
#
i_return_value = @
asm_const_line_xyz @
( s_output_ids, @
s_line_length, @
s_line_origin, @
s_coord_frame, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_patch_2curve()
#
# This file opens a new database "new.db" and
# creates three curves. Later it creates two
# surfaces with three curves using the above
# function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_patch_2curve()
# has the following arguments:
#
# asm_const_patch_2curve
# ( output_ids,
# curve1_list,
# curve2_list,
# manifold_type,
# manifold_id,
# ruled_form,
# auto_align,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "3 4"
STRING s_curve1_list[32]
STRING s_curve2_list[32]
INTEGER i_manifold_type
STRING s_manifold_id[32]
INTEGER i_ruled_form
LOGICAL l_auto_align
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
# Create three curves.
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "1", 1., @
30., 150., "Coord 0.3", "[0 0 0]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
i_return_value = @
asm_const_line_2point( "2", "[-0.866 0.5 1]", @
"[0.866 0.5 1]", 0, "", 50., 1, @
sv_asm_line_2point_created_ids )
dump i_return_value
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "3", 1., @
30., 150., "Coord 0.3", "[0 0 2]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
ga_view_aa_set( 23.,-60., 0. )
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 20 )
s_curve1_list = "curve 1 3"
s_curve2_list = "curve 2 2"
i_manifold_type = 0
i_ruled_form = 0
l_auto_align = TRUE
i_return_value = @
asm_const_patch_2curve @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
i_manifold_type, @
s_manifold_id, @
i_ruled_form, @
l_auto_align, @
sv_created_ids )
dump i_return_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_const_patch_2curve_v1()
#
# This file opens a new database "new.db" and
# creates three curves. Later it creates two
# surfaces with three curves using the above
# function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_patch_2curve_v1()
# has the following arguments:
#
# asm_const_patch_2curve_v1
# ( output_ids,
# curve1_list,
# curve2_list,
# manifold_type,
# manifold_id,
# auto_align,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "3 4"
STRING s_curve1_list[32]
STRING s_curve2_list[32]
INTEGER i_manifold_type
STRING s_manifold_id[32]
LOGICAL l_auto_align
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
# Create three curves.
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "1", 1., @
30., 150., "Coord 0.3", "[0 0 0]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
i_return_value = @
asm_const_line_2point( "2", "[-0.866 0.5 1]", @
"[0.866 0.5 1]", 0, "", 50., 1, @
sv_asm_line_2point_created_ids )
dump i_return_value
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "3", 1., @
30., 150., "Coord 0.3", "[0 0 2]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
ga_view_aa_set( 23.,-60., 0. )
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 20 )
s_curve1_list = "curve 1 3"
s_curve2_list = "curve 2 2"
i_manifold_type = 0
l_auto_align = TRUE
i_return_value = @
asm_const_patch_2curve_v1 @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
i_manifold_type, @
s_manifold_id, @
l_auto_align, @
sv_created_ids )
dump i_return_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_const_patch_3curve()
#
# This file opens a new database "new.db" and
# creates five curves. Later it creates two
# surfaces with five curves using the above
# function. Each surface consists of three
# curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_patch_3curve()
# has the following arguments:
#
# asm_const_patch_3curve
# ( output_ids,
# curve1_list,
# curve2_list,
# curve3_list,
# param_pos,
# auto_align,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8 9"
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
REAL r_param_pos
LOGICAL l_auto_align
STRING sv_created_ids[VIRTUAL]
STRING sv_sgm_create_curve_2d_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
# Create five curves.
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "1", 1., @
30., 150., "Coord 0.3", "[0 0 0]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "2", 1., @
-150.,-30.,"Coord 0.3", "[0 1 1]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "3", 1., @
30., 150., "Coord 0.3", "[0 0 2]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "4", 1., @
-150.,-30.,"Coord 0.3", "[0 1 3]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "5", 1., @
30., 150., "Coord 0.3", "[0 0 4]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
ga_view_aa_set( 23.,-60., 0. )
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 20 )
s_curve1_list = "curve 1 3"
s_curve2_list = "curve 2 4"
s_curve3_list = "curve 3 5"
l_auto_align = TRUE
r_param_pos = 0.4
# Create two surfaces with ids 8 and 9.
# Surface with id 8 has curves 1 ,2 and 3.
# Surface with id 9 has curves 3 ,4 and 5.
i_return_value = @
asm_const_patch_3curve @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
r_param_pos, @
l_auto_align, @
sv_created_ids )
dump i_return_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 asm_const_patch_4curve()
#
# This file opens a new database "new.db" and
# creates four curves. Later it creates a
# surface with four curves using the above
# function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_patch_4curve()
# has the following arguments:
#
# asm_const_patch_4curve
# ( output_ids,
# curve1_list,
# curve2_list,
# curve3_list,
# curve4_list,
# param_pos1,
# param_pos2,
# auto_align,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8"
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
STRING s_curve4_list[32]
REAL r_param_pos1
REAL r_param_pos2
LOGICAL l_auto_align
STRING sv_created_ids[VIRTUAL]
STRING sv_sgm_create_curve_2d_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
# Create four curves.
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "1", 1., @
30., 150., "Coord 0.3", "[0 0 0]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "2", 1., @
-150.,-30.,"Coord 0.3", "[0 1 1]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "3", 1., @
30., 150., "Coord 0.3", "[0 0 2]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "4", 1., @
-150.,-30.,"Coord 0.3", "[0 1 3]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
ga_view_aa_set( 23.,-60., 0. )
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 20 )
s_curve1_list = "curve 1 "
s_curve2_list = "curve 2 "
s_curve3_list = "curve 3 "
s_curve4_list = "curve 4 "
l_auto_align = TRUE
r_param_pos1 = 0.33
r_param_pos2 = 0.66
# Create a surface with ids 8 having curves 1,2,3 and 4.
i_return_value = @
asm_const_patch_4curve @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
s_curve4_list, @
r_param_pos1, @
r_param_pos2, @
l_auto_align, @
sv_created_ids )
dump i_return_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 asm_const_patch_edge()
#
# This file opens a new database "new.db" and
# creates four curves. Later it creates a
# surface with four bounding curves using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_patch_edge()
# has the following arguments:
#
# asm_const_patch_edge
# ( output_ids,
# curve1_list,
# curve2_list,
# curve3_list,
# curve4_list,
# manifold_type,
# manifold_id,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8"
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
STRING s_curve4_list[32]
INTEGER i_manifold_type
STRING s_manifold_id[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_sgm_create_curve_2d_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
# Create four curves.
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "1", 1., @
30., 150., "Coord 0.3", "[0 0 0]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "2", 1., @
90.,270.,"Coord 0.1","[0.866 0.5 1]" @
,FALSE,sv_sgm_create_curve_2d_created )
dump i_return_value
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "3", 1., @
30., 150., "Coord 0.3", "[0 0 2]", FALSE , @
sv_sgm_create_curve_2d_created )
dump i_return_value
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "4", 1., @
90.,270.,"Coord 0.1", "[-0.866 0.5 1]" @
, FALSE ,sv_sgm_create_curve_2d_created )
dump i_return_value
ga_view_aa_set( 23.,-60., 0. )
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 20 )
s_curve1_list = "curve 1 "
s_curve2_list = "curve 2 "
s_curve3_list = "curve 3 "
s_curve4_list = "curve 4 "
i_manifold_type = 0
# Create a surface with ids 8 having curves 1,2,3 and 4.
i_return_value = @
asm_const_patch_edge @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
s_curve4_list, @
i_manifold_type, @
s_manifold_id, @
sv_created_ids )
dump i_return_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 two calls to
# the function asm_const_patch_extract()
#
# This file opens a new database "new.db" and
# creates a cubic solid. Later it extracts two
# surfaces from this solid in different
# parametric planes.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_patch_extract()
# has the following arguments:
#
# asm_const_patch_extract
# ( output_ids,
# hpat_list,
# param_plane,
# param_pos,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8"
STRING s_hpat_list[32]
INTEGER i_param_plane
REAL r_param_pos
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 = @
asm_const_hpat_xyz("1","<2 2 2>","[0 0 0]", @
"coord 0", sv_asm_create_hpat_xyz_created )
dump i_return_value
ga_view_aa_set( 23.,-34.,0.)
surface_label(TRUE)
s_hpat_list = "Solid 1"
# Create a patch by extracting a surface from the solid in
# parametric plane 1 and having parametric position 0.75.
i_param_plane = 1
r_param_pos = 0.75
i_return_value = @
asm_const_patch_extract @
( s_output_ids, @
s_hpat_list, @
i_param_plane, @
r_param_pos, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
# Create a patch by extracting a surface from the solid in
# parametric plane 2 and having parametric position 0.33.
s_output_ids = "9"
i_param_plane = 2
r_param_pos = 0.33
i_return_value = @
asm_const_patch_extract @
( s_output_ids, @
s_hpat_list, @
i_param_plane, @
r_param_pos, @
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_const_patch_fillet()
#
# This file opens a new database "new.db" and
# creates two surfaces at right angle to each
# other. Later it creates a fillet surface
# between these two surfaces.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_patch_fillet()
# has the following arguments:
#
# asm_const_patch_fillet
# ( output_ids,
# radius1,
# radius2,
# fil_tol,
# trim_orig,
# surfacepoint1_list,
# surfacepoint2_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8"
REAL r_radius1
REAL r_radius2
REAL r_fil_tol
LOGICAL l_trim_orig
STRING s_surfacepoint1_list[256]
STRING s_surfacepoint2_list[256]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
# Create two surfaces at right angle to each other.
i_return_value = @
asm_const_patch_xyz("1","<0 1 1>","[0 0 0]", @
"coord 0" ,sv_asm_create_patch_xy_created)
dump i_return_value
i_return_value = @
asm_const_patch_xyz("2","<1 0 1>","[0 0 0]", @
"coord 0", sv_asm_create_patch_xy_created)
dump i_return_value
ga_view_aa_set(23.,-34.,0.)
r_radius1 = 0.2
r_radius2 = 0.3
r_fil_tol = 0.005
l_trim_orig = TRUE
s_surfacepoint1_list = "Construct PointSurfaceUVOnSurface" // @
"(Evaluate Geometry (Point 4 )) (Evaluate Geometry (Surface 1 ))"
s_surfacepoint2_list = "Construct PointSurfaceUVOnSurface" // @
"(Evaluate Geometry (Point 5 )) (Evaluate Geometry (Surface 2 ))"
# Create fillet surface at the edge of the two surfaces.
# Session file paused. Press "Resume" to continue..
sf_pause()
i_return_value = @
asm_const_patch_fillet @
( s_output_ids, @
r_radius1, @
r_radius2, @
r_fil_tol, @
l_trim_orig, @
s_surfacepoint1_list, @
s_surfacepoint2_list, @
sv_created_ids )
$? YESFORALL 1000049
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 asm_const_patch_match()
#
# This file opens a new database "new.db" and
# creates a square surface. Further it creates
# two curves. Later it creates a surface with
# these two curves. Finally it constructs a
# match surface with two edges of the previously
# created surfaces.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_patch_match()
# has the following arguments:
#
# asm_const_patch_match
# ( output_ids,
# surface_list1,
# surface_list2,
# del_org,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8"
STRING s_surface_list1[32]
STRING s_surface_list2[32]
LOGICAL l_del_org
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
STRING sv_asm_create_line_xyz_created[VIRTUAL]
STRING sv_sgm_create_curve_2d_created[VIRTUAL]
STRING sv_sgm_surface_2curve_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
# Create a surface.
i_return_value = @
asm_const_patch_xyz( "1", "<1 1 0>","[0 0 0]" @
,"Coord 0",sv_asm_create_patch_xy_created )
dump i_return_value
# Create two curves.
i_return_value = @
sgm_const_curve_2d_arcangles_v1( "1", 0.5, @
-90., 90., "Coord 0.3", "[1 0.5 0]",TRUE, @
sv_sgm_create_curve_2d_created )
dump i_return_value
i_return_value = @
asm_const_line_xyz( "2", "<0 1 0>", "[2 0 0]",@
"Coord 0",sv_asm_create_line_xyz_created )
dump i_return_value
# Create a surface between the two created curves.
i_return_value = @
sgm_const_surface_2curve( "2", "Curve 1 ", @
"Curve 2 ", sv_sgm_surface_2curve_created )
dump i_return_value
s_surface_list1 = "surface 1"
s_surface_list2 = "surface 2"
l_del_org = TRUE
surface_label(TRUE)
# Note the creation of match surface.
# Session file paused. Press "Resume" to continue..
sf_pause()
# Create a match surface with label = 8.
i_return_value = @
asm_const_patch_match @
( s_output_ids, @
s_surface_list1, @
s_surface_list2, @
l_del_org, @
sv_created_ids )
$? YES 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_create_line_xyz_created)
sys_free_string(sv_sgm_create_curve_2d_created)
sys_free_string(sv_sgm_surface_2curve_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_patch_vertex()
#
# This file opens a new database "new.db" and
# creates seven points. Later it constructs
# two surfaces with the created points. Each
# surface contains four points.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_patch_vertex()
# has the following arguments:
#
# asm_const_patch_vertex
# ( output_ids,
# point1_list,
# point2_list,
# point3_list,
# point4_list,
# manifold_type,
# manifold_id,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "1 2"
STRING s_point1_list[32]
STRING s_point2_list[32]
STRING s_point3_list[32]
STRING s_point4_list[32]
INTEGER i_manifold_type
STRING s_manifold_id[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_grid_xyz_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
# Create 7 points.
i_return_value = @
asm_const_grid_xyz( "","[0 0 0][1 0 0]"// @
"[1 1 0][0 1 0][2 1 0][2 2 0][1 2 0]", @
"coord 0", sv_asm_create_grid_xyz_created )
dump i_return_value
s_point1_list = "point 1 3 "
s_point2_list = "point 2 5 "
s_point3_list = "point 3 6 "
s_point4_list = "point 4 7 "
i_manifold_type = 0
# Create Surface using the vertex grid points.
i_return_value = @
asm_const_patch_vertex @
( s_output_ids, @
s_point1_list, @
s_point2_list, @
s_point3_list, @
s_point4_list, @
i_manifold_type, @
s_manifold_id, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_grid_xyz_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_patch_xyz()
#
# This file opens a new database "new.db" and
# creates a surface with a given origin and
# given length.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_patch_xyz()
# has the following arguments:
#
# asm_const_patch_xyz
# ( output_ids,
# surface_length,
# surface_origin,
# coord_frame,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "4"
STRING s_surface_length[32]
STRING s_surface_origin[32]
STRING s_coord_frame[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
# Create a surface with origin [0 0 0] and length <1 1 0>.
s_surface_length = "<1 1 0>"
s_surface_origin = "[0 0 0]"
s_coord_frame = "coord 0"
i_return_value = @
asm_const_patch_xyz @
( s_output_ids, @
s_surface_length, @
s_surface_origin, @
s_coord_frame, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_solid_5face()
#
# This file opens a new database "new.db" and
# creates a triangular prism with five surfaces.
# Later it creates a solid with the help of
# these five surfaces.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_solid_5face()
# has the following arguments:
#
# asm_const_solid_5face
# ( output_ids,
# surface1_list,
# surface2_list,
# surface3_list,
# surface4_list,
# surface5_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8"
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING s_surface3_list[32]
STRING s_surface4_list[32]
STRING s_surface5_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
STRING sv_asm_line_2point_created_ids[VIRTUAL]
STRING sv_sgm_surface_3edge_created[VIRTUAL]
STRING sv_sgm_surface_4edge_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0.)
# Create two surfaces.
i_return_value = @
asm_const_patch_xyz("","<1 1 0><0 1 1>", @
"[0 0 0][0 0 0]", "coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create two curves.
i_return_value = @
asm_const_line_2point( "1", "Point 6 ", @
"Point 3 ", 0, "", 50., 1, @
sv_asm_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point( "2", "Point 5 ", @
"Point 4 ", 0, "", 50., 1, @
sv_asm_line_2point_created_ids )
dump i_return_value
# Create three surfaces.
i_return_value = @
sgm_const_surface_3edge( "", @
"Surface 2.3 Surface 2.1 ", @
"Surface 1.2 surface 1.4 ", @
"Curve 1 Curve 2", @
sv_sgm_surface_3edge_created )
dump i_return_value
i_return_value = @
sgm_const_surface_4edge( "5", "Surface 2.2 ", @
"Curve 1 ", "Surface 1.3 ", "Curve 2 ", @
sv_sgm_surface_4edge_created )
dump i_return_value
solid_label(TRUE)
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
s_surface3_list = "surface 3"
s_surface4_list = "surface 4"
s_surface5_list = "surface 5"
# Create a Solid with the created five surfaces.
i_return_value = @
asm_const_solid_5face @
( s_output_ids, @
s_surface1_list, @
s_surface2_list, @
s_surface3_list, @
s_surface4_list, @
s_surface5_list, @
sv_created_ids )
dump i_return_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)
sys_free_string(sv_sgm_surface_3edge_created)
sys_free_string(sv_sgm_surface_4edge_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_solid_6face()
#
# This file opens a new database "new.db" and
# creates six surfaces. Later it creates a
# solid with the help of these six surfaces.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_solid_6face()
# has the following arguments:
#
# asm_const_solid_6face
# ( output_ids,
# surface1_list,
# surface2_list,
# surface3_list,
# surface4_list,
# surface5_list,
# surface6_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8"
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING s_surface3_list[32]
STRING s_surface4_list[32]
STRING s_surface5_list[32]
STRING s_surface6_list[128]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
STRING sv_asm_line_2point_created_ids[VIRTUAL]
STRING sv_sgm_surface_4edge_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0.)
# Create three surfaces.
i_return_value = @
asm_const_patch_xyz("", @
"<2 0 1><0 1 1><1 0 1>", @
"[0 0 0][0 0 0][0 1 0]","coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create two curves.
i_return_value = @
asm_const_line_2point( "1", "Point 8 ", @
"Point 3 ", 0, "", 50., 1, @
sv_asm_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point( "2", "Point 7 ", @
"Point 2 ", 0, "", 50., 1, @
sv_asm_line_2point_created_ids )
dump i_return_value
# Create three surfaces.
i_return_value = @
sgm_const_surface_4edge( "", @
"Surface 3.1 Surface 3.3 Surface 3.2 ", @
"Surface 2.4 Surface 2.2 Curve 1 ", @
"Surface 1.1 Surface 1.3 Surface 1.2 ", @
"Curve 2 Curve 1 Curve 2 ",@
sv_sgm_surface_4edge_created )
dump i_return_value
solid_label(TRUE)
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
s_surface3_list = "surface 3"
s_surface4_list = "surface 4"
s_surface5_list = "surface 5"
s_surface6_list = "surface 6"
# Create a Solid with the created six surfaces.
i_return_value = @
asm_const_solid_6face @
( s_output_ids, @
s_surface1_list, @
s_surface2_list, @
s_surface3_list, @
s_surface4_list, @
s_surface5_list, @
s_surface6_list, @
sv_created_ids )
dump i_return_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)
sys_free_string(sv_sgm_surface_4edge_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_solid_extrude()
#
# This file opens a new database "new.db" and
# creates a cubic solid. Later it extrudes
# one of the surface of the solid in a defined
# axis with scaling and rotating it
# simultaneously and creates three solids.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_solid_extrude()
# has the following arguments:
#
# asm_const_solid_extrude
# ( output_ids,
# delta,
# scale,
# angle,
# origin,
# coord_frame,
# nsolids,
# surface_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "6"
STRING s_delta[32]
REAL r_scale
REAL r_angle
STRING s_origin[32]
STRING s_coord_frame[32]
INTEGER i_nsolids
STRING s_surface_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_hpat_xyz_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
# Create a solid.
i_return_value = @
asm_const_hpat_xyz( "1","<1 1 1>","[0 0 0]", @
"coord 0",sv_asm_create_hpat_xyz_created)
dump i_return_value
ga_view_aa_set(23.,-34.,0)
solid_label(TRUE)
s_delta = "<0 5 0>"
r_scale = 2.0
r_angle = 30
s_origin = "[0.5 1.0 0.5]"
s_coord_frame = "coord 0"
i_nsolids = 3
s_surface_list = "Solid 1.4"
# Create three solids.
i_return_value = @
asm_const_solid_extrude @
( s_output_ids, @
s_delta, @
r_scale, @
r_angle, @
s_origin, @
s_coord_frame, @
i_nsolids, @
s_surface_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
# Observe the solids in the top view.
# Session file paused. Press "Resume" to continue..
sf_pause()
ga_view_aa_set(90.,0.,0.)
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_hpat_xyz_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_solid_glide()
#
# This file opens a new database "new.db" and
# creates a surface and two curves. Later it
# creates a solid by gliding the surface on
# these two curves using the above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_solid_glide()
# has the following arguments:
#
# asm_const_solid_glide
# ( output_ids,
# scale,
# glide_option,
# director_surface,
# base_surface,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8 9"
REAL r_scale
INTEGER i_glide_option
STRING s_director_surface[32]
STRING s_base_surface[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
STRING sv_asm_create_line_arc_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
# Create a surface in the yz plane.
i_return_value = @
asm_const_patch_xyz( "1", "<0 0.5 1>", @
"[0 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create two curves in the xz plane.
i_return_value = @
sgm_const_curve_arc3point( "1", FALSE, @
"[0 0 0]", "[1 0 0.5]", "[2 0 0.8]", @
sv_asm_create_line_arc_created )
dump i_return_value
i_return_value = @
sgm_const_curve_arc3point( "2", FALSE, @
"[2 0 0.8]", "[2.5 0 1]", "[3 0 1.5]", @
sv_asm_create_line_arc_created )
dump i_return_value
# Create a solid.
s_director_surface = "Curve 1 2"
s_base_surface = "Surface 1"
r_scale = 0.3
i_glide_option = 1
i_return_value = @
asm_const_solid_glide @
( s_output_ids, @
r_scale, @
i_glide_option, @
s_director_surface, @
s_base_surface, @
sv_created_ids )
dump i_return_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_arc_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_solid_normal()
#
# This file opens a new database "new.db" and
# creates a surface. Later it creates a solid
# with an offset from the created surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_solid_normal()
# has the following arguments:
#
# asm_const_solid_normal
# ( output_ids,
# thickness1,
# thickness2,
# thickness3,
# thickness4,
# nsolids,
# flip,
# surface_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8"
STRING s_thickness1[32]
STRING s_thickness2[32]
STRING s_thickness3[32]
STRING s_thickness4[32]
INTEGER i_nsolids
LOGICAL l_flip
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
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
# Create a surface in the yz plane.
i_return_value = @
asm_const_patch_xyz( "1", "<0.5 0 1>", @
"[0 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create a Solid.
s_thickness1 = "0.5"
s_thickness2 = "0.4"
s_thickness3 = "0.7"
s_thickness4 = "0.3"
i_nsolids = 1
l_flip = TRUE
s_surface_list = "surface 1"
i_return_value = @
asm_const_solid_normal @
( s_output_ids, @
s_thickness1, @
s_thickness2, @
s_thickness3, @
s_thickness4, @
i_nsolids, @
l_flip, @
s_surface_list, @
sv_created_ids )
dump i_return_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 asm_const_solid_revolve()
#
# This file opens a new database "new.db" and
# creates two surfaces. Later it creates a
# solid, revolving these two surfaces, using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_solid_revolve()
# has the following arguments:
#
# asm_const_solid_revolve
# ( output_ids,
# axis,
# angle,
# offset,
# coord_frame,
# nsurfaces,
# surface_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8"
STRING s_axis[32]
REAL r_angle
REAL r_offset
STRING s_coord_frame[32]
INTEGER i_nsurfaces
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
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
# Create two surfaces.
i_return_value = @
asm_const_patch_xyz( "1", "<0 0.2 0.2>", @
"[0 1 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "2", "<0 0.3 0.3>", @
"[0 2 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
s_axis = "coord 0.3"
r_angle = 180.0
r_offset = 30.0
s_coord_frame = "coord 0"
i_nsurfaces = 1
s_surface_list = "surface 1 2"
i_return_value = @
asm_const_solid_revolve @
( s_output_ids, @
s_axis, @
r_angle, @
r_offset, @
s_coord_frame, @
i_nsurfaces, @
s_surface_list, @
sv_created_ids )
dump sv_created_ids
dump i_return_value
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 asm_const_solid_2surface()
#
# This file opens a new database "new.db" and
# creates two surfaces. Later it creates a
# solid with these two surfaces using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_solid_2surface()
# has the following arguments:
#
# asm_const_solid_2surface
# ( output_ids,
# auto_orient,
# surface1_list,
# surface2_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
LOGICAL l_auto_orient
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
s_output_ids = "8"
# Create two surfaces.
i_return_value = @
asm_const_patch_xyz( "1", "<1 0 1>", @
"[0 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "2", "<0.5 0 0.5>", @
"[0.25 1 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
l_auto_orient = TRUE
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
i_return_value = @
asm_const_solid_2surface @
( s_output_ids, @
l_auto_orient, @
s_surface1_list, @
s_surface2_list, @
sv_created_ids )
dump i_return_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 asm_const_solid_3surface()
#
# This file opens a new database "new.db" and
# creates three surfaces. Later it creates a
# solid with these three surfaces using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_solid_3surface()
# has the following arguments:
#
# asm_const_solid_3surface
# ( output_ids,
# orient,
# param_method,
# surface1_list,
# surface2_list,
# surface3_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
LOGICAL l_orient
INTEGER i_param_method
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING s_surface3_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
s_output_ids = "8"
# Create three surfaces.
i_return_value = @
asm_const_patch_xyz( "1", "<1 0 1>", @
"[0 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "2", "<0.5 0 0.5>", @
"[-0.25 1 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "3", "<0.5 0 0.5>", @
"[0.25 2 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
l_orient = TRUE
i_param_method = 2
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
s_surface3_list = "surface 3"
i_return_value = @
asm_const_solid_3surface @
( s_output_ids, @
l_orient, @
i_param_method, @
s_surface1_list, @
s_surface2_list, @
s_surface3_list, @
sv_created_ids )
dump i_return_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 asm_const_solid_4surface()
#
# This file opens a new database "new.db" and
# creates four surfaces. Later it creates a
# solid with these four surfaces using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_solid_4surface()
# has the following arguments:
#
# asm_const_solid_4surface
# ( output_ids,
# orient,
# param_method,
# surface1_list,
# surface2_list,
# surface3_list,
# surface4_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
LOGICAL l_orient
INTEGER i_param_method
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING s_surface3_list[32]
STRING s_surface4_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
s_output_ids = "8"
# Create four surfaces.
i_return_value = @
asm_const_patch_xyz( "1", "<1 0 1>", @
"[0 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "2", "<0.5 0 0.5>", @
"[-0.25 1 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "3", "<0.5 0 0.5>", @
"[0.25 2 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "4", "<1 0 1>", @
"[0.5 3 0.5]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
l_orient = TRUE
i_param_method = 2
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
s_surface3_list = "surface 3"
s_surface4_list = "surface 4"
i_return_value = @
asm_const_solid_4surface @
( s_output_ids, @
l_orient, @
i_param_method, @
s_surface1_list, @
s_surface2_list, @
s_surface3_list, @
s_surface4_list, @
sv_created_ids )
dump i_return_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 asm_const_solid_nsurface()
#
# This file opens a new database "new.db" and
# creates four surfaces. Later it creates a
# solid with these four surfaces using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_solid_nsurface()
# has the following arguments:
#
# asm_const_solid_nsurface
# ( output_ids,
# orient,
# param_method,
# surface_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
LOGICAL l_orient
INTEGER i_param_method
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
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_lines_set( "general", 2 )
dump i_return_value
solid_label(TRUE)
# Create four surfaces.
i_return_value = @
asm_const_patch_xyz( "1", @
"<1 0 1><0.5 0 0.5><0.5 0 0.5><1 0 1>", @
"[0 0 0][-.25 1 .25][.25 2 .25][.5 3 .5]", @
"Coord 0", sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
s_output_ids = "8"
l_orient = TRUE
i_param_method = 2
s_surface_list = "surface 1 2 3 4"
i_return_value = @
asm_const_solid_nsurface @
( s_output_ids, @
l_orient, @
i_param_method, @
s_surface_list, @
sv_created_ids )
dump i_return_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 asm_const_surface_2curve()
#
# This function creates parametric bicubic surfa-
# ces from 2 set of curves.
#
# In this example a new database is opened and 2
# curves are drawn in XZ plane. Then this
# function is called to create a surface between
# the 2 curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_surface_2curve()
# has the following arguments:
#
# asm_const_surface_2curve
# ( output_ids,
# curve1_list,
# curve2_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "1", "[0 0 0]","[0 0 1]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point @
( "2", "[5 0 0]","[3 0 3]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2"
i_return_value = @
asm_const_surface_2curve @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_surface_3curve()
#
# This function creates parametric bicubic surfa-
# ces from 3 set of curves.
#
# In this example a new database is opened and 3
# curves are drawn. Then this function is called
# to create a surface using the 3 curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_surface_3curve()
# has the following arguments:
#
# asm_const_surface_3curve
# ( output_ids,
# param_method,
# curve1_list,
# curve2_list,
# curve3_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
INTEGER i_param_method
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "1", "[0 0 0]","[1 0 0]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point @
( "2", "[0 5 5]","[3 5 5]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point @
( "3", "[0 3 10]","[1 3 10]",0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
i_param_method = 2
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2"
s_curve3_list = "Curve 3"
i_return_value = @
asm_const_surface_3curve @
( s_output_ids, @
i_param_method, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_surface_4curve()
#
# This function creates parametric bicubic surfa-
# ces from 4 set of curves.
#
# In this example a new database is opened and 4
# curves are drawn. Then this function is called
# to create a surface using the 4 curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_surface_4curve()
# has the following arguments:
#
# asm_const_surface_4curve
# ( output_ids,
# param_method,
# curve1_list,
# curve2_list,
# curve3_list,
# curve4_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
INTEGER i_param_method
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
STRING s_curve4_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "1", "[0 0 0]","[1 0 0]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point @
( "2", "[0 5 5]","[3 5 5]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point @
( "3", "[0 3 10]","[1 3 10]",0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point @
( "4", "[0 10 15]","[3 10 15]",0,"",50.,1,@
sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
i_param_method = 2
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2"
s_curve3_list = "Curve 3"
s_curve4_list = "Curve 4"
i_return_value = @
asm_const_surface_4curve @
( s_output_ids, @
i_param_method, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
s_curve4_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_surface_ncurve()
#
# This function creates parametric bicubic surfa-
# ces from a specified set of curves.
#
# In this example a new database is opened and 4
# curves are drawn. Then this function is called
# to create a surface using the 4 curves.
# Approximation of the generated surface is
# reported by Patran immediately after creation.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_surface_ncurve()
# has the following arguments:
#
# asm_const_surface_ncurve
# ( output_ids,
# param_method,
# curve_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
INTEGER i_param_method
STRING s_curve_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "#", "[0 0 0][0 5 5][0 3 10][0 10 15]", @
"[1 0 0][3 5 5][1 3 10][3 10 15]", 0,"",@
50., 1, sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
i_param_method = 2
s_curve_list = "Curve 1:4 "
i_return_value = @
asm_const_surface_ncurve @
( s_output_ids, @
i_param_method, @
s_curve_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_surface_3edge()
#
# This function creates parametric bicubic surfa-
# ces from 3 set of curves defining the boundary
# of the surfaces.
#
# In this example a new database is opened and 3
# curves are drawn. Then this function is called
# to create a surface with 3 curves as boundaries
# for the surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_surface_3edge()
# has the following arguments:
#
# asm_const_surface_3edge
# ( output_ids,
# curve1_list,
# curve2_list,
# curve3_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "#", "[0 0 0][0 0 0][1 0 0]", @
"[1 0 0][0 0 1][0 0 1]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2"
s_curve3_list = "Curve 3"
i_return_value = @
asm_const_surface_3edge @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_surface_4edge()
#
# This function creates parametric bicubic surfa-
# ces from 4 set of curves defining the boundary
# of the surfaces.
#
# In this example a new database is opened and 4
# curves are drawn. Then this function is called
# to create a surface with 4 curves as boundaries
# for the surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_surface_4edge()
# has the following arguments:
#
# asm_const_surface_4edge
# ( output_ids,
# curve1_list,
# curve2_list,
# curve3_list,
# curve4_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
STRING s_curve4_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "#", "[0 0 0][1 0 0][1 0 1][0 0 1]", @
"[1 0 0][1 0 1][0 0 1][0 0 0]", @
0,"",50., 1, sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2"
s_curve3_list = "Curve 3"
s_curve4_list = "Curve 4"
i_return_value = @
asm_const_surface_4edge @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
s_curve4_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_surface_extract()
#
# This function creates parametric bicubic surf-
# aces by extracting a surface from a solid at
# a specified parametric position and in a spec-
# ified parametric direction.
#
# In this example a new database is opened and a
# cube of 1 unit is created. Then this function
# is called to create a surface along u-plane at
# the midpoint of the edge by extraction from
# cube.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_surface_extract()
# has the following arguments:
#
# asm_const_surface_extract
# ( output_ids,
# solid_list,
# param_plane,
# param_pos,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_solid_list[32]
INTEGER i_param_plane
REAL r_param_pos
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_create_hpat_xyz_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create Cube of 1 X 1 X 1
i_return_value = @
asm_const_hpat_xyz @
( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @
sv_create_hpat_xyz_created_ids )
#---------------------------------------------------------------------
# Create Surface
s_output_ids = ""
s_solid_list = "Solid 1"
i_param_plane = 1
r_param_pos = 0.5
i_return_value = @
asm_const_surface_extract @
( s_output_ids, @
s_solid_list, @
i_param_plane, @
r_param_pos, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_create_hpat_xyz_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_surface_extract_face()
#
# This function creates parametric bicubic surf-
# ace by extracting a surface from a face of a
# solid
#
# In this example a new database is opened and a
# cube of 1 unit is created. Then this function
# is called to create a surface by extracting the
# top-surface ("Solid 1.4") using this function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_surface_extract_face()
# has the following arguments:
#
# asm_const_surface_extract_face
# ( output_ids,
# face_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_face_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_create_hpat_xyz_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create Cube of 1 X 1 X 1
i_return_value = @
asm_const_hpat_xyz @
( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @
sv_create_hpat_xyz_created_ids )
#---------------------------------------------------------------------
# Create Surface
s_output_ids = ""
s_face_list = "Solid 1.4"
i_return_value = @
asm_const_surface_extract_face @
( s_output_ids, @
s_face_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_create_hpat_xyz_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_surface_extrude()
#
# This function creates parametric bicubic
# surfaces by moving curves through space along
# a defined axis with the option of
# simultaneously scaling and rotating the
# extruded surfaces.
#
# In this example a new database is opened and a
# line is drawn from [0 0 0] to [0 0 1]. Then a
# surface is created using this function, by
# extrusion of "Curve 1" along vector <10 0 0>.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_surface_extrude()
# has the following arguments:
#
# asm_const_surface_extrude
# ( output_ids,
# delta,
# scale,
# angle,
# origin,
# coord_frame,
# num_surfaces,
# curve_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_delta[32]
REAL r_scale
REAL r_angle
STRING s_origin[32]
STRING s_coord_frame[32]
INTEGER i_num_surfaces
STRING s_curve_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_point_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
surface_label(TRUE)
#---------------------------------------------------------------------
# Create Curve from [0 0 0] to [0 0 1]
i_return_value = @
asm_const_line_2point @
( "1","[0 0 0]","[0 0 1]",0,"",50.,1, @
sv_point_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create Surface by extrusion of "Curve 1"
s_output_ids = ""
s_delta = "<10 0 0>"
r_scale = 1
r_angle = 0.0
s_origin = "[0 0 0]"
s_coord_frame = "Coord 0"
i_num_surfaces = 1
s_curve_list = "Curve 1 "
i_return_value = @
asm_const_surface_extrude @
( s_output_ids, @
s_delta, @
r_scale, @
r_angle, @
s_origin, @
s_coord_frame, @
i_num_surfaces, @
s_curve_list, @
sv_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_point_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_surface_glide()
#
# This function creates parametric bicubic surf-
# aces by moving base curves along a path defined
# by a set of director curves translated to the
# origin of the base curves.
#
# In this example a new database is opened and a
# base curve is drawn form [0 0 0] to [1 0 0].
# 2 director curves are then drawn. And this
# function is called to create surfaces by
# gliding the "Curve 1" along the director curves
# "Curve 2" and "Curve 3".
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_surface_glide()
# has the following arguments:
#
# asm_const_surface_glide
# ( output_ids,
# scale,
# glide_option,
# director_curve,
# basic_curve,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
REAL r_scale
INTEGER i_glide_option
STRING s_director_curve[32]
STRING s_basic_curve[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_create_line_xyz_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
surface_label(TRUE)
#---------------------------------------------------------------------
# Create base curve
i_return_value = @
asm_const_line_xyz @
( "", "<1 0 0>", "[0 0 0]", "Coord 0", @
sv_create_line_xyz_created_ids )
dump i_return_value
# Create director curve
i_return_value = @
asm_const_line_2point @
( "2", "[0 0 0]", "[0 5 5]", 0, "", 50., @
1, sv_create_line_xyz_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point @
( "3", "[0 5 5]", "[0 0 10]", 0, "", 50., @
1, sv_create_line_xyz_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create Surfaces
s_output_ids = ""
r_scale = 1.0
i_glide_option = 0
s_director_curve = "Curve 2 3 "
s_basic_curve = "Curve 1 "
i_return_value = @
asm_const_surface_glide @
( s_output_ids, @
r_scale, @
i_glide_option, @
s_director_curve, @
s_basic_curve, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_create_line_xyz_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_surface_normal()
#
# This function creates parametric bicubic surf-
# aces defined by a set of base curves and an
# offset from those curves in the direction of
# the curvature . The offset may be constant or
# a linear taper.
#
# In this example a new database is opened and a
# line is drawn form [0 0 0] to [10 0 0]. Then
# surfaces of varying thickness are created using
# this function using the initially created curve
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_surface_normal()
# has the following arguments:
#
# asm_const_surface_normal
# ( output_ids,
# thickness1,
# thickness2,
# origin,
# num_surfaces,
# normal_rev_direction,
# curve_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_thickness1[32]
STRING s_thickness2[32]
STRING s_origin[32]
INTEGER i_num_surfaces
LOGICAL l_normal_rev_direction
STRING s_curve_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_point_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
surface_label(TRUE)
#---------------------------------------------------------------------
# Create Curve from [0 0 0] to [10 0 0]
i_return_value = @
asm_const_line_2point @
( "1","[0 0 0]","[10 0 0]",0,"",50.,1, @
sv_point_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surfaces
s_output_ids = "1"
s_thickness1 = "1.0"
s_thickness2 = "5.0"
s_origin = ""
i_num_surfaces = 3
l_normal_rev_direction = TRUE
s_curve_list = "Curve 1 "
i_return_value = @
asm_const_surface_normal @
( s_output_ids, @
s_thickness1, @
s_thickness2, @
s_origin, @
i_num_surfaces, @
l_normal_rev_direction, @
s_curve_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_point_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_surface_revolve()
#
# This function creates parametric bicubic surfa-
# ces by revolving a curve about an axis of
# rotation.
#
# In this example a new database is opened and a
# line is drawn form [0 0 0] to [1 0 0]. Then a
# set of 4 surfaces are created by revolving this
# curve along Z-axis for 45 degrees.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_surface_revolve()
# has the following arguments:
#
# asm_const_surface_revolve
# ( output_ids,
# axis,
# angle,
# offset,
# coord_frame,
# num_surfaces,
# curve_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_axis[32]
REAL r_angle
REAL r_offset
STRING s_coord_frame[32]
INTEGER i_num_surfaces
STRING s_curve_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_point_ids[VIRTUAL]
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
surface_label(TRUE)
#---------------------------------------------------------------------
# Create Curve
i_return_value = @
asm_const_line_2point @
( "1","[0 0 0]","[1 0 0]",0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create Surface
s_output_ids = "1"
s_axis = "Coord 0.3"
r_angle = 45.0
r_offset = 0.
s_coord_frame = "Coord 0"
i_num_surfaces = 4
s_curve_list = "Curve 1 "
i_return_value = @
asm_const_surface_revolve @
( s_output_ids, @
s_axis, @
r_angle, @
r_offset, @
s_coord_frame, @
i_num_surfaces, @
s_curve_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_point_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function asm_const_surface_vertex()
#
# This function creates parametric bicubic surfa-
# ces which is the quadrilateral formed by four
# vertex points.
#
# In this example a new database is opened and 4
# points are created on the XZ plane. Then this
# function is called to create a surface using
# the 4 vertex.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_surface_vertex()
# has the following arguments:
#
# asm_const_surface_vertex
# ( output_ids,
# point1_list,
# point2_list,
# point3_list,
# point4_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_point1_list[32]
STRING s_point2_list[32]
STRING s_point3_list[32]
STRING s_point4_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_create_grid_xyz_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
surface_label(TRUE)
#---------------------------------------------------------------------
# Create Points
i_return_value = @
asm_const_grid_xyz @
( "1", "[0 0 0]", "Coord 0", @
sv_create_grid_xyz_created_ids )
dump i_return_value
i_return_value = @
asm_const_grid_xyz @
( "2", "[5 0 0]", "Coord 0", @
sv_create_grid_xyz_created_ids )
dump i_return_value
i_return_value = @
asm_const_grid_xyz @
( "3", "[5 0 7]", "Coord 0", @
sv_create_grid_xyz_created_ids )
dump i_return_value
i_return_value = @
asm_const_grid_xyz @
( "4", "[0 0 5]", "Coord 0", @
sv_create_grid_xyz_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create Surface
s_output_ids = ""
s_point1_list = "Point 1"
s_point2_list = "Point 2"
s_point3_list = "Point 3"
s_point4_list = "Point 4"
i_return_value = @
asm_const_surface_vertex @
( s_output_ids, @
s_point1_list, @
s_point2_list, @
s_point3_list, @
s_point4_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_create_grid_xyz_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_2d_arc3point_v1()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_2d_arc3point_v1()
# has the following arguments:
#
# sgm_const_curve_2d_arc3point_v1
# ( output_ids,
# create_center,
# plane_list,
# start_list,
# mid_list,
# end_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
LOGICAL l_create_center
STRING s_plane_list[16]
STRING s_start_list[16]
STRING s_mid_list[16]
STRING s_end_list[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating two curves with the center points in X-Y plane.
s_output_ids = "#"
l_create_center = TRUE
s_plane_list = "Coord 0.3"
s_start_list = "[1 1 0] [2 2 0]"
s_mid_list = "[1 4 1]"
s_end_list = "[3 3 0]"
#
i_return_value = @
sgm_const_curve_2d_arc3point_v1 @
( s_output_ids, @
l_create_center, @
s_plane_list, @
s_start_list, @
s_mid_list, @
s_end_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_2d_arc3point_v2()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_2d_arc3point_v2()
# has the following arguments:
#
# sgm_const_curve_2d_arc3point_v2
# ( output_ids,
# create_center,
# plane_list,
# start_list,
# mid_list,
# end_list,
# project_flag,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
LOGICAL l_create_center
STRING s_plane_list[16]
STRING s_start_list[16]
STRING s_mid_list[16]
STRING s_end_list[16]
LOGICAL l_project_flag
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating two curves with the center points in parallel to X-Y plane
# and passing through start points.
s_output_ids = "#"
l_create_center = TRUE
s_plane_list = "Coord 0.3"
s_start_list = "[0 0 1] [0 0 2]"
s_mid_list = "[1 4 1]"
s_end_list = "[3 3 0]"
#
i_return_value = @
sgm_const_curve_2d_arc3point_v2 @
( s_output_ids, @
l_create_center, @
s_plane_list, @
s_start_list, @
s_mid_list, @
s_end_list, @
l_project_flag, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_arc3point()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two curves in 3D space.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_arc3point()
# has the following arguments:
#
# sgm_const_curve_arc3point
# ( output_ids,
# create_center,
# start_list,
# mid_list,
# end_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
LOGICAL l_create_center
STRING s_start_list[32]
STRING s_mid_list[32]
STRING s_end_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating two curves in 3D space.
s_output_ids = "#"
l_create_center = TRUE
s_start_list = "[0 0 0] [1 1 0]"
s_mid_list = "[-1 -2 0] [1 2 0]"
s_end_list = "[-1 1 3] [1 -1 -4]"
#
i_return_value = @
sgm_const_curve_arc3point @
( s_output_ids, @
l_create_center, @
s_start_list, @
s_mid_list, @
s_end_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_bspline()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create a bspline closed curve.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_bspline()
# has the following arguments:
#
# sgm_const_curve_bspline
# ( output_ids,
# point_list,
# order,
# interpolate,
# param_method,
# closed,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_point_list[32]
INTEGER i_order
LOGICAL l_interpolate
INTEGER i_param_method
LOGICAL l_closed
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a fourth order open piecewise cubic curve.
s_output_ids = "#"
s_point_list = "[0 0 0][1 1 1][-1 .5 1][0 1 1]"
i_order = 4
i_param_method = 2
#
i_return_value = @
sgm_const_curve_bspline @
( s_output_ids, @
s_point_list, @
i_order, @
l_interpolate, @
i_param_method, @
l_closed, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_extract()
#
# This session file will create a new database by
# name ’new.db’ and create a surface. The above
# mentioned function will be called to create a
# curve on the surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_extract()
# has the following arguments:
#
# sgm_const_curve_extract
# ( output_ids,
# surface_list,
# direction,
# param_pos,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_surface_list[16]
INTEGER i_direction
REAL r_param_pos
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a surface.
i_return_value = @
asm_const_patch_xyz( "1", "<1 1 0>","[0 0 0]",@
"Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating a curve on surface along constant C1 direction.
s_output_ids = "#"
s_surface_list = "Surface 1"
i_direction = 1
r_param_pos = 0.4
#
i_return_value = @
sgm_const_curve_extract @
( s_output_ids, @
s_surface_list, @
i_direction, @
r_param_pos, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_extract_edge()
#
# This session file will create a new database by
# name ’new.db’ and create a surface. The above
# mentioned function will be called to create
# curves on the surface edges.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_extract_edge()
# has the following arguments:
#
# sgm_const_curve_extract_edge
# ( output_ids,
# edge_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_edge_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a surface.
i_return_value = @
asm_const_patch_xyz( "1", "<1 1 0>","[0 0 0]",@
"Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating curves on two edges of the surface.
s_output_ids = "#"
s_edge_list = "Surface 1.1 1.3"
#
i_return_value = @
sgm_const_curve_extract_edge @
( s_output_ids, @
s_edge_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_patch_xy_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_loft()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create a curve based on end slopes
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_loft()
# has the following arguments:
#
# sgm_const_curve_loft
# ( output_ids,
# slope_control,
# point_list,
# slope_list1,
# slope_list2,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
LOGICAL l_slope_control
STRING s_point_list[64]
STRING s_slope_list1[16]
STRING s_slope_list2[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Setting view to Isometric View 2.
i_return_value = ga_view_aa_set(23., 56., 0)
dump i_return_value
#---------------------------------------------------------------------
# Creating a curve passing through four points. Curve is also
# constrained by end slopes.
s_output_ids = "#"
l_slope_control = TRUE
s_point_list = "[0 0 0] [2.5 1 0] [2.3 .6 0] [3 1 1]"
s_slope_list1 = "<1 4 0.5>"
s_slope_list2 = "<1 -1.5 0>"
#
i_return_value = @
sgm_const_curve_loft @
( s_output_ids, @
l_slope_control, @
s_point_list, @
s_slope_list1, @
s_slope_list2, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_revolve()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create three curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_revolve()
# has the following arguments:
#
# sgm_const_curve_revolve
# ( output_ids,
# axis,
# angle,
# offset,
# coord_frame,
# point,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_axis[16]
REAL r_angle
REAL r_offset
STRING s_coord_frame[16]
STRING s_point[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating three curves by revolving points around Z axis.
s_output_ids = "#"
s_axis = "Coord 0.3"
r_angle = 120
r_offset = 10.0
s_coord_frame = "Coord 0"
s_point = "[0 1 0] [0 2 2] [0 3 3]"
#
i_return_value = @
sgm_const_curve_revolve @
( s_output_ids, @
s_axis, @
r_angle, @
r_offset, @
s_coord_frame, @
s_point, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_3edge()
#
# This function creates bi-parametric surfaces
# from 3 set of curves defining the boundary
# of the surfaces.
#
# In this example a new database is opened and 3
# curves are drawn. Then this function is called
# to create a surface with 3 curves as boundaries
# for the surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_3edge()
# has the following arguments:
#
# sgm_const_surface_3edge
# ( output_ids,
# curve1_list,
# curve2_list,
# curve3_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "#", "[0 0 0][0 0 0][1 0 0]", @
"[1 0 0][0 0 1][0 0 1]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2"
s_curve3_list = "Curve 3"
i_return_value = @
sgm_const_surface_3edge @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_3edge_man()
#
# This function creates manifold surfaces from
# 3 set of curves defining the boundary of the
# parametric or generalized coons surfaces.
#
# In this example a new database is opened and a
# inclined surface is drawn using 2 curves. Then
# 3 curves, for acting as edges are drawn. Then
# this function is called to create a manifold
# surface over "Surface 1".
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_3edge_man()
# has the following arguments:
#
# sgm_const_surface_3edge_man
# ( output_ids,
# curve1_list,
# curve2_list,
# curve3_list,
# surface_list,
# cubic,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
STRING s_surface_list[32]
LOGICAL l_cubic
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
STRING sv_surface_2curve_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create Manifold surface
i_return_value = @
asm_const_line_2point @
( "#","[0 0 0][0 -2 2]","[2 0 0][2 -2 2]",@
0,"",50., 1, sv_line_2point_created_ids )
dump i_return_value
i_return_value = @
sgm_const_surface_2curve @
( "", "Curve 1 ", "Curve 2 ", @
sv_surface_2curve_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "#","[0 0 0][0 0 0][1 0 0]", @
"[1 0 0][0 0 1][0 0 1]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
s_curve1_list = "Curve 3"
s_curve2_list = "Curve 4"
s_curve3_list = "Curve 5"
s_surface_list = "Surface 1"
l_cubic = TRUE
i_return_value = @
sgm_const_surface_3edge_man @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
s_surface_list, @
l_cubic, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
sys_free_string( sv_surface_2curve_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_4edge()
#
# This function creates bi-parametric surfaces
# from 4 set of curves defining the boundary
# of the surfaces.
#
# In this example a new database is opened and 4
# curves are drawn. Then this function is called
# to create a surface with 4 curves as boundaries
# for the surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_4edge()
# has the following arguments:
#
# sgm_const_surface_4edge
# ( output_ids,
# curve1_list,
# curve2_list,
# curve3_list,
# curve4_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
STRING s_curve4_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "#", "[0 0 0][1 0 0][1 0 1][0 0 1]", @
"[1 0 0][1 0 1][0 0 1][0 0 0]", @
0,"",50., 1, sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2"
s_curve3_list = "Curve 3"
s_curve4_list = "Curve 4"
i_return_value = @
sgm_const_surface_4edge @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
s_curve4_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_4edge_man()
#
# This function creates manifold surfaces from
# 4 set of curves defining the boundary of the
# parametric or generalized coons surfaces.
#
# In this example a new database is opened and a
# surface is drawn using 2 curves. Then 4 curves
# are drawn for acting as edges. Then this
# function is called to create a manifold surface
# over "Surface 1".
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_4edge_man()
# has the following arguments:
#
# sgm_const_surface_4edge_man
# ( output_ids,
# curve1_list,
# curve2_list,
# curve3_list,
# curve4_list,
# surface_list,
# cubic,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
STRING s_curve4_list[32]
STRING s_surface_list[32]
LOGICAL l_cubic
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
STRING sv_surface_2curve_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create surface
i_return_value = @
asm_const_line_2point @
( "#","[0 0 0][0 -2 2]","[2 0 0][2 -2 2]",@
0,"",50., 1, sv_line_2point_created_ids )
dump i_return_value
i_return_value = @
sgm_const_surface_2curve @
( "", "Curve 1 ", "Curve 2 ", @
sv_surface_2curve_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "", "[0 0 0][1 0 0][1 0 1][0 0 1]", @
"[1 0 0][1 0 1][0 0 1][0 0 0]", @
0,"",50., 1, sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create Manifold surface
s_output_ids = ""
s_curve1_list = "Curve 3"
s_curve2_list = "Curve 4"
s_curve3_list = "Curve 5"
s_curve4_list = "Curve 6"
s_surface_list = "Surface 1"
l_cubic = TRUE
i_return_value = @
sgm_const_surface_4edge_man @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
s_curve4_list, @
s_surface_list, @
l_cubic, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
sys_free_string( sv_surface_2curve_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_extract_face()
#
# This function creates parametric surface
# by extracting a surface from a face of a
# solid
#
# In this example a new database is opened and a
# cube of 1 unit is created. Then this function
# is called to create a surface by extracting the
# top-surface ("Solid 1.4") using this function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_extract_face()
# has the following arguments:
#
# sgm_const_surface_extract_face
# ( output_ids,
# face_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_face_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_create_hpat_xyz_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
surface_label(TRUE)
#---------------------------------------------------------------------
# Create Cube of 1 X 1 X 1
i_return_value = @
asm_const_hpat_xyz @
( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @
sv_create_hpat_xyz_created_ids )
#---------------------------------------------------------------------
# Create Surface
s_output_ids = ""
s_face_list = "Solid 1.4"
i_return_value = @
sgm_const_surface_extract_face @
( s_output_ids, @
s_face_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_create_hpat_xyz_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_extrude()
#
# This function creates bi-parametric surfaces
# by moving curves through space along a defined
# axis with the option of simultaneously scaling
# and rotating the extruded surfaces.
#
# In this example a new database is opened and a
# line is drawn from [0 0 0] to [0 0 1]. Then a
# surface is created using this function, by
# extrusion of "Curve 1" along vector <10 0 0>.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_extrude()
# has the following arguments:
#
# sgm_const_surface_extrude
# ( output_ids,
# delta,
# scale,
# angle,
# origin,
# coord_frame,
# curve_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_delta[32]
REAL r_scale
REAL r_angle
STRING s_origin[32]
STRING s_coord_frame[32]
STRING s_curve_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_point_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
surface_label(TRUE)
#---------------------------------------------------------------------
# Create Curve from [0 0 0] to [0 0 1]
i_return_value = @
asm_const_line_2point @
( "1","[0 0 0]","[0 0 1]",0,"",50.,1, @
sv_point_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create Surface by extrusion of "Curve 1"
s_output_ids = ""
s_delta = "<10 0 0>"
r_scale = 1
r_angle = 0.0
s_origin = "[0 0 0]"
s_coord_frame = "Coord 0"
s_curve_list = "Curve 1 "
i_return_value = @
sgm_const_surface_extrude @
( s_output_ids, @
s_delta, @
r_scale, @
r_angle, @
s_origin, @
s_coord_frame, @
s_curve_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_point_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_revolve()
#
# This function creates surfaces by revolving a
# curve about an axis of rotation.
#
# In this example a new database is opened and a
# line is drawn form [0 0 0] to [1 0 0]. Then a
# surface is created by revolving this curve
# along Z-axis for 45 degrees.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_revolve()
# has the following arguments:
#
# sgm_const_surface_revolve
# ( output_ids,
# axis,
# angle,
# offset,
# coord_frame,
# curve_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_axis[32]
REAL r_angle
REAL r_offset
STRING s_coord_frame[32]
STRING s_curve_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
surface_label(TRUE)
#---------------------------------------------------------------------
# Create Curve
i_return_value = @
asm_const_line_2point @
( "1","[0 0 0]","[1 0 0]",0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create Surface
s_output_ids = "1"
s_axis = "Coord 0.3"
r_angle = 45.0
r_offset = 10.
s_coord_frame = "Coord 0"
s_curve_list = "Curve 1 "
i_return_value = @
sgm_const_surface_revolve @
( s_output_ids, @
s_axis, @
r_angle, @
r_offset, @
s_coord_frame, @
s_curve_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_vector_2point()
#
# This function creates vector between two sets
# of points.
#
# In this example a new database is opened and
# vectors are created between 2 sets of points.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_vector_2point()
# has the following arguments:
#
# sgm_const_vector_2point
# ( output_ids,
# base_point_list,
# tip_point_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_base_point_list[32]
STRING s_tip_point_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
#---------------------------------------------------------------------
# Create Vectors
s_output_ids = ""
s_base_point_list = "[0 0 0] [1 1 1]"
s_tip_point_list = "[10 0 0] [2.2 3.3 4.4]"
i_return_value = @
sgm_const_vector_2point @
( s_output_ids, @
s_base_point_list, @
s_tip_point_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_vector_intersect()
#
# This function creates vectors at the
# intersection of two sets of planes.
#
# In this example a new database is opened and
# 2 planes are created along XY and XZ plane
# using 3 point option. Then this function is
# called to create a vector at the intersection
# of the two planes. The created vector appear
# on the default viewport.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_vector_intersect()
# has the following arguments:
#
# sgm_const_vector_intersect
# ( output_ids,
# first_plane_list,
# second_plane_list,
# vector_rev_direction,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_first_plane_list[32]
STRING s_second_plane_list[32]
LOGICAL l_vector_rev_direction
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_plane_3p_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
#---------------------------------------------------------------------
# Create Plane along XY plane
i_return_value = @
sgm_const_plane_3point @
( "", "[ 0 0 0]", "[ 10 0 0]", @
"[ 10 10 0]", sv_plane_3p_ids )
dump i_return_value
# Create Plane along XZ plane
i_return_value = @
sgm_const_plane_3point @
( "", "[ 0 0 0]", "[ 10 0 0]", @
"[ 10 0 10]", sv_plane_3p_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create Vector
s_output_ids = ""
s_first_plane_list = "Plane 1 "
s_second_plane_list = "Plane 2 "
l_vector_rev_direction = FALSE
i_return_value = @
sgm_const_vector_intersect @
( s_output_ids, @
s_first_plane_list, @
s_second_plane_list, @
l_vector_rev_direction, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_plane_3p_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of 2 calls to the
# function sgm_const_vector_magnitude()
#
# This function creates a vector from base point
# in the specified magnitude and direction.
#
# In this example a new database is opened and
# 2 vectors of magnitude 10 and 5 units are
# created along X and Z axis respectively, with
# [0 0 0] as base point.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_vector_magnitude()
# has the following arguments:
#
# sgm_const_vector_magnitude
# ( output_ids,
# magnitude_list,
# direction_list,
# base_point_list,
# coord_frame,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_magnitude_list[32]
STRING s_direction_list[32]
STRING s_base_point_list[32]
STRING s_coord_frame[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
#---------------------------------------------------------------------
# Create Vector of Magnitude 10 units along X axis
s_output_ids = ""
s_magnitude_list = "10.0"
s_direction_list = "<1 0 0>"
s_base_point_list = "[0 0 0]"
s_coord_frame = "Coord 0"
i_return_value = @
sgm_const_vector_magnitude @
( s_output_ids, @
s_magnitude_list, @
s_direction_list, @
s_base_point_list, @
s_coord_frame, @
sv_created_ids )
dump i_return_value
# Session file paused. Press "Resume" to continue..
sf_pause()
#---------------------------------------------------------------------
# Create Vector of Magnitude 5 units along Z axis
s_output_ids = ""
s_magnitude_list = "5.0"
s_direction_list = "<0 0 1>"
s_base_point_list = "[0 0 0]"
s_coord_frame = "Coord 0"
i_return_value = @
sgm_const_vector_magnitude @
( s_output_ids, @
s_magnitude_list, @
s_direction_list, @
s_base_point_list, @
s_coord_frame, @
sv_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_vector_normal()
#
# This function creates vectors that are normal
# to specified planes, surfaces or element faces.
#
# In this example a new database is opened and
# surface of dimension 4 X 4 is created along
# XY plane. Then this function is called to
# create a vector perpendicular to the surface
# at the its center. The created vector appear
# on the default viewport.
#
# This file can be run by starting a session of
# Patran, opening a new or existing database,
# and running this session file through the
# "File","Session","Play" pulldown menus
# on the menu bar.
#
# The function sgm_const_vector_normal()
# has the following arguments:
#
# sgm_const_vector_normal
# ( output_ids,
# normal_option,
# entity_list,
# magnitude_list,
# base_point_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
INTEGER i_normal_option
STRING s_entity_list[32]
STRING s_magnitude_list[32]
STRING s_base_point_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_xy_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
#---------------------------------------------------------------------
# Create Surface along XY plane
i_return_value = @
asm_const_patch_xyz @
( "1", "<4 0 4>", "[0 0 0]", "Coord 0", @
sv_xy_ids )
#---------------------------------------------------------------------
# Create Vector
s_output_ids = ""
i_normal_option = 2
s_entity_list = "Surface 1 "
s_magnitude_list = "1.0"
s_base_point_list = "[2.0 0.0 2.0 ] "
i_return_value = @
sgm_const_vector_normal @
( s_output_ids, @
i_normal_option, @
s_entity_list, @
s_magnitude_list, @
s_base_point_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_xy_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_vector_product()
#
# This function creates product vectors from two
# sets of vectors. The generated vectors are
# based on the origin points of the first set of
# vectors.
#
# In this example a new database is opened and 2
# vectors are created along X and Z axis. Then
# this function is called to create a vector as
# product of vectors "Vector 1" and "Vector 2".
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_vector_product()
# has the following arguments:
#
# sgm_const_vector_product
# ( output_ids,
# vector_list1,
# vector_list2,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_vector_list1[32]
STRING s_vector_list2[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
#---------------------------------------------------------------------
# Create Vector along X and Z axis
i_return_value = @
sgm_const_vector_2point @
( "#","[0 0 0]","[10 0 0] [0 0 10]", @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Create Vector - Product of Vectors 1 & 2
s_output_ids = ""
s_vector_list1 = "Vector 1"
s_vector_list2 = "Vector 2"
i_return_value = @
sgm_const_vector_product @
( s_output_ids, @
s_vector_list1, @
s_vector_list2, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_vertex()
#
# This function creates bi-parametric surfa-
# ces which is the quadrilateral formed by four
# vertex points.
#
# In this example a new database is opened and 4
# points are created on the XZ plane. Then this
# function is called to created a surface using
# the 4 vertex.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_vertex()
# has the following arguments:
#
# sgm_const_surface_vertex
# ( output_ids,
# point1_list,
# point2_list,
# point3_list,
# point4_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_point1_list[32]
STRING s_point2_list[32]
STRING s_point3_list[32]
STRING s_point4_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_create_grid_xyz_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
surface_label(TRUE)
#---------------------------------------------------------------------
# Create Points
i_return_value = @
asm_const_grid_xyz @
( "1", "[0 0 0]", "Coord 0", @
sv_create_grid_xyz_created_ids )
dump i_return_value
i_return_value = @
asm_const_grid_xyz @
( "2", "[5 0 0]", "Coord 0", @
sv_create_grid_xyz_created_ids )
dump i_return_value
i_return_value = @
asm_const_grid_xyz @
( "3", "[5 0 7]", "Coord 0", @
sv_create_grid_xyz_created_ids )
dump i_return_value
i_return_value = @
asm_const_grid_xyz @
( "4", "[0 0 5]", "Coord 0", @
sv_create_grid_xyz_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create Surface
s_output_ids = ""
s_point1_list = "Point 1"
s_point2_list = "Point 2"
s_point3_list = "Point 3"
s_point4_list = "Point 4"
i_return_value = @
sgm_const_surface_vertex @
( s_output_ids, @
s_point1_list, @
s_point2_list, @
s_point3_list, @
s_point4_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_create_grid_xyz_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_create_curve_boundary()
#
# In this illustration, a new database is opened
# 2 points are created. A line is created using
# those 2 points.
#
# This file can be run by starting a session of
# Patran and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_create_curve_boundary()
# has the following arguments:
#
# sgm_create_curve_boundary
# ( output_ids,
# construct_method,
# exist,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[128]
STRING s_construct_method[128]
INTEGER i_exist
STRING sv_created_ids[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
# Create 2 Points
i_return_value = @
asm_const_grid_xyz( "", "[0 0 0 ]"// @
"[10 0 0]", "Coord 0", @
sv_asm_create_grid_xyz_creat_id )
dump i_return_value
#---------------------------------------------------------------------
# Create a line between Point 1 and 2.
#
s_output_ids = "#"
s_construct_method = "Co 2PointCurve ( Ev Geo (G1))( Ev Geo (G2))"
i_return_value = @
sgm_create_curve_boundary @
( s_output_ids, @
s_construct_method, @
i_exist, @
sv_created_ids )
dump i_return_value
dump i_exist
# The ID of the created curve is
dump sv_created_ids
sys_free_string( sv_asm_create_grid_xyz_creat_id )
sys_free_string( sv_created_ids )
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of three calls
# to the function sgm_create_curve_bspline().
#
# This illustration opens a new database and
# creates 3 points in it. It calls the function
# to create 3 different B-splines.
#
# This file can be run by starting a session of
# Patran and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_create_curve_bspline() has the following
# arguments:
#
# sgm_create_curve_bspline
# ( output_ids,
# point_list,
# order,
# interpolate,
# param_method,
# closed,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[128]
STRING s_point_list[128]
INTEGER i_order
LOGICAL l_interpolate
INTEGER i_param_method
LOGICAL l_closed
STRING sv_created_ids[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
# Create 3 points
i_return_value = @
asm_const_grid_xyz @
( "", "[0 0 0][10 0 0][10 10 0]", @
"Coord 0", @
sv_asm_create_grid_xyz_creat_id )
dump i_return_value
#---------------------------------------------------------------------
# Call the function to create a open B-spline curve with order 3,
# without interpolation.
s_output_ids = "1"
s_point_list = "Point 1:3"
i_order = 3
l_interpolate = FALSE
i_param_method = 1
l_closed = FALSE
i_return_value = @
sgm_create_curve_bspline @
( s_output_ids, @
s_point_list, @
i_order, @
l_interpolate, @
i_param_method, @
l_closed, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
# Session file paused to observe the curve created. Press "Resume"
# to continue.
sf_pause()
#---------------------------------------------------------------------
# Call the function to create a open B-spline curve with order 3,
# with interpolation.
s_output_ids = "2"
l_interpolate = TRUE
l_closed = FALSE
i_return_value = @
sgm_create_curve_bspline @
( s_output_ids, @
s_point_list, @
i_order, @
l_interpolate, @
i_param_method, @
l_closed, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
# Session file paused to observe the curve created. Press "Resume"
# to continue.
sf_pause()
#---------------------------------------------------------------------
# Call the function to create a closed B-spline curve with order 3,
# with interpolation.
s_output_ids = "3"
l_interpolate = TRUE
l_closed = TRUE
i_return_value = @
sgm_create_curve_bspline @
( s_output_ids, @
s_point_list, @
i_order, @
l_interpolate, @
i_param_method, @
l_closed, @
sv_created_ids )
dump i_return_value
# Created ID list
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_grid_xyz_creat_id)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_create_curve_chain()
#
# This illustration opens a new database and
# creates 3 points in it. Using these points,
# it creates 2 lines. Finally a composite curve
# is created using these two lines.
#
# This file can be run by starting a session of
# Patran and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_create_curve_chain() has the following arguments:
#
# sgm_create_curve_chain
# ( output_ids,
# curve_list,
# delete_orig,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[128]
STRING s_curve_list[128]
LOGICAL l_delete_orig
STRING sv_created_ids[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][10 10 0]", @
"Coord 0", @
sv_asm_create_grid_xyz_creat_id )
dump i_return_value
# Create 2 Lines
i_return_value = @
asm_const_line_2point( "", "Point 1 2", @
"Point 2 3", @
0, "", 50., 1, @
sv_asm_line_2point_created_id )
dump i_return_value
# Session file paused. Observe the two lines created. Press "Resume"
# to continue.
sf_pause()
#---------------------------------------------------------------------
# Call the function to construct a composite curve from a list of
# 2 curves.
s_output_ids = "#"
s_curve_list = "Curve 1:2"
l_delete_orig = TRUE
i_return_value = @
sgm_create_curve_chain @
( s_output_ids, @
s_curve_list, @
l_delete_orig, @
sv_created_ids )
$? YES 38000217
dump i_return_value
# Created IDs
dump sv_created_ids
sys_free_string( sv_created_ids )
sys_free_string( sv_asm_line_2point_created_id )
sys_free_string( sv_asm_create_grid_xyz_creat_id )
# Note that the third line is created in place of Curve 1 and 2.
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_create_curve_chain_v1()
#
# This illustration opens a new database and
# creates 3 points in it. Using these points,
# it creates 2 lines. Finally a composite curve
# is created using these two lines and the
# original lines are deleted.
#
# This file can be run by starting a session of
# Patran and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_create_curve_chain_v1()
# has the following arguments:
#
# sgm_create_curve_chain_v1
# ( output_ids,
# curve_list,
# delete_original,
# segment_id,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[128]
STRING s_curve_list[128]
LOGICAL l_delete_original
INTEGER i_segment_id
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]
STRING sv_asm_line_2point_created_id[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
# Show the labels of Points and Curves
point_label(TRUE)
curve_label(TRUE)
# Create 3 Points
i_return_value = @
asm_const_grid_xyz @
( "", "[0 0 0][10 0 0][10 10 0]", @
"Coord 0", @
sv_asm_create_grid_xyz_creat_id )
dump i_return_value
# Create 2 Curves
i_return_value = @
asm_const_line_2point( "", "Point 1 2", @
"Point 2 3", @
0, "", 50., 1, @
sv_asm_line_2point_created_id )
dump i_return_value
# Session file paused. Observe the two lines created. Press "Resume"
# to continue.
sf_pause()
#---------------------------------------------------------------------
# Call the function to costruct a composite curve from a list of
# 2 curves. Delete the original curve and retain only the curve
# newly created.
s_output_ids = "#"
s_curve_list = "Curve 1:2"
l_delete_original = TRUE
i_segment_id = 0
i_return_value = @
sgm_create_curve_chain_v1 @
( s_output_ids, @
s_curve_list, @
l_delete_original, @
i_segment_id, @
sv_created_ids )
$? YES 38000217
dump i_return_value
# Created IDs
dump sv_created_ids
sys_free_string( sv_created_ids )
sys_free_string( sv_asm_line_2point_created_id )
sys_free_string( sv_asm_create_grid_xyz_creat_id )
# Note that the third line is created in place of Curve 1 and 2.
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of two calls to
# the function sgm_create_curve_loft()
#
# In this illustration, a new database is opened
# 6 points are created. A loft curve passing
# through these 6 points is created. Finally
# another loft curve is created passing through
# all the 6 points and using the slopes.
#
# This file can be run by starting a session of
# Patran and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_create_curve_loft()
# has the following arguments:
#
# sgm_create_curve_loft
# ( output_ids,
# slope_control,
# point_list,
# slope_list1,
# slope_list2,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[128]
LOGICAL l_slope_control
STRING s_point_list[128]
STRING s_slope_list1[128]
STRING s_slope_list2[128]
STRING sv_created_ids[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 Curves.
curve_label(TRUE)
# Create 6 points
i_return_value = @
asm_const_grid_xyz( "", "[0 10 0 ]"// @
"[2.5 12.5 0] [5 10 0] [15 5 0]"// @
" [17.5 2.5 0] [20 5 0]", "Coord 0", @
sv_asm_create_grid_xyz_creat_id )
dump i_return_value
#---------------------------------------------------------------------
# Call the function to create the loft curve without using the slopes
#
s_output_ids = "#"
l_slope_control = FALSE
s_point_list = "Point 1:6"
i_return_value = @
sgm_create_curve_loft @
( s_output_ids, @
l_slope_control, @
s_point_list, @
s_slope_list1, @
s_slope_list2, @
sv_created_ids )
dump i_return_value
# Session file paused. Observe the loft-spline created. Press
# "Resume" to continue.
sf_pause()
#---------------------------------------------------------------------
# Call the function to create the loft curve using the slopes.
#
l_slope_control = TRUE
s_slope_list1 ="Construct 2PointVector"// @
"(Evaluate Geometry(Point 1 ))(Evaluate Geometry(Point 5 ))"
s_slope_list2 = "Construct 2PointVector"// @
"(Evaluate Geometry(Point 6 ))(Evaluate Geometry(Point 5 ))"
i_return_value = @
sgm_create_curve_loft @
( s_output_ids, @
l_slope_control, @
s_point_list, @
s_slope_list1, @
s_slope_list2, @
sv_created_ids )
dump i_return_value
# Created IDs
dump sv_created_ids
sys_free_string( sv_created_ids )
sys_free_string( sv_asm_create_grid_xyz_creat_id )
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_create_surface_composite()
#
# In this illustration, a new database is opened
# 3 surfaces are created. Then the function is
# called to create the composite surface using
# 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 sgm_create_surface_composite()
# has the following arguments:
#
# sgm_create_surface_composite
# ( output_labels,
# surface_list,
# flag,
# cleantol,
# gaptol,
# curve_start_label,
# loop_id,
# add_list,
# remove_list,
# inner_loop_list,
# vertex_list,
# delete_cons,
# implicit_topology,
# created_labels )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_labels[128]
STRING s_surface_list[128]
INTEGER i_flag
REAL r_cleantol
REAL r_gaptol
INTEGER i_curve_start_label
INTEGER i_loop_id
STRING s_add_list[128]
STRING s_remove_list[128]
STRING s_inner_loop_list[128]
STRING s_vertex_list[128]
LOGICAL l_delete_cons
LOGICAL l_implicit_topology
STRING sv_created_labels[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]
STRING sv_asm_line_3point_creat_id[VIRTUAL]
STRING sv_sgm_surface_2curve_creat_id[VIRTUAL]
STRING sv_asm_create_patch_xy_creat_id[VIRTUAL]
STRING sv_sgm_transform_surf_creat_id[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
# Show the labels of the surfaces
surface_label(TRUE)
# Create a patch (Surface).
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 3 points
i_return_value = @
asm_const_grid_xyz @
( "", "[2 15 0][5 13 0][8 15 0]", @
"Coord 0", @
sv_asm_create_grid_xyz_creat_id )
dump i_return_value
# Create one line passing through the 3 points created.
i_return_value = @
asm_const_line_3point( "1", "Point 5 ", @
"Point 6 ", "Point 7 ", 1, 0.5, @
sv_asm_line_3point_creat_id )
dump i_return_value
# Create the surface using the two curves.
i_return_value = @
sgm_const_surface_2curve( "2", @
"Surface 1.2", "Curve 1 ", @
sv_sgm_surface_2curve_creat_id )
dump i_return_value
# Mirror the surface
i_return_value = @
sgm_transform_mirror( "3", "surface", @
"Coord 0.2", 5.0, TRUE, FALSE, @
"Surface 2 ", sv_sgm_transform_surf_creat_id )
dump i_return_value
# Observe the 3 surfaces created.
# Session file paused. Press "Resume" to continue..
sf_pause()
#---------------------------------------------------------------------
# Create the composite surface using Surface 3 1 2. Surface 4 will
# be created in place of Surfaces 3 1 2 and the old surfaces are
# deleted.
#
s_output_labels= "4"
s_surface_list = "Surface 3 1 2"
i_flag = 0
r_cleantol = 0.1
r_gaptol = 0.005
i_curve_start_label = 5
i_loop_id = 1
s_add_list = ""
s_remove_list = ""
s_inner_loop_list = ""
s_vertex_list = ""
l_delete_cons = TRUE
l_implicit_topology = TRUE
i_return_value = @
sgm_create_surface_composite @
( s_output_labels, @
s_surface_list, @
i_flag, @
r_cleantol, @
r_gaptol, @
i_curve_start_label, @
i_loop_id, @
s_add_list, @
s_remove_list, @
s_inner_loop_list, @
s_vertex_list, @
l_delete_cons, @
l_implicit_topology, @
sv_created_labels )
$? YES 38000219
dump i_return_value
# Created Labels
dump sv_created_labels
# Observe the Surface 4 created
sys_free_string( sv_created_labels )
sys_free_string( sv_asm_line_3point_creat_id )
sys_free_string( sv_asm_create_grid_xyz_creat_id )
sys_free_string( sv_sgm_surface_2curve_creat_id )
sys_free_string( sv_asm_create_patch_xy_creat_id )
sys_free_string( sv_sgm_transform_surf_creat_id )
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_create_surface_decompose()
#
# In this illustration, a new database is opened
# a surface is created. Then the function is
# called to create a new surface using the
# created surface.
#
# This file can be run by starting a session of
# Patran and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_create_surface_decompose()
# has the following arguments:
#
# sgm_create_surface_decompose
# ( output_ids,
# object_surface,
# manifold_entity,
# point1_list,
# point2_list,
# point3_list,
# point4_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[128]
LOGICAL l_object_surface
STRING s_manifold_entity[128]
STRING s_point1_list[128]
STRING s_point2_list[128]
STRING s_point3_list[128]
STRING s_point4_list[128]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]
STRING sv_asm_line_3point_creat_id[VIRTUAL]
STRING sv_sgm_surface_2curve_creat_id[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
# Show the labels of the surfaces
surface_label(TRUE)
# Create 6 points
i_return_value = @
asm_const_grid_xyz( "", "[0 0 0][0 5 0]"// @
"[0 10 0][10 0 0][10 5 0][10 10 0]", @
"Coord 0", sv_asm_create_grid_xyz_creat_id )
dump i_return_value
# Create a Line
i_return_value = @
asm_const_line_3point( "1", "Point 1 ", @
"Point 2 ", "Point 3 ", 1, 0.5, @
sv_asm_line_3point_creat_id )
dump i_return_value
# Create a Line
i_return_value = @
asm_const_line_3point( "2", "Point 4 ", @
"Point 5 ", "Point 6 ", 1, 0.5, @
sv_asm_line_3point_creat_id )
dump i_return_value
# Create a surface
i_return_value = @
sgm_const_surface_2curve( "1", "Curve 1 ", @
"Curve 2 ", sv_sgm_surface_2curve_creat_id )
dump i_return_value
# Observe the surface created.
# Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
# Call the function to construct a surface from four vertices
# defined from the existing surface.
#
s_output_ids = "2"
l_object_surface = FALSE
s_manifold_entity = "Surface 1"
s_point1_list = "Point 2"
s_point2_list = "Point 5"
s_point3_list = "Point 4"
s_point4_list = "Point 1"
i_return_value = @
sgm_create_surface_decompose @
( s_output_ids, @
l_object_surface, @
s_manifold_entity, @
s_point1_list, @
s_point2_list, @
s_point3_list, @
s_point4_list, @
sv_created_ids )
dump i_return_value
# Created IDs
dump sv_created_ids
# Observe the Surface 2 created
sys_free_string( sv_created_ids )
sys_free_string( sv_asm_create_grid_xyz_creat_id )
sys_free_string( sv_asm_line_3point_creat_id )
sys_free_string( sv_sgm_surface_2curve_creat_id )
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_create_surface_ruled()
#
# In this illustration, a new database is opened
# 2 lines are created. Then the function is
# called to create a ruled surface between these
# 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_create_surface_ruled()
# has the following arguments:
#
# sgm_create_surface_ruled
# ( output_ids,
# curve1_list,
# curve2_list,
# ruled_form,
# auto_align,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[128]
STRING s_curve1_list[128]
STRING s_curve2_list[128]
INTEGER i_ruled_form
LOGICAL l_auto_align
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_grid_xyz_creat_id[VIRTUAL]
STRING sv_asm_line_2point_creat_id[VIRTUAL]
STRING sv_asm_line_3point_creat_id[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
# Show the labels of the surfaces
surface_label(TRUE)
# Create the points
i_return_value = @
asm_const_grid_xyz( "", "[0 10 0][20 10 0]"// @
"[0 0 0][10 -2 0][20 -10 0]", @
"Coord 0", sv_asm_create_grid_xyz_creat_id )
dump i_return_value
# Create the curve
i_return_value = @
asm_const_line_2point( "1", "Point 1 ", @
"Point 2 ", 0, "", 50., 1, @
sv_asm_line_2point_creat_id )
dump i_return_value
# Create the Curve
i_return_value = @
asm_const_line_3point( "2", "Point 3 ", @
"Point 4 ", "Point 5 ", 1, 0.5, @
sv_asm_line_3point_creat_id )
dump i_return_value
#---------------------------------------------------------------------
# Create ruled surface between Curve 1 and Curve 2
#
s_output_ids = "1"
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2"
i_ruled_form = 1
l_auto_align = TRUE
#
i_return_value = @
sgm_create_surface_ruled @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
i_ruled_form, @
l_auto_align, @
sv_created_ids )
dump i_return_value
# Created IDs
dump sv_created_ids
sys_free_string( sv_created_ids )
sys_free_string( sv_asm_create_grid_xyz_creat_id )
sys_free_string( sv_asm_line_2point_creat_id )
sys_free_string( sv_asm_line_3point_creat_id )
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_create_surface_trimmed()
#
# In this illustration, a new database is opened.
# A surface and 5 curves are created. Four curves
# are converted into a composite curve. Then the
# function is called to create a trimmed surface
# between the composite curve and the fifth
# circular curve.
#
# This file can be run by starting a session of
# Patran and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_create_surface_trimmed()
# has the following arguments:
#
# sgm_create_surface_trimmed
# ( output_ids,
# curveo_list,
# curvei_list,
# surface,
# delete_ocurve,
# delete_icurve,
# delete_surf,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
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_return_value
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
dump i_return_value
# Observe the curves and the surface.
# Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
# Call the function to create a trimmed surface inside the 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
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 )
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_create_surface_trimmed_v1()
#
# In this illustration, a new database is opened.
# A surface and 5 curves are created. Four curves
# are converted into a composite curve. Then the
# function is called to create a trimmed surface
# between the composite curve and the fifth
# circular curve.
#
# This file can be run by starting a session of
# Patran and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_create_surface_trimmed_v1()
# has the following arguments:
#
# sgm_create_surface_trimmed_v1
# ( output_ids,
# curveo_list,
# curvei_list,
# surface,
# delete_ocurve,
# delete_icurve,
# delete_surf,
# implied_top,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
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
LOGICAL l_implied_top
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
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
dump i_return_value
# 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
l_implied_top = TRUE
i_return_value = @
sgm_create_surface_trimmed_v1 @
( s_output_ids, @
s_curveo_list, @
s_curvei_list, @
s_surface, @
l_delete_ocurve, @
l_delete_icurve, @
l_delete_surf, @
l_implied_top, @
sv_created_ids )
$? YES 38000217
$? YES 38000217
$? YES 38000219
dump i_return_value
# Created surface is
dump sv_created_ids
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 )
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_verify_surface_boundary()
#
# In this illustration, a new database is opened.
# Two surfaces are created. Then function is
# called to verify for the existence of free
# edges between adjacent 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 sgm_verify_surface_boundary()
# has the following arguments:
#
# sgm_verify_surface_boundary
# ( surface_list,
# verify_tol,
# verify_type )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_surface_list[128]
REAL r_verify_tol
INTEGER i_verify_type
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 curves.
surface_label(TRUE)
# Create a patch.
i_return_value = @
asm_const_patch_xyz( "", "<20 10 0>"// @
"<20 10 0>", @
"[0 0 0][0 10 0]", "Coord 0", @
sv_asm_create_patch_xy_creat_id )
dump i_return_value
# Observe the 2 patches created.
# Session file paused. Press "Resume" to continue...
sf_pause()
#---------------------------------------------------------------------
# Call the function to verify the existence of free edges between
# adjacent surfaces 1 and 2 with the verify tolerance = 0.005 and
# verify type = 1.
#
s_surface_list = "Surface 1 2"
r_verify_tol = 0.005
i_verify_type = 1
i_return_value = @
sgm_verify_surface_boundary @
( s_surface_list, @
r_verify_tol, @
i_verify_type )
dump i_return_value
# Create graphical display.
i_return_value = @
sgm_incongruent_geom_display()
dump i_return_value
sys_free_string( sv_asm_create_patch_xy_creat_id )
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_2d_arc2point()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_2d_arc2point()
# has the following arguments:
#
# sgm_const_curve_2d_arc2point
# ( output_ids,
# arc_angle,
# plane_list,
# center_point_list,
# start_point_list,
# end_point_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
INTEGER i_arc_angle
STRING s_plane_list[16]
STRING s_center_point_list[16]
STRING s_start_point_list[16]
STRING s_end_point_list[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Creating two curves in X-Y plane.
s_output_ids = "#"
i_arc_angle = 1
s_plane_list = "Coord 0.3"
s_center_point_list = "[1 1 0] [2 2 0]"
s_start_point_list = "[0 0 0]"
s_end_point_list = "[3 3 0]"
#
i_return_value = @
sgm_const_curve_2d_arc2point @
( s_output_ids, @
i_arc_angle, @
s_plane_list, @
s_center_point_list, @
s_start_point_list, @
s_end_point_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_2d_arc2point_v1()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_2d_arc2point_v1()
# has the following arguments:
#
# sgm_const_curve_2d_arc2point_v1
# ( output_ids,
# arc_method,
# radius,
# create_center,
# flip_center_point,
# arc_angle,
# plane_list,
# center_point_list,
# start_point_list,
# end_point_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
INTEGER i_arc_method
REAL r_radius
LOGICAL l_create_center
LOGICAL l_flip_center_point
INTEGER i_arc_angle
STRING s_plane_list[16]
STRING s_center_point_list[16]
STRING s_start_point_list[16]
STRING s_end_point_list[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating two curves in X-Y plane by defining center.
s_output_ids = "#"
i_arc_method = 1
i_arc_angle = 2
s_plane_list = "Coord 0.3"
s_center_point_list = "[1 1 0] [2 2 0]"
s_start_point_list = "[0 0 0]"
s_end_point_list = "[3 3 0]"
#
i_return_value = @
sgm_const_curve_2d_arc2point_v1 @
( s_output_ids, @
i_arc_method, @
r_radius, @
l_create_center, @
l_flip_center_point, @
i_arc_angle, @
s_plane_list, @
s_center_point_list, @
s_start_point_list, @
s_end_point_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_2d_arc2point_v2()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_2d_arc2point_v2()
# has the following arguments:
#
# sgm_const_curve_2d_arc2point_v2
# ( output_ids,
# arc_method,
# radius,
# create_center,
# flip_center_point,
# arc_angle,
# plane_list,
# center_point_list,
# start_point_list,
# end_point_list,
# project_flag,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
INTEGER i_arc_method
REAL r_radius
LOGICAL l_create_center
LOGICAL l_flip_center_point
INTEGER i_arc_angle
STRING s_plane_list[16]
STRING s_center_point_list[16]
STRING s_start_point_list[16]
STRING s_end_point_list[16]
LOGICAL l_project_flag
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating two curves in plane parallel to X-Y plane passing through
# start point, by defining radius.
s_output_ids = "#"
i_arc_method = 2
r_radius = 3.11
l_create_center = TRUE
l_flip_center_point = TRUE
i_arc_angle = 1
s_plane_list = "Coord 0.3"
s_start_point_list = "[0 0 1]"
s_end_point_list = "[3 3 0]"
#
i_return_value = @
sgm_const_curve_2d_arc2point_v2 @
( s_output_ids, @
i_arc_method, @
r_radius, @
l_create_center, @
l_flip_center_point, @
i_arc_angle, @
s_plane_list, @
s_center_point_list, @
s_start_point_list, @
s_end_point_list, @
l_project_flag, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_2d_arcangles()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two arcs.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_2d_arcangles()
# has the following arguments:
#
# sgm_const_curve_2d_arcangles
# ( output_ids,
# radius,
# start_angle,
# end_angle,
# plane_list,
# center_point_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
REAL r_radius
REAL r_start_angle
REAL r_end_angle
STRING s_plane_list[32]
STRING s_center_point_list[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating two curves in Z plane.
s_output_ids = "#"
r_radius = 1.55
r_start_angle = 45.0
r_end_angle = 145.0
s_plane_list = "Coord 0.3 Coord 0.3"
s_center_point_list = "[3 3 1] [6 6 2]"
#
i_return_value = @
sgm_const_curve_2d_arcangles @
( s_output_ids, @
r_radius, @
r_start_angle, @
r_end_angle, @
s_plane_list, @
s_center_point_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_2d_arcangles_v1()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two arcs.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_2d_arcangles_v1()
# has the following arguments:
#
# sgm_const_curve_2d_arcangles_v1
# ( output_ids,
# radius,
# start_angle,
# end_angle,
# plane_list,
# center_point_list,
# project_flag,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
REAL r_radius
REAL r_start_angle
REAL r_end_angle
STRING s_plane_list[32]
STRING s_center_point_list[16]
LOGICAL l_project_flag
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating two arcs and translating construction plane
# to curve location.
s_output_ids = "#"
r_radius = 1.55
r_start_angle = 45.0
r_end_angle = 145.0
s_plane_list = "Coord 0.3 Coord 0.3"
l_project_flag = FALSE
s_center_point_list = "[3 3 3] [6 6 6]"
#
i_return_value = @
sgm_const_curve_2d_arcangles_v1 @
( s_output_ids, @
r_radius, @
r_start_angle, @
r_end_angle, @
s_plane_list, @
s_center_point_list, @
l_project_flag, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_2d_arc3point()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_2d_arc3point()
# has the following arguments:
#
# sgm_const_curve_2d_arc3point
# ( output_ids,
# plane_list,
# start_point_list,
# middle_point_list,
# end_point_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_plane_list[16]
STRING s_start_point_list[16]
STRING s_middle_point_list[16]
STRING s_end_point_list[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating two curves in X-Y plane.
s_output_ids = "#"
s_plane_list = "Coord 0.3"
s_start_point_list = "[1 1 0] [2 2 0]"
s_middle_point_list = "[1 4 1]"
s_end_point_list = "[3 3 0]"
#
i_return_value = @
sgm_const_curve_2d_arc3point @
( s_output_ids, @
s_plane_list, @
s_start_point_list, @
s_middle_point_list, @
s_end_point_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_2d_circle()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two circles.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_2d_circle()
# has the following arguments:
#
# sgm_const_curve_2d_circle
# ( output_ids,
# radius_method,
# radius,
# plane_list,
# radius_point_list,
# center_point_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
INTEGER i_radius_method
REAL r_radius
STRING s_plane_list[32]
STRING s_radius_point_list[16]
STRING s_center_point_list[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Calling function to create two circles in two perpendicular planes.
# Circles drawn by explicitly giving the radius.
s_output_ids = "1"
i_radius_method = 1
r_radius = 1.45
s_plane_list = "Coord 0.3 Coord 0.2"
s_center_point_list = "[5 5 0] [0 0 0]"
#
i_return_value = @
sgm_const_curve_2d_circle @
( s_output_ids, @
i_radius_method, @
r_radius, @
s_plane_list, @
s_radius_point_list, @
s_center_point_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_2d_circle_v1()
#
# This session file will create a new database by
# name ’new.db’ and call the above mentioned
# function and create two circles.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_2d_circle_v1()
# has the following arguments:
#
# sgm_const_curve_2d_circle_v1
# ( output_ids,
# radius_method,
# radius,
# plane_list,
# radius_point_list,
# center_point_list,
# project_flag,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
INTEGER i_radius_method
REAL r_radius
STRING s_plane_list[16]
STRING s_radius_point_list[16]
STRING s_center_point_list[16]
LOGICAL l_project_flag
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Calling function to create two circles and project them on a plane.
# Circles are created by giving radius value.
s_output_ids = "#"
i_radius_method = 1
r_radius = 1.45
s_plane_list = "Coord 0.3"
s_center_point_list = "[0 0 3] [3 3 -1]"
l_project_flag = TRUE
#
i_return_value = @
sgm_const_curve_2d_circle_v1 @
( s_output_ids, @
i_radius_method, @
r_radius, @
s_plane_list, @
s_radius_point_list, @
s_center_point_list, @
l_project_flag, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_2d_normal()
#
# This session file will create a new database by
# name ’new.db’ and create a curve. The above
# mentioned function will be called to create two
# curves perpendicular to it.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar
#
# The function sgm_const_curve_2d_normal()
# has the following arguments:
#
# sgm_const_curve_2d_normal
# ( output_ids,
# length,
# flip,
# plane_list,
# point_list,
# curve_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
REAL r_length
LOGICAL l_flip
STRING s_plane_list[16]
STRING s_point_list[16]
STRING s_curve_list[16]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_line_3point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a curve by giving three points.
i_return_value = @
asm_const_line_3point( "1", "[0 0 0]", @
"[ 0.5 1 2]", "[1 0.5 1]",1,0.5, sv_asm_line_3point_created_ids)
dump i_return_value
#---------------------------------------------------------------------
# Creating two curves perpendicular to the Curve 1. The curves will
# be projected on to the Z plane. New curves will be drawn on the
# opposite side of the curve 1 with respect to the points given.
s_output_ids = "#"
r_length = -3.0
l_flip = TRUE
s_plane_list = "Coord 0.3"
s_point_list = "[1 2 0][.5 -1 1]"
s_curve_list = "Curve 1 "
#
i_return_value = @
sgm_const_curve_2d_normal @
( s_output_ids, @
r_length, @
l_flip, @
s_plane_list, @
s_point_list, @
s_curve_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_const_curve_2d_normal_v1()
#
# This session file will create a new database by
# name ’new.db’ and create a curve. The above
# mentioned function will be called to create two
# curves perpendicular to it.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar
#
# The function sgm_const_curve_2d_normal_v1()
# has the following arguments:
#
# sgm_const_curve_2d_normal_v1
# ( output_ids,
# length,
# flip,
# plane_list,
# point_list,
# curve_list,
# project_flag,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
REAL r_length
LOGICAL l_flip
STRING s_plane_list[16]
STRING s_point_list[16]
STRING s_curve_list[16]
LOGICAL l_project_flag
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_line_3point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a curve by giving three points.
i_return_value = @
asm_const_line_3point( "1", "[0 0 0]", @
"[ 0.5 1 2]", "[1 0.5 1]",1,0.5, sv_asm_line_3point_created_ids)
dump i_return_value
#---------------------------------------------------------------------
# Creating two curves perpendicular to the Curve 1. The curves will
# be projected on the plane parallel to Z plane and passing through
# the individual points. New curves will be drawn on the opposite
# side of the curve 1 with respect to the points given.
s_output_ids = "#"
r_length = -3.0
l_flip = TRUE
s_plane_list = "Coord 0.3"
s_point_list = "[1 2 0][.5 -1 1]"
s_curve_list = "Curve 1 "
l_project_flag = FALSE
#
i_return_value = @
sgm_const_curve_2d_normal_v1 @
( s_output_ids, @
r_length, @
l_flip, @
s_plane_list, @
s_point_list, @
s_curve_list, @
l_project_flag, @
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_const_curve_intersect()
#
# This session file will create a new database by
# name ’new.db’ and create two surfaces and a
# plane. The above mentioned function will be
# called to create curves on the surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_intersect()
# has the following arguments:
#
# sgm_const_curve_intersect
# ( output_ids,
# intersect_option,
# surface1_list,
# surface2_list,
# geo_tol,
# int_tol,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
INTEGER i_intersect_option
STRING s_surface1_list[16]
STRING s_surface2_list[32]
REAL r_geo_tol
REAL r_int_tol
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_asm_create_patch_xy_crtd_ids[VIRTUAL]
STRING sv_sgm_create_plane_3p_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Changing view to Isometric View 1.
i_return_value = ga_view_aa_set(23., -34., 0)
dump i_return_value
#---------------------------------------------------------------------
# Creating a plane.
i_return_value = @
sgm_const_plane_3point("1","[0 0 0]","[1 0 0]"@
, "[0 1 -1]", sv_sgm_create_plane_3p_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating two surfaces.
i_return_value = @
asm_const_patch_xyz( "1", "<2 2 0>","[0 0 0]",@
"Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "2","<3 2 -5>","[-1 1 3]"@
,"Coord 0", sv_asm_create_patch_xy_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating two curves where the plane is intersecting the two
# surfaces.
s_output_ids = "#"
i_intersect_option = 2
s_surface1_list = "Plane 1"
s_surface2_list = "Surface 2 Surface 1"
r_geo_tol = 1e-08
r_int_tol = 0.1
#
i_return_value = @
sgm_const_curve_intersect @
( s_output_ids, @
i_intersect_option, @
s_surface1_list, @
s_surface2_list, @
r_geo_tol, @
r_int_tol, @
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_crtd_ids)
sys_free_string(sv_sgm_create_plane_3p_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_manifold_2point()
#
# This session file will create a new database by
# name ’new.db’ and create a surface. The above
# mentioned function will create two curves on
# the surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_manifold_2point()
# has the following arguments:
#
# sgm_const_curve_manifold_2point
# ( output_ids,
# surface_list,
# point1_list,
# point2_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_surface_list[16]
STRING s_point1_list[32]
STRING s_point2_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_sgm_create_surface_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a surface by giving vertex points.
i_return_value = @
sgm_const_surface_vertex( "1", "[0 0 0]", @
"[4 1 -.5]", "[3.5 2.1 4]", "[-.5 3 2.2]", @
sv_sgm_create_surface_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Changing view for proper view of the surface.
i_return_value = ga_view_aa_set( -105., 0., -30. )
dump i_return_value
#---------------------------------------------------------------------
# Making the surface interior clear on the screen.
i_return_value = ga_display_lines_set( "general", 5 )
dump i_return_value
#---------------------------------------------------------------------
# Creating 2 curves on the surface.
s_output_ids = "#"
s_surface_list = "Surface 1"
s_point1_list = "[0 0 0][.5 .5 0]"
s_point2_list = "[.75 .35 3] [.1 .9 0]"
#
i_return_value = @
sgm_const_curve_manifold_2point @
( s_output_ids, @
s_surface_list, @
s_point1_list, @
s_point2_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_sgm_create_surface_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_manifold_npoint()
#
# This session file will create a new database by
# name ’new.db’ and create a surface. The above
# mentioned function will create a curve on the
# surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_manifold_npoint()
# has the following arguments:
#
# sgm_const_curve_manifold_npoint
# ( output_ids,
# surface,
# point_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_surface[16]
STRING s_point_list[64]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_sgm_create_surface_crtd_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling the curve and point labeling.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a surface by giving vertex points.
i_return_value = @
sgm_const_surface_vertex( "1", "[0 0 0]", @
"[4 1 -.5]", "[3.5 2.1 4]", "[-.5 3 2.2]", @
sv_sgm_create_surface_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Changing view for proper view of the surface.
i_return_value = ga_view_aa_set( -105., 0., -30. )
dump i_return_value
#---------------------------------------------------------------------
# Making the surface interior clear on the screen.
i_return_value = ga_display_lines_set( "general", 5 )
dump i_return_value
#---------------------------------------------------------------------
# Creating 1 curve on the surface.
s_output_ids = "#"
s_surface = "Surface 1"
s_point_list = "[0 0 0] [.75 .35 3] [.5 .5 0] [.1 .9 0]"
#
i_return_value = @
sgm_const_curve_manifold_npoint @
( s_output_ids, @
s_surface, @
s_point_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_sgm_create_surface_crtd_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_curve_project()
#
# This session file will create a new database by
# name ’new.db’ and create a surface and a curve.
# The above mentioned function will project the
# curve on the surface and create a curve.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_curve_project()
# has the following arguments:
#
# sgm_const_curve_project
# ( output_ids,
# curve_list,
# surface_list,
# delete_org,
# project_method,
# vector,
# coord_frame,
# prjtol,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[16]
STRING s_curve_list[16]
STRING s_surface_list[16]
LOGICAL l_delete_org
INTEGER i_project_method
STRING s_vector[16]
STRING s_coord_frame[16]
REAL r_prjtol
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_sgm_create_surface_crtd_ids[VIRTUAL]
STRING sv_asm_line_3point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Enabling curve and point label.
curve_label(TRUE)
point_label(TRUE)
#---------------------------------------------------------------------
# Creating a surface by giving vertex points.
i_return_value = @
sgm_const_surface_vertex( "1", "[0 0 0]", @
"[4 1 -.5]", "[3.5 2.1 4]", "[-.5 3 2.2]", @
sv_sgm_create_surface_crtd_ids )
dump i_return_value
#---------------------------------------------------------------------
# Creating a curve by specifying three points.
i_return_value = @
asm_const_line_3point( "1", "[1 1 .5]", @
"[.4 -.2 1]", "[3 0 -.1]", 1, 0.5, @
sv_asm_line_3point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Changing view for proper view of the surface.
i_return_value = ga_view_aa_set( -20., 70., -160. )
dump i_return_value
#---------------------------------------------------------------------
# Making the surface interior clear on the screen.
i_return_value = ga_display_lines_set( "general", 5 )
dump i_return_value
#---------------------------------------------------------------------
# Creating a projected curve on the surface without deleting the old.
s_output_ids = "#"
s_curve_list = "Curve 1"
s_surface_list = "Surface 1"
l_delete_org = FALSE
s_coord_frame = "Coord 0"
r_prjtol = 1e-05
#
i_return_value = @
sgm_const_curve_project @
( s_output_ids, @
s_curve_list, @
s_surface_list, @
l_delete_org, @
i_project_method, @
s_vector, @
s_coord_frame, @
r_prjtol, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
sys_free_string(sv_created_ids)
sys_free_string(sv_sgm_create_surface_crtd_ids)
sys_free_string(sv_asm_line_3point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_plane_3point()
#
# This function creates planes passing through
# three sets of points.
#
# In this example a new database is opened and
# 2 planes, parallel XZ and YZ plane, are created
# using this function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_plane_3point()
# has the following arguments:
#
# sgm_const_plane_3point
# ( output_ids,
# point1_list,
# point2_list,
# point3_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_point1_list[32]
STRING s_point2_list[32]
STRING s_point3_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
#---------------------------------------------------------------------
# Create Plane
s_output_ids = "#"
s_point1_list = "[0 0 0]"
s_point2_list = "[10 0 0] [0 10 0]"
s_point3_list = "[10 0 10] [0 10 10]"
i_return_value = @
sgm_const_plane_3point @
( s_output_ids, @
s_point1_list, @
s_point2_list, @
s_point3_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_plane_curve()
#
# This function creates planes normal to a set
# of curves at a set of points on the curves.
#
# In this example a new database is opened and
# 2 curves are drawn from [0 0 0] to [10 0 0] and
# [10 0 0] to [10 10 0]. Then 2 planes are
# created perpendicular to these curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_plane_curve()
# has the following arguments:
#
# sgm_const_plane_curve
# ( output_ids,
# point_option,
# curve_list,
# point_list,
# u_position,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
INTEGER i_point_option
STRING s_curve_list[32]
STRING s_point_list[32]
REAL r_u_position
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_point_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
#---------------------------------------------------------------------
# Create line
i_return_value = @
asm_const_line_2point @
( "#", "[0 0 0][10 0 0]", @
"[10 0 0][10 10 0]", 0, "", @
50., 1, sv_point_ids )
#---------------------------------------------------------------------
# Create Plane
s_output_ids = "#"
i_point_option = 2
s_curve_list = "Curve 1 2"
s_point_list = "Point 1 2"
r_u_position = 0.0
i_return_value = @
sgm_const_plane_curve @
( s_output_ids, @
i_point_option, @
s_curve_list, @
s_point_list, @
r_u_position, @
sv_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_point_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of 3 calls to the
# function sgm_const_plane_leastsq()
#
# This function creates a least squares plane
# from a set of points, a curve, or a surface.
#
# In this example a new database is opened and a
# cube of 10 unit is created. Then a curve is
# created. Then this function is called three
# times to create 3 least square planes - first
# using "Points 3 6 7 8", second using "Curve 1"
# and third using surface "Solid 1.6".
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_plane_leastsq()
# has the following arguments:
#
# sgm_const_plane_leastsq
# ( output_ids,
# leastsq_option,
# entity_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
INTEGER i_leastsq_option
STRING s_entity_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_create_hpat_xyz_created_ids[VIRTUAL]
STRING sv_create_curve_2d_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Plane labels
plane_label(TRUE)
#---------------------------------------------------------------------
# Create cube of dimension 10 X 10 X 10
i_return_value = @
asm_const_hpat_xyz @
( "1", "<10 10 10>","[0 0 0]", "Coord 0", @
sv_create_hpat_xyz_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create semicircular arc
i_return_value = @
sgm_const_curve_2d_arc2point_v2 @
( "#", 2, 5., FALSE, FALSE, 1,"Coord 0.3",@
"", "Point 7 ", "Point 6 ", FALSE, @
sv_create_curve_2d_created_ids )
#---------------------------------------------------------------------
# Create least square Plane from set of points
s_output_ids = "#"
i_leastsq_option = 1
s_entity_list = "Point 3 6 7 8"
i_return_value = @
sgm_const_plane_leastsq @
( s_output_ids, @
i_leastsq_option, @
s_entity_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
# Session file paused. Press "Resume ..." to continue...
sf_pause()
#---------------------------------------------------------------------
# Create least square Plane from a curve
s_output_ids = "#"
i_leastsq_option = 2
s_entity_list = "Curve 1"
i_return_value = @
sgm_const_plane_leastsq @
( s_output_ids, @
i_leastsq_option, @
s_entity_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
# Session file paused. Press "Resume ..." to continue...
sf_pause()
#---------------------------------------------------------------------
# Create least square Plane from surface
s_output_ids = "#"
i_leastsq_option = 3
s_entity_list = "Solid 1.6 1.2"
i_return_value = @
sgm_const_plane_leastsq @
( s_output_ids, @
i_leastsq_option, @
s_entity_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_create_hpat_xyz_created_ids)
sys_free_string( sv_create_curve_2d_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_plane_tangent()
#
# This function creates planes that are tangent
# to set of surfaces at a set of points on the
# surfaces.
#
# In this example a new database is opened and
# surface of dimension 4 X 4 is created along
# XY plane. Then this function is called to
# create a plane tangential to this plane at
# point [10 10 0].
#
# This file can be run by starting a session of
# Patran, opening a new or existing database,
# and running this session file through the
# "File","Session","Play" pulldown menus
# on the menu bar.
#
# The function sgm_const_plane_tangent()
# has the following arguments:
#
# sgm_const_plane_tangent
# ( output_ids,
# point_option,
# surface_list,
# point_list,
# uv_position,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
INTEGER i_point_option
STRING s_surface_list[32]
STRING s_point_list[32]
REAL ra_uv_position(2)
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_xy_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
surface_label(TRUE)
#---------------------------------------------------------------------
# Create Surface along XY plane
i_return_value = @
asm_const_patch_xyz @
( "#", "<4 4 0>", "[0 0 0]", "Coord 0", @
sv_xy_ids )
#---------------------------------------------------------------------
# Create Plane
s_output_ids = ""
i_point_option = 2
s_surface_list = "Surface 1"
s_point_list = "Point 3 "
ra_uv_position = [0., 0.]
i_return_value = @
sgm_const_plane_tangent @
( s_output_ids, @
i_point_option, @
s_surface_list, @
s_point_list, @
ra_uv_position, @
sv_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_xy_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_plane_interpolate()
#
# This function creates planes by interpolation
# along a set of curves, The normals of the
# generated planes are along the curve tangents
# at the points of intersection between the
# planes and the curves.
#
# In this example a new database is opened and
# a curve is drawn from [0 0 0] to [10 0 0]. Then
# 3 planes, whose normals are along the curve is
# created using this function with uniform space
# ratio. The created planes appear on the default
# viewport.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_plane_interpolate()
# has the following arguments:
#
# sgm_const_plane_interpolate
# ( output_ids,
# curve_list,
# space_ratio,
# num_planes,
# method,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_curve_list[32]
REAL r_space_ratio
INTEGER i_num_planes
INTEGER i_method
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_point_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
#---------------------------------------------------------------------
# Create line
i_return_value = @
asm_const_line_2point @
( "1", "[0 0 0]", "[10 0 0]", 0, "", @
50., 1, sv_point_ids )
#---------------------------------------------------------------------
# Create Plane
s_output_ids = ""
s_curve_list = "Curve 1 "
r_space_ratio = 0.0
i_num_planes = 3
i_method = 1
i_return_value = @
sgm_const_plane_interpolate @
( s_output_ids, @
s_curve_list, @
r_space_ratio, @
i_num_planes, @
i_method, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_point_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_plane_vector_normal()
#
# This function creates planes from a set of
# vector normals
#
# In this function a new database is opened and
# vector is created from [0 0 0] to [1 0 0]. Then
# this function is called to crated a plane
# perpendicular to the created vector.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_plane_vector_normal()
# has the following arguments:
#
# sgm_const_plane_vector_normal
# ( output_ids,
# offset_list,
# vector_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_offset_list[32]
STRING s_vector_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_vector_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
#---------------------------------------------------------------------
# Create Vector
i_return_value = @
sgm_const_vector_magnitude @
( "1","1.0","<1 0 0>","[0 0 0]","Coord 0",@
sv_vector_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create Plane
s_output_ids = ""
s_offset_list = "0.0"
s_vector_list = sv_vector_ids
i_return_value = @
sgm_const_plane_vector_normal @
( s_output_ids, @
s_offset_list, @
s_vector_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_vector_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_solid_2surface()
#
# This file opens a new database "new.db" and
# creates two surfaces. Later it creates a
# solid with these two surfaces using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_solid_2surface()
# has the following arguments:
#
# sgm_const_solid_2surface
# ( output_ids,
# surface1_list,
# surface2_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
s_output_ids = "8"
# Create two surfaces.
i_return_value = @
asm_const_patch_xyz( "1", "<1 0 1>", @
"[0 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "2", "<0.5 0 0.5>", @
"[0.25 1 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
i_return_value = @
sgm_const_solid_2surface @
( s_output_ids, @
s_surface1_list, @
s_surface2_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_const_solid_2surface_v1()
#
# This file opens a new database "new.db" and
# creates two surfaces. Later it creates a
# solid with these two surfaces using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_solid_2surface_v1()
# has the following arguments:
#
# sgm_const_solid_2surface_v1
# ( output_ids,
# auto_orient,
# surface1_list,
# surface2_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
LOGICAL l_auto_orient
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
s_output_ids = "8"
# Create two surfaces.
i_return_value = @
asm_const_patch_xyz( "1", "<1 0 1>", @
"[0 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "2", "<0.5 0 0.5>", @
"[0.25 1 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
l_auto_orient = TRUE
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
i_return_value = @
sgm_const_solid_2surface_v1 @
( s_output_ids, @
l_auto_orient, @
s_surface1_list, @
s_surface2_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_const_solid_3surface_v1()
#
# This file opens a new database "new.db" and
# creates three surfaces. Later it creates a
# solid with these three surfaces using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_solid_3surface_v1()
# has the following arguments:
#
# sgm_const_solid_3surface_v1
# ( output_ids,
# param_method,
# surface1_list,
# surface2_list,
# surface3_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
INTEGER i_param_method
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING s_surface3_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
s_output_ids = "8"
# Create three surfaces.
i_return_value = @
asm_const_patch_xyz( "1", "<1 0 1>", @
"[0 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "2", "<0.5 0 0.5>", @
"[-0.25 1 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "3", "<0.5 0 0.5>", @
"[0.25 2 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
i_param_method = 2
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
s_surface3_list = "surface 3"
i_return_value = @
sgm_const_solid_3surface_v1 @
( s_output_ids, @
i_param_method, @
s_surface1_list, @
s_surface2_list, @
s_surface3_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_const_solid_3surface_v2()
#
# This file opens a new database "new.db" and
# creates three surfaces. Later it creates a
# solid with these three surfaces using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_solid_3surface_v2()
# has the following arguments:
#
# sgm_const_solid_3surface_v2
# ( output_ids,
# auto_orient,
# param_method,
# surface1_list,
# surface2_list,
# surface3_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
LOGICAL l_auto_orient
INTEGER i_param_method
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING s_surface3_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
s_output_ids = "8"
# Create three surfaces.
i_return_value = @
asm_const_patch_xyz( "1", "<1 0 1>", @
"[0 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "2", "<0.5 0 0.5>", @
"[-0.25 1 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "3", "<0.5 0 0.5>", @
"[0.25 2 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
l_auto_orient = TRUE
i_param_method = 2
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
s_surface3_list = "surface 3"
i_return_value = @
sgm_const_solid_3surface_v2 @
( s_output_ids, @
l_auto_orient, @
i_param_method, @
s_surface1_list, @
s_surface2_list, @
s_surface3_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_const_solid_4surface_v1()
#
# This file opens a new database "new.db" and
# creates four surfaces. Later it creates a
# solid with these four surfaces using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_solid_4surface_v1()
# has the following arguments:
#
# sgm_const_solid_4surface_v1
# ( output_ids,
# param_method,
# surface1_list,
# surface2_list,
# surface3_list,
# surface4_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
INTEGER i_param_method
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING s_surface3_list[32]
STRING s_surface4_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
s_output_ids = "8"
# Create four surfaces.
i_return_value = @
asm_const_patch_xyz( "1", "<1 0 1>", @
"[0 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "2", "<0.5 0 0.5>", @
"[-0.25 1 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "3", "<0.5 0 0.5>", @
"[0.25 2 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "4", "<1 0 1>", @
"[0.5 3 0.5]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
i_param_method = 2
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
s_surface3_list = "surface 3"
s_surface4_list = "surface 4"
i_return_value = @
sgm_const_solid_4surface_v1 @
( s_output_ids, @
i_param_method, @
s_surface1_list, @
s_surface2_list, @
s_surface3_list, @
s_surface4_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_const_solid_4surface_v2()
#
# This file opens a new database "new.db" and
# creates four surfaces. Later it creates a
# solid with these four surfaces using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function asm_const_solid_4surface_v2()
# has the following arguments:
#
# sgm_const_solid_4surface_v2
# ( output_ids,
# orient,
# param_method,
# surface1_list,
# surface2_list,
# surface3_list,
# surface4_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
LOGICAL l_auto_orient
INTEGER i_param_method
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING s_surface3_list[32]
STRING s_surface4_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
s_output_ids = "8"
# Create four surfaces.
i_return_value = @
asm_const_patch_xyz( "1", "<1 0 1>", @
"[0 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "2", "<0.5 0 0.5>", @
"[-0.25 1 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "3", "<0.5 0 0.5>", @
"[0.25 2 0.25]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "4", "<1 0 1>", @
"[0.5 3 0.5]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
l_auto_orient = TRUE
i_param_method = 2
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
s_surface3_list = "surface 3"
s_surface4_list = "surface 4"
i_return_value = @
sgm_const_solid_4surface_v2 @
( s_output_ids, @
l_auto_orient, @
i_param_method, @
s_surface1_list, @
s_surface2_list, @
s_surface3_list, @
s_surface4_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_const_solid_5face()
#
# This file opens a new database "new.db" and
# creates a triangular prism with five surfaces.
# Later it creates a solid with the help of
# these five surfaces.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_solid_5face()
# has the following arguments:
#
# sgm_const_solid_5face
# ( output_ids,
# surface1_list,
# surface2_list,
# surface3_list,
# surface4_list,
# surface5_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8"
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING s_surface3_list[32]
STRING s_surface4_list[32]
STRING s_surface5_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
STRING sv_asm_line_2point_created_ids[VIRTUAL]
STRING sv_sgm_surface_3edge_created[VIRTUAL]
STRING sv_sgm_surface_4edge_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0.)
# Create two surfaces.
i_return_value = @
asm_const_patch_xyz("","<1 1 0><0 1 1>", @
"[0 0 0][0 0 0]", "coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create two curves.
i_return_value = @
asm_const_line_2point( "1", "Point 6 ", @
"Point 3 ", 0, "", 50., 1, @
sv_asm_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point( "2", "Point 5 ", @
"Point 4 ", 0, "", 50., 1, @
sv_asm_line_2point_created_ids )
dump i_return_value
# Create three surfaces.
i_return_value = @
sgm_const_surface_3edge( "", @
"Surface 2.3 Surface 2.1 ", @
"Surface 1.2 Surface 1.4", @
"Curve 1 Curve 2 ", @
sv_sgm_surface_3edge_created )
dump i_return_value
i_return_value = @
sgm_const_surface_4edge( "5", "Surface 2.2 ", @
"Curve 1 ", "Surface 1.3 ", "Curve 2 ", @
sv_sgm_surface_4edge_created )
dump i_return_value
solid_label(TRUE)
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
s_surface3_list = "surface 3"
s_surface4_list = "surface 4"
s_surface5_list = "surface 5"
# Create a Solid with the created five surfaces.
i_return_value = @
sgm_const_solid_5face @
( s_output_ids, @
s_surface1_list, @
s_surface2_list, @
s_surface3_list, @
s_surface4_list, @
s_surface5_list, @
sv_created_ids )
dump i_return_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)
sys_free_string(sv_sgm_surface_3edge_created)
sys_free_string(sv_sgm_surface_4edge_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_solid_6face()
#
# This file opens a new database "new.db" and
# creates six surfaces. Later it creates a
# solid with the help of these six surfaces.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_solid_6face()
# has the following arguments:
#
# sgm_const_solid_6face
# ( output_ids,
# surface1_list,
# surface2_list,
# surface3_list,
# surface4_list,
# surface5_list,
# surface6_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8"
STRING s_surface1_list[32]
STRING s_surface2_list[32]
STRING s_surface3_list[32]
STRING s_surface4_list[32]
STRING s_surface5_list[32]
STRING s_surface6_list[128]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
STRING sv_asm_line_2point_created_ids[VIRTUAL]
STRING sv_sgm_surface_4edge_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0.)
# Create three surfaces.
i_return_value = @
asm_const_patch_xyz("", @
"<2 0 1><0 1 1><1 0 1>", @
"[0 0 0][0 0 0][0 1 0]","coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create two curves.
i_return_value = @
asm_const_line_2point( "1", "Point 8 ", @
"Point 3 ", 0, "", 50., 1, @
sv_asm_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point( "2", "Point 7 ", @
"Point 2 ", 0, "", 50., 1, @
sv_asm_line_2point_created_ids )
dump i_return_value
# Create three surfaces.
i_return_value = @
sgm_const_surface_4edge( "", @
"Surface 3.1 Surface 3.3 Surface 3.2 ", @
"Surface 2.4 Surface 2.2 Curve 1 ", @
"Surface 1.1 Surface 1.3 Surface 1.2 ", @
"Curve 2 Curve 1 Curve 2 ",@
sv_sgm_surface_4edge_created )
dump i_return_value
solid_label(TRUE)
s_surface1_list = "surface 1"
s_surface2_list = "surface 2"
s_surface3_list = "surface 3"
s_surface4_list = "surface 4"
s_surface5_list = "surface 5"
s_surface6_list = "surface 6"
# Create a Solid with the created six surfaces.
i_return_value = @
sgm_const_solid_6face @
( s_output_ids, @
s_surface1_list, @
s_surface2_list, @
s_surface3_list, @
s_surface4_list, @
s_surface5_list, @
s_surface6_list, @
sv_created_ids )
dump i_return_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)
sys_free_string(sv_sgm_surface_4edge_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_sweep_solid_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 sgm_sweep_solid_arc()
# has the following arguments:
#
# sgm_sweep_solid_arc
# ( output_labels,
# axis,
# angle,
# offset,
# coord_frame,
# surface,
# created_labels )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_labels[128]
STRING s_axis[128]
REAL r_angle
REAL r_offset
STRING s_coord_frame[128]
STRING s_surface[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_output_labels = "1"
s_axis = "Coord 0.2"
r_angle = 90.0
r_offset = 0.0
s_coord_frame = "Coord 0"
s_surface = "Surface 1"
i_return_value = @
sgm_sweep_solid_arc @
( s_output_labels, @
s_axis, @
r_angle, @
r_offset, @
s_coord_frame, @
s_surface, @
sv_created_labels )
dump i_return_value
# Labels of the created solids
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 sgm_const_solid_decompose()
#
# This file opens a new database "new.db" and
# creates a solid. Later it creates a solid
# with two surfaces of the solid and eight
# vertices on these 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 sgm_const_solid_decompose()
# has the following arguments:
#
# sgm_const_solid_decompose
# ( output_ids,
# cubic,
# solid_face1_list,
# solid_face2_list,
# vertex1_list,
# vertex2_list,
# vertex3_list,
# vertex4_list,
# vertex5_list,
# vertex6_list,
# vertex7_list,
# vertex8_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[64]
LOGICAL l_cubic
STRING s_solid_face1_list[64]
STRING s_solid_face2_list[64]
STRING s_vertex1_list[64]
STRING s_vertex2_list[64]
STRING s_vertex3_list[64]
STRING s_vertex4_list[64]
STRING s_vertex5_list[64]
STRING s_vertex6_list[64]
STRING s_vertex7_list[64]
STRING s_vertex8_list[64]
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
i_return_value = ga_group_display_set("default_group","general")
dump i_return_value
i_return_value = ga_display_lines_set( "general", 2 )
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
s_output_ids = "8"
s_vertex1_list = "Solid 1.1 (u 0.817341) (v 0.113631)"
s_vertex2_list = "Solid 1.1 (u 0.255154) (v 0.128562)"
s_vertex3_list = "Solid 1.1 (u 0.296613) (v 0.659205)"
s_vertex4_list = "Solid 1.1 (u 0.719944) (v 0.636695)"
s_vertex5_list = "Solid 1.5 (u 0.256030) (v 0.779096)"
s_vertex6_list = "Solid 1.5 (u 0.694468) (v 0.619849)"
s_vertex7_list = "Solid 1.5 (u 0.205608) (v 0.381275)"
s_vertex8_list = "Solid 1.5 (u 0.765057) (v 0.218996)"
l_cubic = TRUE
s_solid_face1_list = "Solid 1.1"
s_solid_face2_list = "Solid 1.5"
# Create a solid.
i_return_value = @
sgm_const_solid_decompose @
( s_output_ids, @
l_cubic, @
s_solid_face1_list, @
s_solid_face2_list, @
s_vertex1_list, @
s_vertex2_list, @
s_vertex3_list, @
s_vertex4_list, @
s_vertex5_list, @
s_vertex6_list, @
s_vertex7_list, @
s_vertex8_list, @
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 sgm_const_solid_extrude()
#
# This file opens a new database "new.db" and
# creates a cubic solid. Later it extrudes
# one of the surface of the solid in a defined
# axis with scaling and rotating it
# simultaneously and creates a solid.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_solid_extrude()
# has the following arguments:
#
# sgm_const_solid_extrude
# ( output_ids,
# delta,
# scale,
# angle,
# origin,
# coord_frame,
# surface_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "6"
STRING s_delta[32]
REAL r_scale
REAL r_angle
STRING s_origin[32]
STRING s_coord_frame[32]
STRING s_surface_list[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_hpat_xyz_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
# Create a solid.
i_return_value = @
asm_const_hpat_xyz( "1","<1 1 1>","[0 0 0]", @
"coord 0",sv_asm_create_hpat_xyz_created)
dump i_return_value
ga_view_aa_set(23.,-34.,0)
solid_label(TRUE)
s_delta = "<0 5 0>"
r_scale = 2.0
r_angle = 30
s_origin = "[0.5 1.0 0.5]"
s_coord_frame = "coord 0"
s_surface_list = "Solid 1.4"
# Create a solid.
i_return_value = @
sgm_const_solid_extrude @
( s_output_ids, @
s_delta, @
r_scale, @
r_angle, @
s_origin, @
s_coord_frame, @
s_surface_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
# Observe the solids in the top view.
# Session file paused. Press "Resume" to continue..
sf_pause()
ga_view_aa_set(90.,0.,0.)
sys_free_string(sv_created_ids)
sys_free_string(sv_asm_create_hpat_xyz_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_solid_glide()
#
# This file opens a new database "new.db" and
# creates a surface and two curves. Later it
# creates a solid by gliding the surface on
# these two curves using the above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_solid_glide()
# has the following arguments:
#
# sgm_const_solid_glide
# ( output_ids,
# scale,
# glide_option,
# director_surface,
# base_surface,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8 9"
REAL r_scale
INTEGER i_glide_option
STRING s_director_surface[32]
STRING s_base_surface[32]
STRING sv_created_ids[VIRTUAL]
STRING sv_asm_create_patch_xy_created[VIRTUAL]
STRING sv_asm_create_line_arc_created[VIRTUAL]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
# Create a surface in the yz plane.
i_return_value = @
asm_const_patch_xyz( "1", "<0 0.5 1>", @
"[0 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create two curves in the xz plane.
i_return_value = @
sgm_const_curve_arc3point( "1", FALSE, @
"[0 0 0]", "[1 0 0.5]", "[2 0 0.8]", @
sv_asm_create_line_arc_created )
dump i_return_value
i_return_value = @
sgm_const_curve_arc3point( "2", FALSE, @
"[2 0 0.8]", "[2.5 0 1]", "[3 0 1.5]", @
sv_asm_create_line_arc_created )
dump i_return_value
# Create a solid.
s_director_surface = "curve 1 2"
s_base_surface = "surface 1"
r_scale = 0.3
i_glide_option = 1
i_return_value = @
sgm_const_solid_glide @
( s_output_ids, @
r_scale, @
i_glide_option, @
s_director_surface, @
s_base_surface, @
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_arc_created)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_solid_normal()
#
# This file opens a new database "new.db" and
# creates a surface. Later it creates a solid
# with an offset from the created surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_solid_normal()
# has the following arguments:
#
# sgm_const_solid_normal
# ( output_ids,
# thickness1,
# thickness2,
# thickness3,
# thickness4,
# flip,
# surface_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = ["8"]
STRING s_thickness1[32]
STRING s_thickness2[32]
STRING s_thickness3[32]
STRING s_thickness4[32]
LOGICAL l_flip
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
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
# Create a surface in the yz plane.
i_return_value = @
asm_const_patch_xyz( "1", "<0.5 0 1>", @
"[0 0 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create a Solid.
s_thickness1 = "0.5"
s_thickness2 = "0.4"
s_thickness3 = "0.7"
s_thickness4 = "0.3"
l_flip = TRUE
s_surface_list = "surface 1"
i_return_value = @
sgm_const_solid_normal @
( s_output_ids, @
s_thickness1, @
s_thickness2, @
s_thickness3, @
s_thickness4, @
l_flip, @
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_const_solid_nsurface_v1()
#
# This file opens a new database "new.db" and
# creates four surfaces. Later it creates a
# solid with these four surfaces using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_solid_nsurface_v1()
# has the following arguments:
#
# sgm_const_solid_nsurface_v1
# ( output_ids,
# param_method,
# surface_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
INTEGER i_param_method
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
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_lines_set( "general", 2 )
dump i_return_value
solid_label(TRUE)
# Create four surfaces.
i_return_value = @
asm_const_patch_xyz( "1", @
"<1 0 1><0.5 0 0.5><0.5 0 0.5><1 0 1>", @
"[0 0 0][-.25 1 .25][.25 2 .25][.5 3 .5]", @
"Coord 0", sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
s_output_ids = "8"
i_param_method = 2
s_surface_list = "surface 1 2 3 4"
i_return_value = @
sgm_const_solid_nsurface_v1 @
( s_output_ids, @
i_param_method, @
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_const_solid_nsurface_v2()
#
# This file opens a new database "new.db" and
# creates four surfaces. Later it creates a
# solid with these four surfaces using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_solid_nsurface_v2()
# has the following arguments:
#
# sgm_const_solid_nsurface_v2
# ( output_ids,
# auto_orient,
# param_method,
# surface_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32]
LOGICAL l_auto_orient
INTEGER i_param_method
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
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_lines_set( "general", 2 )
dump i_return_value
solid_label(TRUE)
# Create four surfaces.
i_return_value = @
asm_const_patch_xyz( "1", @
"<1 0 1><0.5 0 0.5><0.5 0 0.5><1 0 1>", @
"[0 0 0][-.25 1 .25][.25 2 .25][.5 3 .5]", @
"Coord 0", sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
s_output_ids = "8"
l_auto_orient = FALSE
i_param_method = 2
s_surface_list = "surface 1 2 3 4"
i_return_value = @
sgm_const_solid_nsurface_v2 @
( s_output_ids, @
l_auto_orient, @
i_param_method, @
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_const_solid_revolve()
#
# This file opens a new database "new.db" and
# creates two surfaces. Later it creates a
# solid, revolving these two surfaces, using the
# above function.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_solid_revolve()
# has the following arguments:
#
# sgm_const_solid_revolve
# ( output_ids,
# axis,
# angle,
# offset,
# coord_frame,
# surface_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[32] = "8"
STRING s_axis[32]
REAL r_angle
REAL r_offset
STRING s_coord_frame[32]
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
ga_view_aa_set(23.,-34.,0)
ga_group_display_set("default_group","general")
ga_display_lines_set( "general", 2 )
solid_label(TRUE)
# Create two surfaces.
i_return_value = @
asm_const_patch_xyz( "1", "<0 0.2 0.2>", @
"[0 1 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
i_return_value = @
asm_const_patch_xyz( "2", "<0 0.3 0.3>", @
"[0 2 0]", "Coord 0", @
sv_asm_create_patch_xy_created )
dump i_return_value
# Create a solid.
s_axis = "coord 0.3"
r_angle = 180.0
r_offset = 30.0
s_coord_frame = "coord 0"
s_surface_list = "surface 1 2"
i_return_value = @
sgm_const_solid_revolve @
( s_output_ids, @
s_axis, @
r_angle, @
r_offset, @
s_coord_frame, @
s_surface_list, @
sv_created_ids )
dump sv_created_ids
dump i_return_value
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_const_surface_2curve()
#
# This function creates bi_parametric surfaces
# from 2 set of curves.
#
# In this example a new database is opened and 2
# curves are drawn in XZ plane. Then this
# function is called to create a surface between
# the 2 curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_2curve()
# has the following arguments:
#
# sgm_const_surface_2curve
# ( output_ids,
# curve1_list,
# curve2_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "1", "[0 0 0]","[0 0 1]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point @
( "2", "[5 0 0]","[3 0 3]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2"
i_return_value = @
sgm_const_surface_2curve @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_2curve_man()
#
# This function creates manifold surfaces from
# 2 set of curves and a set of surfaces.
#
# In this example a new database is opened and a
# surface ( 5 X 5 ) is created on XZ plane. Then
# 2 curves are drawn in parallel plane to XZ
# plane at Y = 3. Then this function is called to
# create a manifold surface on "Surface 1" using
# the 2 curves after a pause.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_2curve_man()
# has the following arguments:
#
# sgm_const_surface_2curve_man
# ( output_ids,
# curve1_list,
# curve2_list,
# surface_list,
# object_surface,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_surface_list[32]
LOGICAL l_object_surface
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
STRING sv_create_patch_xy_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create Manifold Surface
i_return_value = @
asm_const_patch_xyz @
( "1", "<5 0 5>", "[0 0 0]", "Coord 0", @
sv_create_patch_xy_created_ids )
i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "1", "[0 3 0]","[1 3 3]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point @
( "2", "[3 3 1]","[4 3 4]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Session file paused. Press "Resume" to continue..
sf_pause()
#---------------------------------------------------------------------
# Create Surface in Manifold surfaces
s_output_ids = ""
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2"
s_surface_list = "Surface 1"
l_object_surface = FALSE
i_return_value = @
sgm_const_surface_2curve_man @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
s_surface_list, @
l_object_surface, @
sv_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
sys_free_string( sv_create_patch_xy_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_3curve_v1()
#
# This function creates bi_parametric surfaces
# from 3 set of curves.
#
# In this example a new database is opened and 3
# curves are drawn. Then this function is called
# to create a surface using the 3 curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_3curve_v1()
# has the following arguments:
#
# sgm_const_surface_3curve_v1
# ( output_ids,
# param_method,
# curve1_list,
# curve2_list,
# curve3_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
INTEGER i_param_method
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "1", "[0 0 0]","[1 0 0]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point @
( "2", "[0 5 5]","[3 5 5]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
i_return_value = @
asm_const_line_2point @
( "3", "[0 3 10]","[1 3 10]",0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
i_param_method = 2
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2"
s_curve3_list = "Curve 3"
i_return_value = @
sgm_const_surface_3curve_v1 @
( s_output_ids, @
i_param_method, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_4curve_v1()
#
# This function creates bi-parametric surfaces
# from 4 set of curves.
#
# In this example a new database is opened and 4
# curves are drawn. Then this function is called
# to create a surface using the 4 curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_4curve_v1()
# has the following arguments:
#
# sgm_const_surface_4curve_v1
# ( output_ids,
# param_method,
# curve1_list,
# curve2_list,
# curve3_list,
# curve4_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
INTEGER i_param_method
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
STRING s_curve4_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "#", "[0 0 0][0 5 5][0 3 10][0 10 15]", @
"[1 0 0][3 5 5][1 3 10][3 10 15]", 0,"",@
50., 1, sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
i_param_method = 2
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2"
s_curve3_list = "Curve 3"
s_curve4_list = "Curve 4"
i_return_value = @
sgm_const_surface_4curve_v1 @
( s_output_ids, @
i_param_method, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
s_curve4_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_ncurve_v1()
#
# This function creates bi-parametric surfaces
# from a specified set of curves.
#
# In this example a new database is opened and 5
# curves are drawn. Then this function is called
# to create a surface using the 5 curves.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_ncurve_v1()
# has the following arguments:
#
# sgm_const_surface_ncurve_v1
# ( output_ids,
# param_method,
# curve_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
INTEGER i_param_method
STRING s_curve_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "#", "[0 0 0][0 5 5][0 3 10][0 10 15]"//@
"[0 15 0]","[1 0 0][3 5 5][1 3 10]"// @
"[3 10 15][5 15 0]", 0,"",50., 1, @
sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
i_param_method = 2
s_curve_list = "Curve 1:5 "
i_return_value = @
sgm_const_surface_ncurve_v1 @
( s_output_ids, @
i_param_method, @
s_curve_list, @
sv_created_ids )
dump i_return_value
dump sv_created_ids
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_extract()
#
# This function creates parametric bicubic surf-
# aces by extracting a surface from a solid at
# a specified parametric position and in a spec-
# ified parametric direction.
#
# In this example a new database is opened and a
# cube of 1 unit is created. Then this function
# is called to create a surface along u-plane at
# the midpoint of the edge by extraction from
# cube.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_extract()
# has the following arguments:
#
# sgm_const_surface_extract
# ( output_ids,
# solid_list,
# param_plane,
# param_pos,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_solid_list[32]
INTEGER i_param_plane
REAL r_param_pos
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_create_hpat_xyz_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
surface_label(TRUE)
#---------------------------------------------------------------------
# Create Cube of 1 X 1 X 1
i_return_value = @
asm_const_hpat_xyz @
( "1", "<1 1 1>", "[0 0 0]", "Coord 0", @
sv_create_hpat_xyz_created_ids )
#---------------------------------------------------------------------
# Create Surface
s_output_ids = ""
s_solid_list = "Solid 1"
i_param_plane = 1
r_param_pos = 0.5
i_return_value = @
sgm_const_surface_extract @
( s_output_ids, @
s_solid_list, @
i_param_plane, @
r_param_pos, @
sv_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_create_hpat_xyz_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function sgm_const_surface_edge()
#
# This function creates bi-parametric surfaces
# from 4 set of curves defining the boundary
# of the surfaces.
#
# In this example a new database is opened and 4
# curves are drawn. Then this function is called
# to create a surface with 4 curves as boundaries
# for the surface.
#
# This file can be run by starting a session of
# Patran, and running this session file
# through the "File","Session","Play" pulldown
# menus on the menu bar.
#
# The function sgm_const_surface_edge()
# has the following arguments:
#
# sgm_const_surface_edge
# ( output_ids,
# curve1_list,
# curve2_list,
# curve3_list,
# curve4_list,
# created_ids )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_output_ids[2]
STRING s_curve1_list[32]
STRING s_curve2_list[32]
STRING s_curve3_list[32]
STRING s_curve4_list[32]
STRING sv_created_ids[VIRTUAL]
INTEGER i_return_value
STRING sv_line_2point_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database
uil_file_new.go( "", "new.db" )
$? YES 36000002
# Set ISO-1 viewing
i_return_value = @
ga_view_aa_set @
( 23., -34., 0. )
dump i_return_value
# Display Surface Label
i_return_value = surface_label(TRUE)
dump i_return_value
#---------------------------------------------------------------------
# Create lines
i_return_value = @
asm_const_line_2point @
( "#", "[0 0 0][1 0 0][1 0 1][0 0 1]", @
"[1 0 0][1 0 1][0 0 1][0 0 0]", 0,"", @
50., 1, sv_line_2point_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Create surface
s_output_ids = ""
s_curve1_list = "Curve 1"
s_curve2_list = "Curve 2"
s_curve3_list = "Curve 3"
s_curve4_list = "Curve 4"
i_return_value = @
sgm_const_surface_edge @
( s_output_ids, @
s_curve1_list, @
s_curve2_list, @
s_curve3_list, @
s_curve4_list, @
sv_created_ids )
dump i_return_value
#---------------------------------------------------------------------
# Free allocated memory
sys_free_string( sv_created_ids)
sys_free_string( sv_line_2point_created_ids)
#---------------------------------------------------------------------