Bu CATIA API fonksiyonu ne işe yarar?
Fonksiyon: CAAGsiCreateStair.CATScript
Cevap:
------------------------------------------------------------------------
 COPYRIGTH DASSAULT SYSTEMES 2000
------------------------------------------------------------------------
 ***********************************************************************
   Purpose:      Create an helicoidal Stair
   Assumtions:
   Author:
   Languages:    VBScript
   Locales:      English
   CATIA Level:  V5R6
 ***********************************************************************
 ------------------------------------------------------------------------
  VB Macro

  Object:
  Generate and helicoidal stair
  Input data
     Origin point and helix direction
     Starting point of helix and its pitch / height definition
     Height of each Step

  VB macro
     Initialize input data
     Compute number of required step for the helix height
     Loop on number of step and generate the geometry for each step in a HybridBody

  CATIA VB tools related to this sample
     Open a CATIA document and a CATPart
     Show/Noshow of wireframe and surfacic object
     Adding new Open-Body
     Create parameters and formula / Use it in geomety definition
     Catia methods required CATIAReference as input object / Generate reference for each input geometry
     Create Generative Shape Design feature
     Update geometry / Note: done at the end in order to enhance creation performances

------------------------------------------------------------------------
------------------------------------------------------------------------
 Global Variables
 ---------------------------------------------------------
 Origin Points
 Starting Point of the stair helix
 Direction of the helix
 Pitch and height of the helix
 Step height value
------------------------------------------------------------------------
 Main program
------------------------------------------------------------------------
     Open a New Part
     Init global variable
     Generate geometry
 ------------------------------------------------------------------------

 --------------------------------------------------------------
 Create a CATIA Part Docuument
 --------------------------------------------------------------
 Creating  a Part Document
 Retrieving HybridBodies collection in Part Document
 Adding an OpenBody
 --------------------------------------------------------------
 Init global Values
 --------------------------------------------------------------
 --------------------------------------------------------------
 Declaring and setting working variables
 --------------------------------------------------------------
 --------------------------------------------------------------
 Setting knowledge objects and variables
 --------------------------------------------------------------
 Init working knowledge parameters
 Working Parm object
 Init working knowledge relations
 Working Formula object
 Set Parameters for stair generation
 --------------------------------------------------------------
 Generating  starting geometry (Reference points /Direction of helix /Helix)
 --------------------------------------------------------------

 Origin and Starting Point
 Plan horizontal XY
 Direction of helix
 Note: Another way to create direction using horizontal plane
 Set Dir = PartDoc.Part.HybridShapeFactory.AddNewDirection(Ref)
 Line for helix definition
 Create formula defining Line offset value equal to helix height parameter
 Helix
 --------------------------------------------------------------
 Generating Steps
 --------------------------------------------------------------
 Compute number of step to generate
 Starting plane for helix/steps
 Setting reference objet use for each step
 Note:  RefPlane is the basic plane used for each step / it is updated in the loop
 --------------------------------------------------------------
 Loop on steps
 --------------------------------------------------------------

 Create a new openbody
Point0 = Point reference for the step on axis
Point1 = Point reference for the step on helix
PlanOffset= Step height reference plane
Point3 = Point reference on helix
Point2 = Point Projected from helix on step ground plane
 Step definition contours : 2 lines and a circle arc
 Line1
 Line2
 Circle arc
 Step surface
Riser (Opposite-step) surface
 Join of two surfaces
 End of loop - re-init ref plane for next step
 RefPlane = RefPlaneOffset
Updating CATIA Part Document
 Note : Performed only at the end of geometry generation
 Reframing CATIA Part Window