Title: Parametric Modeling
1Parametric Modeling
2(No Transcript)
3Workflow in writing code in DP VBA
- Think about the process of generating the shape
- Use macro recording to get sample code
- Set user inputs
- Clean up unnecessary code
- Modify the sample code with VB statements
- Debug
- Add Dialog box for better UI
- Add more additional functions
4(No Transcript)
5For...Next Statement
- For counter start To end Step step
- statements
- Exit For
- statements Next
- For I 1 To 10
- For J 1 To 10
- For K 1 To 10
- . . .
- Next
- Next
- Next
6Workflow in creating a surface
- Create control points
- Location of points
- Distance between points
- Number of points
- Create control curves
- Distance between curves
- Number of curves
- Create surface
7(No Transcript)
8(No Transcript)
9(No Transcript)
10(No Transcript)
11(No Transcript)
12(No Transcript)
13(No Transcript)
14(No Transcript)
15(No Transcript)
16(No Transcript)
17Document Generation
18Generating point
Comment out
19Adding hybridbody (gemetrical set)
20Adding spline
21Adding surface
22User inputs as variables
23Conversion of adding points
- Number of points needed
- Number of points number of curves
- Use two loops
- One for points
- One for curves
- For Next
- Where to keep generated points?
- Create new geometrical set and keep points for
one curve
24Adding new hybridbody
25Set initial values for variables
26Debugging
27(No Transcript)
28Stop Debugging
29(No Transcript)
30Adding new hybridBody
31Function for changing name
Str Function Returns a Variant (String)
representation of a number. Len Function Returns
a Long containing the number of characters in a
string or the number of bytes required to store a
variable. -1 because of \O at the end of
string in DP VBA (?)
32Declaring variables for point
33Direction of curves Y axis
Direction of array of curves X axis
34X, Y values
35Z value with Rnd (random) value
36Clean up codes for other points
37Add two loops for curves
38Adjust existing code for curve gen
Moved
Comment out or delete
Comment out or delete
Moved
39Adding created point
Change this one into proper point
40Accessing created points
Temporary variable declaration for points
Accessing through properties and methods
Replace into oPoint to create reference
41Debug up to here
42Delete other spline related codes
Delete up to here
43Change name of hybridbody and add loop
44Accessing created curves
Temporary variable declaration for curves
Accessing through properties and methods
Replace into oCurve to create reference
45Delete unnecessary code
46Add more touches
- Hide points and curves
- Zoom to fit all in
- Add Dialog boxes
47Hide points and curves
- Dim selection1 As Selection
- Set selection1 partDocument1.Selection
- selection1.Add hybridBody1
- selection1.Add hybridBody2
- Dim visPropertySet1 As VisPropertySet
- Set visPropertySet1 selection1.VisProperties
- visPropertySet1.SetShow catVisPropertyNoShowAttr
- selection1.Clear
48Zoom to fit all in
- CATIA.ActiveWindow.ActiveViewer.Reframe
- If this doesnt work
- CATIA.StartCommand "Fit All In"
49(No Transcript)
50(No Transcript)
51(No Transcript)
52(No Transcript)
53(No Transcript)
54(No Transcript)
55(No Transcript)
56(No Transcript)
57(No Transcript)
58(No Transcript)
59(No Transcript)
60(No Transcript)
61(No Transcript)
62(No Transcript)
63(No Transcript)
64(No Transcript)
65(No Transcript)
66Modify code into two Subs And put SGenForm.show
in the CATMain
67Modify predefined values into Form input values
68(No Transcript)
69Register at http//www.coa.gatech.edu/symposium/bi
m/registration.php
70Mid term project
- Apply some ideas to the code!
71Images from Paracloud
72Images from Paracloud
73Images from Paracloud
74Images from Paracloud
75Images from Paracloud
76Images from Paracloud
77Things to submit on 27th of March
- Zipped CATVBA file
- A couple of snapshots
- A short description of how did you manipulate
your shape through VBA