ica_cici Posted February 9, 2010 Posted February 9, 2010 Hi All, I need to make a twisted chain, and always do with the two commands. At first I array the object then 3drotate it one by one manually, but it need a lot of times and patients to get the twist result. I've been posted this thread in the general forum and Pablo Ferral suggests this to me: "Could you use a script or a lisp routine? Have you tried posting in the customisation forum?". I know how to use a lisp routine but I don't know how to make a lisp routine. Is there a lisp routine for array an object in a row and 3drotate it all at once? Is there an Autolisp tutorial to learn, because I need to make this shape in several sizes? Thanks for help. Quote
Adesu Posted February 10, 2010 Posted February 10, 2010 I guess you want like this,maybe (setq ss (ssget "x" '((0 . "TEXT")))) (if (not (member "geom3d.arx" (arx))) (arxload "geom3d") ) ; if (rotate3d ss dir sp "r" 0 ang "") Hi All, I need to make a twisted chain, and always do with the two commands. At first I array the object then 3drotate it one by one manually, but it need a lot of times and patients to get the twist result. I've been posted this thread in the general forum and Pablo Ferral suggests this to me: "Could you use a script or a lisp routine? Have you tried posting in the customisation forum?". I know how to use a lisp routine but I don't know how to make a lisp routine. Is there a lisp routine for array an object in a row and 3drotate it all at once? Is there an Autolisp tutorial to learn, because I need to make this shape in several sizes? Thanks for help. Quote
BearDyugin Posted February 10, 2010 Posted February 10, 2010 On simple somehow here so: (defun c:test (/ ptim t1 t2 kol ugol) (setq ptim (car (entsel)) t1 (getpoint "\nInitial a direction point: ") t2 (getpoint t1 "\nFinal point of a direction: ") kol (1- (getint "\nCopying number: ")) ugol (getreal "\nAngle of rotation: ") ) (vl-cmdf "_copy" ptim "" "_non" t1 "_non" t2) (vl-cmdf "_rotate3d" "_last" "" "_2" "_non" t1 "_non" t2 ugol) (repeat kol (vl-cmdf "_copy" "_last" "" "_non" t1 "_non" t2) (vl-cmdf "_rotate3d" "_last" "" "_non" t1 "_non" t2 ugol) ) ) If all as wanted, then it is possible to add the output agent of errors, input by default... Quote
Pablo Ferral Posted February 10, 2010 Posted February 10, 2010 See! There are some very clever people hanging out in these forums! Quote
ica_cici Posted February 11, 2010 Author Posted February 11, 2010 I guess you want like this,maybe (setq ss (ssget "x" '((0 . "TEXT"))))(if (not (member "geom3d.arx" (arx))) (arxload "geom3d") ) ; if(rotate3d ss dir sp "r" 0 ang "") I'm sorry can't develop the lisp, I don't know much about lisp language. But (Terimakasih) Thanks anyway. Quote
ica_cici Posted February 11, 2010 Author Posted February 11, 2010 For Geobuilder I've been Tried the test.lsp and it works, but the last copying objects seem rotate3d in one axes. It should array just like the previous copies. The distance of each link is 1.03 mm. Am I inputing wrong number? Command: test Select object: Initial a direction point: 0,0,0 Final point of a direction: 1.03,0,0 Copying number: 15 Angle of rotation: 12 Is kol refers to column? Thank you for help! Quote
ica_cici Posted February 11, 2010 Author Posted February 11, 2010 See! There are some very clever people hanging out in these forums! Yes you are right, thank you Pablo! Quote
BearDyugin Posted February 11, 2010 Posted February 11, 2010 ica_cici, No so should not be. Please, show the drawing DWG file, and copy from a command line all course of performance of the program Quote
ica_cici Posted February 11, 2010 Author Posted February 11, 2010 I try the lisp once more and now I think I know what is caused the problem. It seems that zoom in and zoom out had an effect on it (see test1.jpg & test2.jpg). In the second picture I apply zoom in so there are more space in the screen than the first picture and get the perfect result. Looks like screen appearance bounded the array process. (sorry it hard for me to express in english) This is the command list for test1.jpg Command: test Select object: Initial a direction point: 0,0,0 Final point of a direction: 1.03,0,0 Copying number: 15 Angle of rotation: 12 _copy Select objects: 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _2 Specify first point on axis: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Command: _copy Select objects: _last 1 found Select objects: Specify base point or displacement, or [Multiple]: _non Specify second point of displacement or : _non Command: _rotate3d Current positive angle: ANGDIR=counterclockwise ANGBASE=0 Select objects: _last 1 found Select objects: Specify first point on axis or define axis by [Object/Last/View/Xaxis/Yaxis/Zaxis/2points]: _non Specify second point on axis: _non Specify rotation angle or [Reference]: 12.00000000000000 Thank you very much Geobuilder test.dwg Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.