t in a number of curves, offset them and then make a union of those. This should give me the curve on which the center of the next particle that collides with the cluster lays.
[See attached picture]
Here's my problem. At first I got an awfull lot of error messages due to my inexperience with coding in VB and/or GH. After alle those were taken care of I have two scripts that do the job. I want to be able to do it in one script but I can't get the array of curves into the Curve.CreateBooleanUnion(x). If I set thoses curves as output and as input [hint: curves] in the next VB script, then Curve.CreateBooleanUnion(x) does work.
I guess I'm doing something terribly wrong in stating my variables, but I have no clue how to solve this.
Thanks for taking the time to look at my problem.
Reinier
Script 'offset'
Private Sub RunScript(ByVal x As Curve, ByRef A As Object) Dim z As array z = x.Offset(plane.WorldXY, 0.5, 1, 2) A = z(0)End Sub
Script 'union'
Private Sub RunScript(ByVal x As List(Of Curve), ByRef A As Object)A = Curve.CreateBooleanUnion(x)End Sub…
instance points). Since this list needs to be accessible for all my components it needs to be stored in some class that is accessible for all components. This class should provide for the components to check values or to append/ assign them from within their SolveInstance domain.
Apart from storing their coordinates I would like to keep track of their 'numbers'. These numbers should be assigned automatically and the way this is done can be expressed in the following pseudo code:
input = somearrayofpoints
for each point in input:
check = checkifcoordinatesexist(point) (true is yes, false is no)
if check == True:
nr= getLastNr() (returns last item from some record database)
store as string (nr + point)
else:
nr = getNrAt(point.coords) (returns the node number at given coordinates in record database)
store as string (nr + point)
How would I go about setting some structure like this up?
I have tried a following simpler set up using a Singleton class where I have a public class that basically returns the value of a number. Then I have a Grasshopper component that just counts the amount of points it gets and add it to the recorded amount of points like:
int counter = points.Count;
SingletonClass singleton = SingletonClass.getInstance(); singleton.getValue += counter;
No multiple of these components 'add' their counts together but with every run they keep increasing. So I need to in this set up I need to clear the data for every run.
So two questions:
1. is this a good start to achieve the above mentioned result, if not any suggestions? references?
2. if so, ho do I deal with the Grasshopper runtime and clear the data send to the Singleton class? Can I use event handlers for solver events for this?
Any suggestion would be greatly appreciated!
(I have attached the singletonclass.cs class and the counter.cs component for reference)
…
ystem to support it from the back.
ELEVATIONPLAN
What I need to do is create a mesh network that is composed of straight segmented pieces. To start, I contoured the surface at 500mm segments in the X and Y axis, getting a mesh grid [below]
Then, I wrote a simple grasshopper script to segment the contour lines, but when I run it, the segments in the X direction and the Y direction do not intersect like I need them to.
I understand why this happened and I understand what I need to do (in concept) but I can't seem to figure out how to implement it.
I'm pretty sure that I need to take the original contours and find the intersecting points and include it in my set of points from DivLength command. My problem is that in the list, the numbers get all jostled up and when I Pline the list of points, it goes a bit crazy. My questions are:
1. Is this the best method of going about this process of creating the segmented mesh?
2. How do I reassemble the list of the two point groups I added?
Thanks in advance!
Best,
Issac
…
thing about how to use Grasshopper to break up the unit modules as parameterization. Is there any Grasshopper Master could help me? The result i want is looks cool and easy to build.
Reference:
https://vimeo.com/98518748 Video link
http://www.designboom.com/architecture/robotically-fabricated-landesgartenschau-exhibition-hall-06-25-2014/
The question:
1,In the video,How to process parametric form?(kangaroo?)
2,After make all the things on the round surface, how to change the Tangency circle into flat polygon?
3, at last ,how to link every unit module?
…
for metadata on the Grasshopper installation but can't seem to find a reliable way to do this.
Issue #1 - Checking for an installation of Grasshopper
a) I can check to see if Grasshopper has been installed by searching the Windows registry, but it's not reliable. It seems that Grasshopper no longer has an individual uninstall package (can't find in Add/Remove...), and rather is uninstalled if you uninstall Rhino. However, the registry keys for Grasshopper do not appear to be cleaned on a Rhino uninstall, so my installer can get spoofed into thinking that there is a Grasshopper installed when it's not.
b) It appears that not every Grasshopper install creates a registry entry in HKEY_LOCAL_MACHINE. On my machine, for instance, I can search for the Grasshopper key and return the directory of the .rhp file, and then verify that the file does in fact exist. On other machines, however, I have found that there is no key in the HKEY_LOCAL_MACHINE, and the registry entry in HKEY_CURRENT_USER does not include the path to the .rhp file, so I can't verify whether it does in fact exist or if the registry is out of date.
c) I could brute-force search for the .rhp file, but I haven't found the most reliable parent director(ies) to search in order to be exhaustive and accurate.
Issue #2 -- Checking the Grasshopper Version
I would like to be able to trigger an update programmatically to a network installer (firm-sanctioned GH version) if the existing version is older than specified.
In some cases, if I can find the rhp through the HKEY_LOCAL_MACHINE key, I could theoretically parse the file path, which appears to contain the text representing the version. This seems hacky, though, and I have to learn Gentee programming language to do it (trying to avoid that). Also, as I said before, I am not guaranteed to have this path location if I am only able to find the HKEY_CURRENT_USER key. Perhaps if I could reliably find the .rhp through a brute force file search, this would be my best option.
Just thought I would put this out there to see if you have any thoughts (David?). :) If I don't hear anything from the community, I'm going to try to do the brute force search and parsing method...
Thanks,
Marc
…
faces (maked in RED, GREEB and BLUE) are shared by two zones. The small zones (in GRAY) attached to the big hall are not taken into consideration in the research.
In this case, inclined surfaces are included, as the simplification of the grandstand for spectators.
As the image shows, I have some questions:
1 - What should be the correct “surface type” of the inclined surfaces? floor?wall? or else?
(Actually, I have tried both floors and walls, but warnings shown below were received. The weird thing is that they had been assigned as floors and walls respectively having checked by the "decomposeByType" component.
2 - Can I ignore these warnings? if not, why and how can I deal with it - how to assign inclined surfaces as proper "type"?
3 - How can I get "interiorWalls"?
Although the small zones attached to the large hall are not considered in the research, I still need to assigned the shared walls as interior Walls (and set EPBC as "Adiabatic"), right? But, having checked by the "decomposeByType" component regrading walls, all I got were "walls" instead of "interiorWalls". Then, how can I get "interiorWalls" as I want?
Btw, due to the complexity of the geometry (e.g. containing inclined surfaces), I formed the thermal zone of the sports hall surface by surface using the "createHBSrfs" component as shown in above images. Do you think if it is a proper way in my case?
Any help will be much appreciated!
Ding
…
vided with U and V into line segments (i'd prefer to use that method instead of rectangular grid). These segments in U direction would then be rotated around V lines segments with min value of 0 and max value of 90 degrees, according to attractor (i'd like it to be image sampler in the end but for now im trying with point/multiple points). These lines would then be lofted
I post the definition below
Here are my problems (i marked them in definition):
1)i managed to get U direction line in every second row, i dont know how to get the lines between the rest (i tried shifting list, but didnt manage to get the right result).
2)Harder part - id like to measure distance between attractor point and a bottom point of lines. Than i would like to transfer it to rotation this way (distances used just as example): distance 0-20 - angle of rotation 0degrees; distance 20-30 - angle of rotation 1-90 degrees. I have no idea how to transfer it into definition. I also have problems remapping numbers to 0-90 value.
3)I'd like to do that later but i'd also like to use black-white image sampler as white - 0 angle of rotation, black - 90 degrees. I never experimented with image sampler and would be grateful for some advice how transfer colors into degree values.
I politely ask you to help me (especially with first two points i mentioned). I'm not asking for a ready definition - I would like to understand where my mistakes are.
Below i post a picture of something simmilar (although im trying to rotate it by edge, not by center line)
Pardon my english, thank you for your time and help.
Enjoy your weekend.…
s in Python:
...and if I print ghc.CullDuplicates(curve_points) I see the actual names of the outputs in the Python editor:
...so I can either do:
a,b,c = ghc.CullDuplicates(curve_points)
...or:
a = ghc.CullDuplicates(curve_points)[0]
b = ghc.CullDuplicates(curve_points)[1]
c = ghc.CullDuplicates(curve_points)[2]
...or even:
a = ghc.CullDuplicates(curve_points).points
b = ghc.CullDuplicates(curve_points).indices
c = ghc.CullDuplicates(curve_points).valence
And multiple inputs are just separated by commas within the parenthesis.
But the component is defaulting to Average instead of Leave One, which doesn't give me much useful. I'm trying to remove duplicate lines quickly, of 25K lines, and this is the fastest component in Grasshopper I've found to do that, by finding the line midpoint then getting the indices output from CullDuplicates to find out which are keepers.
There's no documentation about what Average even means, and it spits out a bunch of -1s, with the resulting lines culled by index of the good numbers being rather odd compared to Leave One, which just works naturally, like a human being would want it to.
Is it possible to change the component mode from Average to Leave One from Python?
Rhinocommon seems to lack a cull duplicate lines/curves command, so I'm hoping Grasshopper components will be faster than raw interpreted (uncompiled) Python.
…
Added by Nik Willmore at 11:22am on February 11, 2016
ding devices.
In file attached you can find all the different attempts. Unfortunately I have some problems with these simulations.
1) - The first problem is related to EP Construction components: You need a newer version of ladybug to use this component.... so I can't create any new materials.
I have tried to use the update components but it doesn't run and produces this error:
Downloading the source code...Removing Old Version...Runtime error (Win32Exception): WindowsErrorTraceback: line 235, in main, "<string>" line 264, in script
2) (Red Box) I have simulated a box with a single window facing south. Both with or without shading (and different shading combinations) I obtained always the same result. I used the window shade generator component and seems It is working well.
What is the problem?
3) In the box 3, I have only changed the approach to define the thermal zone. The E+ component gives me this error: Solution exception: 'hb_EPFenSurface' object has no attribute 'blindsMaterial'. I don't know what is the problem.
At the end, I tried to simulate a complex geometry shading device. As you suggest, in other post, I used HBContext component but during the E+ simulation compares this error message: 'None Type' object is unsubcriptable. Maybe the geometry is too complex or something goes wrong with the mesh?
Thank you for your availability and help. And sorry for too many questions.
Bye
Andrea…
ake this example. However, I still have minor bugs.
Whenever I save and reopen the file, I could not unclick the drop down menu to fold the additional input. See pictures below.
1. When I open the gh file.
2. The input is not folded.
3. When I click again, additional input is now duplicated with itself.
Does anyone know how to fix this situation? Any comment will be appreciated.
I attach the C# file below. Thanks! …