2024年4月17日发(作者:相诗兰)
Option Explicit
' COPYRIGHT DASSAULT SYSTEMES 2001
'*******************************************************************************
' Purpose : 创建一个凸轮轴
' Assumptions : DASSAULT SYSTEMES
' Author :cym_sd@
' Languages : VBScript
' Locales : English (United states)
' CATIA Level : V5R14
'*******************************************************************************
'Number Of Cylinders
' ------------------
Dim iNumberOfCylinders As Integer
' Shaft data
' ----------
' -- Shaft origin
Dim iCenterX As Integer
Dim iCenterY As Integer
' -- Distance between two of two different cylinders
Dim iCylinderSpacing As Integer
' -- Bearing diameter
Dim iBearingDiam As Integer
' -- Distance between the cylinders centers
Dim iBearingLength As Integer
' -- Pin diameter between two
Dim iPinDiam As Integer
' -- Distance between 2 of a single cylinder
Dim iPinLength As Integer
' data
' --------
' -- Thickness
Dim iCamThickness As Integer
' -- Circle 1 diameter
Dim iCircle1Rad As Integer
' -- Circle 2 diameter
Dim iCircle2Rad As Integer
' -- Distance between the 2 circle centers
Dim iCircleDist As Integer
' Pi definition
' -------------
Dim dPi As Double
' Global data to define the different elements of the camshaft
' ------------------------------------------------------------
' -- Sketch and Sketch elements
Dim oCurrentSketch As Sketch
Dim oCurrentLine1 As AnyObject
Dim oCurrentLine2 As AnyObject
Dim oCurrentCircle1 As AnyObject
Dim oCurrentCircle2 As AnyObject
' -- Current distance from shaft origin
Dim iCurrentLevel As Integer
' Part definition
' ---------------
' -- Part
Dim oPart As Part
' -- Main tool of the part
Dim oPartBody As Body
' -- Definition of YZ plane as work plane
Dim oPlaneYZ As Reference
' **************************************************************************
' Main program
'
' **************************************************************************
Sub CATMain()
' -- Initialize global variables
iNumberOfCylinders = 4
iCamThickness = 15
iCircle1Rad = 25
2024年4月17日发(作者:相诗兰)
Option Explicit
' COPYRIGHT DASSAULT SYSTEMES 2001
'*******************************************************************************
' Purpose : 创建一个凸轮轴
' Assumptions : DASSAULT SYSTEMES
' Author :cym_sd@
' Languages : VBScript
' Locales : English (United states)
' CATIA Level : V5R14
'*******************************************************************************
'Number Of Cylinders
' ------------------
Dim iNumberOfCylinders As Integer
' Shaft data
' ----------
' -- Shaft origin
Dim iCenterX As Integer
Dim iCenterY As Integer
' -- Distance between two of two different cylinders
Dim iCylinderSpacing As Integer
' -- Bearing diameter
Dim iBearingDiam As Integer
' -- Distance between the cylinders centers
Dim iBearingLength As Integer
' -- Pin diameter between two
Dim iPinDiam As Integer
' -- Distance between 2 of a single cylinder
Dim iPinLength As Integer
' data
' --------
' -- Thickness
Dim iCamThickness As Integer
' -- Circle 1 diameter
Dim iCircle1Rad As Integer
' -- Circle 2 diameter
Dim iCircle2Rad As Integer
' -- Distance between the 2 circle centers
Dim iCircleDist As Integer
' Pi definition
' -------------
Dim dPi As Double
' Global data to define the different elements of the camshaft
' ------------------------------------------------------------
' -- Sketch and Sketch elements
Dim oCurrentSketch As Sketch
Dim oCurrentLine1 As AnyObject
Dim oCurrentLine2 As AnyObject
Dim oCurrentCircle1 As AnyObject
Dim oCurrentCircle2 As AnyObject
' -- Current distance from shaft origin
Dim iCurrentLevel As Integer
' Part definition
' ---------------
' -- Part
Dim oPart As Part
' -- Main tool of the part
Dim oPartBody As Body
' -- Definition of YZ plane as work plane
Dim oPlaneYZ As Reference
' **************************************************************************
' Main program
'
' **************************************************************************
Sub CATMain()
' -- Initialize global variables
iNumberOfCylinders = 4
iCamThickness = 15
iCircle1Rad = 25