Skip to main content
Inspiring
September 13, 2018
Question

Can you Identify (and Change) the Starting Anchor on a Closed Path

  • September 13, 2018
  • 3 replies
  • 1032 views

Is there an easy way to identify the Starting Anchors of Letters that have been Outlined?   The only thing I can find is to delete a line segment and replace it, but that is really impractical when working with 100's of letters.

I'd really love to be able to automatically set the Starting Anchor to the Highest angle Anchor of each letter.

Any Advice is welcome!

This topic has been closed for replies.

3 replies

renél80416020
Inspiring
September 17, 2018

Bonjour Bryan, (pardon d'écrire en français)

J'ai réalisé le script qui modifie le point de départ d'un tracé.

Voilà le travail :

change-0point-01.js

But du script

Modifier si besoin le point d’entré d’un tracé ainsi que le sens de parcours.

Fontionnement

Soit l’exemple du texte vectorisé PUBLIC, il s’agit d’un groupe composé de six tracés transparents  (comprenant neuf tracés sans fond, contour noir 1pt),

certains tracés sont en sens horaire et d’autres en sens trigo.

1 Sélectionnez le groupe.

2 Lancez le script.

3 Affichage des informations sur l’ordre des points du premier tracé (pathItem).

4 Saisie du nouveau point d’entrée , 0 si pas de changement, ajouter la lettre r si inversion du sens de parcours.

          pour la lettre U je choisi 9 comme point de départ.

5 Retrait des informations.

6 retour en 3 tracé suivant...

Si intéressé me joindre par mail, mon adresse est sous ma photo.

De LR

PS C'est pour programmer une machine à commande numérique ?

renél80416020
Inspiring
September 14, 2018

Hi !

Un moyen simple pour identifier le point de départ d'un tracé fermé est d'utiliser Contour / flèche début

A simple way to identify the starting point of a closed path is to use stroke/ arrow start

Silly-V
Legend
September 14, 2018

I do not quite understand what you mean by the 'highest angle'. Here's a sample script that will select each starting path point of individual paths within an outlined collection of letters, but as you will see it does not quite correspond with your own illustration.

What is the 'highest angle' in question which would shift the points so that the ones from the script result would be transformed to fit your picture?

#target illustrator

function test(){

     var doc = app.activeDocument;

     var selectedItem = doc.selection[0];

     var selectedPathItems = [], thisPathItem;

     for (var i = 0; i < doc.pathItems.length; i++) {

          thisPathItem = doc.pathItems;

          if(thisPathItem.selected){

               selectedPathItems.push(thisPathItem);

          }

     }

     doc.selection = null;

     for (var i = 0; i < selectedPathItems.length; i++) {

          thisPathItem = selectedPathItems;

          thisPathItem.pathPoints[0].selected = PathPointSelection.ANCHORPOINT;

     }

};

test();

Inspiring
September 14, 2018

Sorry, I think I may have used the wrong Terms.  I would need the Priority to be

- First a Corner Point

- Second a Connector Point

- Last a Smooth Point

  • Corner Points: Connect straight line segments to straight line segments and do not need Bezier handles.
    Corner Anchor Points
  • Smooth Points: Line segments that join in smooth, continuous curves, two, opposing Bezier handles will extend from the anchor point which is used to control the bend. The handles on a smooth anchor point are reciprocal and always stay in alignment. Here's a three-anchor-point sine wave:
    Smooth Anchor Points
  • Connector Points: Connector points are used to connect straight line segments to curved ones, or to connect curved line segments that meet at an angle.
    Connector Anchor Point

Thank you!

Silly-V
Legend
September 14, 2018

Ok the point types are fine, how do we know that the point you want selected (remapped to be the start point rather) on the "U" is supposed to be the top left one vs the top right one (talking about the points on the top left stem)?

If the rule for this could be conditionally assessed by the script then the next step would be to redraw the paths with the re-ordered point arrays, a matter in itself.