Vittorio Posted January 31, 2024 Posted January 31, 2024 Hello Everybody! I am totally new to AutoLISP and haven't coded anything yet. Currently I am reading "AutoCAD Platform Customization by Lee Ambrosius" at page 184 (out of ~700) and taking notes on my tablet. It will take some time until I'm finished with the book and some more time until I'll start practicing. But right now I'm looking for a function that could do the same as the Civil 3D OFFSETFEATURE command, except letting me pick the height from an object by snapping to an endpoint of another polyline for example. I looked at the "RETAN" function in the AutoLISP Quick Start tutorial to see if I can adapt some of its code, but the fact, that the Civil 3D OFFSETFEATURE function has some user interaction (select object to offset, enter offset width etc.) makes it impossible to me. I would highly appreciate if someone could assist me in creating this custom function. Many thanks in advance Quote
BIGAL Posted January 31, 2024 Posted January 31, 2024 What did a Google "offset 3dpolylines autocad" reveal ? Quote
Vittorio Posted January 31, 2024 Author Posted January 31, 2024 13 minutes ago, BIGAL said: What did a Google "offset 3dpolylines autocad" reveal ? Unfortunately, nothing useful ... Quote
Vittorio Posted February 6, 2024 Author Posted February 6, 2024 Any ideas on the LISP routine? I know about the command and other tools, but I would explicitly like to learn about LISP and if what I need is possible (modify a command with user interaction). Quote
BIGAL Posted February 6, 2024 Posted February 6, 2024 It is theoretically possible, as a Civil designer, road kerbs come to mind, survey back of kerb and add 2 more 3dlines. Thinking about it make a 2d pline over top of 3d poly and offset, make a new point list use the XY values but add the original corresponding z + ht adjust of the 3d poly, erase the 2 dummy plines and draw a new 3d poly. Big hint built into Civil software add ons, CIV3D, CIvil Site Design etc. Need a sample dwg with 3dpoly's and say text off offset and ht adjust. Note will fail if vertices are lost during offset. Quote
Vittorio Posted February 7, 2024 Author Posted February 7, 2024 (edited) I made a sample drawing which shows what I am trying to do. I have two possible scenarios: A closed 3D Polyline at the bottom and a 3D Polyline above A closed 3D Polyline at the bottom and a Survey Point above With those two scenarios I use the Civil 3D command OFFSETFEATURE (which is a step-by-step 3D offset procedure). How the command works: Specify XY-offset distance Select Object to offset Specify Side of the Object where the offset should be placed Specify Z-offset distance which may be: elevation difference constant height ... Civil 3D OFFSETFEATURE command The problem is step 4. where i have to input the Z-offset. At this point I cannot pick a coordinate, but only enter a single value. I have to type in the value by hand, so I need to memorize the value, copy it from the properties pane or write it down on a paper. Here an customized AutoLISP command would come in handy. I thought of "modifying" the OFFSETFEATURE command in a way that at step 4. I could either pick a point on a 3D Polyline or a Survey Point. Now what I need in the end is a TIN Civil 3D Surface, therefore the upper 3D Polyline must be located inside (when looking from the top) the lower 3D Polyline to create a 3D Mesh without Errors. Drawing_C3D_sample001.dwg Edited February 7, 2024 by Vittorio added description Quote
hosneyalaa Posted February 7, 2024 Posted February 7, 2024 Well Step 4 You have a polyline with a fixed height of 0.50 How to calculate the heights of Vertexes polyline 3D Quote
Vittorio Posted February 8, 2024 Author Posted February 8, 2024 13 hours ago, hosneyalaa said: Well Step 4 You have a polyline with a fixed height of 0.50 How to calculate the heights of Vertexes polyline 3D I was thinking of picking a Vertex on the 3D Polyline with OSNAP Endpoint. Would it be possible to "modify" the OFFSETFEATURE command so at step 4 I can pick a Point or Vertex and the LISP routine would get the Z-value from it? Quote
hosneyalaa Posted February 8, 2024 Posted February 8, 2024 @Vittorio try lisp from https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/3d-polyline-slope-routine-needed/td-p/9250847?nobounce&fbclid=IwAR0o17vq-mNm4anCmUVnSFO4T6K9Eb6GvwnLuRapPuUQToxiBf9EKz2GMs0 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.