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
ems in the same way. Lofting was particularly difficult, you had to have a separate loft component for every lofted surface that you wanted to generate because the component would/could only see one large list of inputs. Then came along the data structures in GH v0.6 which allowed for the segregation of multiple input sets.
If you go to Section 8: The Garden of Forking Paths of the Grasshopper Primer 2nd Edition you will find the image above describing the storing of data.
Here you will notice a similarity between the path {0;0;0;0}(N=6) and the pathmapper Mask {A;B;C;D}(i). A is a placeholder for all of the first Branch structures (in this case just 0). B is a place holder for all the second branch structures possibly either 0, 1 or 2 in this case. And so forth.
(i) is a place holder for the index of N. If you think of it like a for loop the i plays the same role. For the example {A;B;C;D}(i) --> {i\3}
{0;0;0;0}(0) --> {0\3} = {0}
{0;0;0;0}(1) --> {1\3} = {0}
{0;0;0;0}(2) --> {2\3} = {0}
{0;0;0;0}(3) --> {3\3} = {1}
{0;0;0;0}(4) --> {4\3} = {1}
{0;0;0;0}(5) --> {5\3} = {1}
{0;0;0;1}(0) --> {0\3} = {0}
{0;0;0;1}(1) --> {1\3} = {0}
{0;0;0;1}(2) --> {2\3} = {0}
{0;0;0;1}(3) --> {3\3} = {1}
{0;0;0;1}(4) --> {4\3} = {1}
{0;0;0;1}(5) --> {5\3} = {1}
{0;0;0;1}(6) --> {6\3} = {2}
{0;0;0;1}(7) --> {7\3} = {2}
{0;0;0;1}(8) --> {8\3} = {2}
...
{0;2;1;1}(8) --> {8\3} = {2}
I'm not entirely sure why you want to do this particular exercise but it goes some way towards describing the process.
The reason for the tidy up: every time the data stream passes through a component that influences the path structure it adds a branch. This can get very unwieldy if you let it go to far. some times I've ended up with structures like {0;0;1;0;0;0;3;0;0;0;14}(N=1) and by remapping the structure to {A;B;C} you get {0;0;1}(N=15) and is much neater to deal with.
If you ever need to see what the structure is there is a component called Param Viewer on the first Tab Param>Special Icon is a tree. It has two modes text and visual double click to switch between the two.
Have a look at this example of three scenarios in three situations to see how the data structure changes depending on what components are doing.
…
rner
___________{0;5} <--- This or
0 0.0 <--- This
1 1.0
2 2.0
3 3.0
...
15 15.0
If it is the latter then you can simply add 0.5 to every number using the addition component
EDIT: An alternative would be to start your series at 0.5 instead of 0
S input of [Series] = 0.5…
t uploaded.
My rhino version is: 5 SR11 64-bit(5.11.50226.17195, 2/26/2015) Even the simplified building mass (3 floors building with 15 rectangular simple breps) doesn't work either.Should i upgrade Rhino or grasshopper?
…
sed to calculate a direction of a plane containing the 3 points. After that next points are tested if they have quite the same direction as the first plane. There is a recursion if it works. Recursion end
if limit in size is obtained (no polygon with more than xx points)
if angle is too big
if the next point is the same as the beginning of polygon.
The problem now is that it generates many polygons on the same place. It could (must) be filtered.
Here an example with 3 twisted hexagon (5°, 10° and 15°). Depending on angle threshold there is not the same number of same hexagon on each one.
…
ase make your reservation early.
Yasar University Academic Staff: 50 TL
Yasar University Part-time Staff: 50 TL
Yasar University Students: 75 TL
Other University Students: 150 TL
Other University M.Sc. and PhD Students: 200 TL
Other Participants: 300 TL
For further information and registration: berk.ekici@yasar.edu.tr…
n. They result in a bad mesh, but by re-sorting the input lines i get varying results of bad mesh. (no changes to exo inputs).
Original = 62 non-manifold, 8 naked edges....
Sort lines by Z = 56 non manifold, 15 naked edges
Sort lines by X = 1 manifold edge, 0 naked edges
Sort lines by Y = 54 non manifold, 19 naked edges
From your point of view, knowing how Exo actually goes about constructing the mesh, do you think there could perhaps be a certain technique for sorting the lines that would aid creating cleaner meshes. Or is it totally dependent on each mesh in question? Or would i just drive myself crazy trying to find logic where there isn't any?
Thanks…
use "Solid Intersection" it only returns 15 intersections, eventhough many of the brep sets are identical, and it is pretty clear visually that they share some volume.
I'm pretty clueless to why.
Anyone who can spread some light on this will save my day! :)
23 Initial brep sets:
Only 15 intersections found:
…