I had a look at the code on Github and it looks like there is code to deal with ngons, but I haven't been able to get it to work in a C# custom goal.
I used this workflow:
1) Select a K2 constraint and setup a simple demo patch in GH2) Create a C# component3) Go to Github and copy paste the source code containing the entire 'public class NameOfConstraint' inside the curly brackets4) Copy paste the code into the C# component into the section titled // <Custom additional code>5) Right-click on the C# component and select 'Manage Assemblies...'6) In the dialog add the Kangaroo.solver from you GH libs7) Recreate the C# component inputs based on the original K2 constraint paying attention to Access and Type hints8) Add a line of code into the C# component in the main 'private void' section creating a new instance of the main Class with the component input variables. A = new FunctionName(x, y);9) Replace any occurrencies of Particles with KangarooSolver.Particle…
ntext was not being meshed correctly and it has since been fixed. You can get the new component by syncing with the github or by using the component that is in the attached GH definition.
Also, I should note that a key new feature that has been added in this overhaul is the ability to run a much faster calculation using a method that was developed by the awesome comfort scientists over at the center for the built environment (http://escholarship.org/uc/item/89m1h2dg). The new method gets you results that are very close to that of the full mannequin mesh but in about 1/50th of the time by extrapolating the mannequin geometry down to a set of 9 points and using some coefficients to compensate for the geometry of the human body.
Lasty, I put in options of 3 simplified mannequin meshes for the 3 different body positions (standing, sitting, and lying down). This should allow you to run a faster version of the older method if you so desire. They can be accessed by plugging integers 3,4 or 5 into the BodyPosture input.
Ultimately, the new fast methods are going to allow us to factor in direct solar radiation in the indoor temperature maps that I have been working on:
https://www.youtube.com/watch?v=__cRBh2DGMA&list=UUc6HWbF4UtdKdjbZ2tvwiCQ
I will post a new tutorial video on the updated solar MRT adjustor and the indoor temperature maps once I finish developing the full workflow to make indoor comfort maps.…
Loop'. The fun part of the slower version is that you can see what it's doing while it's running. 'Fast Loop' gives no indication that it's working, so you want to test it with small numbers and be sure it's coded properly before bumping the iteration count up.
The GH profiler running the slow version showed between 1 and 1.5 seconds per loop, but the reality was more like ~10 seconds per loop toward the end of an 11 X 11 grid, or ~20 minutes total. It's easier to be patient because you know it's working.
The 'Fast Loop' finished the same grid in 1.6 minutes! An impressive improvement. I've been running it on a 30 X 30 grid (900 points) for ~23 minutes so far and see nothing yet. Not the ~12 minutes I had hoped for... Now 36 minutes on this loop for 900 points... hope it's not stuck. Not fast! Later - DONE!! Profiler says 59 minutes for 900 points but it was more like an hour and twenty minutes total. It succeeded, I have a single 'Closed Brep' from 900 extruded rings, baked to Rhino.
Another strategy to explore would be doing 'SUnion' on a smaller grid using the Anemone loop, then replicate it by moving it as needed to form a larger grid; then run the copies through another 'SUnion' loop. I went ahead and implemented that while waiting. It works and is fast! Started with 3 X 3 and ran the result again as 5 X 5 (9 X 25 = 225 total) in barely ~70 seconds!? Trying 36 X 36 now... 1,296 points appears to have succeeded in less than ten minutes! Though it seems to take quite awhile after the loop ends before control is restored to GH/Rhino. I'll let you do your own experiments and benchmarks.
I encapsulated the loop in a cluster called 'suLoop' (blue groups).
Internal of 'suLoop' cluster:
…
Added by Joseph Oster at 11:14pm on March 22, 2017
(because 3 pins have been dedicated to inputs). So, if you want to control more than this, then you might need to bump up to the Mega. The important thing about controlling lots of servos is your power consumption. You need to provide enough power to support all of your servos. You need to find out how much current each of your servos draw and then multiply that by the number of servos you're going to use. Then you need a power supply that can handle that (typically 5V and however much current you calculated). The other thing to remember is to make sure you connect the ground of your external power supply to the ground on your arduino (all of your grounds need to be connected together). Other than that, it should be pretty straightforward.
Cheers,
Andy…
mum wall thickness of >1.0mm but I'm not sure about aluminium sintering. We have an Objet 3d printer at work that jets plastic media and we try to keep above 1mm wall thickness on that. It will print much thinner but it gets very hard to remove the support material without damaging the part.
You could create a tag attached by a thin section that protrudes from a discreet position on the inside of a corner piece? This could easily be removed during assembly.
Chris: looks like another good project! I'm currently trying to design moulds for all my corner pieces since there are 6 different corner pieces on my geodesic dome, 3 of which are split in half for ease of assembly, making 9 moulds! 3D printing was a bit out of my budget!…
Added by martyn hogg at 1:07pm on January 14, 2015
file. A TSpline made thing in fact.
2. This atroci ... er ... hmm ... I mean unspeakable beauty uses an exo-skeletal load bearing structure hence is THAT big (BTW: Apparently nobody knows what thermal bridge is nor thermal expansion nor vapor condensation ... but these are "minor" details these holly blob days, he he).
3. 2 means that some nodes of that "grid" MUST "meet" floors in order to support them and (hopefully) withstand some seismic forces. BTW: A Richter scale 9 (for an hour) is all what this building actually needs (that's acid "humor").
4. The "smarter" way to do this is to spread "some" (i.e a lot) random points (Note: David's algo yields "evenly-spaced-points" within the limits of the possible) on the guide blob (a polysurface in fact).
5. Then ... you need some algo that tests proximity AND "adjusts" the Z in order to have some node points "co-planar" (Z) with the floors.
6. Then you triangulate all that stuff (the points, that is) using some decent Ball Pivot Algorithm (NOT Delauney) and you get a triangulated mesh that "engulfs" the guide blob. If you want some quads (as shown) this is also possible.
7. So you have edges ... i.e poly lines (per mesh face) and if you offset them ... you have "drilling" profiles that you must use against a second guide "thickened" blob for creating a continuously smooth exo-skeletal LBS (as shown). Of course Rhino (being a surface modeller) could require years to do this solid difference opp (or an eternity).
8. Rounding the "lips" of that LBS Brep is out of question with Rhino or GH (but it can been done very easily using other apps). Then you must "split" the Brep (in modules? in nodes + "rodes"? you tell me) in order to make it in real-life (what about forgetting all that?, he he).
9. Then, there's the glazing thingy that is made via quads meaning planarity. This is achievable with Kangaroo2 but is a bit tricky.
Moral: WHAT a gigantic pile of worms is this thread of yours...
more soon.
…
imes. Your loop should go to y.Count - 1. Or, you could use a For...Each loop, circumventing the problem altogether:
Dim shortLines As New List(Of Line)
For Each segment As Line in y
If (segment.Length < x) Then
shortLines.Add(segment)
End If
Next
A = shortLines
--------------------------------
Another problem is this line of code:
New_Lines.Add(New_Line)
It is located inside the loop but outside the If statement, meaning it gets run every single iteration. This fills up the short line list with duplicates.
-------------------------------
Here's something else which is redundant:
Dim Input_Line As New Line
Apart from the fact that you don't need a special variable for this at all, you also don't need to add a New keyword. The type Line in RhinoCommon (just like Point3d, Vector3d, Plane, BoundingBox etc. etc.) are Structures, not Classes. Structures always exist when they are defined, whereas Classes can be null ("Nothing" in VB).
-------------------------------
Some more advice:
Dim i As Integer
For i = 0 To y.Count()
You can merge these two lines into one. VB.NET allows you to declare your iteration variable inside the loop:
For i As Integer = 0 To y.Count - 1
--------------------------------
If you don't like the For...Each approach at the top of this answer, here's how to write this using a For...To loop:
Dim shortLines As New List(Of Line)
For i As Integer = 0 To y.Count - 1
If (y(i).Length < x) Then
shortLines.Add(y(i))
End If
Next
A = shortLines
ps. A personal preference of mine is that I always encase the expressions inside If...Then statements in brackets. You technically don't need to do this, but I find it makes the code more readable.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
imilar topic with a Windows 10 user, which successfully fixed this issue.If you are tiny little patient, I think we can try the same steps in your Windows 7 case.For start, try these three steps:1) Close Rhino. Restart your PC. 2) Once the PC boots up, double click on the "regMapWinGIS.cmd" file in "MapWinGIS" installation folder.3) When it closes the Command Prompt window it opened, try running Rhino, Grasshopper and drop the "Gismo Gismo" component on the canvas (Grasshopper working area).If this does not help (you get the same COM class factory CLSID error message coming out from the "Gismo Gismo" component), then try the following steps, one by one:
1) Close Grasshopper and Rhino2) Run the Revo Uninstaller Pro and uninstall your MapWinGIS application along with removing all the leftovers from the registry. You can download 30 days trial version of it from here. Here is a youtube example of a bit older Revo Uninstaller. But the important part is that is shows how registry leftovers are removed.3) Restart your PC, and once it boots again, make sure that you are logged in as an Adminstrator!4) In your Start menu's search box type: "UAC", which will find your User Account Control Settings. Click on it, and a new window will open. Set the bar on the left to "Never notify".5) Turn off your Antivirus, which ever it is.6) Download the 64 bit version of v4.9.4.2 MapWinGIS.7) Right click on downloaded MapWinGIS-only-v4.9.4.2-x64.exe file, and choose "Properties". If there is "Unblock" button click on it, and then click on "OK". If there is no "Unblock" button, just click on "OK".8) Left double click on MapWinGIS-only-v4.9.4.2-x64.exe file and install it to "C:\dev\MapWinGIS" folder. Choose "Full installation" during installation process!9) In your Start menu's search box type: "CMD". Once the "Command prompt" appears do not left click on it! Instead right click on it, and choose "Run as Administrator".10) A command prompt window will open. Type the following command:
"your_regsvr32_folder_path\regsvr32.exe" /u /s c:\dev\mapwingis\mapwingis.ocx
If command does not result in an error message, then type this one afterwards:
"your_regsvr32_folder_path\regsvr32.exe" /s c:\dev\mapwingis\mapwingis.ocx
11) If no error appeared again, then open your Rhino and Grasshopper and check what "Gismo Gismo" component prints from its "readMe!" output.If errors appeared, please post their screenshots. Thank you in advance.
Please accept my apologies for the large number of steps. Some of them are quite simple actually (click on this, download that...).…
Added by djordje to Gismo at 12:58pm on November 28, 2017
ld work.
For example there's a grid shell and I've got a number of control points (for example 3) that can move up and down.
Depending on the control points I get forms that are structurally good and some that are bad.
In my office we've got a GH-Component, which leads the geometry in structural members and solves the structural forces and so on through an external Software called Sofistik and afterwards gives back to GH some Values, for example maximum bending moments. (Like Karamba)
Now I want to create this optimization component or something like that to minimize e.g. the bending moments in the given geometry.
Let's start with the work of the component.
So when I've three control points that can only move in z-direction.
P1(0,0,Z1), P2(10,0,Z2), P3(5,5,Z3)
They only depend on Z, so everything depends on Z1 to Z3 which have a range between 0 and 10 f.e.
First I want to get some (between 9 and 15) random Particles, one particle consists of this 3 different Z's.
So for example the first particle Part1 is [Z1=10, Z2=5, Z3=7]
and the second particle Part2 is [Z1=7, Z2=1, Z3=9]
and so on.
I created these Start Particles in a Cluster. See attached file.
I also tried this in C#, but thought it is easier in GH.
After I've got the Start Particles I want to give out the first particle and evaluate with its including Z's the target value in GH. Therefore I had to take the first branch and graft this branch (Discussion before)
Afterwards I want to save this Target Value that depends on the first starting Particle. Then I want to give out the second starting Particle to evaluate its target Value and store it. And so on till the last target Value of the last Starting Particle got assigned.
Then I want to assign the particles with its target values. E.g. part1: t=0.9, part2: t=1.8...
Then I want to define neighborhoods or the count of the expected local minima.
These neighborhoods can look like: Each neighborhood has to include not less than 3 particles. And the particles have to be next to each other.
E.g. if there are 12 particles and I want to have a look for 3 local minima, I need 3 or 4 neighborhoods. Then I would take 3 neighborhoods, because the more particles in one neighborhood, the better.
So the Count of the neighborhoods would be N=min{(Count of Part/3)& N_min}
How to define these neighborhoods I don't know at the moment. I think it has to be searched for the distance between the particles. E.g. part1 with (9,9,9) and part2 with (9,9,8) are next to each other but part 3 with(1,1,2) is far away.
Then each StartParticle is set to Partx_localbest.
And in each Neighbourhood the best of these localbeststs is Part_NyBest. (The best ist the one with the smallest target Value)
Loop:
Now I want to create new Particles. These Particles don't change their Z-values randomly. They change their Z-Values depending on Part_NxBest and Part_localBest. Therefore it has to be evaluated a new velocityfactor with v_Partx_new=0,792*v_PartxOld+1,5*random(0,1)*(partx_localbest-partx)+1,5*random(0,1)*(part_NyBest-partx)
The new particles will then be partx_new=partx+v_Partx_new.
The new Particle partx_new will be set to partx and then set in the output.
then there has to be caught the targetValue of part1 afterwards part2 can be put out and its target value caught and so on.
Then it has to be looked for the Partx_localbest through comparing the partx_localbest and its target value with the new part_x and its target value. If the target value of the new partx is smaller than partx_localbest,
then partx_localbest is the new partx.
This has to be done for each partx. Afterwards the same for neighborhoods best (best of all partx_localbest in one neighborhood)
Endloop if velocity gets small.
Output all part_NxBest
Output all targetvalues of the part_NxBests.
So in the Input there have to be:
StartParticles if they are given through the cluster attached.
Device on the target Value like in the attached gh.file from David Rutten I found in the discussions
Count of neighborhoods
And in the output
Output particle for evaluation
Output all part_NxBest
Output all targetvalues of the part_NxBests
Hope didn’t forget anything. And hope it isn’t crushed to badly. Sorry for my bad English by the way ;-)
For more explanation, how the PSO works in other programs. There’s attached a workflow script (is it called like that?) I think for GH it should be a little bit changed like I tried in my explanations.
So if you can help me a in some parts or you have any advices would be great, otherwise thank you nevertheless!!!!
Thankfully there’s no limit for the words in the discussions :-D
Best, Heiko
…
nderstand each other quite well.
I will pick one piece of the PVsurface at the bottom row:
So the label "1" represents the PVsurface for which the shading diagram will be created.
Label "2" is the back facade (made of glass or opaque elements, does not matter).Label "3" represents the row of PVsurfaces above.
Now take a look at how the shading diagram would look like for the mentioned PVsurface. I made some of its parts a bit incorrect on purpose, so that I could clearly the differences a bit easier:
Label "1" would be first type of self-shading. It's the shading which prevents the PVsurface to "see" anything behind its back.Label "2" would be shading from the facade wall to which the PV surfaces are attached to. I deliberately colored it blue, to distinguish it from other two types of the shading. Otherwise it would look black.Label "3" is the second type of self-shading: the shading from the above row of PV surfaces.In literature, you won't find the terms: first and second type of self-shading. I invented them.To my knowledge, when self-shading is mention, this will probably be related with label "3" (second type of self-shading). It's the shading from the adjacent rows of PV modules in front, or like in this case above.So when I said:
You do not have to supply the surfaces additionally to the context_ input. The component will "under the hood" add them to the context_ input to account for self shading. Last year this hasn't been the case, but after the suggestion by Chris Mackey, I changed this feature.
This was related to the first type of self shading (label "1").
And when I said:
However, as we are using the PV SWH System size component, there will be no self-shading. The PV SWH System size component positions the PV rows in such a way, that no self shading will appear for the given minimalSpacingPeriod_ criteria.
This was related to the second type of self shading (label "3").
I should also mention that I made the upper photo a bit incorrect. If you would do the shading analysis, the label "3" would be almost non-existent. Here is how the shading diagram would actually look like:
As mentioned this is because PV SWH System size component will position each PVsurface row in such a way, so that there would be no second type of self shading for the chosen minimalSpacingPeriod_ criteria. In our case, as the minimalSpacingPeriod_ criteria we chose the summer solstice in the Northern Hemisphere from 10 to 14 hours. We should have taken from 9 to 15, but we took from 10 to 14 to as on option of lowering the distance between the PV rows.This means that there will be no second type self-shading all year round from 10 to 14 hours.
Let me know if all of this helps in any way.…