"sheet" body Breps (i.e trimmed stuff == BrepFaces) divide them proportionally to the u/v domains using DeDom2Num: get Lists of U1/V1 values, say a uList and a vList. In order to do that:
3. Find the min of each List, say uMin, vMin.
4. Your U/V division integer values (per surface) are:
(int) (U * uList[i] / uMin)); (int) (V * vList[i] / vMin));
5. Using the pts and vectors trees from the divide surface component ... add to each div pt the corresponding normal vector multiplied by some min/max random value.
6. Create a Nurbs Surface using the newly created "distorted" pts (control points or trough points).
7. Trim the surfaces against the potential Inner/Outer loops (per brep). Trim requires solid cutters mind.
…
onents now marked as "obsolete" due to the fact that the definition was done long before v0.6.
CNC-Lab_Giveaway_V2_GH_Forum_12.zip
hope it is obvious how it works:
basically the trick is one master-crv and a combination of point-mirror and orient to obtain a non-planar crvset consisting of 10 segments: 5 (the evens) on a given pentagon and 5 (the odds) being planar on the neightboring pentagons. extrude-to-pt (to center of sphere), boolean/intersect, offsetSrf/loft will return a solid piece of the puzzle. again some (re-)orienting will return a full sphere.
BTW: since the CNC-Lab Giveaway (as we used to call the puzzle) is non-profit, academic, a challenge and a nice little excersise i don't see a reason for blame someone to steal anything. (unless that someone turns it into something commercial or is faking authorship, of course)
i like the GH forum for being a place were open-minded people share knowledge and contribute a great community. i would spend a lot more time in here if had the time...
speaking of typing hrvatski, mamam pojma, nema ljubavi to help me out ;-) will continue that one later... ;-)
best,
frank…
er control pt's weight with a slider. By using the same points, and using the same cp weight but negative, resulted in the completion of the positive curves ellipsoid.
The crv with the positive CP bakes and is selectable in rhino while the crv with the negative CP can be baked but not selected in Rhino. They can both be joined, but you can only select the baked joined curve, if you select the segment defined by the positive CP crv. In GH it can also be revolved, but again, when baked, only the area defined by the positive control point can be selected, even though it is one surface, the area defined by the negative CP cannot be selected. Why is this the case?…
port clr
clr.AddReferenceToFileAndPath("C:\Program Files (x86)\Rhinoceros 5\Plug-ins\Karamba.gha")
import Karamba.Nodes.Node as Node
print Node.pos"
but returns printed <field# pos on Node>.
How can I print that property correctly?
And an other question. I noticed that every class have 'Fields' and 'Properties'. They seems me quite similar, such as a kind of classes information.
What's the difference? I can get the information by 'Properties' like for the 'Fields'?
Sorry if the questions are too simple
Cheers
Giovanni…
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;
}…
e of what should I do?
Thankyou!!!!
//Create empty rectanles, breps list List<Rectangle3d> rects = new List<Rectangle3d>(); List<Brep> collectBreps = new List<Brep>();
//Initialize a new instance of the Random class called random
Random random = new Random(); //Create a new unitZ vector Vector3d unitZ = new Vector3d(0, 0, 1); //Start a loop for(int i = start; i <= end; i = i + 2) { //Create random values int randint = random.Next(0, 100); int randint2 = random.Next(0, 10); int randint3 = random.Next(0, 5); //Create new Extrusions based on these random values Point3d pt = new Point3d(i, randint, randint2); Plane pln = new Plane(pt, unitZ); Rectangle3d rect = new Rectangle3d(pln, randint3, randint3); //Add all of these to the appropriate lists (Actually, since we are only using the rects you don't need the others FYI) rects.Add(rect); } A = rects;…
lass BrepDeform Inherits GH_Component Public Reslist As New List(Of String) Public Sub New() MyBase.New("BrepDeform", "Deform", _ "移动物件的控制点" & vbCrLf & "(Move the control Point to change a object)", "SEG", "Modify")
End Sub Public Overrides ReadOnly Property ComponentGuid As System.Guid Get Return New Guid("8226e0ea-ed6b-47c2-8a24-244f044152d8") End Get End Property Protected Overrides ReadOnly Property Internal_Icon_24x24() As System.Drawing.Bitmap Get Return My.Resources.SEG_BrepDeform End Get End Property Protected Overrides Sub RegisterInputParams(ByVal pManager As GH_Component.GH_InputParamManager) ' pManager.AddTextParameter("Guid", "Id", "将要被替换的犀牛物件" & vbCrLf & "(RhinoObjects that will be replaced)", GH_ParamAccess.item) 'Dim guidParam As New Param_Guid pManager.AddParameter(New Param_Guid, "Guid", "Id", "将要被替换的犀牛物件" & vbCrLf & "(RhinoObjects that will be replaced)", GH_ParamAccess.item) pManager.AddPointParameter("ControlPoint3d", "C", "控制点的位置" & vbCrLf & "(Control Point's location)", GH_ParamAccess.item) pManager.AddPointParameter("NewPoint3d", "P", "新控制点的位置" & vbCrLf & "(New Control Point's location)", GH_ParamAccess.item) pManager.AddNumberParameter("Tolerace", "T", "输入点与物件实际控制点对比的精度" & vbCrLf & "(Tolerace for the Control Point match)", GH_ParamAccess.item, 0.1)
pManager.AddBooleanParameter("BlMove", "M", "如果是True则进行移动" & vbCrLf & "(If true Perform the Move)", GH_ParamAccess.item, False)
End Sub Protected Overrides Sub RegisterOutputParams(ByVal pManager As Kernel.GH_Component.GH_OutputParamManager) pManager.AddTextParameter("Result", "RG", "结果列表" & vbCrLf & "(Result)", GH_ParamAccess.list) End Sub Public Overrides ReadOnly Property Exposure As GH_Exposure Get Return GH_Exposure.primary End Get End Property
Protected Overrides Sub SolveInstance(ByVal DA As Kernel.IGH_DataAccess) If Banner.astrict.showmessage Then Return Dim Ids As Guid = Guid.Empty 'Dim Ids As String = String.Empty Dim tpt As Point3d = Point3d.Unset, opt As Point3d = Point3d.Unset Dim tolar As Double = 0.1 Dim blMove As Boolean = False If Not DA.GetData(0, Ids) Then Return If Not DA.GetData(1, opt) Then Return If Not DA.GetData(2, tpt) Then Return If Not DA.GetData(3, tolar) Then Return If Not DA.GetData(4, blMove) Then Return If Not blMove Then GoTo line1 Reslist.Add(Now & "_未替换!(Replace failed!)") Else Reslist.Clear() ' Grasshopper.Instances.ActiveCanvas.ModifiersEnabled = False End If
' rt.AddRange(docobjlist.Select(Function(geoobj As RhinoObject) GH_Convert.ObjRefToGeometry(New ObjRef(geoobj.Id)))) 'Private Checked(5) As Boolean, Namestr() As String = {"Point", "Curve", "Brep", "Mesh", "TextDot", "TextEntity"}
Try
Dim rh As RhinoDoc = Rhino.RhinoDoc.ActiveDoc Dim rhobj As RhinoObject = rh.Objects.Find(Ids) ' Dim rhobj As RhinoObject = rh.Objects.Find(New Guid(Ids))
Dim bobj As BrepObject = CType(rhobj, BrepObject) RhinoApp.RunScript("Cancel", False) RhinoApp.RunScript("Cancel", False) bobj.Select(True)
RhinoApp.RunScript("_SolidPtOn", False) Dim gobjs As GripObject() = bobj.GetGrips ' rh.Views.RedrawEnabled = False For Each grpobj As GripObject In gobjs
If grpobj.CurrentLocation.DistanceTo(opt) < tolar Then grpobj.Select(True) Dim CurrentPln As Plane = RhinoDoc.ActiveDoc.Views.ActiveView.ActiveViewport.ConstructionPlane Dim tropt As New Point3d(opt), trtpt As New Point3d(tpt) tropt.Transform(Transform.PlaneToPlane(Plane.WorldXY, CurrentPln)) trtpt.Transform(Transform.PlaneToPlane(Plane.WorldXY, CurrentPln))
Dim movestr As String = "_move " + String.Format("{0},{1},{2} ", tropt.X, tropt.Y, tropt.Z) + String.Format("{0},{1},{2} _Cancel _Cancel", trtpt.X, trtpt.Y, trtpt.Z) RhinoApp.RunScript(movestr, True) grpobj.Select(False) End If
Next
'RhinoApp.RunScript("Cancel", False) 'RhinoApp.RunScript("Cancel", False) '' rh.Views.RedrawEnabled = True Reslist.Add(Now & "_替换成功!(Replace Success!)") Catch ex As Exception Reslist.Add(Now & "_替换失败!(Replace failed!)" & vbCrLf & ex.Message)
End Try ' Grasshopper.Instances.ActiveCanvas.ModifiersEnabled = True
line1: DA.SetDataList(0, Reslist) End Sub
'Private Sub Testt_PingDocument(sender As IGH_DocumentObject, e As GH_PingDocumentEventArgs) Handles Me.PingDocument ' Dim Mbool = Aggregate bcbool In Checked Into cb = Any(bcbool)
' If Not Mbool Then ' Checked(0) = True ' Message = Namestr(0) ' Order = 0 ' End If 'End Sub
End Class
The picture below shows the two question.
Question One I must use data dam, or the component can't batch deal the brep. I don't know why, I have You can give me a solution to make it working normal not using the data dam
Question Two I can not uset the Button component, If I use it, the gh canvas will die with some mouse event--. I have see this problem before in this forum,but there is no solution and explain. I want to know why and How to solve it.
I don't know if I have made my question clear,if not give a message. Thank you! Thank you all.
The gh test file and 3dm test file in the upload files.
…
The construction consists of inter-locking parts that ‘click’ into each other by using the relative flexibilty of the material. No screws or nails were used. The main connection joints are loosely based on a study about digital wood joints done by the Offenbach Design School in Germany under the guidance of Prof. Jochen Gros in the mid nineties.
The approximate scripting time was 3 weeks and building (or clicking) took only three days. Basically I've done the work for free, since there was a very limited budget. The material was sponsored by Vanstyn plywood in the Netherlands that also produces the sheets. I had some help with the building up from some very friendly volunteers!
The overall size is 21 by 6 by 4 meters and the material used is an Oukume plywood with a core of aluminum honeycomb.
Thanks for watching!
Photography by Maarten Noordijk…
Added by Jasper Niens at 9:35am on September 30, 2014
hours in June to be warmer than any five hours in December. Direct-Normal radiation is purely a function of the amount radiation received directly from the sun. So, if the five hours in December 21 in your calculation were cloudy, the amount of direct-radiation for those hours will be zero. Secondly, your statement that.. "The temperature is ok, but radiance shuold be like temperature.." is not correct. It can be that you feel warmer on a cloudy day than you do on a sunny day.
The monthly weather data for Sao Paulo indicates that most of the rainfall occurs in the months of January and December. This implies that the direct-normal radiation for those months will be low, but the global-horizontal radiation will be high. And this is consistent with the results you are getting.
Try comparing more number of hours in Winter versus Summer. Something like (10AM to 3PM)* ( June 1 - June 30) versus (10AM to 3PM)*(December 1 - December 30). Finally, for the climate in Sao Paulo, it makes sense to compare direct-normal and global horizontal radiations separately.
…