3D_PolyOffset

Short description

  • Creates a 3D offset of a selected 3D polyline.
  • Converts the original 3D polyline into a temporary 2D polyline.
  • Applies a user-defined offset distance.
  • Reconstructs a new 3D polyline using original Z-coordinates.
  • Restores system variables and cleans up temporary entities.

Command:

  • Command name: OFFSET3D
  • Select a 3D polyline when prompted.
  • Enter the offset distance via keyboard input.

Description:

  • Saves current system variables (OSMODE, PLINETYPE, VIEWDIR).
  • Switches to World UCS and disables object snaps.
  • Extracts all vertex coordinates from the selected 3D polyline.
  • Generates a temporary 2D polyline using XY coordinates only (Z set to 0).
  • Offsets the temporary 2D polyline by a specified distance.
  • Reads offset vertex coordinates.
  • Creates a new 3D polyline by combining offset XY values with original Z values.
  • Deletes temporary 2D polylines.
  • Restores original system settings.

Helper function: (if any)​

  • Function name: polypt
  • Validates whether the selected entity is a POLYLINE.
  • Iterates through all vertices until SEQEND is reached.
  • Extracts X, Y, and Z coordinates (group code 10).
  • Stores vertex coordinates in the global list ppt_list.
  • Displays an error message if the entity is not a polyline.

Functionalities:

  • 3D polyline vertex extraction.
  • Temporary 2D polyline generation.
  • Keyboard-driven offset distance input.
  • Automated 2D offset operation.
  • Reconstruction of a 3D polyline with preserved elevation values.
  • Automatic cleanup of intermediate geometry.
  • System variable state preservation and restoration.

Result:

  • 3D polyline vertex extraction.
  • Temporary 2D polyline generation.
  • Keyboard-driven offset distance input.
  • Automated 2D offset operation.
  • Reconstruction of a 3D polyline with preserved elevation values.
  • Automatic cleanup of intermediate geometry.
  • System variable state preservation and restoration.

Images, animations etc.

Pixel

Additional info:

Share this page:

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Categories: AutoCAD_Lips
Tags: 3D
0
Would love your thoughts, please comment.x
()
x