Home > Community > Forums > Custom IC SKILL > get highlighted stretch coordinates

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 get highlighted stretch coordinates 

Last post Fri, Jul 27 2012 8:56 AM by blankman. 6 replies.
Started by Aritra 01 Dec 2011 02:09 AM. Topic has 6 replies and 2711 views
Page 1 of 1 (7 items)
Sort Posts:
  • Thu, Dec 1 2011 2:09 AM

    • Aritra
    • Top 200 Contributor
    • Joined on Thu, Apr 22 2010
    • Howrah, West Bengal
    • Posts 42
    • Points 775
    get highlighted stretch coordinates Reply

     Hi ,

         While stretching a path , after entering the bBox at the end of the path the end center line gets highlighted. Is there any command by which we can get the pints that is highlighted by stretch / partial select ? 

    Filed under:
    • Post Points: 20
  • Thu, Dec 1 2011 8:17 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 396
    • Points 7,430
    Re: get highlighted stretch coordinates Reply

    You can use this command on each object in the selected set:

    geGetSelSetFigPoint(obj)

    obj = car(geGetSelectedSet())
    ptSel = geGetSelFigPoint(obj)

    If the objects are deslected, you can reselect the same points:

    geDeselectAllFig()
    geSelectFigPoint(obj ptSel)

    For a path or polygon, the selected points correspond to the points in the objects point list:

    ptSel will be a list something like:  list(nil nil nil nil nil t)
    obj~>points will be a list of coordinate pairs: ((-7.5 3.5) (0.0 3.5) (0.0 -0.5) (6.0 -0.5) (6.0 -4.0) (10.5 -4.0))

    In this case the selected point would be the last one in the list.

    For rectangles, you'll receive a list of four values for ptSel, but you'll have to map these to the points in the rectangle's bBox attribute: obj~>bBox = ((10.0 10.0) (20.0 20.0))

    Derek

    • Post Points: 35
  • Thu, Dec 1 2011 9:59 PM

    • Aritra
    • Top 200 Contributor
    • Joined on Thu, Apr 22 2010
    • Howrah, West Bengal
    • Posts 42
    • Points 775
    Re: get highlighted stretch coordinates Reply

     Hi Derek,

                   Thanks for the reply. It works fine .

    Just a small note. The function I found is : geGetSelSetFigPoint(obj)

    I did not found the function you mentioned as  : geGetSelFigPoint(obj)

    Thanks again.

    • Post Points: 20
  • Fri, Dec 2 2011 6:54 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 396
    • Points 7,430
    Re: get highlighted stretch coordinates Reply

    You're right, sorry for the typo. Glad you found what you needed.

    Derek

    • Post Points: 5
  • Mon, Jul 23 2012 4:14 AM

    • blankman
    • Top 100 Contributor
    • Joined on Wed, Apr 20 2011
    • Posts 72
    • Points 1,200
    Re: get highlighted stretch coordinates Reply

    dmay:

    For rectangles, you'll receive a list of four values for ptSel, but you'll have to map these to the points in the rectangle's bBox attribute: obj~>bBox = ((10.0 10.0) (20.0 20.0))

    Derek

     

    Hi Derek,

    What is the best way to go about mapping these to extract the selected points?

    Thanks,

    Brian.

    • Post Points: 20
  • Mon, Jul 23 2012 4:34 AM

    Re: get highlighted stretch coordinates Reply

    Brian,

    Something like this:

    (procedure (abBBoxToPoints bbox)
      (list
       (lowerLeft bbox)
       (list (xCoord (lowerLeft bbox)) (yCoord (upperRight bbox)))
       (upperRight bbox)
       (list (xCoord (upperRight bbox)) (yCoord (lowerLeft bbox)))))

    (procedure (abGetSelectedPoints obj)
      (foreach mapcan (pt isSel)
        (or (dbGetq obj points) (abBBoxToPoints (dbGetq obj bBox)))
        (geGetSelSetFigPoint obj)
        (and isSel (list pt))
      )
    )

    Andrew

     

    • Post Points: 20
  • Fri, Jul 27 2012 8:56 AM

    • blankman
    • Top 100 Contributor
    • Joined on Wed, Apr 20 2011
    • Posts 72
    • Points 1,200
    Re: get highlighted stretch coordinates Reply

     Thanks Andrew

    • Post Points: 5
Page 1 of 1 (7 items)
Sort Posts:
Started by Aritra at 01 Dec 2011 02:09 AM. Topic has 6 replies.