-
Notifications
You must be signed in to change notification settings - Fork 1
/
Operations.bas
129 lines (109 loc) · 2.99 KB
/
Operations.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
Attribute VB_Name = "Operations"
Public Function interiorPocketingToolPath(geos As Paths)
Dim drw As Drawing
Set drw = App.ActiveDrawing
Dim md As MillData
Set md = App.CreateMillData
Dim frm As Frame
Set frm = App.Frame
Dim toolLocation As String
Dim ld As LeadData
toolLocation = frm.PathOfThisAddin & "/Tools/.75 ROUGHER.art"
App.SelectTool toolLocation
md.PocketType = acamPocketCONTOUR
md.AutoZ = True
md.FinalPassIsland = acamFinalPassFULL
md.StartCutting = acamStartINSIDE
md.PocketUsePreviousMachining = True
md.SafeRapidLevel = 1
md.FeedDownDistance = 0.25
md.AutoZMaxDepthOfCut = 0.5625
md.Stock = 0.02
md.WidthOfCut = 0.45
md.OverlapOnOpenElements = 1
md.AutoZRampAngle = 30
geos.Selected = True
md.Pocket
Set md = App.CreateMillData
Set ld = App.CreateLeadData
toolLocation = frm.PathOfThisAddin & "/Tools/DOWNSHEAR 0.125 Inch.art"
App.SelectTool toolLocation
md.AutoZ = True
md.RoughFinishUsePreviousMachining = True
md.XYCorners = acamCornersSTRAIGHT
md.SafeRapidLevel = 1
md.FeedDownDistance = 0.25
md.Stock = -0.001
ld.LeadIn = acamLeadBOTH
ld.LeadOut = acamLeadBOTH
ld.RadiusIn = 2
ld.RadiusOut = 2
md.SetLeadData ld
geos.Selected = True
md.RoughFinish
geos.Selected = False
End Function
Public Function butterflyToolPath(geos As Paths)
Dim drw As Drawing
Set drw = App.ActiveDrawing
Dim md As MillData
Set md = App.CreateMillData
Dim frm As Frame
Set frm = App.Frame
Dim toolLocation As String
Dim ld As LeadData
toolLocation = frm.PathOfThisAddin & "/Tools/DOWNSHEAR 0.25 Inch.art"
App.SelectTool toolLocation
md.PocketType = acamPocketCONTOUR
md.AutoZ = True
md.FinalPassIsland = acamFinalPassFULL
md.StartCutting = acamStartINSIDE
md.PocketUsePreviousMachining = True
md.SafeRapidLevel = 1
md.FeedDownDistance = 0.25
md.AutoZMaxDepthOfCut = 0.25
md.AutoZRampAngle = 30
md.Stock = 0.02
md.WidthOfCut = 0.125
geos.Selected = True
md.Pocket
Set md = App.CreateMillData
Set ld = App.CreateLeadData
toolLocation = frm.PathOfThisAddin & "/Tools/DOWNSHEAR 0.125 Inch.art"
App.SelectTool toolLocation
md.AutoZ = True
md.RoughFinishUsePreviousMachining = True
md.XYCorners = acamCornersSTRAIGHT
md.SafeRapidLevel = 1
md.FeedDownDistance = 0.25
md.DepthOfCut = 0.5
md.Stock = -0.003
ld.LeadIn = acamLeadBOTH
ld.LeadOut = acamLeadBOTH
ld.RadiusIn = 1
ld.RadiusOut = 1
md.SetLeadData ld
geos.Selected = True
md.RoughFinish
End Function
Public Function holesToolPath(geos As Paths, depth As Double, feed As Integer)
Dim drw As Drawing
Set drw = App.ActiveDrawing
Dim md As MillData
Set md = App.CreateMillData
Dim frm As Frame
Set frm = App.Frame
Dim toolLocation As String
Dim td As MillTool
Dim ms As MillStyle
toolLocation = frm.PathOfThisAddin & "/Tools/0.05 DRILL MILL.art"
Set td = App.SelectTool(toolLocation)
td.FixedDownFeed = feed
md.DrillType = acamDRILL
md.SafeRapidLevel = 1
md.RapidDownTo = 0.25
md.BottomOfHole = depth
geos.Selected = True
md.DrillTap
geos.Selected = False
End Function