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…
ra' nella finestra di Grasshopper, in alto, insieme agli altri set di componenti come 'Params', 'Maths', ecc.
Si tratta di un esperimento per cercare di ampliare in qualche modo l'ambito di utilizzo di Grasshopper.
Come sappiamo Grasshopper e' nato per consentire l'utilizzo parametrico di Rhino. Le definizioni di Grasshopper permettono di registrare i passi necessari per costruire gli oggetti, nonche' di variare i dati utilizzati dalla definizione, ad esempio oggetti geometrici, lunghezze, angoli, ecc.
Quando modifichiamo i valori utilizzati dalla definizione Grasshopper automaticamente ricalcola il tutto e ci mostra la preview del risultato.
A questo punto, se il risultato e' soddisfacente, possiamo dire a Grasshopper di inserire gli oggetti in questione nel documento di Rhino, cosicche' li vedremo apparire nelle viste come veri e proprii oggetti Rhino.
Questo modo di lavorare ha avuto un grande successo tra gli utilizzatoti di Rhino, rendendo molto piu' agevole la costruzione di oggetti nel caso in cui sia necessario procedere per tentativi, verificando il risultato prima di stabilire la forma finale da ottenere.
Il successo di Grasshopper pero' ha anche mostrato quanto sia comodo poter definire graficamente le procedure di costruzione, e in generale poter utilizzare Rhino tramite i componenti, ad esempio gli slider, che tutti noi, suppongo, vorremmo avere a disposizione anche quando usiamo Rhino nel modo classico tramite pulsanti e comandi.
Quindi col passare del tempo sono apparsi sempre piu' Add-on per Grasshopper che permettono di eseguire operazioni particolari o anche di utilizzare Grasshopper in ambiti diversi dal concetto originale di 'History programmabile'. Accodandosi a questa tendenza, edoc prova a costruire dei componenti che permettano di operare direttamente sugli oggetti Rhino, cioe' curve, superfici, layer ecc. appartenenti al documento Rhino su cui stiamo lavorando. L'idea e' permettere di utilizzare la comoda interfaccia utente di Grasshopper anche per operazioni che solitamente sono eseguite in modo tradizionale con pulsanti e comandi, o anche tramite script.
Come gia' detto, e' un esperimento. I componenti nascono, muoioni e cambiano molto spesso, nel tentativo di capire cosa puo' essere utile e cosa puo' fuzionare o meno.
Segnalazioni di bug, suggerimenti, considerazioni ecc. sono benvenuti.
se qualche anima pia volesse tradurre questa presentazione gli faremo un monumento equestre!
grazie e scusate
gg
…
nza dal centro delle facce ad un punto fisso per determinare quant'è il valore dell'offset per quella faccia.
Prova questa soluzione per ora:
- abilita il componente disattivato all'inizio;
- il componente curve offset non funziona bene, domani vedo se riesco a crearne uno migliore;
- inforna (bake) la brep risultante e convertila in mesh da rhino;
- per dargli spessore, fai l'offset solido della mesh in rhino per l'ultima fase, funziona meglio.
I've used the distance from the center of the faces to a fixed point to determine the value of the offset.
Try like this:
- enable the first component disabled;
- offset curve don't work perfectly, I'll try to fix it maybe...
- bake the brep and convert it into mesh in rhino;
- for the thickness, do a solid offset of the mesh in rhino for last phase, it just works better.…
me research involving shades and and solar radiation and I need the sun's path through the entire year to fully optimize the design. This far I've been able to simulate what I want by having my shadders following a mock solar orbit around them, what I need to know is to use a model that simulates solar paths, use it as an attractor point and have my shadding surfaces follow it, pretty much like that I am doing right now (or so I think)
Here's where my questions come around:
I remember finding somewhere on the internet a definiton that simulates the sun's path through the year; I think I can find it again and use it for my purposes. I think that I could just run the GH definition, bake the geometry and then upload it to Ecotect and have it run so I can get the data and keep working over that, then feed the geometry again to Ecotect, ad nauseam. However I think that is a very slow process.
Is there a way that I can run an Ecotect plug in of sorts within GH, that way I can get my data IN grasshopper and model accordingly?
Does that make sense?
Thanks a lot for any input.…
Added by Antonio Tamez at 3:40am on October 24, 2011
s for the sunlight hours analysis.
I'm producing BRE Annual Probable Sunlight Hours calculations and so to match the BRE approach, I'm using 100 sun vectors, each representing 1% of probable sunlight hours. I could use the Sunpath and Analysis Period components to produce sun positions for the whole year, but this gives results that do not fully reflect the BRE methodology - which is important here. I'm detailing this just to clarify that this isn't a full annual calc of 8760 hours for 350 surfaces.
Anyway, when I run the calc, it takes about an hour to run, but the Sunlight Hours Component itself reports a calculation time of 3 seconds! Does this mean that the rest of the time is all about prepping the brep geometry? If so, is there a reason why this is much slower than when using a view of sky recipe and exporting to radiance. For the same project, I completed a view of sky calculations and based on the number of test points and -ad setting, this was completing about 5.25 billions rays so I understand why that took an hour.
Any thoughts as to why the sunlight hours calc seems to take so long?
thanks
Nick
…
s topology gets pretty bad for use in CAD programs, since they are "in and out" at the same time. Generate naked edges and non-manifold edges. The problem itself is when I make an offset of the surfaces, which create "bad objets" in Rhino. I'm using Mantis, a plugin for Mathematica software, and one based on this the Math Surfaces script from http://www.co-de-it.com/wordpress/code/grasshopper-code. Both give me errors. I have tried to make a merge with the normal flip in the same model, but the error continues. If I do a split, in Rhino, there is no problem to create a solid offset, but the opposite is totally different if I make a Mirror. Can you help me with this complicated issue? Thank you.…