didn't look at it that closely), other than to say tree data structure is helping you and hurting you.
What I did to fix the file was work backwards. Looking at only the left panel you are trying to create 11 total planar surfaces from edge curves (8 curves per surface). That means you should be generating 11 of each type of curve so that you will have 88 total curves when you attempt to join them.
Tree data was in some cases giving you 121 of each type of curve (lists matching with tree structure...) so I worked backwards from your individual curves to flatten the inputs until ending up with only 11 (the expected number) of each type of curve.
…
y to facilitate the help.
Private Sub RunScript(ByVal x As Boolean, ByVal Ids As List(Of Guid), ByRef A As Object)
If x ThenBB = New BLABLA(ids)A = BB.CurvaElseIf BB IsNot Nothing Then BB.timer.Stop()End If
End Sub
'<Custom additional code>
Dim BB As BlABLA
Public Class BLABLAPublic Curva As curvePrivate Cache As list(Of point3d)Private IDs As list(Of guid)
Sub New(_ids As list(Of guid))IDs = _idsDim points As New list(Of point3d)For Each id As guid In idsDim 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 Forpoints.add(pt.Location)Nextcache = pointscurva = curve.CreateInterpolatedCurve(points, 3)timer = New system.Windows.Forms.Timertimer.Interval = 100timer.Start()
End Sub
Public WithEvents timer As system.Windows.Forms.Timer
Private Sub Tick(sender As Object, e As System.EventArgs) Handles timer.Tick
For i As int32 = 0 To ids.count - 1Dim rh As rhinoobject = rhinodoc.ActiveDoc.Objects.Find(ids(i))Dim pt As Rhino.Geometry.Point = DirectCast(rh.Geometry, rhino.Geometry.Point)If pt Is Nothing Then Continue For
If Not pt.Location.Equals(cache(i)) ThenUpdateOutput()
End Ifcache(i) = pt.LocationNextEnd Sub
Private Sub UpdateOutput()'HERE I NEED UPDATE THE A OUTPUTrhinoapp.WriteLine("Change")End Sub
End Class…
surface edges and use the Bowerbird BB Offset component, or the Polyline Offset in StudioAvw plug-in. This way you can avoid the whole fillet-first-then-offset approach you were trying.…
i to usb cable and was able to connect Grasshopper with my digital piano realtime through a simple VB.NET component, no need for any other intermediate software. I used this library http://midiservices.codeplex.com/ (but there are several others).
The VB component outputs a list of 88 values that correspond to the intensity of each piano key at the current time (if the pedal is on and a key is depressed the value is halved, if the pedal is off the value is 0).
The rest of the definition is just to do something with this data. It uses these values to display each note as different floating colors that move with the wind (using Kangaroo). The strength of the wind changes as the music dynamics change.
If there are several devices connected you might have to change the line device.Open(0) to another number.
Definition: piano_midi.gh
…
an be given as 88° and 95°. All three angles must sum up to 180, and we're already 3 degrees over balance. Or maybe the user specifies three edge-lengths: 21, 12 and 8. 21 is bigger than 12+8, so even if the triangle was stretched flat, the two short edges cannot reach the ends of the long edge. The above is easy to test for and I add errors to the component if an invalid triangle is provided. However there are also many angle+edge length combinations which result in invalid triangles.
I could of course test for these as well, but the problem is now tolerance. What if the user specifies a redundant angle of 54.7°, whereas the mathematics tell us that the actual angle is 54.7002°. Is that an error? If so, is the angle wrong or is perhaps one of the edges wrong? Or has the triangle simply been over-constrained? Is there a mathematically robust way of dealing with this? And if so, would that also be the most user-friendly way of dealing with it?…
Added by David Rutten at 2:23pm on August 23, 2014
s are identical to those in Grasshopper so I am getting an ambiguous reference error when loading the OpenStudio.dll into my component and using the Point type hint.
private void RunScript(Point3d pt, ref object os3DVector)
{
OpenStudio.Point3dVector points = new OpenStudio.Point3dVector();
points.Add(pt);
}
Error: 'Point3d' is an ambiguous reference between 'Rhino.Geometry.Point3d' and 'OpenStudio.Point3d' (line 88)
Is there any particular reason the Grasshopper reference to Point3D is implicit rather than explicit Is this something that can be changed on my end as it appears to be locked down.
Would like it to read as follows:
private void RunScript(Rhino.Geometry.Point3d pt, ref object os3DVector)
{
OpenStudio.Point3dVector points = new OpenStudio.Point3dVector();
points.Add(pt);
}
Awesome, thanks!…
d' and no extension method 'AnnotativeScalingEnabled' accepting a first argument of type 'Rhino.Geometry.TextEntity' could be found (are you missing a using directive or an assembly reference?) (line 94)
Along with some warnings:
1. Warning (CS0618): 'Rhino.Geometry.AnnotationBase.Text' is obsolete: 'Use RichText or PlainText' (line 88)2. Warning (CS0618): 'Rhino.Geometry.AnnotationBase.FontIndex' is obsolete: 'Use Font property instead' (line 92)
3. Warning (CS0618): 'Rhino.RhinoDoc.Fonts' is obsolete: 'Use DimStyles table instead' (line 92)
I've downloaded the latest version of FabTools.
I've completely un-installed and re-installed.
I've Googled everything I can think of to find a solution, but most references are circa 2013 which is probably under Rhino 5. Which works totally fine, BTW.
Does anybody know of a solution?
Thanks,
Michael
…
rkup) as below:
float coeff_perez [] is from Perez's paper in solar energy vol. 50, No.3. pp235-245, 1993.
i would like to adjust A3, A4, A5, A6 and A7 using measurement irradiance data over a whole year for every minute or hour, and update these coefficients under the file perezlum.cal. It means i may need to re-compile gendaylit.exe, which i have no idea how to do it.
i found radiance has another version on gendaymtx.c v2.13. it includes static const double PerezCoeff[8][20]. I am wondering which version of gendaymtx does ladybug GenCumulativeSkyMtx use.
Thanks for your suggestions on honeybee plugin. I will take a look and see how.
Cheers,
Le
…
, however I am getting one error which I cannot solve for the life of me.
As part of this component I have overwritten the display pipeline to enable for custom display options, and to speed up the process of previewing a lot of geometry.
When I wrote it in my c# native grasshopper component there wasnt any problems, but when compiled into its own component using Giulio Piacintino visual studio template.
Any help is appreciated, and the code is as follows(which was kindly shared by David Reeves), I have changed one thing from the grasshopper to the visual studio compiled component, which is the " if(_clippingBox.IsValid){}" statement, which was to prevent it from getting a display pipeline error before anything had been added to the component:
//-------------------------------- //overiding the different preview function to prevent errors public override BoundingBox ClippingBox { get { return _clippingBox; } } //-------------------------------- public override void DrawViewportWires(IGH_PreviewArgs args) { if (_clippingBox.IsValid) { //display for Lines and Points base.DrawViewportWires(args); // add custom display code here // access draw methods under "args.Display" //args.Display.DrawPointCloud(_cloud, 3); for (int i = 0; i < objT[1].Length; i++) { if (BB[1][i] && P) {
args.Display.DrawLine((Line)objT[1][i], System.Drawing.Color.FromArgb(0, 0, 0), 3); } else if (!BB[1][i]) { args.Display.DrawLine((Line)objT[1][i], System.Drawing.Color.FromArgb(0, 0, 0), 1); } } } } //--------------------------- //--------------------------- public override void DrawViewportMeshes(IGH_PreviewArgs args) { if (_clippingBox.IsValid) { //display for Surfaces & Meshes base.DrawViewportMeshes(args); // add custom display code here // access draw methods under "args.Display"
for (int i = 0; i < objT[0].Length; i++) { if (BB[0][i] && P) { System.Drawing.Color col = System.Drawing.Color.FromArgb(255, 255, 153); args.Display.DrawMeshShaded((Mesh)objT[0][i], new Rhino.Display.DisplayMaterial(col)); } else if (!BB[0][i]) { args.Display.DrawMeshShaded((Mesh)objT[0][i], new Rhino.Display.DisplayMaterial()); } } } } //---------------------------…