Jump to content

Recommended Posts

Posted

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.:)

ARRAY.jpg

Posted

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.:)

Posted

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...

53871b2f8056.gif

Posted

See! There are some very clever people hanging out in these forums!

Posted
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.:)

Posted

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!:)

test.jpg

Posted
See! There are some very clever people hanging out in these forums!

 

Yes you are right, thank you Pablo!:)

Posted

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

Posted

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 :P

 

 

test1.jpg

test2.jpg

test.dwg

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...