Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Engaged ,
Sep 13, 2018 Sep 13, 2018

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.

Capture.PNG

Any Advice is welcome!

TOPICS
Scripting
982
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Valorous Hero ,
Sep 13, 2018 Sep 13, 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();

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 14, 2018 Sep 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

start points.jpg

Thank you!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Sep 14, 2018 Sep 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 14, 2018 Sep 14, 2018

To answer the first question: As far as the U is concerned, for the process to work it would not matter if it was the left, right, or even on the other stem. It just matters that it is one of them.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Sep 14, 2018 Sep 14, 2018

So is the snippet that produces the native starting points not the solution?

Most of the points appear to be the same as your desired location, and if you're not worried about the U and the stem the point is on, are you not worried about the C and the anchor being on the bottom rather than the top as your picture shows ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 14, 2018 Sep 14, 2018

you have to rule out the "highest angle" and corner point rules as you're not applying them to your samples. You're moving from a 90 degree to 90 degree angles and from corner point to corner point in the U and I letters.

and I am curious to know the purpose of your request, is it for shortest travel distance?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 17, 2018 Sep 17, 2018

Hey Carlos,

When we cut the letter out there is the potential for a minuscule bump to be at the Starting Anchor. To minimize the likelihood/appearance of this, we place the starting point at any of the Top Anchors (we have always just done the leftmost corner one as a standard practice).

Does that answer your question?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 17, 2018 Sep 17, 2018
LATEST

I can adjust my script to place the starting point in the top left of all the tracks automatically selected.

It would be nice to have an example :

(When we cut the letter out there is the potential for a minuscule bump to be at the Starting Anchor ??)

Cut with that  Tool ?

And to do what ?

de LR

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 14, 2018 Sep 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

public.PNG

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 17, 2018 Sep 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 :

test1.png

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.

test3.PNG

5 Retrait des informations.

6 retour en 3 tracé suivant...

test2.png

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 ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines