Author Topic: Automatically create 3D Polylines on crossing 3D polyline Geometry??  (Read 386 times)

0 Members and 1 Guest are viewing this topic.

Windsor

  • Mosquito
  • Posts: 5
Hi there,

This is my first post here and I'm quite new to autolisp programming.

My problem is that I want to automatically generate a 3D Polyline across existing 3D Polylines (please see IMAGE 1 below). is this possible through Autolisp as this has been puzzling me for some time now. (Cyan line is ar z=0, yellow is 3D polyline crossing contours and grey are 3d contours comprised of 3D polylines)

I'm aware this process can be done manually using the apparent intersection objectsnap in plan view or by using civil 3D. However I am simply looking to speed up workflow as sections like these take up a lot of time when there are many of them to do and I don not have access to Civil 3D, only standart AutoCAD.

Any help with this would be greatly appreciated!

if there is any further information you need please let me know.

ribarm

  • Gator
  • Posts: 2747
  • Marko Ribar, architect
Re: Automatically create 3D Polylines on crossing 3D polyline Geometry??
« Reply #1 on: June 22, 2022, 08:55:31 PM »
I am not with CAD to test unnecessary tested things, but I can tell - if your contours are 3d polys and you need 3d poly spanning across like projection of reference polyline entity (lwpoly), then please try one of routines packed in this ZIP file :
https://www.theswamp.org/index.php?topic=9042.msg576276#msg576276

Good luck...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

Windsor

  • Mosquito
  • Posts: 5
Re: Automatically create 3D Polylines on crossing 3D polyline Geometry??
« Reply #2 on: June 23, 2022, 05:17:27 AM »
Hi there, thanks for the reply.

I'm a bit stuck on how to use these as I wish to create the yellow lines in the image above. these .lsp files dont allow me to select any of the olyline geometry.

I must be missing something obvious but I'm new to using lisp programmes.

Regards,
Luke

BIGAL

  • Swamp Rat
  • Posts: 1037
  • 40 + years of using Autocad
Re: Automatically create 3D Polylines on crossing 3D polyline Geometry??
« Reply #3 on: June 23, 2022, 07:52:13 PM »
This is a every day question for civil engineers, so simple answer is get Civil software add on.

Ok I here moaning but it costs.

So look at other products like TriangV0.6.7.lsp does what you want maybe as it uses TIN's yes its free.
A man who never made a mistake never made anything

Windsor

  • Mosquito
  • Posts: 5
Re: Automatically create 3D Polylines on crossing 3D polyline Geometry??
« Reply #4 on: June 24, 2022, 03:30:16 AM »
Hi Bigal

This has been a question that's been on my mind for a while now, unfortunately I only work through AutoCAD but the lisp that you have mentioned below is brilliant, it generates geometry comprising of 3d faces that can then be cut with a lifted line and the resulting spline can be converted into a polyline and be used for 2D sections. This is already a real timesaver.

Thank you very much for sending this on!

Lee Mac

  • Seagull
  • Posts: 12696
  • London, England
Re: Automatically create 3D Polylines on crossing 3D polyline Geometry??
« Reply #5 on: June 25, 2022, 11:37:49 AM »
The program I posted here back in 2013 is close to what you're looking for, though, this operates with 2D polyline contours rather than 3D polyline contours.

BIGAL

  • Swamp Rat
  • Posts: 1037
  • 40 + years of using Autocad
Re: Automatically create 3D Polylines on crossing 3D polyline Geometry??
« Reply #6 on: June 25, 2022, 08:45:48 PM »
I dont know how much civil work you do but Civil Site Design will run with Autocad as is reasonably priced and does way more than you will probably ever use.


https://civilsitedesign.com
A man who never made a mistake never made anything

doaiena

  • Mosquito
  • Posts: 3
Re: Automatically create 3D Polylines on crossing 3D polyline Geometry??
« Reply #7 on: June 27, 2022, 09:10:56 PM »
I think i have an idea, but i dont have time to present it in code at the moment.

- select 3DPolylines
- select lines that you want to check for intersections with
- make flat copies of 3DPolylines (z = 0)

3DPoly - ((1 . 3DPoly1) (2 . 3DPoly2) (3 . 3DPoly3) etc...)
FlatCopy - ((1 . FlatPoly1) (2 . FlatPoly2) (3 . FlatPoly3) etc...)

- check for intersections between the flat copies and the lines

(setq intersectionPoint3D (vlax-curve-getPointAtParam 3DPoly1... (vlax-curve-getParamAtPoint FlatPoly1... intersectionPoint2D)))

- make a list of all intersection3D points and sort them from the start point of the line
- connect all intersection3D points

BIGAL

  • Swamp Rat
  • Posts: 1037
  • 40 + years of using Autocad
Re: Automatically create 3D Polylines on crossing 3D polyline Geometry??
« Reply #8 on: June 27, 2022, 10:10:01 PM »
Also posted here https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/automatically-cutting-sections-with-lisp-routine/td-p/11248758

Suggested use TriangV.0.6.7.lsp that has extract long section from a TIN model and its free.
A man who never made a mistake never made anything

ribarm

  • Gator
  • Posts: 2747
  • Marko Ribar, architect
Re: Automatically create 3D Polylines on crossing 3D polyline Geometry??
« Reply #9 on: June 28, 2022, 12:28:01 AM »
Just for clearance, to put back topic on top...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube