Curve offset

Hi
i have an illustrator as curve imported ,
please help me find how to make it ready for built-in offset?
as you see it wont offset properly in some values.
i am not aiming for curve rebuild using component like divide curve , rebuild curve , interpolate .
also not going to use other offset from clipper or puffer-fish
any help appreciated
thanks
staw001.gh (6.3 KB)

Illustrator makes crappy curves, your example has a lot of sorta-tangent-but-not-really joints, and that combined with Rhino’s hit-and-miss Offset algorithm is a recipe for problems. What I see is that it works with some values and fails with others - even in Rhino outside Grasshopper. If you want it to work reliably you will probably need to fix the original somewhat.

we need to find what to do as a per-process.
doc says curve are set of point from start to end named seams but there is more parameter in curve which is key. things get more complicated if we explode and try to correct those segments but if a simple flip curve used as preprocess then the offset will be corrected which is a true magic . but how to find if we should use flip or not in an imported curve or which D value need a flip curve. :grimacing:

Yes, but I wouldn’t want to rely in that “magic” - I think you may just be getting lucky here, as flipping the curve doesn’t fix its problems and it’s likely to fail at some other offset value.

exactly, with flipped , in some D value the offset was returning two curve,one closed and one empty Arc-Line or something like that.
at the other hand that illustrator is a simple one time continues click and drag path which couldn’t be simpler.
in curves ribbon there is only one Flip Curve that let me change a Curve inside values,am i right?
how could i change the z direction of curve overall plane normal?

Yep, and that’s why it makes crappy curves. They’re just a series of connected Bézier splines with no control over tangency between segments. If you look at the curve in Rhino, there are a bunch of spots where a kink point has three control points stacked one on top of the other… They are only made for illustration/print purposes where nobody really cares about that kind of junk.

That is not to say that the Rhino offset curve algorithm can’t be improved… it can. It’s better in V8, but still not as robust as it could be.

Thanks.
I’ve put this case on the list as RH-81494 Offset: Failure case

FWIW, with “Corners” set to “None”, at least the output is useable, though not a single closed curve
image

-wim

Why don’t you want to rebuild? It offsets immediately as a closed curve after a rebuild.

rebuild is going to change angles at kink mostly and not usable for some need-to-be-precised line imported.

I’d understand if you were importing CAD-generated curves & couldn’t offset properly, but is it really necessary to be that precise for something created in Illustrator? Then again I’ve got no idea what the project is.

Seems it doesn’t matter from which software imported or its precise or not, just want to make proper offset

Hi Saeed -

The main problem with this input is that there are very many stacked control points on the ends of subcurves in this object. You can use the testValidateControlPointSpacing test command to see where these are located.
The developer has tried a few things to work around this but that didn’t turn up anything useful. In this case, you will need to fix the input.
-wim

:ok_hand: this was a great guide.
thanks for help and your time.