nt3d center;
br = obj_ref.Brep();center = br.GetBoundingBox(true).Center;
RES = br.Translate(-center.X, -center.Y, -center.Z);RES = br.Rotate(-tetta_radian, tetta_D, P);RES = br.Rotate(-phi_radian, phi_D, P);
doc.Objects.Replace(obj_ref.ObjectId, br);doc.Views.Redraw();
This Code move object to center and rotate it by tetta and phi inradian .…
Point3d center;
br = obj_ref.Brep(); center = br.GetBoundingBox(true).Center;
RES = br.Translate(-center.X, -center.Y, -center.Z); RES = br.Rotate(-tetta_radian, tetta_D, P); RES = br.Rotate(-phi_radian, phi_D, P);
doc.Objects.Replace(obj_ref.ObjectId, br); doc.Views.Redraw();
This Code move object to center and rotate it by tetta and phi inradian .…
t = tree
End Sub
#Region "Additional methods and Type declarations"
Sub nearTwo (ByVal ptsIn As List(Of On3dPoint), ByRef tree As DataTree(Of On3dPoint), ByRef pathNum As Int32, ByRef j As Int32)
While (j > 3)
Dim path As New EH_Path(pathNum)
Dim d1 As Double = Double.MaxValue
Dim d2 As Double = Double.MaxValue
Dim min1 As Int32 = -1
Dim min2 As Int32 = -1
For i As Int32 = 1 To j - 1
Dim d As Double = ptsIn(0).DistanceTo(ptsIn(i))
If (d < d1) Then
d1 = d
min1 = i
Else If (d < d2) Then
d2 = d
min2 = i
End If
Next
tree.Add(ptsIn(0), path)
tree.Add(ptsIn(min1), path)
tree.Add(ptsIn(min2), path)
ptsIn(0) = Nothing
ptsIn(min1) = Nothing
ptsIn(min2) = Nothing
Dim tList As New List(Of On3dPoint)
For i As Int32 = 0 To j - 1
If (ptsIn(i) <> Nothing) Then
tList.Add(ptsIn(i))
End If
Next
j = tList.Count()
pathNum += 1
'calls recursive routine
nearTwo(tList, tree, pathNum, j)
End While
End Sub…
ep is to understan the logics of what you want to do, in your case, build 4 point surfaces (u also need to know the right direction to build the surfaces). Then you can write an hipotetic list (by hand in a paper) of what you want. In your case the list was (0, 1, 3, 2) (2, 3, 5, 4) (4, 5, 7, 6), etc... if you can imagine building 2 lists, each one with the sequences (0, 2, 4, 6, etcc) and (1, 3, 5, 7, etc..) then you can manage with shift and graft to finally have four lists. A( 0 1 2 3 ...) B (1 3 5 etc..) C(3 5 7 etc..) D (2 4 6 etc..). And to achieve the 2 first lists, you need to get the odd and the pair numbers. The cull pattern does that amazingy well. With a pattern True-False you get de pair numbers, and with the False-True pattern you get de odd numbers.
Hope it was clear enough…
Added by Pep Tornabell at 5:32am on November 19, 2009
me list... as far as i can see in my geometry model there are multiple relations within the list of indexes... so i thought i´d like to flip the value - which is the relating index number - with the corresponding index so as to create branches with lists of indexes that relate to the value re-occuring within the flow of the original list... has anyone an idea on how to accomplish this?
example:
index 0 value 3
index 1 value 3
index 2 value 3
flipped and branched:
branch 3 index 0 value 0
branch 3 index 1 value 1
branch 3 index 2 value 2
greetings
ante…
Added by Ante Ljubas at 12:45pm on October 22, 2010
ill also prepare you for the entry level of the advanced Behavioral Topologies workshop which will be running in Jan. 17-20.
For details check out: http://www.d-nat.net/complexity-parameterized-03or email: contact@d-nat.net for details and registration.
…
Added by Zayad Motlib at 1:24am on November 20, 2017
e the following code:
Sub RunScript(ByVal D As Double, ByVal R As Double, ByVal C as Double, ByVal T As Double)
'pts will hold all the points we compute.
Dim pts As New List(Of On3dPoint)
'I'm assuming D is no longer hardcoded since it will be an input?
For D = 0.0 To 5.0 Step 0 '(!!! Step 0???, are you crazy!?!? that will crash!)
D += T
For R = 0.0 To 5.0 Step 0 '(again... step 0?)
N = (((R + C) * (D + T)) / D) - R
R += N
pts.Add(New On3dPoint(D, R, N))
Next
Next
'Assign the result to the A output
A = pts
End Sub
I've just written that without testing, there may be a bug I missed.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…