home *** CD-ROM | disk | FTP | other *** search
- 'This script gives a demonstration of the construction of a WHEEL MODEL using basic CorelCAD commands
-
- '***********D*************************************************************************************************
- '***************************A*********************************************************************************
- '*****************************************************V*******************************************************
- '******************************************************************************E******************************
- REM ⌐ 1996 Corel Corporation. All rights reserved.
- '************************************************************************************************************
-
-
- REM Declare Variables
- Global Title as string
-
- Rem Set Variable
- Title$ = "CorelCAD: Wheel Construction Demo"
-
- WITHOBJECT "CorelCAD.Automation.1"
-
- .filenew
-
- string1$ = "This script will show you the construction of a wheel model step by step."
- string2$ = "For more information on the features used in the demonstration consult CorelCAD's On-line Help."
- BEGIN DIALOG DispMessage1 25, 70, 316, 70,Title$
- TEXT 4, 2, 310, 17, String1$
- TEXT 4, 20, 310, 19, String2$
- TEXT 6, 46, 170, 13, "Click NEXT to proceed or CANCEL to exit the Script."
- PUSHBUTTON 198, 44, 40, 16, "Next >>>"
- CANCELBUTTON 240, 44, 40, 16
- END DIALOG
-
- Return% = DIALOG (DispMessage1)
- if Return = 2 then STOP
-
- string1$ = "First, two construction CIRCLES will be drawn."
- string2$ = "They will then both be EXTRUDED to solids."
- BEGIN DIALOG DispMessage2 25, 70, 316, 70,Title$
- TEXT 4, 2, 310, 17, String1$
- TEXT 4, 20, 310, 19, String2$
- TEXT 6, 46, 170, 13, "Click NEXT to proceed or CANCEL to exit the Script."
- PUSHBUTTON 198, 44, 40, 16, "Next >>>"
- CANCELBUTTON 240, 44, 40, 16
- END DIALOG
-
- Return% = DIALOG (DispMessage2)
- if Return = 2 then STOP
-
- .CircleRadius -1, 0, 0, 0, 55, 0, 0
- .ZoomToAll
- .CircleRadius -1, 0, 0, 0, 35, 0, 0
- .SelectPointAt -50.5416, 18.0458, 0, 0
- .StartAddCmdPoint 2
- .AddCmdPoint -45.0157, -10.8285, 0
- .AddCmdPoint -45.0157, -10.8285, 12
- .EndAddCmdPoint
- .Extrude 0
- .SelectPointAt -16.4731, -38.8804, 11.092, 0
- .StartAddCmdPoint 2
- .AddCmdPoint -42.1412, -4.26234, 11.092
- .AddCmdPoint -42.1412, -4.26234, 30.0
- .EndAddCmdPoint
- .Extrude 0
-
- string1$ = "Now the inner cylinder will be chopped into a quarter cylinder."
- string2$ = "We will use BOOLEAN SUBTRACT to do this."
- BEGIN DIALOG DispMessage3 25, 70, 316, 70,Title$
- TEXT 4, 2, 310, 17, String1$
- TEXT 4, 20, 310, 19, String2$
- TEXT 6, 46, 170, 13, "Click NEXT to proceed or CANCEL to exit the Script."
- PUSHBUTTON 198, 44, 40, 16, "Next >>>"
- CANCELBUTTON 240, 44, 40, 16
- END DIALOG
-
- Return% = DIALOG (DispMessage3)
- if Return = 2 then STOP
-
- .SelectPointAt -12.0632, -4.08458, 31.6914, 0
- .SelectPointAt -11.8953, -4.96388, 31.6914, 0
- .SelectPointAt -6.2062, -2.5064, 31.6914, 0
- .Box -1, 0, 0, 0, 49.4965, -56.7232, 40.955
- .ZoomOut
- .ZoomOut
- .Box -1, 0, 0, 0, 64.3167, 57.6374, 40.955
- .Box -1, 0, 0, 0, -48.6073, 57.7111, 40.955
- .SelectPointAt -77.4771, 31.8843, 40.955, 0
-
- string1$ = "These BOXES have been constructed to be subtracted from the inner cylinder."
- string2$ = ""
- BEGIN DIALOG DispMessage4 25, 70, 316, 70,Title$
- TEXT 4, 2, 310, 17, String1$
- TEXT 4, 20, 310, 19, String2$
- TEXT 6, 46, 170, 13, "Click NEXT to proceed or CANCEL to exit the Script."
- PUSHBUTTON 198, 44, 40, 16, "Next >>>"
- CANCELBUTTON 240, 44, 40, 16
- END DIALOG
-
- Return% = DIALOG (DispMessage4)
- if Return = 2 then STOP
-
- .SetPointXYZ -7.15804, -51.1839, 40.955
- .SetPointXYZ -48.2572, 28.8391, 40.955
- .SetPointXYZ 8.68856, 56.9014, 40.955
- .SetPointXYZ 49.6661, -57.8111, 40.955
- .SolidSubtract
- .SelectPointAt 11.1676, -32.2339, 40.955, 0
- .Move 0, 0, 0, 0, 0, -5, -5, 0
-
- string1$ = "Now a CIRCULAR ARRAY will place 4 copies around a user specified axis."
- string2$ = "A BOOLEAN SUBTRACT will give us a starting object."
- BEGIN DIALOG DispMessage5 25, 70, 316, 70,Title$
- TEXT 4, 2, 310, 17, String1$
- TEXT 4, 20, 310, 19, String2$
- TEXT 6, 46, 170, 13, "Click NEXT to proceed or CANCEL to exit the Script."
- PUSHBUTTON 198, 44, 40, 16, "Next >>>"
- CANCELBUTTON 240, 44, 40, 16
- END DIALOG
-
- Return% = DIALOG (DispMessage5)
- if Return = 2 then STOP
-
- .CircularArray 4, 360, -1, 0, 0, 0, 0, 0, 5, 0
- .SetPointXYZ -52.3332, -14.4441, 0
- .SetPointXYZ -42.8411, -3.95777, 0
- .SetPointXYZ -40.6392, 27.5305, 0
- .SetPointXYZ 4.62838, 25.2103, 0
- .SetPointXYZ 17.0254, -13.5489, 0
- .SolidSubtract
-
- string1$ = "Now, a PLANE will be drawn to construct a tooth."
- string2$ = ""
- BEGIN DIALOG DispMessage6 25, 70, 316, 70,Title$
- TEXT 4, 2, 310, 17, String1$
- TEXT 4, 20, 310, 19, String2$
- TEXT 6, 46, 170, 13, "Click NEXT to proceed or CANCEL to exit the Script."
- PUSHBUTTON 198, 44, 40, 16, "Next >>>"
- CANCELBUTTON 240, 44, 40, 16
- END DIALOG
-
- Return% = DIALOG (DispMessage6)
- if Return = 2 then STOP
-
- .SetPointXYZ 55, 0, 0
- .SetPointXYZ 53.9147, 9.36085, 0
- .SetPointXYZ 60.2683, 10.464, 0
- .SetPointXYZ 60.9163, 15.579, 0
- .SetPointXYZ 65.49, 11.3706, 0
- .SetPointXYZ 64.297, 7.9246, 0
- .SetPointXYZ 71.7344, 5.6733, 0
- .SetPointXYZ 65.6492, 3.422, 0
- .SetPointXYZ 67.903, -0.178138, 0
- .SetPointXYZ 65.1985, -5.35809, 0
- .SetPointXYZ 63.8486, -0.167501, 0
- .Plane 0
- .zoomtoselected
-
- string1$ = "Various FILLETS can be performed to smooth out the corners of the plane."
- string2$ = ""
- BEGIN DIALOG DispMessage7 25, 70, 316, 70,Title$
- TEXT 4, 2, 310, 17, String1$
- TEXT 4, 20, 310, 19, String2$
- TEXT 6, 46, 170, 13, "Click NEXT to proceed or CANCEL to exit the Script."
- PUSHBUTTON 198, 44, 40, 16, "Next >>>"
- CANCELBUTTON 240, 44, 40, 16
- END DIALOG
-
- Return% = DIALOG (DispMessage7)
- if Return = 2 then STOP
-
- .Fillet 3, 61.865, -0.138761, 0, 64.4004, -2.46746, 0
- .Fillet 3, 66.8369, -2.36125, 0, 66.6132, 1.91859, 0
- .Fillet 3, 64.8088, 9.39469, 0, 64.7222, 12.033, 0
- .Fillet 3, 60.4297, 11.6804, 0, 59.6432, 10.2705, 0
- .Fillet 1, 60.8131, 14.6728, 0, 61.3081, 15.1182, 0
- .Fillet 1, 64.7087, 8.98159, 0, 65.0123, 7.77341, 0
- .Fillet 1, 68.2821, 6.7694, 0, 69.3439, 4.73241, 0
- .Fillet 1, 66.416, 3.65426, 0, 66.1921, 2.62706, 0
- .Fillet 1, 65.7152, -4.31112, 0, 64.8713, -4.22409, 0
-
- string1$ = "Another EXTRUDE will give us our tooth."
- string2$ = ""
- BEGIN DIALOG DispMessage8 25, 70, 316, 70,Title$
- TEXT 4, 2, 310, 17, String1$
- TEXT 4, 20, 310, 19, String2$
- TEXT 6, 46, 170, 13, "Click NEXT to proceed or CANCEL to exit the Script."
- PUSHBUTTON 198, 44, 40, 16, "Next >>>"
- CANCELBUTTON 240, 44, 40, 16
- END DIALOG
-
- Return% = DIALOG (DispMessage8)
- if Return = 2 then STOP
-
- .SelectPointAt 55,0,0
- .StartAddCmdPoint 2
- .AddCmdPoint 55, 0, 0
- .AddCmdPoint 55,0,12
- .EndAddCmdPoint
- .Extrude 0
- .zoomtoselected
- .SelectPointAt 55,0,0
- .Move 0, 0, 55, 0, 0, 51, 0, 0
-
- string1$ = "And another CIRCULAR ARRAY will give us many teeth."
- string2$ = ""
- BEGIN DIALOG DispMessage9 25, 70, 316, 70,Title$
- TEXT 4, 2, 310, 17, String1$
- TEXT 4, 20, 310, 19, String2$
- TEXT 6, 46, 170, 13, "Click NEXT to proceed or CANCEL to exit the Script."
- PUSHBUTTON 198, 44, 40, 16, "Next >>>"
- CANCELBUTTON 240, 44, 40, 16
- END DIALOG
-
- Return% = DIALOG (DispMessage9)
- if Return = 2 then STOP
-
- .CircularArray 18, 360, -1, 0, 0, 0, 0, 0, 2, 0
- .SelectAll
- .zoomtoselected
-
- string1$ = "A BOOLEAN ADD will combine all of the individual solids into one solid."
- string2$ = ""
- BEGIN DIALOG DispMessage10 25, 70, 316, 70,Title$
- TEXT 4, 2, 310, 17, String1$
- TEXT 4, 20, 310, 19, String2$
- TEXT 6, 46, 170, 13, "Click NEXT to proceed or CANCEL to exit the Script."
- PUSHBUTTON 198, 44, 40, 16, "Next >>>"
- CANCELBUTTON 240, 44, 40, 16
- END DIALOG
-
- Return% = DIALOG (DispMessage10)
- if Return = 2 then STOP
-
- .SolidAdd
-
- string1$ = "A MATERIAL will now be applied."
- string2$ = "This will take a moment."
- BEGIN DIALOG DispMessage11 25, 70, 316, 70,Title$
- TEXT 4, 2, 310, 17, String1$
- TEXT 4, 20, 310, 19, String2$
- TEXT 6, 46, 170, 13, "Click NEXT to proceed or CANCEL to exit the Script."
- PUSHBUTTON 198, 44, 40, 16, "Next >>>"
- CANCELBUTTON 240, 44, 40, 16
- END DIALOG
-
- Return% = DIALOG (DispMessage11)
- if Return = 2 then STOP
-
- .selectall
- .ApplyMaterial "Jewel", "Mother of Pearl"
- .ShadeEntireView 0, 0, 3, 0
-
- beep
- BEGIN DIALOG endn 25, 70, 154, 65,Title$
- TEXT 29, 14, 98, 8, "The demonstration is complete."
- PUSHBUTTON 61, 34, 40, 16, "End"
- END DIALOG
-
- Return% = DIALOG (endn)
- if Return = 2 then STOP
-
-
- END WITHOBJECT
-
-
- '***************************************************************************************************************************
-
-