
Discussion forum
|

Please abide by the rules of this forum.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
Polygcode.lsp |
Post Reply ![]() |
Author | |
r.b.hughes ![]() Newbie ![]() Joined: 07.Oct.2022 Location: Canada Using: AutoCAD 2023 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 10.Oct.2022 at 21:43 |
Thanks for the help. I am not a LISP user. My mistake was not putting "cadr PT1" in brackets.
|
|
![]() |
|
Kent Cooper ![]() Senior Member ![]() Joined: 12.Mar.2013 Location: United States Using: AutoCAD2020, 2023 Status: Offline Points: 580 |
![]() ![]() ![]() ![]() ![]() |
Very basic AutoLisp multiplication:
.... (princ (strcat "\n" "X" (rtos (* (cadr PT1) 2) 2 __PV_DP) __PV_Delimiter ....
|
|
![]() |
|
r.b.hughes ![]() Newbie ![]() Joined: 07.Oct.2022 Location: Canada Using: AutoCAD 2023 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
I have been using this .lsp file (downloaded from this site) for students to extract XYZ coordinates to be used in a CNC.program. I am trying to adapt the program to extract XZ coordinates for programs for a CNC lathe. The problem I am having is that the X values I get are radius, and I need diameter. I have not been able to find out how to multiply the polyline point value by 2. Here is a clip of the section of the script (foreach PT1 listCOORDINATES ;all vertices (princ (strcat "\n" "X" (rtos (cadr PT1) 2 __PV_DP) __PV_Delimiter "Z" (rtos (car PT1) 2 __PV_DP) )) ; display XY For simplicity, the Y coordinate (cadr) is the X axis, and the X coordinate (car) is the Z axis. I need the value of the Y coordinate to be multiplied by 2. Can anyone suggest how to do this? Many thanks.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0,094 seconds.