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?
…
se enseñan los principios de modelado básico y orgánico en Rhinoceros. En Grasshopper se estudian los principios de Parametrización, panelización y análisis en Grasshopper, así como el proceso de manufactura digital para maquinaria de corte Láser y CNC.
UN solo pago anticipado $5,000.00
Pagos diferidos $5,500.00*
*reserva tu lugar con el 50%
De lunes a viernes de 10 am a 18 pm
Del 23 al 27 de julio de 2012
DURACION: 40 HORAS
SESIONES: 5 DE 8 HORAS
o info@dimensiontallerdigital.com
informes al 55 (50 16 0634) con Mayri Gallegos (o al cel. 55 28 85 24 73)
Incluye material para corte digital.…
Grasshopper. So, I once made an attempt to bind ms sqlServer in order to get frozen definitions at some states, to avoid managing baked objects in Rhino and also be able to retain whole results without using the GH state manager that rebuilds everything.
But at that time GH's VB.Net component didn't properly read referenced dlls and I forgot it since then.
At first, I was surprised by Slingshot's extensive interface : I was still having in mind my own old project, a tool that would have acted at the Rhino's geometry object level, and auto creating the needed tables.
The bd would have consisted of a main table, owning the objects ID and name, and related tables containing the necessary information relative to the main objects.
For example, a Brep is made of so and so underlying objects, passed to respective tables, according to GH objects definition layout (just the way they are written in the xml schema).
Then, on a db, query an object by name, and retrieve the whole object or underlying objects (e.g. at the bounding curves level, or points level for a Brep).
With Slingshot, I made a few attempts to cheat GH with BLOB data fields, but no way to get a whole object. It seems that GH simply provides an object.toString ... and GH is definitely not conceived to produce persistence outside of Rhino. If I have some spare time, I will try to extract
About points and colors, I am now simply using a single field with CHAR(asLargeAsNeeded...), as GH parses String to every Point (or Vector or Color) entry of any component.
I do so because it need less to display on the canvas...
Whatever I wrote before, I really like your conception, as opened to relational interactions between ...whatever you need or dream of !
One last thing : GH can't open the definition file "Genome_DB_Template.gh" that I've downloaded from your site : http://slingshot-dev.wikidot.com/database-genome. I was expecting to learn a lot from your very smart stuff ! (I am running GH 08.00.13 and Slingshot 0.7.2.0)
Slingshot is running great, opened to any use...Thanks again.
Best,
Stan
…
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~
…
starting as soon as possible.
We're offering challenging projects, insights and contact to leading industry companies, project responsibilities according to abilities and initiative, great work environment and laid-back atmosphere, room to play and evolve,...
Our ideal candidate:
- is passionate about construction, engineering and (computational) design
- is proficient in Rhino / Grasshopper / (GH-)Python
- knows his ways around the Adobe Suite and MS Office
- has a current work permit for Germany
- is a German speaker (other native speakers also welcome, with excellent English skills)
- has an architectural background (Student / BA / MA /...), ideally with work experience
- is interested / has experience in digital manufacturing and prototyping
- will be able to join us shortly
We're looking forward to your applications / inquiries / CVs to: mpelzer@fat-lab.de
View our past projects here: www.fat-lab.com
(Current projects, unfortunately, are non-disclosed)
…