Parametric Modeling - PowerPoint PPT Presentation

1 / 77
About This Presentation
Title:

Parametric Modeling

Description:

Create new geometrical set and keep points for one curve. Adding new hybridbody ... Replace into oPoint to create reference. Debug up to here. Delete other ... – PowerPoint PPT presentation

Number of Views:440
Avg rating:3.0/5.0
Slides: 78
Provided by: dongho
Category:

less

Transcript and Presenter's Notes

Title: Parametric Modeling


1
Parametric Modeling
  • 17. Visual Basic II

2
(No Transcript)
3
Workflow 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)
5
For...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

6
Workflow 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)
17
Document Generation
18
Generating point
Comment out
19
Adding hybridbody (gemetrical set)
20
Adding spline
21
Adding surface
22
User inputs as variables
23
Conversion 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

24
Adding new hybridbody
25
Set initial values for variables
26
Debugging
27
(No Transcript)
28
Stop Debugging
29
(No Transcript)
30
Adding new hybridBody
31
Function 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 (?)
32
Declaring variables for point
33
Direction of curves Y axis
Direction of array of curves X axis
34
X, Y values
35
Z value with Rnd (random) value
36
Clean up codes for other points
37
Add two loops for curves
38
Adjust existing code for curve gen
Moved
Comment out or delete
Comment out or delete
Moved
39
Adding created point
Change this one into proper point
40
Accessing created points
Temporary variable declaration for points
Accessing through properties and methods
Replace into oPoint to create reference
41
Debug up to here
42
Delete other spline related codes
Delete up to here
43
Change name of hybridbody and add loop
44
Accessing created curves
Temporary variable declaration for curves
Accessing through properties and methods
Replace into oCurve to create reference
45
Delete unnecessary code
46
Add more touches
  • Hide points and curves
  • Zoom to fit all in
  • Add Dialog boxes

47
Hide 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

48
Zoom 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)
66
Modify code into two Subs And put SGenForm.show
in the CATMain
67
Modify predefined values into Form input values
68
(No Transcript)
69
Register at http//www.coa.gatech.edu/symposium/bi
m/registration.php
70
Mid term project
  • Apply some ideas to the code!

71
Images from Paracloud
72
Images from Paracloud
73
Images from Paracloud
74
Images from Paracloud
75
Images from Paracloud
76
Images from Paracloud
77
Things 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
Write a Comment
User Comments (0)
About PowerShow.com