I’m slowly getting better with grasshopper, but often still get stuck. This time I’m working on a vector file I received. Its an “artwork” where the lines are spaced 10mm from each other. I’m using these lines to divide the image curves in “over the line” and “under the line”, and then merging them creating a line that’s made of the straight lines and the upper/lower picture lines. in pictures:
I also tried creating a pre-check, where I remove curves that don’t touch any guidelines (there are a few of them). One of the problems may be using sort list + list item to divide the curves in upper and lower, because maybe the list is not made of subsequents upper/lower curves. Any help?
Maybe start by only uploading the relevant {internalized} objects (artwork + lines). You’re missing stuff + have plugins some of us might not have installed:
Ah, sorry… I tried to organize things to make it look cleaner, forgot about plugins, and thought I internalized everything. Here is the file again, and should be better now.
Before proceeding, one quick question—you mentioned:
This could sound like you’re splitting the “artwork” curves with the lines they intersect, but I could be wrong. It also might sound like you want a continuous curve made of top-curve + line (full line or intersecting line segment?) + bottom-curve…Can you show a closeup sketch of a single result resembling the desired outcome?
Sorry deleted by accident—yes slow way split all surfaces with the lines then join the pairs, debrep them and sort them top/bottom face based on the Y coordinate of their centroids. Still unsure what @CarlosFilho meant, though.
The entire creating lines section is unnecessary. I could have just taken the container of lines. Then the two close curve sections could be shortened with a close curve component from some plug-in. Sorting the curves by adjacency may be also unimportant.
The problem is that Grasshopper recognizes intersections with Collision which then do not get made with Trim with Region. Intersection detection is dependent on the unit tolerance of the file. Increasing it helps. But you might have to go in manually to do corrections yourself.
Beautiful sketch! It matters, and changes the approach.
Also, it is an ideal sketch and does not yet specify what the outcome should be in the very specific cases such as tiny but still colliding curves:
Furthermore, of all the lazy wishes I could have is that your spacing lines were consistent with your artwork as opposed to having different start/end conditions, for instance:
Alright, all complaints set aside, this new imperfect try involves ‘correcting’ the inconsistent spacing lines by contouring the overall bounding rectangle for all the artwork using the same interval. This facilitates (1) keeping things ordered per-line as taught by Volker, (2) skip slower surface-splitting, and other shenanigans to get us closer to the goal:
Here’s a version that relies on the fast curve-line intersection operation. As already mentioned, there are inconsistencies in the initial curves and the horizontal lines’ spacing and position. With a few checks, I think the horizontal lines should start at the origin with a spacing of 10 units (that gives the most convincing result):
The definition uses point in curve to find the remaining horizontal segments, but sometimes there are self-intersecting curves, so some resulting curves are not quite right:
I saw some Mr Brainwash artwork in a local gallery and nearly laughed my head off when I saw what he was charging for the Mona Lisa screen print. I went away and had a play around and ended up putting a piece in a local abstract exhibition (first time in 20yrs) but it was supposed to be 2m long and water jet cut from 1mm mild steel, but I didn’t have time.
The way I got around it was to divide a surface into strips, cull every other strip after twisting them through 90 degrees and then just projecting and hatching the outlines… The A2 PVC artwork.
Don’t judge me too harshly on the animations, they were done on my iPhone with edits and were just tests, not really for public viewing.
Get some of them printed at your local reprographics place to play around with line thicknesses if you’re going to make them into artwork - curves always look very different on the screen.
Sorry, I wasn’t clear. I was thinking of it from a first principles perspective and redoing the original image rather than trying to rectify what’s already been created:
Split the surface into strips 10mm apart.
Twist them through 90 degrees using image sampler.
Cull every other strip.
Give the surface a thickness .01mm
Explode the offset surfaces and cull the edges leaving just the front and back faces.
Duplicate face border, silhouette or outline.
Project to c plane.
Move both 0.05mm back to the centre line
Explode and remove duplicates
Join
This method creates a horizontal centreline as part of the process.
Sorry, in the workshop today so can’t pull something together.