Bu CATIA API fonksiyonu ne işe yarar?
Fonksiyon: CAAPriCamShaft.CATScript
Cevap:
COPYRIGHT DASSAULT SYSTEMES 2001
*******************************************************************************
  Purpose     : Build of a simplified camshaft
  Assumptions :
  Author :
  Languages   : VBScript
  Locales     : English (United states)
  CATIA Level : V5R6
*******************************************************************************
Number Of Cylinders
 ------------------
 Shaft data
 ----------
 -- Shaft origin
 -- Distance between two cams of two different cylinders
 -- Bearing diameter
 -- Distance between the cylinders centers
 -- Pin diameter between two cams
 -- Distance between 2 cams of a single cylinder
 Cam data
 --------
 -- Thickness
 -- Circle 1 diameter
 -- Circle 2 diameter
 -- Distance between the 2 circle centers
 Pi definition
 -------------
 Global data to define the different elements of the camshaft
 ------------------------------------------------------------
 -- Cam Sketch and cam Sketch elements
 -- Current distance from shaft origin
 Part definition
 ---------------
 -- Part
 -- Main tool of the part
 -- Definition of YZ plane as work plane
 **************************************************************************
 Main program

 **************************************************************************
 -- Initialize global variables
 -- Shading view Mode
 **************************************************************************
 Purpose:   Defines the cylinders between cylinders

 Inputs :

 **************************************************************************
 Cylinder definition: Pad from a circular sketch
 -----------------------------------------------
 -- The YZ plane is the sketch plane
 -- The sketch is a circle centered on shaft origin and of iBearingDiam diameter
 Creation of the cylindrical pad
 Creating the pattern
 --------------------
 Definition of the pattern:
   --  Element to be duplicated
   --  Number of instances in first direction
   --  Number of instances in second direction
   --  Spacing in first direction
   --  Spacing in second direction
   --  Direction 1
   --  Direction 2
   --  Angle
 -- Update of the current level
 **************************************************************************
 Purpose:   Creation of a cam from an angle value

 Inputs :   angle:   The angle

 **************************************************************************
 Create a sketch
 ---------------
 Create base elements in the sketch
 ----------------------------------
 Get references from elements to constraint
 ------------------------------------------
 Create constraints
 ------------------
 -- Fix Circle1
 -- Fix Circle2
 -- Tangency Line1 Circle1
 -- Tangency Line1 Circle2
 -- Coincidence Circle1 Start Point Line1 Start Point
 -- Coincidence Circle2 End Point Line1 End Point
 -- Tangency Line2 Circle1
 -- Tangency Line2 Circle2
 -- Coincidence Circle1 End Point Line2 Start Point
 -- Coincidence Circle2 Start Point Line2 End Point
 Create the Pad from the sketch
 ------------------------------
 **************************************************************************
 Purpose:   Create a cylindric Pad

 Inputs :   thickness:   length of the cylinder
            radius   :   radius of the cylinder

 **************************************************************************
 -- Create a sketch
 -- Create base circle in the sketch
 -- Create the Pad from the sketch
 -- Increase Level
 **************************************************************************
 Purpose:   Creation of the set of cams for a cylinder

 Inputs :   angle:   The angle between the set of cam and the Y Axis

 **************************************************************************
 -- Create a cam
 -- Create a cylinder for the pin between cams
 -- Create the other cam
 -- Increase level