t. This was a reasonably effective workflow for the purposes of solving the initial problem. (in reviewing this post, it seems a bit lengthy, but hopefully it's of use to others).
Link to Illustrator Script example:https://forums.adobe.com/thread/508138
Portion I used: This applies to entire illustrator document. I am using Illustrator CC 64 bit and this worked okay. Tested a few times and it failed once, but a restart of Illustrator fixed it.
var v_selection = app.activeDocument.pathItems;SwapFillStroke(v_selection); function SwapFillStroke(objSel) { for(k = 0; k < objSel.length; k++){ var subSel = objSel[k]; var c_fill = subSel.fillColor; var c_stroke = subSel.strokeColor; subSel.fillColor = c_stroke; if(!subSel.stroked) subSel.stroked = true; subSel.strokeColor = c_fill; }} redraw();
My goal was to export colored geometry, (analysis meshes for example), from Rhino and get it into illustrator with solid fills.
If you want to know how meshes are colored in rhino...there are many explanations here on the forum, a quick search will get you more detailed information.
Short version: export your lines from rhino to illustrator and run the script listed above to make the stroke color the fill color. (in illustrator, shift+X will swap the fill and stroke colors on individual objects, but does not work on multiple objects..hence the need for the script).
Detailed Version:
In my case, I had 2 case studies I was working with.1 - wind rose meshes generated from Ladybug/honeybee2 - A mesh terrain that was colored by pre-set slope values.
NOTE: There are a few plugins to bake objects with color. I used Human tools, (Bake Geometry and JustifiedText3D).http://www.grasshopper3d.com/group/human (lots of other great stuff in there too!)
I had two types of geometry. (2 different definitions)
1- An analysis mesh, (HoneyBee/LadyBug),
2 - Lines generated from mesh faces. (mesh terrain/slope values).
Export results as a DXF, and choose "do not explode". (these were my settings)
DXF seemed to produce the most consistent results.
(you could export/save as an AI file and just open them in illustrator, but that seemed to give inconsistent results with the script).
Open DXF in Illustrator:
Apply Script in illustrator:
In the terrain example, there are only 5 colors, so selection in illustrator, by color, is very easy. In the results from honeybee/ladybug, (or any analysis process I imagine), the default colors are created with a much wider range of values. I presume the legend is then created by an average of those values within a range. My point is that, with the analysis results, selecting objects by color in Illustrator is probably not a very effective workflow.
I only tested this on my instance of rhino and Illustrator. mileage may vary.
In summation, at this point, it seems that the best way to get colored mesh faces, into illustrator, is to export the meshes, (which really ends up being the mesh face edges...curves), and bringing them into illustrator and running a quick script to swap the colors. Once that is complete, you can then select ALL the objects, and change the stroke color/weight at once.…
The PC actually stops working because after a few seconds the simulation starts the fan inside the PC all of a sudden stops and for the next 5-10 mins I cannot do anything, even alt+ctrl+canc. After I wait for that time i get the followig error:
the ReadMe says:
{0;0;0}0. Grid-based Radiance simulation1. The component is checking ad, as, ar and aa values. This is just to make sure that the results are accurate enough.2. -ar is set to 300.3. Good to go!4. Current working directory is set to: C:\Users\Luigi\Desktop\Prova__\Prova_1\gridBasedSimulation\5. Found a trans material... Resetting st parameter from 0.85 to 0.011276004966. WMIC PROCESS get Commandline7. WMIC PROCESS get Commandline8. WMIC PROCESS get Commandline9. WMIC PROCESS get Commandline10. WMIC PROCESS get Commandline11. WMIC PROCESS get Commandline12. WMIC PROCESS get Commandline13. WMIC PROCESS get Commandline14. WMIC PROCESS get Commandline15. WMIC PROCESS get Commandline16. WMIC PROCESS get Commandline17. WMIC PROCESS get Commandline18. WMIC PROCESS get Commandline19. WMIC PROCESS get Commandline20. WMIC PROCESS get Commandline21. WMIC PROCESS get Commandline22. WMIC PROCESS get Commandline23. WMIC PROCESS get Commandline24. WMIC PROCESS get Commandline25. WMIC PROCESS get Commandline26. WMIC PROCESS get Commandline27. WMIC PROCESS get Commandline28. WMIC PROCESS get Commandline29. WMIC PROCESS get Commandline30. WMIC PROCESS get Commandline31. WMIC PROCESS get Commandline32. WMIC PROCESS get Commandline33. WMIC PROCESS get Commandline34. WMIC PROCESS get Commandline35. WMIC PROCESS get Commandline36. WMIC PROCESS get Commandline37. WMIC PROCESS get Commandline38. WMIC PROCESS get Commandline39. WMIC PROCESS get Commandline40. WMIC PROCESS get Commandline41. WMIC PROCESS get Commandline42. WMIC PROCESS get Commandline43. WMIC PROCESS get Commandline44. WMIC PROCESS get Commandline45. WMIC PROCESS get Commandline46. WMIC PROCESS get Commandline47. WMIC PROCESS get Commandline48. WMIC PROCESS get Commandline49. WMIC PROCESS get Commandline50. WMIC PROCESS get Commandline51. WMIC PROCESS get Commandline52. WMIC PROCESS get Commandline53. WMIC PROCESS get Commandline54. WMIC PROCESS get Commandline55. WMIC PROCESS get Commandline56. WMIC PROCESS get Commandline57. WMIC PROCESS get Commandline58. WMIC PROCESS get Commandline59. WMIC PROCESS get Commandline60. WMIC PROCESS get Commandline61. WMIC PROCESS get Commandline62. WMIC PROCESS get Commandline63. WMIC PROCESS get Commandline64. WMIC PROCESS get Commandline65. WMIC PROCESS get Commandline66. WMIC PROCESS get Commandline67. WMIC PROCESS get Commandline68. WMIC PROCESS get Commandline69. WMIC PROCESS get Commandline70. WMIC PROCESS get Commandline71. WMIC PROCESS get Commandline72. WMIC PROCESS get Commandline73. WMIC PROCESS get Commandline74. WMIC PROCESS get Commandline75. WMIC PROCESS get Commandline76. WMIC PROCESS get Commandline77. WMIC PROCESS get Commandline78. WMIC PROCESS get Commandline79. WMIC PROCESS get Commandline80. WMIC PROCESS get Commandline81. WMIC PROCESS get Commandline82. WMIC PROCESS get Commandline83. WMIC PROCESS get Commandline84. WMIC PROCESS get Commandline85. WMIC PROCESS get Commandline86. WMIC PROCESS get Commandline87. WMIC PROCESS get Commandline88. WMIC PROCESS get Commandline89. WMIC PROCESS get Commandline90. WMIC PROCESS get Commandline91. WMIC PROCESS get Commandline92. WMIC PROCESS get Commandline93. WMIC PROCESS get Commandline94. WMIC PROCESS get Commandline95. WMIC PROCESS get Commandline96. WMIC PROCESS get Commandline97. WMIC PROCESS get Commandline98. WMIC PROCESS get Commandline99. WMIC PROCESS get Commandline100. WMIC PROCESS get Commandline101. WMIC PROCESS get Commandline102. WMIC PROCESS get Commandline103. WMIC PROCESS get Commandline104. WMIC PROCESS get Commandline105. WMIC PROCESS get Commandline106. WMIC PROCESS get Commandline107. WMIC PROCESS get Commandline108. WMIC PROCESS get Commandline109. WMIC PROCESS get Commandline110. WMIC PROCESS get Commandline111. WMIC PROCESS get Commandline112. WMIC PROCESS get Commandline113. WMIC PROCESS get Commandline114. WMIC PROCESS get Commandline115. WMIC PROCESS get Commandline116. WMIC PROCESS get Commandline117. WMIC PROCESS get Commandline118. WMIC PROCESS get Commandline119. WMIC PROCESS get Commandline120. WMIC PROCESS get Commandline121. WMIC PROCESS get Commandline122. WMIC PROCESS get Commandline123. WMIC PROCESS get Commandline124. WMIC PROCESS get Commandline125. WMIC PROCESS get Commandline126. WMIC PROCESS get Commandline127. WMIC PROCESS get Commandline128. WMIC PROCESS get Commandline129. WMIC PROCESS get Commandline130. WMIC PROCESS get Commandline131. WMIC PROCESS get Commandline132. WMIC PROCESS get Commandline133. WMIC PROCESS get Commandline134. WMIC PROCESS get Commandline135. WMIC PROCESS get Commandline136. WMIC PROCESS get Commandline137. WMIC PROCESS get Commandline138. WMIC PROCESS get Commandline139. WMIC PROCESS get Commandline140. WMIC PROCESS get Commandline141. WMIC PROCESS get Commandline142. WMIC PROCESS get Commandline143. WMIC PROCESS get Commandline144. WMIC PROCESS get Commandline145. WMIC PROCESS get Commandline146. WMIC PROCESS get Commandline147. WMIC PROCESS get Commandline148. WMIC PROCESS get Commandline149. WMIC PROCESS get Commandline150. WMIC PROCESS get Commandline151. WMIC PROCESS get Commandline152. WMIC PROCESS get Commandline153. WMIC PROCESS get Commandline154. WMIC PROCESS get Commandline155. WMIC PROCESS get Commandline156. WMIC PROCESS get Commandline157. WMIC PROCESS get Commandline158. WMIC PROCESS get Commandline159. WMIC PROCESS get Commandline160. WMIC PROCESS get Commandline161. WMIC PROCESS get Commandline162. WMIC PROCESS get Commandline163. WMIC PROCESS get Commandline164. WMIC PROCESS get Commandline165. WMIC PROCESS get Commandline166. WMIC PROCESS get Commandline167. WMIC PROCESS get Commandline168. WMIC PROCESS get Commandline169. WMIC PROCESS get Commandline170. WMIC PROCESS get Commandline171. WMIC PROCESS get Commandline172. WMIC PROCESS get Commandline173. WMIC PROCESS get Commandline174. WMIC PROCESS get Commandline175. WMIC PROCESS get Commandline176. WMIC PROCESS get Commandline177. WMIC PROCESS get Commandline178. WMIC PROCESS get Commandline179. WMIC PROCESS get Commandline180. WMIC PROCESS get Commandline181. WMIC PROCESS get Commandline182. WMIC PROCESS get Commandline183. WMIC PROCESS get Commandline184. WMIC PROCESS get Commandline185. WMIC PROCESS get Commandline186. WMIC PROCESS get Commandline187. WMIC PROCESS get Commandline188. WMIC PROCESS get Commandline189. WMIC PROCESS get Commandline190. WMIC PROCESS get Commandline191. WMIC PROCESS get Commandline192. WMIC PROCESS get Commandline193. WMIC PROCESS get Commandline194. WMIC PROCESS get Commandline195. WMIC PROCESS get Commandline196. WMIC PROCESS get Commandline197. WMIC PROCESS get Commandline198. Runtime error (IndexOutOfRangeException): index out of range: 0199. Traceback: line 320, in script
The thing is that if I raise the -aa parameter from 0.05 to 0.1 all works fine..
Is this only related to my PC then?? What should I do to solve this issue?
Thanks again for your help
Luigi…
t the maximum potential with the bridge BIM+PARAMETRIC DESIGN ;D
During this Intense Week, we will learn about the power of Rhino + Grasshopper + ArchiCAD with Professional and Useful examples for our Normal Working day :D
You will get Advanced Library Files + Personal Web + Knowledge and Skills to start using this incredible Methodology ;D
Also, the week is having Lectures from different Experts sharing their Computational Working Experiences ;D And Jam Sessions! opening the door to 5 interesting topics to research, learn and experiment together :D
2020 is your YEAR ;D !!!
Complete details and registration……
when I install Grasshopper, automatically install it in the folder rhino4. When I try to load it from Rhino 5 gives me the message that you can see in the add file.
Thanks
e to subscribe to the same set of rules of course, but things I like to do when programming are:
Declare variables as late as possible. Don't put them all at the top, but put them on the line above the first line that uses them.
Give variables understandable names. "curves" is to be preferred to "crvs" or "c".
Don't nest conditional structures too deep. If there's no way around it, move inner loops into their own functions. A great way to reduce too much indentation is to write:If (Not x) Then Continue For
Instead of
If (x) Then blahblahblahEnd If
Always check for null/Nothing if you get a reference type from some process.
Always check for empty arrays.
Use ReadOnly class level variables whenever possible.
Import few namespaces. Basically, don't import any unless you have to specifically refer to a namespace, say, more than 5 times.
Use #Regions to combine properties, constructors/destructors and other closely related methods.
Prefix class level variables with m_. This is in fact an archaic rule borrowed from Hungarian notation which is not recommended by the .NET style guide any more, but I like it.
Don't compare booleans to True or False in conditionals, i.e.If (x = True) ThenIf (x = False) Then
should be
If (x) ThenIf (Not x) Then
Put the conditional statements in If blocks in brackets.
Use AndAlso and OrElse instead of And and Or whenever possible.
Use String.Format() instead of &'s to combine strings.
Use constants like String.Empty and Vector3d.XAxis instead of "" and New Vector3d(1,0,0)
When comparing strings, use the .Equals() method with the proper StringComparison instead of =.
It also seems like the algorithm you're using is pretty sensitive. I'm not exactly certain what your input is supposed to look like, but I think it can be made more robust.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
ting up but I’m glad the discussion has been rolling!
I understand what you mean, Abraham with property boundary rights and I’ll admit that I can potentially see some usefulness in what you are suggesting with the solar envelope. For example, I could imagine this integrated into the component as a "trimWithSiteBoundary" boolean input that a user could flip if they are only interested in seeing what is going above their property boundary. However, I have a big fear that new users might not fully understand what this operation is doing if they are first encountering my component and would therefore end up with a misleading result. In other words, I would like users to see the complete solar geometry before they trim it with the site boundary extrusion so that they are fully aware of what is going on. Also, because this trimming operation is very easy to set up with existing grasshopper components (you were able to do it yourself pretty easily in the file that you uploaded), I would rather have users employ this method rather than having something built into the component.
As for the solar fan suggestion, I think that filling in that portion of the fan would just be too misleading. I could all-too-easily see new users making the mistake of saying that a neighbor’s cantilever over the north part of their site blocks their sun, which is simply not true. Also, there is the argument that this operation (if the user really wants it) should be very easy to set up with existing grasshopper components. However, I see that in your uploaded GH file, this has not been working correctl. I have been playing around with it for the last hour and I am pretty confident that you have found a bug in Grasshopper that I will report to Guilio shortly. In the meantime, I have uploaded a new file in which you are able to get the type of solar fan that you desire. I will try to keep you posted.
As Mostapha and Saeran have suggested, I think things would be best if we press forward with having my component useful for very detailed lengthy solar fan/envelope analysis and Saeran’s component useful for quick, initial analysis. By the way, Saeran, I am really impressed with the speed of your component, especially for the solar envelope. I like the methodology you used and it’s a huge asset to the Ladybug suite.
Thanks again, Abraham, for all of the feedback and I hope that you are able to get a lot of use out of these components.
-Chris…
ecific than the thread title...
and here i have a generic application of this approach to surfaces created by a two dimentional "sketch" of kd tree from a random float, extruded z direction. i did using only grasshopper components for now.
but then i have to analyze the surface curvature because any tangent circle on the surface should have less than 5 cm diameter. so when i get a mesh i want analyze, it has like 400k faces at the moment. when i intersect this mesh with plane every 1cm or so, the mesh intersection work in no time, but then i wont get to the end of joining all the little lines into curves.
its the curves of the surface i need so that i can interpolate the points using discontinuity components, evaluate curve, tangent circle and cull the circles by diameters to see where the surface design can cause material to damage or have cosmetic defects.
i was hoping to use either galapagos or octopus to minimize the numbers of the tangent circles that exceed 5cms on the surfaces, once i have recorded a kangaroo simulation run, rather than having to run and rerun kangaroo for surfaces individually to simulate and analyze the mesh outputs.
when i design the support structure for the panels that depends on the shape of each panel, I also want to see the total material length of the support structures and its efficiency before i make any changes to the initial control brep (show in green, blue, pink and white)
for me its important to show how it is possible for the initial floats to be altered (like the swarm behavior, or some other algorithms) and have the entire process reset, analyze and record data. because the sheet material is a formable but NOT FLEXIBLE material which can take on many possible shapes, i wanted to create a definition robust enough for many iterations and for me to be able to navigate between the possibilities. …
loudy) sky it should be 50%.
For each case I get close to those numbers but not those numbers. I get around 38 for the CIE and and 48.something for the uniform sky.
Also I would expect that for each window, which has the center point above the roof or the context they would all get the maximum value, irrelevant also of their horizontal location,which is not the case (they have very slight deviations).
Radiance uses a stochastic method for lighting simulation and up to 5% tolerance in the results even for the same case is normal. Just re-run the analysis couple of times and you will see the numbers will slightly change. You will get 49.something in couple of tries.
Also I noticed that I have to reconnect the ptsFileAddress input each time I change the testSurface objects, but probably this is an expected behavior.
In case you are using searchAnnual component to read the results, connect done output to refresh input so the results will be updated automatically.
are you considering of adding a Radiance Folder Output to the runDaylightAnalysis so we don't repeat with text Concatenation the folder location manually?
It is already there. gridBasedResultFiles outputs the file address. Sorry if the example file was confusing. In that example I wanted to make it clear that you can reproduce all the results from the study folder. I intentionally made the result visualization harder than what it can be to make sure users will educate themselves about the outputs but not as hard as what you have been doing. Sorry! :)
Check the attached file for a revised version of your file.
…