Move direction handles in synch with anchor point?

Hi all
I'm trying to nudge the anchor points on an object randomly (to get an informal look). (I know some Effects do this already.)
Maintaining corner points is no problem - you just set the direction handles to the same coordinates as their anchor.
But I can't nudge a smooth point in the way I want to, which is to move the anchor but maintain the direction handles in exactly the same relation to their anchor as they had before. That is to say, they should remain smooth points.
My script calculates the difference between 'before' and 'after' positions of the anchor, and applies that difference to the direction handles… but in practice the smooth points are converted to corners, because the direction handles don't maintain their relation with the anchor.
Would be grateful if someone can point out the flaw(s!) in my logic.
var docRef = activeDocument;
var objects = activeDocument.selection.length;
var cShift = prompt("Point shift (pt)",5);
// loop through all objects
for(var count=0;count<objects;count++)
currentObj = activeDocument.selection[count];
nudge(currentObj);
// function nudges each object
function nudge(obj)
var objPoints = obj.selectedPathPoints;
var objPointCount = objPoints.length;
for (var i = 0;i<objPointCount;i++){
var thisPoint = objPoints[i];
var va = thisPoint.anchor[0];
var vb = thisPoint.anchor[1];
var la = thisPoint.leftDirection[0];
var lb = thisPoint.leftDirection[1];
var ra = thisPoint.rightDirection[0];
var rb = thisPoint.rightDirection[1];
if(va==la && va==ra && vb==lb && vb==rb)
{ // if corner point, randomize anchor position
va = va +((Math.random()*cShift));
vb = vb +((Math.random()*cShift));
thisPoint.anchor = Array(va,vb);
// set direction handles at same position, maintaining a corner point
thisPoint.leftDirection = Array(va,vb);
thisPoint.rightDirection = Array(va,vb);
else
{ // not a corner point: keep handles in same relative position to their shifted anchor
var va2 = va +((Math.random()*cShift));
var vb2 = vb +((Math.random()*cShift));
thisPoint.anchor = Array(va2,vb2);
// this bit calculates the random shift applied to the anchor
var anchorShifta = va2 - va;
var anchorShiftb = vb2 - vb;
// these lines apply the same shift to the direction handles
thisPoint.leftDirection[0] = la + anchorShifta;
thisPoint.leftDirection[1] = lb + anchorShiftb;
thisPoint.rightDirection[0] = ra + anchorShifta;
thisPoint.rightDirection[1] = rb + anchorShiftb;

The else part modified:
else
{ // not a corner point: keep handles in same relative position to their shifted anchor
    var aShift = Math.random()*cShift;
    var bShift = Math.random()*cShift;
    thisPoint.anchor = [va  + aShift, vb + bShift];
    thisPoint.leftDirection = [la + aShift, lb + bShift];
    thisPoint.rightDirection = [ra + aShift, rb + bShift];

Similar Messages

  • How to distort a irregular shape with anchor points around it

    Hi,
    I want to skew the irregular shape with anchor points around it.If any body point any samples please help me.
    with thanks,
    Srinivas

    If you want the fill to follow the boundary, here's one way to do it, more easily done than demonstrated:

  • Path with anchor points and bezier control handles

    I have a text, not converted to outline. Live text.
    I am using IllCS4.
    That is cool thing about hovering the cursor above the text and see hidden path and anchor points only when you hovering exactly above them. But I want them be visible permannently, while I am applying some envelop distort  changes. Then I want to turn visibility off. And how to get permanent visiblity of bazier control handles at  the same time?
    I am lost.
    Tx

    Yes, thank you,
    that is great thing, but when I use it, I see outlines (like a wireframe) of image  only.
    Is there any way to see still image as it is and switch on visibility of object' path with all control points?

  • Move Graphic to Flash with Anchor Points

    I created a graphic in Illustrator CS5 that I want to use in Flash CS5.  How do I move the graphic to Flash and preserve the anchor points of the graphic so I can use them in Flash?  I have used the Import to Library function in Flash but once the graphic has been imported the anchor points are gone.
    Here is some background in case I'm trying to do it incorrectly.  I have a speech bubble I created in Illustrator.  Now I need to use this speech bubble in a Flash animation but the bubble will need to resize according to how much text will be placed in it.  I can't just change the width and height of the bubble because that will make certain parts like the edges to big.  I need the bubble to "grow".  In Illustrator I can do this by select certain anchor points and moving them without effecting other points.  But in Flash I'm not sure how to accomplish this.

    Thanks for the reply.  I just did some reading on 9 Slice and that is actually what I need.  Unfortunately it is not working correctly in Flash CS5 with my Illustrator graphic.
    I setup 9 Slice in Illustrator and it works great in Illustrator.  I can resize my graphic and only the parts I want resize.  Then I saved the Illustrator file and tried importing it into Flash CS5 and I see the 9 Slice lines but when I resize the graphic 9 Slice is not working.  I tried creating a simple box in Flash with curved edges and 9 Slice worked with it.
    Is there something special I need to do to get 9 Slice to work on my imported Illustrator graphic?  I tried creating new 9 Slice lines in Flash as well but that never worked either.  Am I missing something?

  • Is it possible to independently manipulate a snapped handle of a corner anchor point?

    I stopped reading what's new since many versions and simply learn the new stuff when I need to or by discovery so, today I had to create various vector shapes and I got very annoyed that I can't pull a snapped handle of a corner point back and manipulate it without disturbing the handle on the other side. This has been always annoying problem for me and I'm just checking in case I have missed something.
    For example in a shape like this the highlighted corner anchor has one of its handles snapped to the point or in other words it is only with one handle. Is it possible to pull out an manipulate missing handle without disturbing the handle on the other side and any of the other handles?
    edit: just to let you know that I know the trick with deleting the segment and recreating it but that makes sense only when the neighboring point is corner too.

    I think a user nowadays would intuitively expect to just click and drag with a modifier/s key pressed to achieve that.
    In FreeHand, you can (yes, present tense; still works fine on current Windows) simply altDrag the middle of the straight segment that you want to bend. That one little very pratical feature gave rise to a whole drawing method which came to be called the "bendomatic" method (I think Olav Martin Kvern coined the phrase). Just click, click, click with the Pen, placing anchors at obvious locations, and bending the straight segments as you go. This was a very quick & intuitive way to teach beginners how to draw efficient paths with a minimum of anchors. But it is not just a beginner's trick. It lets you impart a stylistic consistency that is tedious to mimic in AI. Also very useful when working zoomed into segments the opposite anchor of which is off-screen.
    Xara Designer Pro (formerly named Xara Xtreme) mimics FH's "bendomatic" method. In fact, it's usually really the best way to draw paths efficiently in that program, because its Pen tool behavior is still otherwise sub-standard.
    Illustrator lets you alter the bend of a segment that already has its associated handles extended, which begs the question, "Who needs that, since the handles are already accessible?"
    But if you perform the exact same maneuver on a straight segment with retracted handles, you just move the straight segment and its two associated anchors. An example of the logical inconsistency that so permeates AI.
    FreeHand also provides other means by which to perform the alteration you depict. You can click a button to auto-extend the retracted handle without disturbing the adjacent segment. Or, you can just AltDrag the retracted handle out from the anchor with the selection pointer.
    These are just a couple of instances in which FH's basic path selection & manipulation interface is demonstrably more efficient and more elegant than AI's. It's just a better interface.
    JET

  • Problems with anchor points on Pages 5.2.2

    i have Pages 5.2.2 and Mavericks 10.9.5.  I noticed I could not follow on from a previous paragraph on a simple wordprocessing page.  No inserted tables or media inserts, just straight forward writing.  The hidden symbols shows that it is a 'lollipop ' symbol - an anchor point for objects set to move with text.  The online help instructs to go to the format inspect and choose Arrange.  On my version the latest there are ino STYLE IMAGE ARRANGE boxes.  On the menu there is ARRANGE but everything is greyed out, even when I highlight the text involved.  How do I delete the anchor point, please

    PeterBreis0807 wrote:
    Menu > View > Show Layout/Invisibles
    It is also possible for objects to hang out off the page, try lassoing them with the mouse and command key held down.
    Peter

  • How to distribute equal spacing with anchor points?

    I am working in Lesson 5 of Adobe Illustrator CS5 Classroom in a Book, and am having a problem selecting the 2 anchor points to distribute equal space based on the bottom center anchor point of the violin.  The note said to reference chapter 2, which I have already been through, but even after reading the Illustrator Help dialog on pg 75, I am still at a loss.  Can anyone explain how to distribute this equal spacing of 2 anchors relative to one anchor point?

    csnpreggers,
    If anyone has any further advice or comment, I'd still love to hear from all parties.
    Especially when working with a finished symmetrical shape, such as a violin, which may have been created using mirroring, in other words elaborating on a shape, possibly with something unforeseen in the first round, and especially when it is inconvenient to cut paths to work with one half, you may use the instructions in small print using invisible ink at the bottom of item 3 in lesson 5:
    2 tips, using the Line Tool and Smart Guides:
    To make sure the left Anchor Point has the same same distance from the bottom Anchor Point, first ShiftDrag horizontally with the Line Segment Tool from the right Anchor Point to cross the path, then select the violin path and click it with the Add Anchor Point Tool where Smart Guides say intersect.
    Or to place both Anchor Points at the same time instead, first create a sufficiently long horizontal path with the Line Segment Tool below the violin path, then ShiftDrag it upwards to cross the violin path at the desired distances, then select the violin path and click it with the Add Anchor Point Tool where Smart Guides say intersect, both right and left.

  • XI IDOC Master Data Synch with Change Pointer (GLMAST)

    Hi,
    I have scenario to create integration between 2 SAP system with XI 7.0 using IDOC - GLMAST. I already acitvate Change Pointer Globally (BD61) and Activate Change Pointer for GLMAST (BD50).
    The problem is whenever changes have done in system 1, 2 IDOC generated, First IDOC  to Logical System PRODUCTION and second IDOC to Logical System SALES.
    In order to seding the IDOC i have scheduled report RBDMIDOC. My question is how i can modify the IDOC target port in stead of send to PRODUCTION and SALES to others port (XI in this case).
    Thank you and Regards
    Fernand

    Hi Prateek
    I already create partner profile and port for XI and add GLMAST. but then the IDOC generated alwasy sent to PRODUCTION and SALES partner profile.
    How to disable that IDOC to send to PRODUCTION and SALES partner profile and only send to XI Profile ?
    Thank you and Regards
    Fernand

  • Importing movies into iTunes to synch with iTouch

    Is there a way to import a movie (a DVD I purchased) into iTunes so I can synch it to my iTouch?
    Thanx...
    Al

    I'm afraid that importing of commercial DVDs can't be discussed on the forum as that involves breaking the encryption on them (which is illegal in most countries). If your discs don't have a digital copy then there's no advice that can be given. Such discussions are against the Forum's terms of use. "Do not submit software or descriptions of processes that break or otherwise ‘work around’ digital rights management software or hardware. This includes conversations about ‘ripping’ DVDs or working around FairPlay software used on the iTunes Store.": Discussions Help & Terms of Use

  • Adjust both handles on anchor point simultaneously locking their relationship

    when using pen tool,
    CTRL uses last used selection tool, (for me I set it to direct selection)
    ALT uses convert anchor point tool,
    another option that I`d like to see is when using ALT (convert anchor point tool) when adjusting dragging an anchor handle is to press ALT/CTRL to lock the angle of both handles, ( whether smooth or non smooth anchor handles) to adjust them simultaneously,
    why would I want this?
    see, sometimes you want to keep that angle just as you created it, but if you move one anchor you lose it and have to now adjust the other, or sometimes you want to nudge one side of the path coming from the anchor down or up a little, but maintain the handles relationship to the handle angle with the path on the other side of the anchor, this would be the quickest way to maintain all of that,

    Bugs in Illustrator do occasionally result in both of an anchorPoint's handles being located on the same side of the anchorPoint and "locked" together in such a way that their lenghts can be individually adjusted, but their angles cannot be separated. You may have encountered one of those situations.
    Bezier, by the way, is not a verb. It's a mathematician's name. And a straight Bezier curve is still a Bezier curve. It's control points still exist; they either correspond with the start and end points, or they at least occur on the straight segment.
    JET

  • Convert Anchor Point Tool Won't Remove Handles

    I have handles on a point in Illustrator CC 2014. I am trying to click on the point with the "convert anchor tool" to remove the handles, but it is not working. I can manipulate the handles with the tool and move the points, but it will not delete the handles like normal.

    Brad,
    There may be something you are unaware of (Anchor Point(s) on top of Anchor Point(s) or something).
    If you deselect (click an empty spot or another object), then click the Anchor Point with the Direct Selection Tool, does the Anchor Point show normally with two Handles?
    If it does, can you ClickDrag each Handle into the Anchor Point and convert it that way?

  • How does logic x deal with audio anchor points?

    In logic 9 you access the audio file anchor points via the sample editor. I cannot find the sample editor in logic x. How then do we deal with anchor points?

    These two links will give answers to your questions:
    http://help.apple.com/logicpro/mac/10/#lgcpcac7b11e
    http://help.apple.com/logicpro/mac/10/#lgcpc78843f6
    Have a nice day!

  • Pen Tool/Anchor Point Help

    I often draw/trace things using the Pen Tool.  I start with an anchor point (A) then click to make another (B), then I drag the first handle away from the anchor point in order to make a bezier curve.  The problem comes when I need to continue the path to another anchor point (C) after the curve.  If I don't move the "dragged" handle, then it warps the continued path to the next anchor point (C).  What I have been doing to remedy this frustration is switching to the Direct Selection Tool then moving the "dragged" handle over top of the previous anchor point (B).  Please tell me there is an easier/faster way to do this...
    Many thanks in advance!

    Have you studied the manual?
    Illustrator Help | Drawing with the Pen, Pencil, orFlare tool
    There are also plenty of tutorials on how to use the pen tool.
    If you know all this and still need help, please post a screenshot of the situation.

  • How to convert an anchor point to have a single control point...

    Can anyone tell me if it is possible to convert an existing anchor point on a path from a dual control point with directional handles either side of the point to a single control point with one directional handle?
    In Illustrator this is easy, all you do is drag one directional handle into the anchor point and it deletes that handle leaving just the other handle to control the shape.
    In Photoshop this appears to be much harder to achieve as dragging the handle into the anchor point doesn't work and no matter what combination of keyboard shortcuts I've tried I'm not able to get rid of just one of the handles.
    I am able to achieve what I want by splitting the path then Alt clicking on the end point of the path but this strikes me as being really clumsy compared to Illustrator's perfect solution. Even InDesign works better, as you just Alt Click on the directional handle once and it deletes it.
    What seems totally bewildering is why all these pieces of software (made by the same people) work differently?

    Yes it seems your suggestion to drag the directional point so that it sits directly on top of the anchor point is the best one can do. It doesn't actually delete the direction point like it does in AI merely makes the direction point so small it doesn't actually do anything. Not ideal really.
    Maybe all the separate development teams should meet up for a coffee some time and just iron out all these indifferences, I reckon they could get it done in an afternoon, I'd be happy to write them a list. And don't even get me started on how the Workspaces differ from app to app!

  • Anchor points...

    Is anyone experiencing issues with anchor points in 9.1.3? This is the first time I've come across this issue so sorry if it's been raised before...
    I have an audio track which I am having to chop up to move parts, using anchors really helps with this process but the following is happening on my system:
    1. Cut a region to length
    2. Move the anchor to desired location (The anchor doesn't move once I let go of it, I have to move it twice every time in order to move it)
    3. Move region to desired location
    4. Deselect region
    5. Return to region (The region is in the same position but the anchor has reset to the beginning of the region)
    I don't recall this behaviour in the past but it just seems odd to me!

    Hi,
    I was having a similar problem. I couldn't find an explanation as to what was going on, but when I deleted the region from the arrange window and then dragged the same audio file back into the arrange window from the audio bin, I no longer had any problems with the anchor. I found the solution at the bottom of this (somewhat unrelated) post: http://discussions.apple.com/thread.jspa?messageID=12240769&#12240769
    Hope that helps if you haven't sorted it already,
    Jaron

Maybe you are looking for

  • How to add a interactive drop-down list

    I want a drop-down list that will add a set of required fields based on the choice from the list. In this case, we want users to fill in their job title, and based on that title selected we need them to fill in specific licensing information. I haven

  • Urgent: Facing problem with restoratio​n prosses

    Good day, I'm Facing problem with restoration process. During restoring my data from my PC to my Q10 phone using link app. the application reject my request & kept giving me following error: Operation Cancelled. Really need your help Gent's & I'll be

  • Need help with DB design

    Hello, We are planning to use berkeley db to store mesurament data but I'm new to this. The data consists of device id (which made measurement), timestamp (when) and mesured value. Basic queries are "get all data from timestamp1 to timestamp2 for dev

  • How is pricing procedure in MM linked with tax procedure ?

    how do we link a pricing procedure with a tax procedure for a particular vendor material combination? eg RM0000 is applied to standard order which contains condition type eg gross price PBXX and tax procedure applicable is Taxinn which contains condi

  • Can iPad mini be used to have wi fi from BB 9380

    Hi All, I am new to the community. I am just owner of a IPad mini. My query is - I have a Blackberry 9380 at home with 3G Internet connectivity. Can it be used to generate wi fi connectivity to my iPad mini. Please inform. Thanks and regards.