algorithmic modeling for Rhino
Hi there,
I'm creating a honeycomb infill which will be used to generate some G-code for my Ultimaker 2 using Silkworm. Each poly-lines is interpreted as a single printing movement with a lift motion in between each of them.
Therefore I need the least amount of Poly-lines from my 375 lines. I've tried joining them which results in 159 poly-lines and the Pline component doesn't take my boundary into consideration.
Could someone point me in the right direction?
Thanks in advance!
Charles
HoneyComb:
Join Component:
PLine:
Tags:
Rather easy with ... well ... you guess what, he he (but also with the "other" way).
Post some data.
BTW: are you shifting focus towards some more WOW furniture?
Here's the simple shape with the hexagon infill.
Ahah, fine, if you can clarify the logic and I'll give it a go in C# :)
Unfortunately not, I'm trying to get the best strength to weight ratio by playing with various patterns and material distribution informed by an FEA.
5 challenges for the (very) brave are included (you can seriously speed up the processing time ... but only if you address the challenge 4, he he) :
Go for it: Be the winner and get the usual prize (Finest sardines known to man in pure mineral oil - what else?).
Challenge 6: make this via native components (but there's no sardines for that, sorry)
Moral: Dulce pomum quum abest custos.
Am I missing something, the script is giving me the following errors?
"1. Before Solution exception:Cannot execute a program. The command being executed was "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe" /noconfig /fullpaths @"C:\Users\Charles\AppData\Local\Temp\ks0njn50.cmdline"."
"2. Solution exception:Cannot execute a program. The command being executed was "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe" /noconfig /fullpaths @"C:\Users\Charles\AppData\Local\Temp\4sj2wsv3.cmdline"."
"3. After Solution exception:Cannot execute a program. The command being executed was "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe" /noconfig /fullpaths @"C:\Users\Charles\AppData\Local\Temp\fdh5bhf3.cmdline"."
Ignore the above, re-opened the file and it now runs.
However the containedCurvesList outputs one Poly-line per cells?
Er... what do you mean? You want the concave hull of all these?
I.e. a polyline that "engulfs" all the hexagons?
If yes by all you mean -obviously -the "intact" [not chopped] ones?.
I'm trying to join to all 375 lines which constitute my hexagonal pattern within the boundary into as few poly-lines as possible. This, regardless of the order in which it happens.
Er ... kinda like the traveling salesman problem?
Or maybe you want an engulfing polyline and then polylines that contain all the rest ("contained") points? (say in horizontal top-to-bottom enumeration).
Or you want to omit the engulfing one?
For instance and after having a unique pts collection (HashSet etc etc) you could start doing something from queries the likes:
pts = pts.OrderBy(x => x.Y).ThenBy(x =>x.X).ToList();
If by accessing the points the next "gap" (in Y) is greater than the current average ... this means: start sampling pts in a new Polyline (and start counting a new average) etc etc.
Anyway, make a sketch with regard the desired thingy.
Well ... Indeed that I had in mind
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson.
Powered by