fellesverkstedet / Bark-beetle-parametric-toolpaths

A grasshopper plugin for digital fabrication. Enables direct fabrication of geometry with 3D printers, CNC milling, Laser cutters, Robot arms and more. Also featuring 1:1 augmented reality toolpath projections.
97 stars 18 forks source link

Potential speed enhancement: an easier+quicker align curves in same direction #49

Closed Siemenc closed 5 years ago

Siemenc commented 5 years ago

I came across this solution for making curves go the same direction. Seems to speed up things a lot (x 100 in example below) since there's no need for offset. image

JensDyvik commented 5 years ago

Exciting. Don't you need to know whether a curve is going in a climb or conventional direction before you decide to flip? I havent found a good way to analyze if a curve is climb or conventional. Also note that curves inside a curve needs to go in the other direction than the outer curve since they are inside cuts

Siemenc commented 5 years ago

Don't you need to know whether a curve is going in a climb or conventional direction before you decide to flip? Yes, that's what the circle does. Flip curve has an input G which is a guide curve to check against whether the input in C is in the same direction or not. If the direction is different it switches it to match the same direction.

Also just for clarity: It doesn't speed up the whole component by 100x. The solution above just makes a part of the component 100x faster.

Also note that curves inside a curve needs to go in the other direction than the outer curve since they are inside cuts Yep, that's what happens after this step inside the cutout (and other) component . It basically just would replace this: image

JensDyvik commented 5 years ago

Fantastic. Very nice solution. This combined with creating boundary surfaces from cutout and pocket curves to find curves inside curves will be a great combo