st between those two applications. But as soon as every frame is re-calculated I noticed that intersection function is very slow. It is actually so slow, that maximum number of polygons to play with is only 10 or less.
Could you help me to find a faster solution for my script?
calculation of intersection lines;
//////////////////////////////////////////////////////////////////////////////////////////
import ghpythonlib.components as ghcompimport rhinoscriptsyntax as rsdef ctr(crv): pts = ghcomp.Explode(crv)[1] pts = ghcomp.CullDuplicates(pts,0.001)[0] return ghcomp.Average(pts)pts = []lines = []ctr_c1 = ctr(C1)for crv in C2: if ctr(crv) != ctr_c1: int = ghcomp.CurveXCurve(C1, crv)[0] if int: [pts.append(x) for x in int] lines.append(rs.AddLine(int[0],int[1]))
/////////////////////////////////////////////////////////////////////////////////////////////
The overall description of the script:
a)Processing+ghowl is used for moving objects and physics
b)python script (slowest part) calculates intersection lines
c)intersected parts of polygons are rotated in 90 degrees.
I have attached grasshopper and processing files. (processing is not necessary to test the script)
Thank you in advance,
Pereas.
…
width of the other letter
find the intersecting shape with Solid Intersection
re-orient final shape
This process sometimes breaks when a letter has one or more "holes" in it (eg: B, O, R). When this happens, the Solid Intersection component experiences an error and says "Boolean intersection set is empty". I don't know what that means.
I have tried the quick-fixes of flattening and grafting to no avail.
Could somebody shed some light on this issue?
I have internalized the letters into the attached GH def, but am also attaching the illustrator file that I'm using.…
e any affect, but that's way too slow if 90% of the GH program is initialization and creation of source geometry to then simply alter a bit or array here and there. When I use Python directly to change output values that I plug into former slider inputs, again no new solution is triggered at all so I'd have to recalculate the entire Grasshopper program which is simply not how Grasshopper normally works. How do I actually emulate a human changing a slider value one slider at a time in a way that makes Grasshopper behave normally so that only downstream flow is affected in an efficient way?
An related example would be if you have several separate programs in a Grasshopper page and you wanted to only change one of them without triggering full recalculation of them all.
At this point it's almost like a Windows mouse scripting utility is needed but if I need to do combinatorial combinations of all possible slider values, that seems quite thorny too unless I set up a pre-arranged array of values that could then simply be incremented "manually" followed by a right click to bake and then typing commands into Rhino to save to a file. UGH. That would be quite difficult to pull off since I need to control file names, but it's what I seem to need.
I'm using Python since it avoids thorny Grasshopper schemes and it allows me to access Rhino to save baked objects files.…
ving a copy of the surface in the original position. Second, and more frustrating, not all of the surfaces orient properly. A few lay flat but then rotate 90 degrees horizontally.
Any help or insights would be greatly appreciated!
Images and files are below.
grasshopper screenshot 1gh%20problem%20part%201.png
grasshopper screenshot 2gh%20problem%20part%202.png
grasshopper file slat%20wall%20C2.gh…
ey provide all the means to what I try to achieve.
What I need is to get a fast (as possible) evaluation of passive heat/solar gain from a certain facade. I know my building can cool to a certain degree (lets say 80 W/m2 - now lets forget other internal gains) and I want to be sure my facade is not letting excessive amounts of heat into the room/building. Normally I would make a full blown simulation to count my overheating hours and thereby evaluate my facade. To speed up the process, the idea is just to evaluate overheating hours in a faster way. So what I am thinking is that excessive amounts may estimated by counting high intensity irradiation patches in a critical sky-component or whatever such thing would be called that surpasses my sensible cooling load. My hope is that any facade visible to the sky-patches would very similar to the number of overheating hours if properly calibrated to a simulated model. However I have no idea right now, if this can be done.
Why do this? Speed, convenience, whole building thermal analyses.
@Chris and @Abraham The critical sky-component is made with LBs radiance component radiation and filtering the beam-components with highest effects from a yearly epw-file.
@Chris Conductive heat gains are also important especially if the facade is badly insulated, so the next step is to filter the outdoor temperature parallel with that critical sky-component and then do a static heat transfer analysis and combine that with the effect from direct sun influence. Again, no idea if it works.
Hope it makes sense. I a little embarrassed I drew you into this little experiment. This was not at all the point of the discussion. But now we are into it I like to know what you think. If it works its kinda neat, at least i think it is.
/K…
they may not always give you a clear picture of their precise functionality. I thought this may be an issue with many users so I decided to use this opportunity to list all the parameters with my quick take at describing their functionality. Here it goes:
DEFAULT VERTICAL SHIFT -- Number - Shifts panels vertically creating a custom-sized panel with height of the specified dimension at first row of skin.
DEFAULT HORIZONTAL SHIFT -- Number - Shifts panels horizontally creating a custom-sized panel with width of the specified dimension at first column of skin.
DEFAULT SKIN CHAMFERED CORNER--True/False - If "True" wraps panels around surface corners. If '"False" creates a custom-sized panel if necessary to complete the skin surface at the shared edge, defining this way a sharp corner.
RESET BAY AT POINTS-- True/False - When using Panel Bays (Group of Panels) this option restarts the panel bay at a surface corner.
FLOOR HEIGHT-- Number - The Floor To Floor value of the Skin generated. If Panels are shorter than this value, a leftover 'gap' will be seen at top of panels.
MINIMUM PANEL WIDTH -- Number - If the width of a panel (standard or customized) created during the skin generation is less than this value, the panel won't be created and the placement will be skipped.
MINIMUM PANEL HEIGHT -- Number - If the height of a panel (standard or customized) created during the skin generation is less than this value, the panel won't be created and the placement will be skipped.
MINIMUM PANEL AREA-- Number - If the area of a panel (standard or customized) created during the skin generation is less than this value, the panel won't be created and the placement will be skipped.
PANEL PROFILE TOLERANCE-- Number - If a resulting panel shape is within the specified tolerance value to any already created panel, this panel is used instead of creating a new panel shape. The tolerance specifically tracks the distance between each corner of the new panel and the corresponding corners of the existing panels. This parameter is mostly used in "SURFACE PANEL MODE'', where a large number of custom-shaped panels can be generated, to reduce the number of unique panels created.
GENERATE PANEL TYPES ONLY-- True/False - This parameter allows the Skin Generator to discard the creation of scene geometry but still have the grasshopper panel data being generated. The skin panels can be retrieved as grasshopper geometry using SkinDesinger's Display components.
RESET DF BETWEEN SURFACES-- True/False - When "True", the Design Controllers (Design Functions in v.01) resets to its initial values each time it starts a new skin surface. Used for instance to restart a layout pattern at every new surface.
SURFACE PANEL MODE-- True/False - The "SURFACE PANEL MODE" is used to generate panels matching the shape of the surfaces included in the "skinSurfaceList" input.
SURFACE PANEL ORIENTATION -- Orientation Type - When activating the "SURFACE PANEL MODE'', this parameter defines the orientation of the panel generated relative to the normal of the surface that defines its shape. The acceptable values (found in the "Surface-Panel Mode Orientations" dropdown) are:RESETFLIPROTATE 90ROTATE 90 FLIPROTATE 180ROTATE 180 FLIPROTATE 270ROTATE 270 FLIP
I hope this helps but feel free to reach out if you have any questions!
Santiago
…
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~
…
cnicas y estrategias para resolver problemas que hoy se presentan en el diseño y fabricación digital de formas complejas y euclidianas. Se podrá entender mejor la diferencia entre el estilo Modernista y el Parametricismo que vivimos desde el 2000.
Tomando como plataforma básica Rhino, se explora y optimiza el diseño y fabricación de topologías complejas bajo los entornos de Rhino, Grasshopper y RhinoNest.
Instructores:
Andrés Gonzalez, McNeel Miami.
Director de RhinoFabLab.
MSc. María Mena Deferme, Directora de Arquitectura.
Tecnológico de Monterrey campus León, Mexico.
NOTA 1: Tendremos el patrocinio de LaserCUT.mx y podremos usar un Láser Industrial durante todo el taller, mas el laboratorio del iTesm.
NOTA 2: Estudiantes y docentes podrán adquirir Rhino 4.0 con un descuento del 50% sobre el precio de lista en USA.
Descarga el Outline del workshop PDF
http://www.screencast.com/t/M2FjOTBi…
at the same time just seems logical to me that a force would always seek the path of least resistance, so rather than making a 90 degree turn follow a more similar direction. The thought of separating stresslines into groups of tension and compression ist interesting from a design perspective. I wondered how tension and compression forces relate to the S1 and S2 lines, so what I did is pluging the outputs of P1 and P2 into the respective vector display for S1 and S2 and coloring the vectors blue for compression (negative values) and red for tension (positive values). So when you look at the upper side of the surface S1 (SC_02), Tensors along S1 show compression towards the middle and towards the supports Tension. However the Principal Stress Display of the Mesh Visualisation Component for the upper side shows it the other way round, again Red/ Tension and Cyan/ Compression as it says in your manual. Did I miss out on something ? When I look at the lower side (SC_03) I find it more or less matching up (I am just decerning between negative and positive values) so that might make the difference in the size of the compression area. So, does this mean that the S1 and S2 lines are related to the upper and lower side of the surface ? One beeing predominantely in compression(upper side) and one being stressed(lower side) ? That would also explain to me why S1 and S2 swap when you change the side of the surface. I am sorry, many questions... If you have time to explain, would be great. Also, maybe you have a book or article in mind which would explain those things more in depth....
Many thanks,
Philipp…