Ok guys here’s the thing i need to get the outline of such shapes stacked one on another i tried to tackle this many times but always it was like - eh maybe i will figure it out down the way. So im dropping here internalized data: OUTLINE_DATA_COMPLEX.gh (207.1 KB)
As you can see in my attached def, if your polylines are projected onto some sort of curved surface, you can use that to get the boundary curves using Region Unionon the world XY plane.
BTW, you don’t have to invite a few people over for a contest. Just ask your question. Who knows if anyone can help?
The idea I followed was to:
For every curve “C” find the best fitting plane, will call it “P”.
Shatter every curve dependings on all the intersections found by MCX.
For every segment find mid-point.
Create a sub-lists containing all the curves that have one or more intersection with current C curve and project every of them to the relative P plane.
Do the curve-inclusion test for every mid point with all the projected curve, keep only mid-points (segments) that are always outside.
The explanation is harder than the concept itself…
Is this some sort of manual “paint” on mesh?
Edit: sorry i forgot to upload the file … silly me
This is enough to figure out methodology how to approach this - maybe one missing thing is that further we’ll have to add next outline to this outline or subtract from them other outline but i know it will be easy when we’ll grasp low level stuff here
My solution still uses projection, not globally but locally.
I think it would work in most cases, but if your “stamp” (the hexagon) is created in a very curved space (with adjacent hexagons even more curved) it will probably fail too.
The solution would be trimming the actual mesh/brep with each stamp and use that… very heavy…
Thats why i’m reaching out. My most succesfull approach was using simplified spheres joined and intersecting them with underlying geomety. However it’s not cheap to compute. Probably next step here would be to try adaptive marching cubes with adaptive iso to create multires metamesh and then check for intersection - but i guess there’s something what im missing here and whole procedure could be simplified.
@Adam_M you can use everything to acomplish Thing is - as always - to do it cheap in terms of computation time / consumed resources.
You are giving us a list of hexagons, like it is a single input as a “whole”.
To paint i think the best idea would be to do it iteratively.
Now you have 100 hexagons solved in 100ms (for example)
With the 101th hexagon it will recalculate everything again and take again 101ms … not smart.
If you have a “brush” i would store last position and draw a line from center to center and so on…
Or at least do the hexagons intersection one by one WHILE the drawing is done…
Well it is exactly like that if you consider how any kind of brush works - you have a pointer so in general, you will draw a “curvy” shape but instead of that you sample the move each x step let say pixels on screen or units in doc or whatever (usually called brush spacing) in place of sample (point) you’ll place a “stamp” but in general what you do iterativly add shape after shape to previous lets call it stroke/ boundary.
I’m giving “random set of stamps” since it would be hard to share movement as internalised data - ok we could use mass adition to reveal each time unit next step
That actually would be very interesting if it could be handeld in gh during such motion
The hexagons are inconsistent with regard to curve direction so it’s not possible to determine orientation of planes created from them. If they had consistent “surface normals”, this would be relatively easy, but as is, the task is cleaning up junk data. I’d rather take a walk. Ciao.
Not consistent ? Each stamp is conformed to mesh normal and then pulled to fit exact shape of it so if you are calling junk data pulled curves which are intersecting exactly ON mesh well … Here you have whole set if it helps in anything OUTLINE_ALL_DATA.gh (664.0 KB)
Consider that you are asking for “stamps” aligned to curve which wont be aligned to curve since there won’t be any curve.