PCL Examples > Preference Functions > Geometry Preferences
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Geometry Preferences
This section contains examples of some of the functions used to govern some of the preferences used to define how geometry is interpreted.
   
()
#
#  Purpose          :  This file provides an example of 2 calls to the
#                      function pref_geometry_get_v1()
#
#                      In this example a new database is opened and
#                      default geometric preference values in the 
#                      database is got. Then it is changed and got
#                      again.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function pref_geometry_get_v1() has the following arguments:
#  pref_geometry_get_v1
#     (  hpat_parametrization,
#        nurbs_acceleration,
#        geometry_convention )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_hpat_parametrization
LOGICAL  l_nurbs_acceleration
LOGICAL  l_geometry_convention
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Get the default geometric preference values in the database.
i_return_value =                                 @
   pref_geometry_get_v1                          @
      (  l_hpat_parametrization,                 @
         l_nurbs_acceleration,                   @
         l_geometry_convention )
dump i_return_value
 
#  The geometric preference values are
dump  l_hpat_parametrization
dump  l_nurbs_acceleration
dump  l_geometry_convention
#---------------------------------------------------------------------
#  Set a different geometric preference values.
#
IF (l_hpat_parametrization  ==  TRUE) THEN
   l_hpat_parametrization = FALSE
ELSE
   l_hpat_parametrization = TRUE
END IF
 
IF (l_nurbs_acceleration  ==  TRUE) THEN
   l_nurbs_acceleration = FALSE
ELSE
   l_nurbs_acceleration = TRUE
END IF
 
IF (l_geometry_convention ==  TRUE) THEN
   l_geometry_convention = FALSE
ELSE
   l_geometry_convention = TRUE
END IF
 
i_return_value =                                 @
   pref_geometry_set_v1                          @
      (  l_hpat_parametrization,                 @
         l_nurbs_acceleration,                   @
         l_geometry_convention )
dump i_return_value
#---------------------------------------------------------------------
#  Get the geometric preference values in the database again.
i_return_value =                                 @
   pref_geometry_get_v1                          @
      (  l_hpat_parametrization,                 @
         l_nurbs_acceleration,                   @
         l_geometry_convention )
dump i_return_value
 
#  The geometric preference values are
dump  l_hpat_parametrization
dump  l_nurbs_acceleration
dump  l_geometry_convention
#---------------------------------------------------------------------
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function pref_geometry_set_v1()
#
#                      In this example a new database is opened and
#                      default geometric preference values in the
#                      database is got. Then it is changed and got
#                      again.
#
#                      This file can be run by starting a session of
#                      Patran, and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function pref_geometry_set_v1() has the following arguments:
#  pref_geometry_set_v1
#     (  hpat_parametrization,
#        nurbs_acceleration,
#        geometry_convention )
#
#---------------------------------------------------------------------
#  Variable Declarations
LOGICAL  l_hpat_parametrization
LOGICAL  l_nurbs_acceleration
LOGICAL  l_geometry_convention
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Create a new database and set the preferences
uil_file_new.go("", "./new.db")
$? YES  36000002
 
#  Get the default geometric preference values in the database.
i_return_value =                                 @
   pref_geometry_get_v1                          @
      (  l_hpat_parametrization,                 @
         l_nurbs_acceleration,                   @
         l_geometry_convention )
dump i_return_value
 
#  The geometric preference values are
dump  l_hpat_parametrization
dump  l_nurbs_acceleration
dump  l_geometry_convention
#---------------------------------------------------------------------
#  Set a different geometric preference values.
#
IF (l_hpat_parametrization  ==  TRUE) THEN
   l_hpat_parametrization = FALSE
ELSE
   l_hpat_parametrization = TRUE
END IF
 
IF (l_nurbs_acceleration  ==  TRUE) THEN
   l_nurbs_acceleration = FALSE
ELSE
   l_nurbs_acceleration = TRUE
END IF
 
IF (l_geometry_convention ==  TRUE) THEN
   l_geometry_convention = FALSE
ELSE
   l_geometry_convention = TRUE
END IF
 
i_return_value =                                 @
   pref_geometry_set_v1                          @
      (  l_hpat_parametrization,                 @
         l_nurbs_acceleration,                   @
         l_geometry_convention )
dump i_return_value
#---------------------------------------------------------------------
#  Get the geometric preference values in the database again.
i_return_value =                                 @
   pref_geometry_get_v1                          @
      (  l_hpat_parametrization,                 @
         l_nurbs_acceleration,                   @
         l_geometry_convention )
dump i_return_value
 
#  The geometric preference values are
dump  l_hpat_parametrization
dump  l_nurbs_acceleration
dump  l_geometry_convention
#---------------------------------------------------------------------