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 ?
You can use this command on each object in the selected set:
obj = car(geGetSelectedSet())ptSel = geGetSelFigPoint(obj)
If the objects are deslected, you can reselect the same points:
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))
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)
You're right, sorry for the typo. Glad you found what you needed.
dmay said: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
What is the best way to go about mapping these to extract the selected points?
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)) ))