Jump to content

3D offset polyline (Civil 3D OFFSETFEATURE command) and pick height (Z coordinate from object by osnap)


Recommended Posts

Posted

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

Posted
13 minutes ago, BIGAL said:

What did a Google "offset 3dpolylines autocad" reveal ?

Unfortunately, nothing useful ...

Posted

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

Posted

Can you attached example drawing

 

Posted

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.

 

Posted (edited)

I made a sample drawing which shows what I am trying to do.

I have two possible scenarios:

  1. A closed 3D Polyline at the bottom and a 3D Polyline above
  2. 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:

  1. Specify XY-offset distance
  2. Select Object to offset
  3. Specify Side of the Object where the offset should be placed
  4. Specify Z-offset distance which may be:
    1. elevation difference
    2. constant height
    3. ...

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.

 

image.thumb.png.bf7f82911bbe06a20c5881250e779c50.png

Drawing_C3D_sample001.dwg

Edited by Vittorio
added description
Posted

Well

Step 4 You have a polyline with a fixed height of 0.50

How to calculate the heights of Vertexes polyline 3D 

 

Posted
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?

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