How to clean duplicated nodes in batch


#6

I believe the red mark shows up when the nodes are under 1 unit of distance apart. That grid setup allows for fractional values for node locations. If the two nodes were part of a straight line beyond the nodes, then they would be tidied up.


#7

You can use the Delete Short Segments filter from Window > Plugin Manager.


#8

Or set the gird to 1 and run the Tidy up paths command. Setting the gird will not actually enforce it, just if you move nodes.


#9

Thanks guys! It finally worked with Delete Short Segments


#10

Hi guys, I’m trying to use the Delete Short Segments filter for same problem as described above (Overlapping red nodes on a highly textured design). However it doesn’t seem to be working. Any ideas?


#11

Tidying up does not work? Cmd Opt shift T.


#12

Correct ‘Tidy up paths’ does not work.

Grid spacing = 1 / Subdivision = 1 and I have also used ‘Round coordinates’ First. It has worked initially on some letters but not others. Refer to images:


#13

Can you send me the W?


#14

Sure — support at glyphsapp?


#15

I’ve sent the file to the email above. Please let me know if there is an alternate address.

Many thanks.


#16

The e-mail did not reach me. The one you mentioned here was fine, but as a spam protection measure please do not post cleartext e-mail addresses publicly.

You can also use a Forum DM.


#17

Ok, have re-sent via forum DM. Thanks.


#18

The “Tidy up paths” only removes very short line segments. The red dots also show up on short curve segments.


#19

So is there no way to batch clean duplicated nodes when they are curves?


#20

Rainers script could be adjusted to do that.


#21

Hm? Just tried again and Tidy up paths also removes zero-length curve segments for me.


#22

The problem is something else. You have a lot of single-segment paths:

Technically, it is MOVETO-CURVETO, which usually is displayed as two nodes. Just get rid of these. Good way is the Delete Small Paths filter, from Window > Plugin Manager, with a threshold value of approx. 15.

How did you create these paths?


#23

Thanks for taking a look however I’m seeing something different on my end. Take this ‘W’ for instance, none of these errors are single segment paths like in your example:

06

They all seem to be zero-length curve segments for me with at least three nodes. And tidy up paths seems to have no effect.

The paths were created in illustrator using autotrace.


#24

The paths are so bad that I would consider ditching them and inserting new ones.

  • Get rid of the smallest ones. Anything below 100 square units is microscopically tiny and can hardly be displayed.
  • For the ones that are left over, consider redrawing with line segments (i.e., no curves).
  • For the ones you do not want to delete, fixing these zero segments goes like this:
    1. Hold down the Option key and drag-select the red point. This selects only the on-curve points of the segment.
      get-rid-of-red-segments-1
    2. Option-Delete to delete the segment. This also breaks open the path.
      get-rid-of-red-segments-2
    3. Double click to select the whole path.
      get-rid-of-red-segments-3
    4. Move it left-right with the cursor keys: this should close the path again. (Alternatively, right-click and choose Close Open Paths from the context menu.)
      get-rid-of-red-segments-4

#25

Ok, I’ll try a few things, thanks for your help!