已发布 66 月前 (Friday, March 15) 由
jne4sl
Ok, don't hate me, but it's not working the way I would like, and it's probably because I wasn't clear. What I would like is for mirror to act on a path in a way analogous to magnet, i.e. based on the initial behavior of the path, not both endpoints.
The new function mirrors about a path by using the both endpoints
so,
mirror((something),path)
is just the old mirror function:
mirror((something),[path.p1:path.p2])
I don't really need that extension, because it's already possible to write with one line of code in an intuitive way.
What I want, is for mirror path to be a 'mirror' about the initial vector of the path. Which right now, I would do like this, first constructing a temporary point p_:
p_ = apply(path.p1, 1.0, path.a1)
mirror((something),[path.p1:p_])
Which I don't like because it forces me to create a temporary line to mirror about when all the information is already encoded in the path.
I would also like to be able to mirror about the negative of a path, so that:
mirror((something),-path)
would be:
p_ = apply(path.p2, 1.0, path.a2)
mirror((something),[path.p2:p_])
If it's any help, here's a code fragment that suppresses length on a curve by adding a contour dart:
Lines 38 and 42 are 'magnet' being used with a path and a negative path, in an intuitive way, to close a dart.
Lines 51 and 59 are how I would like to use 'mirror' when truing the top edge of the dart.
Lines 52, 53 and 60, 61 are what I've done instead.
Anyway, that's my request. I can use the existing mirror function to do what I want to do, so it's not essential to me. I just find the way 'magnet' works to be extremely convenient, and constructing line segments to work with 'mirror' a little annoying. And I thought it might be an intuitive construction for anyone who doesn't think to create a line segment.
Thanks, again!