ng (It's a bit similar to the Knapsack problem):
I have a Variable --> XandI Have fix numbers (can we call "pieces") 9,12,15,18
I'd like to reach the X, with the summing of these numbers and using the minimum pieces ,it can't be lower than X, but it can be higher, maximum with 3.After this it has to found the most optimal combination which mostly use the same pieces
E.G.
X=98
The wrong solution is like = 1pcs of 18 = 9pcs of 9
Sum of pieces are 10
OR
= 3pcs of 18 = 1pcs of 15 = 1pcs of 12 = 2pcs of 9
Sum of pieces are 7
The right solution in this case = 5pcs of 18 = 1pcs of 9
(5*18)+(1*9)=99 it's good beacuse it's over with maximum 3 and uses the minimum pieces
Then it sends to a list like18 : 5pcs15 : 0pcs12 : 0pcs9 : 1pcsCan somebody help me ? Or is it possible to make this ?
Thank you…
Added by Petrik Kollár at 1:09am on November 10, 2017
llowing for higher skyline and construction areas along public transportation corridors. Up until now, neighborhoods once characterized by two-story houses, gardens and ground- floor open shopfront programs, have been completely transformed by the introduction of fortressed monolithic residential and office towers, which lack any sort of urban street life.
The new master-plan, however, now requires buildings to have an open street façade to accommodate multiple programs. Led by tutors from UNStudio (www.unstudio.com), the AA Visiting School São Paulo will address the changes being prescribed by the new masterplan through the redefinition of the tower typology in the extending of the ground of street culture, green landscapes and ecological mediation along the vertical axis of these buildings. For this, the workshop will teach advanced digital design and fabrication techniques to explore a series of novel differentiating structural and environmental organizations in the redefinition of the São Paulo skyscraper.
For more information:
saopaulo.aaschool.ac.uk
Applications:
https://www.aaschool.ac.uk/STUDY/ONLINEAPPLICATION/visitingApplication.php?schoolID=303
For any queries, please email: brazilvisitingschool@aaschool.ac.uk.…
llowing for higher skyline and construction areas along public transportation corridors. Up until now, neighborhoods once characterized by two-story houses, gardens and ground- floor open shopfront programs, have been completely transformed by the introduction of fortressed monolithic residential and office towers, which lack any sort of urban street life.
The new master-plan, however, now requires buildings to have an open street façade to accommodate multiple programs. Led by tutors from UNStudio (www.unstudio.com), the AA Visiting School São Paulo will address the changes being prescribed by the new masterplan through the redefinition of the tower typology in the extending of the ground of street culture, green landscapes and ecological mediation along the vertical axis of these buildings. For this, the workshop will teach advanced digital design and fabrication techniques to explore a series of novel differentiating structural and environmental organizations in the redefinition of the São Paulo skyscraper.
For more information:
saopaulo.aaschool.ac.uk
Applications:
https://www.aaschool.ac.uk/STUDY/ONLINEAPPLICATION/visitingApplication.php?schoolID=303
For any queries, please email: brazilvisitingschool@aaschool.ac.uk.…
fear that it would be too hard, but I was pleasantly surprised. Not that bad, even for a C# novice. I am attaching the *.cs files for three components:
SerialCreate component creates the serial port instance. This component controls port parameters and opens/closes the port. (It won't close the port, however.) SerialWrite and Read try to interact with the port created by SerialCreate. I can verify that the port opens because it's unavailable to other terminal applications, but if I try to close the port, it won't...it stays open until I restart Rhino. SerialWrite works, because I can see the rx light on my device light up when I enter text in grasshopper. SerialRead does not work. I blue screen with a DPC WATCHDOG VIOLATION.
All in all, not too bad for a day's work. I'll forget the user objects and go for custom components. The question that still remains is that I don't think I'm correctly or efficiently sharing the serial port instance with the other classes. Again, this is just a hack, but I'm happy I'm closer to solving the problem (or so it seems). If anyone has any ideas about how to better go about this, I'd appreciate any suggestions.
Thanks again,
~BB~…
a value.
In this case it will be between position 86 and 87 where the x value of a point jumps from 2.32... to -6.04... (see inside red rectangle @ attached image).
Idea so far is:
1) Decompose the list into x,y,z
2) get just the x values in one list
3) compare all values in a kind loop.
4) if value difference is more that let's say 1.0 - get the index
5) split list at that index.
My question: How to do that without looping?
I would be very thankful is someone could give me a hint.
Best, Boris.
…
Added by Boris Baehre at 5:33am on January 28, 2016
t BBox will then be mapped relative to the UVW space of that box to the new target boxes.
Where your definition is slipping up is the data matching aspect of GH. You have two lists (that count). One list contains 100 items of target boxes and the other contains 2 items of geometry. GH defaults to the Longest List data matching
List A --> List B
Target Box A0 --> Cuboid
Target Box A1 --> Cylinder
Target Box A2 --> (Oops List B has run out of items. Now GH will repeat the last item = Cylinder)
Target Box A3 --> Cylinder
.....
Target Box J9 --> Cylinder
Solution
There are two approaches to rectify this the most logical would be to group the geometries into one object (What you had in mind with the bounding box) to do this use the Group Component on the Transform Tab > Utility Panel.
The other approach is far more common in GH mentality. Use the Graft, right click the G input of Morph and select Graft from the Context Menu. This places all of the items in the List on to separate branches. Creating a list of lists (although these new list only have one item). When GH now tries to data match them it will apply the whole of the first geometry list (Only the Cuboid) to all of the target boxes and all of the second list (Cylinder) to the target boxes again.
I hope this helps…
rves/holes. However, the Kangaroo script itself is prone to locking up so it seems like it might take forever. You can even double click stop the timer from the Windows task bar, I hadn't noticed that before:
You have to use that or right click disable the timer since even with the Reset toggle button input set to True the timer itself locks up the script a bit when you are changing things around.
Just setting the min/max numbers both to a desired mesh size gives a uniform mesh:
Oh weird, it's about if the timer is right click set to so small an interval that it gets ahead of Kangaroo! When you see how long each cycle is taking with the Display > Canvas Widgets > Profiler you just set the timer for above that and the interface comes back into being responsive. It only takes a few Kangaroo cycles to do the inflation, so a full second timer interval is even workable.
A finer mesh:
It's funny running it so slow since it overinflates at first, bulging out, before it equilibrates.
You have control over inflation pressure and mesh stiffness, for a variety of effects.
This is a good system once I realized the timer needed to be mellowed out.
What made it work was the fast custom meshing since a normal mesh is awful and MeshMachine wouldn't work with sharp corner holes at all, breaking out of the boundary even if I fixed curves or vertices or did the equivalent with NURBS surfaces instead of a starting mesh.
There is an initiation time for Kangaroo that doesn't show up on its Profiler time that happens even with the timer off.
There are some fine areas that can't inflate with a reasonable mesh setting:
Worth playing with but no match for ArtCAM since it suffers odd delays in between working fast. If I could get better 2D meshes, that were more adaptive it would be better, but MeshMachine is one of the only re-meshers I know and it's broken for even mildly sharp hole features.
Ah, how about a crude mesh that is then subdivided, guaranteeing inner vertices everywhere? Sort of works, but is still too dense. Way too dense to even do anything. The subdivision triangulates the quads, vastly increasing the mesh wire density. Better just to make a finer initial mesh with plenty of quads.…
Added by Nik Willmore at 12:57am on February 21, 2016