-
0
1
1
- 633714331873472500
-
0
5
99
- true
- true
- Shaded
- 090226_yoon_bahng_a.ghx
- 633712602611896250
- 0
-
-235
-675
- 1.25
- 0
- 16
- deaf8653-5528-4286-807c-3de8b8dad781
- Surface
- Srf
- fab86a83-4c89-412b-b4c3-1bde3c655245
- false
- false
- 0
- 0
- 1
- true
-
53.18748
95.99998
60
20
-
53.18748
95.99998
60
20
-
53.18748
95.99998
- false
- true
- false
- bda29013-cf74-452f-97d6-7af6324d296c
- fb6aba99-fead-4e42-b5d8-c6de5ff90ea6
- VB.NET Script
- ''' <your code>
'Paseed Brep (Srf) is a single face brep
Dim nSrf As New OnNurbsSurface
nSrf = surfaceIn.Face(0).NurbsSurface
Dim arrPts As ArrayList = New ArrayList()
Dim arrFrames As ArrayList = New ArrayList()
Dim arrTets As ArrayList = New ArrayList()
Dim arrCurves As ArrayList = New ArrayList()
For vi As Integer = 0 To countV
Dim v As Double = vi / countV
Dim td2 As Double = tetraDim(vi) / 2
Dim arrTetRow As ArrayList = New ArrayList()
For ui As Integer = 0 To countU
Dim u As Double = ui / countU
Dim arrTet As ArrayList = New ArrayList()
Dim frame As OnPlane = New OnPlane()
nSrf.FrameAt(u, v, frame)
'arrFrames.Add(frame)
arrTet.add(frame.PointAt(-td2, 0, -td2))
arrTet.add(frame.PointAt(td2, 0, -td2))
arrTet.add(frame.PointAt(0, -td2, td2))
arrTet.add(frame.PointAt(0, td2, td2))
arrTetRow.Add(arrTet)
Next
arrTets.Add(arrTetRow)
Next
For vi As Integer = 0 To countV
For ui As Integer = 0 To countU
'arrPts.Add(arrTets(vi)(ui)(0))
'arrPts.Add(arrTets(vi)(ui)(1))
'arrPts.Add(arrTets(vi)(ui)(2))
'arrPts.Add(arrTets(vi)(ui)(3))
If (ui) < countU Then
MakeFlapCurve(ui, vi, flapDim(ui), arrCurves, arrTets, False)
End If
If (vi) < countV Then
MakeFlapCurve(ui, vi, flapDim(ui), arrCurves, arrTets, True)
End If
Next
Next
pointsOut = arrPts
framesOut = arrFrames
polylinesOut = arrCurves
''' </your code>
-
Sub MakeFlapCurve(ByVal ui As Integer, ByVal vi As Integer, ByVal flapDim As Double, ByRef arrCurves As Arraylist, ByRef arrTets As ArrayList, ByVal flip As Boolean)
Dim pA,pB,pC,otpA,otpB,otpC As On3dPoint
If (flip) Then
pA = arrTets(vi)(ui)(3)
pB = arrTets(vi)(ui)(1)
pC = arrTets(vi)(ui)(2)
otpA = arrTets(vi + 1)(ui)(3)
otpB = arrTets(vi + 1)(ui)(1)
otpC = arrTets(vi + 1)(ui)(2)
Else
pA = arrTets(vi)(ui)(1)
pB = arrTets(vi)(ui)(3)
pC = arrTets(vi)(ui)(0)
otpA = arrTets(vi)(ui + 1)(1)
otpB = arrTets(vi)(ui + 1)(3)
otpC = arrTets(vi)(ui + 1)(0)
End If
Dim vec As On3dVector = VectorCreate(pB, pA)
Dim pD As On3dPoint = Translate(pA, vec, flapDim)
vec = VectorCreate(otpB, otpA)
Dim pE As On3dPoint = Translate(otpA, vec, flapDim)
'arrFrames.Add(pln)
Dim crvPts As ArrayList = New ArrayList()
crvPts.Add(pA)
crvPts.Add(pB)
crvPts.Add(pC)
crvPts.Add(pD)
crvPts.Add(pE)
crvPts.Add(otpC)
crvPts.Add(pA)
Dim curve As OnNurbsCurve = New OnNurbsCurve()
MakePolyline(curve, crvPts)
arrCurves.Add(curve)
End Sub
Function Translate(ByVal pt As On3dPoint, ByVal vec As On3dVector, ByVal dist As Double) As On3dPoint
Dim xform As OnXform = New OnXform
vec.Unitize
vec = vec * dist
xform.Translation(vec)
Dim ptOut As On3dPoint = New On3dPoint(pt.x, pt.y, pt.z)
ptOut.Transform(xform)
Translate = ptOUt
End Function
Function VectorCreate(ByVal ptA As On3dPoint, ByVal ptB As On3dPoint) As On3dVector
Dim tmp As on3dpoint = ptB - ptA
Dim vec As On3dVector = New On3dVector(tmp.x, tmp.y, tmp.z)
VectorCreate = vec
End Function
Sub MakePolyline(ByRef nc As OnNurbsCurve, ByVal CPoints As Arraylist)
Dim cp As List(Of On3dPoint) = New List(Of On3dPoint)
For i As Integer = 0 To CPoints.Count - 1
cp.Add(CPoints(i))
Next
'Create nurbs curve
Dim dimension As Integer = 3
Dim order As Integer = 4
nc.CreateClampedUniformNurbs(dimension, 2, cp.ToArray)
End Sub
- 0
- POLYLINES
- e52ca2e9-fdc3-465c-86d8-fa92eae90d3a
- true
- longest_list
- 5
- surfaceIn
- countU
- countV
- tetraDim
- flapDim
- 3
- pointsOut
- framesOut
- polylinesOut
-
850.8702
148.7314
161
104
-
909.8702
150.7314
27
100
-
909.8702
150.7314
- false
- true
- false
- surfaceIn
- 88a94c9d-bada-436f-8907-40639f765eb7
- true
- false
- 1
- fab86a83-4c89-412b-b4c3-1bde3c655245
- 0
- OnBrep
- true
-
0
0
0
0
-
850.8702
150.7314
59
20
-
850.8702
150.7314
- false
- true
- false
- countU
- cb5c9e1b-4da2-48e4-8df4-27d2fcfe3fb2
- true
- false
- 1
- 212fe369-c62f-477a-b177-e223769ab9cb
- 0
- Integer
- true
-
0
0
0
0
-
850.8702
170.7314
59
20
-
850.8702
170.7314
- false
- true
- false
- countV
- 7b124a00-77a6-4e9e-a033-1397b3c6c81a
- true
- false
- 1
- 721e0681-8d94-43dd-906b-52f1581f87ff
- 0
- Integer
- true
-
0
0
0
0
-
850.8702
190.7314
59
20
-
850.8702
190.7314
- false
- true
- false
- tetraDim
- 3f3de2b6-01d4-4bf8-a4b6-596a2692b667
- true
- true
- 1
- 91132f17-7ff9-4870-8506-dfbf2e66de60
- 0
- Double
- true
-
0
0
0
0
-
850.8702
210.7314
59
20
-
850.8702
210.7314
- false
- true
- false
- flapDim
- e78adfe6-7595-427d-b5d4-9031baf89bfb
- true
- true
- 1
- 745819b2-687e-4baf-b95c-0bef4197f05d
- 0
- true
-
0
0
0
0
-
850.8702
230.7314
59
20
-
850.8702
230.7314
- false
- true
- false
- out
- 73e6df7c-9f2e-4346-8ad4-c76cc788f50b
- true
- false
- 0
- 0
- 0
-
0
0
0
0
-
936.8702
150.7314
75
25
-
936.8702
150.7314
- false
- true
- false
- pointsOut
- 5146a8e1-34f7-4104-afc7-bf5701f8a9ad
- true
- false
- 0
- 0
-
0
0
0
0
-
936.8702
175.7314
75
25
-
936.8702
175.7314
- false
- true
- false
- framesOut
- c64b2b04-2ed3-411f-8bf6-265ee188e3d1
- true
- false
- 0
- 0
-
0
0
0
0
-
936.8702
200.7314
75
25
-
936.8702
200.7314
- false
- true
- false
- polylinesOut
- 0b7d88ac-03e5-4f1a-a926-1b79ef8fed20
- true
- false
- 0
- 0
-
0
0
0
0
-
936.8702
225.7314
75
25
-
936.8702
225.7314
- false
- true
- false
- 59e0b89a-e487-49f8-bab8-b5bab16be14c
- Panel
- Panel
- fc397df7-ba05-407a-9391-c2d9ebc99e8f
- true
- false
- 1
- 22b49d08-36fb-442d-8883-eef1ad50570b
- 0
- Double click to edit panel content…
- true
- 0
- false
-
1315.546
25.80647
150
249.3186
-
1317.546
26.80647
146
247.3186
-
1315.546
25.80647
- false
- true
- false
- 57da07bd-ecab-415d-9d86-af36d7073abc
- Number Slider
- countU
- 212fe369-c62f-477a-b177-e223769ab9cb
- true
- false
- 0
- 0
-
9.5
143
229.5625
20
-
9.5
143
48
20
-
9.5
143
- false
- true
- false
- 15
- 3
- 50
- 4
- 1
- 57da07bd-ecab-415d-9d86-af36d7073abc
- Number Slider
- countV
- 721e0681-8d94-43dd-906b-52f1581f87ff
- true
- false
- 0
- 0
-
9.5
172
233
20
-
9.5
172
47
20
-
9.5
172
- false
- true
- false
- 10
- 3
- 50
- 4
- 1
- 57da07bd-ecab-415d-9d86-af36d7073abc
- Number Slider
- Slider
- 5dd6e6d8-0ba5-495a-8ebf-6fd2baa389cb
- true
- false
- 0
- 0
-
301.6875
541
141
20
-
301.6875
541
41
20
-
301.6875
541
- false
- true
- false
- 10
- 5.1
- 20
- 4
- 0
- bc984576-7aa6-491f-a91d-e444c33675a7
- Graph Mapper
- Graph
- cef8fdaf-bc71-4f45-ba60-49629abcfd07
- true
- false
- 1
- e02b9652-781d-49d0-b92b-3ac180462c98
- 0
-
303.4375
372.5
150
150
-
309.4375
378.5
138
138
-
303.4375
372.5
- false
- true
- false
- false
- 0
- 1
- 0
- 1
- 7d54f77a-a866-49ed-95eb-b1f9fb25a1f1
- Sine
- 0
- 0.18913048505783081
- 0.43596020340919495
- 0.93695640563964844
- 9445ca40-cc73-4861-a455-146308676855
- Range
- Range
- 0c054f8d-0f86-4e98-9fcc-555fd03eda53
- true
- longest_list
-
204.4375
429.25
71
58
-
226.4375
431.25
27
54
-
226.4375
431.25
- false
- true
- false
- D
- 36fa19f9-b7a2-4c93-bcbb-0fbe6048c9c8
- true
- false
- 0
- 0
- 1
-
0
0
0
0
-
204.4375
431.25
22
27
-
204.4375
431.25
- false
- true
- false
-
0
1
- N
- 4f5cb2a0-b06d-4a2a-b699-bcea3824148e
- true
- false
- 1
- 721e0681-8d94-43dd-906b-52f1581f87ff
- 0
- 1
-
0
0
0
0
-
204.4375
458.25
22
27
-
204.4375
458.25
- false
- true
- false
- 10
- R
- e02b9652-781d-49d0-b92b-3ac180462c98
- true
- false
- 0
- 0
- 0
-
0
0
0
0
-
253.4375
431.25
22
54
-
253.4375
431.25
- false
- true
- false
- 3e6383e9-af39-427b-801a-19ca916160fa
- Multiplication
- Mult
- 0379f078-b1d9-48d8-b5e5-e6f6ae7b4826
- true
- longest_list
-
484.9375
533
70
45
-
505.9375
535
27
41
-
505.9375
535
- false
- true
- false
- A
- f39e390c-96df-489f-b29e-8bd177b1f6fe
- true
- false
- 1
- cef8fdaf-bc71-4f45-ba60-49629abcfd07
- 0
- 0
-
0
0
0
0
-
484.9375
535
21
20.5
-
484.9375
535
- false
- true
- false
- B
- 08de580e-a10a-413f-8f9c-e8e8667c97db
- true
- false
- 1
- 5dd6e6d8-0ba5-495a-8ebf-6fd2baa389cb
- 0
- 0
-
0
0
0
0
-
484.9375
555
21
20.5
-
484.9375
555
- false
- true
- false
- R
- 91132f17-7ff9-4870-8506-dfbf2e66de60
- true
- false
- 0
- 0
- 0
-
0
0
0
0
-
532.9375
535
22
41
-
532.9375
535
- false
- true
- false
- 59e0b89a-e487-49f8-bab8-b5bab16be14c
- Panel
- Panel
- 35badb54-3b80-492c-a240-538c502a80c5
- true
- false
- 0
- 0
- SIZE OF TETRA
- true
- 0
- false
-
496.8749
351.5625
150
100
-
498.8749
352.5625
146
98
-
496.8749
351.5625
- false
- true
- false
- 57da07bd-ecab-415d-9d86-af36d7073abc
- Number Slider
- Slider
- 05158667-5c6a-445f-b517-b671603f8a4c
- true
- false
- 0
- 0
-
317.9375
868.1875
141
20
-
317.9375
868.1875
41
20
-
317.9375
868.1875
- false
- true
- false
- 5.6269851303100591
- 0.1
- 10
- 4
- 0
- bc984576-7aa6-491f-a91d-e444c33675a7
- Graph Mapper
- Graph
- 67564bad-d47b-4154-b56e-d767807292f4
- true
- false
- 1
- 2cfb2830-9e95-4db0-81c9-08b0dfac28b4
- 0
-
319.6875
699.6875
150
150
-
325.6875
705.6875
138
138
-
319.6875
699.6875
- false
- true
- false
- false
- 0
- 1
- 0
- 1
- 30d3a94f-e362-43f1-9ce1-2e2dabbf7265
- Parabola
- 0.503713846206665
- 0.78614121675491333
- 1
- 0.36295261979103088
- 9445ca40-cc73-4861-a455-146308676855
- Range
- Range
- 2bc5bdc6-ac74-41df-be1a-dcf30c62d708
- true
- longest_list
-
220.6875
756.4375
71
58
-
242.6875
758.4375
27
54
-
242.6875
758.4375
- false
- true
- false
- D
- 5f11e395-639b-4337-b2b2-a5877e4beb11
- true
- false
- 0
- 0
- 1
-
0
0
0
0
-
220.6875
758.4375
22
27
-
220.6875
758.4375
- false
- true
- false
-
0
1
- N
- 1453d110-377f-4041-bb0c-728337a092d6
- true
- false
- 1
- 212fe369-c62f-477a-b177-e223769ab9cb
- 0
- 1
-
0
0
0
0
-
220.6875
785.4375
22
27
-
220.6875
785.4375
- false
- true
- false
- 10
- R
- 2cfb2830-9e95-4db0-81c9-08b0dfac28b4
- true
- false
- 0
- 0
- 0
-
0
0
0
0
-
269.6875
758.4375
22
54
-
269.6875
758.4375
- false
- true
- false
- 3e6383e9-af39-427b-801a-19ca916160fa
- Multiplication
- Mult
- 73fca79a-bcf7-4a8b-8104-9c80ec21bd1a
- true
- longest_list
-
501.1875
860.1875
70
45
-
522.1875
862.1875
27
41
-
522.1875
862.1875
- false
- true
- false
- A
- 7929b46d-684e-481d-88b4-037752eb2bcd
- true
- false
- 1
- 67564bad-d47b-4154-b56e-d767807292f4
- 0
- 0
-
0
0
0
0
-
501.1875
862.1875
21
20.5
-
501.1875
862.1875
- false
- true
- false
- B
- 62946e49-74cd-4b4c-aa85-f2c81a32b409
- true
- false
- 1
- 05158667-5c6a-445f-b517-b671603f8a4c
- 0
- 0
-
0
0
0
0
-
501.1875
882.1875
21
20.5
-
501.1875
882.1875
- false
- true
- false
- R
- 745819b2-687e-4baf-b95c-0bef4197f05d
- true
- false
- 0
- 0
- 0
-
0
0
0
0
-
549.1875
862.1875
22
41
-
549.1875
862.1875
- false
- true
- false
- 59e0b89a-e487-49f8-bab8-b5bab16be14c
- Panel
- Panel
- 407fcdcc-f34c-4d04-8656-470014fb7c7a
- true
- false
- 0
- 0
- SIZE OF FLAP
- true
- 0
- false
-
513.1249
678.75
150
100
-
515.1249
679.75
146
98
-
513.1249
678.75
- false
- true
- false
- fb6aba99-fead-4e42-b5d8-c6de5ff90ea6
- VB.NET Script
- ''' <your code>
Dim meshes As ArrayList = New ArrayList()
For n As Integer = 0 To polylines.count - 1
Dim pts As ArrayOn3dPoint = New ArrayOn3dPoint
polylines(n).IsPolyline(pts)
Dim mesh As New OnMesh()
For i As Integer = 0 To pts.Count() - 1
mesh.SetVertex(i, pts(i))
Next
mesh.SetTriangle(0, 0, 1, 2)
mesh.SetTriangle(1, 2, 3, 0)
mesh.SetTriangle(2, 3, 4, 0)
mesh.SetTriangle(3, 4, 5, 0)
meshes.Add(mesh)
Next
meshesOut = meshes
''' </your code>
- 0
- MESH
- 62fcf26c-1c0f-4fdd-996a-1281abcd13da
- true
- longest_list
- 1
- polylines
- 1
- meshesOut
-
1072.621
216.2538
154
56.00002
-
1129.621
218.2538
27
52
-
1129.621
218.2538
- false
- true
- false
- polylines
- 0430d524-c4be-4749-b637-3779b4ab429a
- true
- true
- 1
- 0b7d88ac-03e5-4f1a-a926-1b79ef8fed20
- 0
- OnCurve
- true
-
0
0
0
0
-
1072.621
218.2538
57
52
-
1072.621
218.2538
- false
- true
- false
- out
- 22b49d08-36fb-442d-8883-eef1ad50570b
- true
- false
- 0
- 0
- 0
-
0
0
0
0
-
1156.621
218.2538
70
26
-
1156.621
218.2538
- false
- true
- false
- meshesOut
- cd8e9d11-312d-40e3-a4e3-a0447cbd4809
- true
- false
- 0
- 0
-
0
0
0
0
-
1156.621
244.2538
70
26
-
1156.621
244.2538
- false
- true
- false