Dim S As New NurbsSurface
Dim k1 As New Integer Dim k2 As New Integer Dim k3 As New Integer
Dim pt_2 As New point3d Dim pt_3 As New point3d Dim pt_4 As New point3d
k1 = 13 k2 = 14 k3 = 15
For i As Integer = 0 To 7 If k1 > 15 Then k1 = k1 - 15 End If pt_2 = L_pts(k1)
If k2 > 15 Then k2 = k2 - 15 End If pt_3 = L_pts(k2)
If k3 > 15 Then k3 = k3 - 15 End If pt_3 = L_pts(k3)
S = nurbsSurface.CreateFromCorners(centre, pt_2, pt_3, pt_4) TAB.add(S)
k1 = k1 + 3 k2 = k2 + 3 k3 = k3 + 3
Next
A = S
You dont realy need to understand the script but I want to be able to declare a dim as a Surface and on the core creat different surface from 4 pt.
Thanks for your Help,
Best regards,
Renaud Ganière…
rameter.
A quick example in VB:
Private Sub RunScript(ByVal Exp As String, ByVal iter As Integer, ByVal t0 As Double, ByRef A As Object) Try Dim pts As New list(Of point3d) Dim Pt As New point3d(1, 1, 0)
Exp = Exp.Replace(" ", "") Dim func As String() = Exp.Split(",")
Dim parser As New grasshopper.Kernel.Expressions.GH_ExpressionParser()
Dim i As New Integer Do While i < iter parser.ClearVariables() If Exp.contains("x") Then parser.AddVariable("x", Pt.X) If Exp.contains("y") Then parser.AddVariable("y", Pt.Y) If Exp.contains("z") Then parser.AddVariable("z", Pt.Z) If Exp.contains("i") Then parser.AddVariable("i", i) If Exp.contains("iter") Then parser.AddVariable("iter", iter) If Exp.contains("t0") Then parser.AddVariable("t0", t0) Pt.X = parser.Evaluate(func(0))._Double Pt.Y = parser.Evaluate(func(1))._Double Pt.Z = parser.Evaluate(func(2))._Double pts.add(pt) i += 1 Loop A = pts
Catch ex As exception Print(ex.ToString) End Try End Sub
…
edge....
maybe something like this
1-isolate and decompose the faces you want to "open"
2-isolate the edges, then evaluate edge, (point on curve is kind of an example of evaluating a curve), to get a point along that curve.
3-recreate a surface by using 2 fixed points and one sliding point, (step 2).
attached is a quick example.…
w with the smallest circles and the higher part with the biggest circles.
Details :
----- top -----
Part 6 : Radius 6 and circle of lower radius with the space left (but less)
Part 5 : Radius 5 and circle of lower radius with the space left (but less)
Part 4 : Radius 4 and circle of lower radius with the space left (but less)
Part 3 : Radius 3 and circle of lower radius with the space left (but less)
Part 2 : Radius 2 and circle of lower radius with the space left (but less)
Part 1 : Radius 1
----bottom----
2. The circle have, surrounding them, a space witch should not intersect with any other circle. For example a circle of radius 5 has a circle of radius 10 from the same center and no other circle should intersect this last one.
Now i have no problem putting points randomly on a surface and then dividing the primary surface in 6 sub-surfaces in order to make the gradiant... My problem start when i try to find the distance beetween the points and dispatch lists according to the distance beetwen them. I really don't know how to proceed i spend so far 5 hours per evening for 2 weeks now... So i won't detail what i've done in order to have new ideas and freshs starts of logics :)
Thx all in advance
ps : i'm aware it might not be clear, so questions are welcome :)
…
End Sub
'<Custom additional code>
Dim BB As BlABLA
Public Class BLABLA Public Curva As curve
Sub New(ids As list(Of guid)) Dim points As New list(Of point3d) For Each id As guid In ids Dim rh As rhinoobject = rhinodoc.ActiveDoc.Objects.Find(id) Dim pt As Rhino.Geometry.Point = DirectCast(rh.Geometry, rhino.Geometry.Point) If pt is Nothing Then Continue For points.add(pt.Location) Next curva = curve.CreateInterpolatedCurve(points, 3) End Sub
End Class…
se, I don't fully understand the syntax and how to put it all together.
This script has no purpose whatsoever, it's simply practice for myself.
private void RunScript(int start, int end, ref object A) {
List<Point3d> pts = new List<Point3d>(); List<Rectangle3d> rect = new List<Rectangle3d>(); List<Plane> plane = new List<Plane>(); List<Extrusion> boxes = new List<Extrusion>();
Random random = new Random(); Vector3d vect = new Vector3d(0, 0, 1);
for (int i = start; i <= end; i = i + 2){ int random1 = random.Next(0, 100); int random2 = random.Next(0, 50); int random3 = random.Next(1, 5); int random4 = random.Next(1, 10);
Point3d pt = new Point3d(random3, random1, random2); Plane pl = new Plane(pt, vect); Rectangle3d rt = new Rectangle3d(pl, random3, random4); Extrusion box = new Extrusion(rt.Transform(Rhino.Geometry.Extrusion.Create(rt, random4, true))); rect.Add(rt); boxes.Add(box);
}
A = boxes; B = rect;
}…
gtool's (PT) ptGridUVCurves to create a grid with the UV co-ordinates
5. paneling them with ptPanelGrid
I tried this before, it works for some flat area, but in those position with rather small corner radius, they are a little bit off from each other.
I draw those lines with their slope (ummmm, width / height, what you actually call it in English"), I have the first line drawn manually (with a specific rotation angle) then I use the slope of it to project the rest of them, it works ok for the red pattern, but not really good for the other direction. I thought there might be some tool that can help to "apply" the whole pattern with one single cell. I will try further with your method see if it works.
thanks a lot…
attaching some screenshots which will help me explain the problem and the surface itself.
In step 1, the grid works just fine.
In step 2, when I try to trim the grid, it's missing two points (red circles).
If I graft the ptTrim component Gd input, I get a proper result with two missing panels (bottom screen shot)
In step 3, when I try to move/offset the trimmed grid it seems like it doesn't understand in which direction to move the grid.
Please help? …