even (0, 2, 4) then that means the point either never hit it, or went in and out again, meaning it's outside. If it hits an odd number of times, then it must have come from within originally.
The method implements this approach using the mesh bounding box, and then striking a polyline from your test point along a vector that is defined by the upper right corner of the bounding box + a vector of (100,100,100). In the case of your failing points, this is a result of their striking an edge very precisely, which gets counted as 2 hits instead of 1 (as it should be getting captured) and passing false:
Your best bet is probably to roll your own implementation, that tests for multiple vectors:
private void RunScript(List<Point3d> P, Mesh M, ref object A, ref object B, ref object C) {
BoundingBox bb = M.GetBoundingBox(false);
List<bool> inside = new List<bool>();
for (int i = 0; i < P.Count; i++) {
Polyline a = new Polyline(); Polyline b = new Polyline();
a.Add(P[i]); b.Add(P[i]);
a.Add(bb.Max + new Vector3d(100, 100, 100)); b.Add(bb.Max + new Vector3d(100, 150, 150));
int[] fa; int[] fb;
Point3d[] xa = Rhino.Geometry.Intersect.Intersection.MeshPolyline(M, new PolylineCurve(a), out fa); Point3d[] xb = Rhino.Geometry.Intersect.Intersection.MeshPolyline(M, new PolylineCurve(b), out fb);
inside.Add(xa.Length % 2 == 1 || xb.Length % 2 == 1);
checkA.AddRange(xa, new GH_Path(i)); checkB.AddRange(xb, new GH_Path(i));
}
A = inside;
}
…
Added by David Stasiuk at 10:20am on October 10, 2017
izes like 0.6m, 0.8m, 0.9m and 1.2m are the most "common": In cases where mechanical floors are a must (hospitals for instance) a 2.4/2.4 is quite handy (habitable/mechanical per floor). You can try 1.8/2.7 as well (floor/habitable) since 1.8 floor thickness can host HVAC and some decent W truss size. Also 1.6/2.4 (floor/habitable) is used in small buildings. NOTE: see next.
3. Don't forget to include corrugated metal height + concrete screed height + raised floors height: for the latter, say, something like 0.3m (modules + adjustable mounts + free space for electric stuff [boxes etc]).
4. As regards exteriors, Laurent Buzon is a close friend of mine. Contact him directly on my behalf:
http://www.buzonuk.com/
http://www.google.gr/url?sa=t&rct=j&q=&esrc=s&sourc...
5. LBS Structural ability and "monolithic" floor behavior (humans don't like vibrating habitable spaces) ARE not the same animal.…
ybee_EnergyPlus Window Shade Generator" component.
3. SolveAdj component has the input to set BC for interior surfaces.
If you want to set them to adiabatic then you can use setToAdiabatic components.
4. For natural ventilation Chris has provided extensive answers including this one.
If the component doesn't work then you need to download the files manually from github and replace the userObjects with the old ones. You have to do it separately for Ladybug and Honeybee which can be painful. Is there anyway to change the firewall settings?
…
Horticulture and Landscape in same time.
The most common plastic materials used as agricultural films are the low density polyethylene (LDPE, with a density less than 0.93 kg m−3), the copolymer of ethylene and vinyl-acetate (EVA)
Also here you can find the characteristics of the flexible materials for greenhouse covers (adapted from CPA, 1992 and Tesi, 2001) as much as i get.
UV-PE Film ( UV-PE~ polyethylene Long life or UV)
Thickness (mm) = 0.18
Direct PAR transmissivity (%) = 90
Diffuse PAR transmissivity (%)= 86
Long-wave IR transmissivity (%)= 65
EVA Film ( EVA~Ethylene vinyl-acetate copolymer)
Thickness (mm) = 0.18
Direct PAR transmissivity (%) = 90
Diffuse PAR transmissivity (%)= 76
Long-wave IR transmissivity (%)= 27
and here you will find the global heat transfer coefficient’ (K in W m−2 °C−1) for the above greenhouse covering materials, measured under normalized conditions (temperatures: exterior: −10°C, interior: +20°C, wind: 4 m s−1). (Source: Nisen and Deltour, 1986.)
Cover Clear sky Overcast Sky
Single PE 8.8-9.0 7.1- 7.2
Single EVA 7.8 6.6
Note : the PAR radiation (photosynthetically active or photoactive radiation and its the amounts to 45–50% of the global radiation; Berninger, 1989)
The name PAR is used to designate the radiation with wavelengths useful for plant photosynthesis. It is accepted that the PAR radiation ranges from 400 to 700 nm (McCree, 1972), although some authors consider the PAR from 350 to 850 nm.
The composition of the radiation changes with time, as a function of the Sun’s elevation and the cloudiness. When the Sun is low over the horizon, the short wavelengths are reduced (less UV and more red). The clouds reduce the amount of energy, greatly decreasing the NIR.
The PAR proportion in relation to the global radiation increases with scattering (diffusion). It is lower with clear sky and in the summer (45–48%).
kind regards
rafat …
Refinement component at first, possibly using MeshMachine instead which is slow but actually gives many fewer triangles and adaptive meshing for tight curves too. Neither are easy to adjust on a deadline!
Then you have to sneak up on workable settings, using only a few lines, or Grasshopper will freeze perhaps indefinitely for 200 lines with extreme settings, especially the CS (Cube Size) setting that can blow up into a huge number if your scale is big.
Cocoon gives lots of nearly flat split quad faces so I quadrangulated those for fun:
Or MeshMachine can refine the mesh to make it efficient:
Whereas the Cocoon Refine component will merely return an equally fine mesh with more equilateral triangles but no serious remeshing to rid so many tiny triangles where they are not needed? Actually, it does seem to remesh also:
David said he used some of Daniel's MeshMachine code in there.…
a pain to use sometimes. I recently found this great post:
http://www.grasshopper3d.com/forum/topics/formatting-numbers-in-grasshopper
which points to the msdn .net framework standard numeric format strings:
http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx
and the custom ones too:
http://msdn.microsoft.com/en-us/library/0c899ak8.aspx
Sooo... today I was trying to make a 2D array generator for RGB values to use with a RGB LED and an Arduino. For instance, declaring a 2D array in Arduino:
int color[3][3]={{255,0,0},{0,255,0},{0,0,255}};
I'm using the blend color component to spit out transitions between two colors. I want the list in the panel to be in the format above, so I used both the expression component and the string format component (are they the same under the hood?). In any case, if I have R, G and B values coming into the component, I want to format them so the come out looking like {R,G,B}, so I can just copy the output in a panel and paste it into the Arduino IDE. But what about {curly braces}. If the expression/format component uses them in it's syntax, for instance:
Format ("{R:0},{G:0},{B:0}",R,G,B)
how do I get them into the formatting string? I tried escaping them like:
Format ("\{{R:0},{G:0},{B:0}\}",R,G,B)
but that just makes the component angry
Escaping characters is explained in the formatting references above. Is it implemented in this component? Should I be looking at a different approach?
I've included a sample file below.
Thanks!
~BB~
…
ing-in-python?commentId=2985220%3AComment%3A628495
For the most part, I got the serial port to work and I could share the port with other components without wiring the components together using a sticky Python dictionary. There were a couple of issues with closing the port (Rhino had to be restarted).
In any case, I'm back at it. I am however going the C# component route with an eye towards writing my own components with visual studio. I am trying to create bidirectional communication with a serial device in grasshopper. I need more control over the serial port that the generic Firefly components can afford. Furthermore, I would like to understand how to program this myself. The first goal would be to create a few components that could handle various serial tasks, one to open/close port, one to read from port and one to write to it. This is not unlike how I got it to work in python, and is also similar to the logic in Firefly's serial components.
The thing that has me stumped with C# is how one shares the port between components? If one component is responsible for creating and opening/closing the port, how do the read/write components address the instance of the port created in the other component? Python has the sticky dictionary, is there something similar in C#? I'm a novice when it comes to C# and how it works within grasshopper, so maybe I'm missing something simple.
I've attached a klunky definition that uses C# to open/close a serial port. I've tried accessing the port with other components, but I don't know enough to make it work. Again, I'm mainly interested in the mechanics of how one component can access the serial port instance created in another component. If I could get some user objects going for now, I'd be happy. In the future, I want to roll my own components. If anyone has any suggestions, code snippets, or any other forms of enlightenment, I'd be greatly appreciative!
Rhino5 x64 + GH version 0.9.0056
Thanks,
~BB~
…