TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Steve C on September 14, 2009, 02:10:41 PM

Title: Calculate/plot product off of a conveyor trajectory
Post by: Steve C on September 14, 2009, 02:10:41 PM
Hello Swamp people,

I have an engineer who brought to me an old lisp program from 1991 called traject.lsp.
When you run it it asks you ...
    - the speed of a conveyor belt
    - the size of the head pully
    - the center of gravity of the product above the conveyor
    - the angle of the conveyor (you can also give two points)
    - the distance in time between calculation points
    - and how many calculation points you want it to use. 

It will then figure out the calculation points and draw a polyline along those points. 
You end up with an polyline showing the trajectory of the product being falling off the
end of the conveyor.  It is metric and kind of works but seems to mess up your snaps.

Does this lisp sound familar to anyone? 
Does anyone know of a later version in Feet/Inches?
If anyone knows of an improved version of this lisp and could point me to it I'd appreciate it. 
I'd really like a Metric and an Imperial version if possible.  My guys could use something like this.

Thank you,
Steve

Title: Re: Calculate/plot product off of a conveyor trajectory
Post by: CAB on September 14, 2009, 03:44:12 PM
Steve I didn't see anything but the snaps problem is easy to fix.
Converting to imperial could be a little tedious but also doable.
Title: Re: Calculate/plot product off of a conveyor trajectory
Post by: hermanm on September 14, 2009, 08:32:11 PM
So, can you post the program which you now have?

I didn't see a file attachment to your post,

but perhaps that is not an option..
Title: Re: Calculate/plot product off of a conveyor trajectory
Post by: Steve C on September 15, 2009, 07:56:17 AM
hermanm,
Thanks for your interest.  Here is the original lisp.
Regards,
Steve

Title: Re: Calculate/plot product off of a conveyor trajectory
Post by: DEVITG on September 15, 2009, 11:03:36 AM
hermanm,
Thanks for your interest.  Here is the original lisp.
Regards,
Steve



Hi Steve , could you upload a conveyor sample dwg?
Title: Re: Calculate/plot product off of a conveyor trajectory
Post by: CAB on September 15, 2009, 12:07:07 PM
Here is the fix for the osnap.

What units do you usually run in your DWGs?
Title: Re: Calculate/plot product off of a conveyor trajectory
Post by: Steve C on September 15, 2009, 01:52:36 PM
Hello DEVITG,
Attached are sample Imperial and Metric conveyor drawings.
These are extremely basic, just the key elements for testing.
Note:  Both conveyors discharge to the right.
(I thought if I could get this command to work we could just mirror the
polyline afterwards if the conveyor discharged to the left)
The UNITS of the metric drawing are Decimal.
The UNITS of the imperial drawing are Architectural.
We do projects in both metric & imperial. 
(That's why I thought I would need 2 versions of the command)

Hello CAD,
I see no attachment or code showing your OSNAP fix.  ???

Thanks all,
Steve
Title: Re: Calculate/plot product off of a conveyor trajectory
Post by: CAB on September 15, 2009, 03:56:58 PM
Look closer at my post and you will see the attachment at the bottom, labeled tarject-CAB.lsp

To get the pline to go left you need to pick the angle right to left of enter (- 180 angle)
i.e. 15 deg for right or 165 deg for left, although left doesn't get the offset correct.
At any rate that to can be fixed.

What is the min - max range of angle of the conveyor?

Are we talking Centimeters & Inches?

What would the prompt defaults be for Imperial?
Title: Re: Calculate/plot product off of a conveyor trajectory
Post by: Steve C on September 16, 2009, 08:01:28 AM
Hello CAB,
Yes I do see your attachment now. Thank you.

Conveyor angle:  0 degree min. - about 30 degree max.

Imperial version prompts: Conveyor speed in feet per second
but other prompts like size of head pulley, etc. in inches.

Metric version prompts: Conveyor speed in meters per second
but other prompts like size of head pulley, etc. in milimeters.

Regards,
Steve