-
Notifications
You must be signed in to change notification settings - Fork 338
/
Copy pathSelPlanar.rvb
62 lines (58 loc) · 1.72 KB
/
SelPlanar.rvb
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
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' SelPlanar.rvb -- June 2007
' If this code works, it was written by Dale Fugier.
' If not, I don't know who wrote it.
' Works with Rhino 4.0.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' SelPlanarPolySrf
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SelPlanarPolySrf
Const rhPolysrf = 16
Dim arrObj, strObj
arrObj = Rhino.ObjectsByType(rhPolysrf)
If IsArray(arrObj) Then
Rhino.EnableRedraw vbFalse
For Each strObj In arrObj
If Rhino.IsPolysurfacePlanar(strObj) Then
Rhino.SelectObject strObj
End If
Next
Rhino.EnableRedraw vbTrue
End If
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' SelPlanarSrf
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SelPlanarSrf
Const rhSrf = 8
Dim arrObj, strObj
arrObj = Rhino.ObjectsByType(rhSrf)
If IsArray(arrObj) Then
Rhino.EnableRedraw vbFalse
For Each strObj In arrObj
If Rhino.IsSurfacePlanar(strObj) Then
Rhino.SelectObject strObj
End If
Next
Rhino.EnableRedraw vbTrue
End If
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' SelPlanarCrv
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SelPlanarCrv
Const rhCrv = 4
Dim arrObj, strObj
arrObj = Rhino.ObjectsByType(rhCrv)
If IsArray(arrObj) Then
Rhino.EnableRedraw vbFalse
For Each strObj In arrObj
If Rhino.IsCurvePlanar(strObj) Then
Rhino.SelectObject strObj
End If
Next
Rhino.EnableRedraw vbTrue
End If
End Sub