Visual LISP, AutoLISP and General Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Stl.lisp steel shapes - insertion point problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
HI All,
I have been using this lisp for a while now and I've just realised when I insert an SHS section of 75 x 75mm the insertion point is off in the y direction by 0.5mm. It is only this section all other in SHS are ok.
I'm no programming guru but I trolled through the script and dim files anyhow but I couldn't see how only this section could be off.
Can anyone have a look and see if they can find the problem please?
This is a great script for inserting steel sections and 3d models.
Solved! Go to Solution.
Re: Stl.lisp steel shapes - insertion point problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
There was a BUG here
there is a misstake here (defun DRAW_TS_SHAPE (/... , , , , , (polar INSERT_PT (DTR 90) (/ OD_VERT 2)) It shall be (polar INSERT_PT (DTR 90) (/ OD_VERT 2.0)) as if OD_VERT is an INT , 75 by example , when divide by 2 it wil give 37 , and not 37.5 as it shall be
Change STL.lsp on your folder
I put a comment at CADALIST Tip1779: STL.ZIP
I mailed to Al Rogers , but it´s e-mail refuse mine.
Re: Stl.lisp steel shapes - insertion point problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Well spotted, thankyou very much for taking the time. The lisp file you attached did not include the change however. I have attached again with the required fix.
Cheers again.
Re: Stl.lisp steel shapes - insertion point problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Re: Stl.lisp steel shapes - insertion point problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
devitg wrote:....
(polar INSERT_PT (DTR 90) (/ OD_VERT 2))
It shall be
(polar INSERT_PT (DTR 90) (/ OD_VERT 2.0))....
I notice there are other places in even the latest corrected routine, where things are divided by 2 as an integer. Some are clearly real numbers that are being divided, so the result will not be rounded down to an integer, and it doesn't matter. But at least some of them look analagous to the above-quoted situation, so [without digging too deeply into where all the variable values are coming from] I wonder whether there are other places where 2 should be changed to 2.0, that haven't given you a problem just because you may not have used those portions yet. Look through for anywhere that the thing being divided will be an integer value.
Re: Stl.lisp steel shapes - insertion point problem
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I did change all 2 where it shall be 2.0 , even in multiplications .
I found some shapes with odd size , so they will give the same error
Not at NTH , neither in RTOS ,or in DCL related lines
Find attached
A few samples
(defun
DRAW_W_M_HP_SHAPE (/ R TW1 PT1 PT2 PT3 PT4 PT5 PT6 PT7 PT8 PT9 PT10
PT11 PT12 PT13 PT14 PT15 PT16 PT17 PT18 PT19 PT20
)
(setq
BF (/ BF 2.0)
TW (/ TW 2.0)
************************************
Changed to 2.0
(defun
DRAW_W_SHAPE_TOP (/ PT1 PT2 PT3 PT4 PT5 PT6 PT7 PT8 ENT1 ENT2)
(setq
BF (/ BF 2.0)
TW (/ TW 2.0)
*********************************************
Changed to 2.0
(defun
DRAW_S_SHAPE (/ TF1 TF2 PT1 PT2 HALF_TAN1 HALF_TAN2 HYPOT PT3 PT4 PT5
PT6 PT7 PT8 PT9 PT10 PT11 PT12 PT13 PT14 PT15 PT16 PT17
PT18 PT19 PT20 PT21 PT22 PT23 PT24 PT25 PT26 PT27 PT28
)
(setq
BF (/ BF 2.0)
TW (/ TW 2.0)
(- TF (* (/ (- BF TW) 2.0) 0.17632698))
