CAD tip # 11295:
Question
This type of AutoCAD editing operations can be usually performed with the help of object snaps (osnaps). In some situations (e.g. if it is not clear where will the objects touch first, 'scale to fill-up' or 'passing through a limited space' tasks, etc.) it is not possible to use osnaps, and here will help this iterative method of incremental changes performed in an automatic loop with more and more accurate steps - see examples:
You can download the MoveTill utility from Download and load it into AutoCAD with APPLOAD. Then you can type the command MOVETILL, SCALETILL or ROTATETILL to start the requested iterative operation. Within it you will select the edited object, the potential boundary object or objects and the reference point or direction for the stepped changes. The application supports all types of 2D DWG objects, since version 1.2 also 3D Solids.
For Move you specify the direction vector (its size is irrelevant), for Scale you specify just the reference point, for Rotate you specify the reference point and the direction of the rotation (cw, ccw).
The Multiple option in ScaleTill allows you to mass scale objects relative to their individual reference points (see video and see sample DWG).
In Setup you can select the animation mode (fast, slow, interactive on pressing Enter), precision for detecting the intersection (interference with the boundary), the iteration rate (speed) and the maximum number of iteration loops.
In some cases (e.g. with thin objects) the iteration proces may not come to a solution - in this case try to decrease the iteration rate, e.g. to 0.8.
You can also preset the iteration parameters with the LISP variables:
(setq _TillMinMove 0.01) ; initial move (coef.) (setq _TillMinScale 1.01) ; initial scale (setq _TillMinRotate 0.01) ; initial rotation (setq _TillFuzzEqual 0.000001) ; match coef. (setq _TillMaxLoops 100) ; max. loops (setq _TillIterRate 1.0) ; relative iter.speed (setq _TillAnimate "No") ; animation type "Slow" "Fast" "Interactive"

