Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Solved
    • Unsolved
    1. Home
    2. Tags
    3. contours
    Log in to post

    • Guest

      Scripting: nearest oncurve point for a given coordinate
      General Questions • scripting contours • • Guest  

      3
      1
      Votes
      3
      Posts
      741
      Views

      jens

      I found a way to speed up the brute force approach though. If you can use external Python modules: from scipy import spatial tree = spatial.KDTree(t_list) # t_list is a list of pre-calculated point coordinate tuples on the cubic curve distance, index = tree.query(pt) # pt is the given point coordinate tuple t_for_pt = float(index) / (len(tree.data) - 1) t_list must be constructed in a way that the first entry is for t = 0 and the last entry for t = 1. It doesn't matter how many points for increments of t you calculate, as long as the index in t_list is proportional to t. Smaller increments of t increase the precision of the result, but the list takes longer to build.
    • nina

      Delete point & approximate existing curve
      Feature Requests • scripting contours • • nina  

      2
      0
      Votes
      2
      Posts
      633
      Views

      frederik

      mmm, not directly from the robofab objects but you could use the naked object g = CurrentGlyph() # remove the first segment from the first contour g[0].naked().removeSegment(0, preserveCurve=True) good luck!
    • A Former User

      Sorting contours
      General Questions • scripting contours • • A Former User  

      5
      0
      Votes
      5
      Posts
      824
      Views

      A Former User

      Perfect, it works. Thanks!
    • jo

      UNSOLVED Join contour with script
      General Questions • scripting contours points • • jo  

      1
      0
      Votes
      1
      Posts
      451
      Views

      jo

      hi I was wondering if there is a way to join two (open) contours with a script. E.g. join last point of contour A with first point of contour B. If I select these points in the glyph-view and click on "Close/Join Open Contours" this works. Is there also a scripting-based way to do that? thanks, jo
    • bahman

      SOLVED Converting ttf splines to otf splines
      General Questions • scripting contours truetype • • bahman  

      3
      0
      Votes
      3
      Posts
      653
      Views

      bahman

      Thanks, that did it! :)
    • jens

      Line to curve
      Problems & Bugs • user interaction contours • • jens  

      3
      0
      Votes
      3
      Posts
      610
      Views

      frederik

      Thanks Jo, a drag is needed to prevent accidentally adding bcp's
    • akiem

      Double points when generating ttf
      Problems & Bugs • contours truetype • • akiem  

      3
      0
      Votes
      3
      Posts
      562
      Views

      frederik

      Did some tests and this issue is already solved. It will be in the next update.
    • jo

      BreakContour() and updateSelection()
      General Questions • scripting contours • • jo  

      3
      0
      Votes
      3
      Posts
      573
      Views

      frederik

      (oh a thread that slipped thought my fingers) this is indeed a bug, will be fixed in the next version thanks
    • jmickel

      Curve point color
      Problems & Bugs • contours • • jmickel  

      2
      0
      Votes
      2
      Posts
      468
      Views

      frederik

      the "Smooth point color" is the stroke color of a point when its smooth
    • bas

      Close contour
      General Questions • user interaction contours • • bas  

      5
      0
      Votes
      5
      Posts
      766
      Views

      bas

      The problem starts of course when there is more than one open contour… But basically I don't care when RF fucks it up in those cases (you do), if it already works with 1 hotkey and 1 open contour it would be an improvement already.
    • sami

      Preserving a path when deleting a point
      Feature Requests • contours points • • sami  

      10
      0
      Votes
      10
      Posts
      1229
      Views

      jbl

      I agree with you guys. My way of drawing involve a lot of "add extreme points + cleanup" method, and it is… painful to work like this in RF. Just a suggestion: on removing a point, maybe the opposite handle should be kept as is, at least? If recalculation of curve is hard, I don't see a reason why both handlelength should be affected. Am I clear? (and yes, FLS' "optimize" algorithm performs well)
    • erik

      Bug after cutting a contour with the knife tool
      Problems & Bugs • contours • • erik  

      3
      0
      Votes
      3
      Posts
      597
      Views

      frederik

      send it to me :) thanks
    • bas

      Integers
      General Questions • user interaction contours • • bas  

      2
      0
      Votes
      2
      Posts
      451
      Views

      frederik

      It true that scaling would result in floating coordinates. But I would rather see advantages in keeping the coordinates with floating numbers. If one has a set of transformations the result would be much better if floating numbers are used instead round the coordinates after each step. use glyph.round() Output will always round all coordinates.
    • joanca

      Contour.index raises AttributeError
      General Questions • scripting contours • • joanca  

      3
      0
      Votes
      3
      Posts
      490
      Views

      joanca

      Well, in this case I don't need it (thought shouldn't it work?) I didn't find glyph.removeCountour() in robofab's documentation :[ Thanks!
    • bas

      Modifying curves
      General Questions • user interaction contours • • bas  

      2
      0
      Votes
      2
      Posts
      468
      Views

      frederik

      mm, you can make a subclass of the EditTool and overwrite the modifyDraggingPoint(point, delta) method to ignore 45° and only look for 0° and 90° angles. But not pref settings (yet, will think about it)
    • bruno

      Add Extreme Points -> Contour direction
      Problems & Bugs • contours • • bruno  

      4
      0
      Votes
      4
      Posts
      1714
      Views

      bruno

      You rock!
    • jbl

      Drag'n'move outlines in large view
      Feature Requests • user interaction contours • • jbl  

      1
      0
      Votes
      1
      Posts
      354
      Views

      jbl

      the outline selection ability disappears when a big zoom-out view is active: you can still use the keyboard, but click-select and drag is not possible because outline view is simplified :(
    • jbl

      Bug on deleting contours
      Problems & Bugs • contours • • jbl  

      6
      0
      Votes
      6
      Posts
      753
      Views

      traviskochel

      great! thanks
    • jbl

      Contour selection behavior
      Feature Requests • user interaction contours points • • jbl  

      2
      0
      Votes
      2
      Posts
      489
      Views

      frederik

      command + c --> cutting segments out alt + del --> breaking contours on the selected points
    • jbl

      Deleting superposed nodes modifies contour
      Feature Requests • contours points • • jbl  

      1
      0
      Votes
      1
      Posts
      416
      Views

      jbl

      This case is unfortunately a consequence from FLS. Superposed nodes: when deleting one of them, the remaining one should inherit the handle length. Instead, a new curve is calculated and differs greatly.