Jump to content
pramodmaharana

lisp to generate contour from xyz

Recommended Posts

pramodmaharana

Hi

 

Anybody have this lisp to generate contour from XYZ in xls file.

 

pramod

Share this post


Link to post
Share on other sites
Snownut

Also search for triangulation, ymg has been working on the subject for sometime now, he has a very nice lisp function posted here. PLEASE before posting a request at least do a basic search on your own.

Share this post


Link to post
Share on other sites
aloy

ymg3,

The discussions given in the link are interesting. I too tried to use two of the solutions given for the Delaunay triangulation but saw they give error messages after processing 99% of the points. They did not draw anything. I attach here the list used (about 750 points) and a snipped section of the points drawn separately.

What can be the problem?.

pointlist.lsp

Points.jpg

Share this post


Link to post
Share on other sites
marko_ribar

This is what I get after supplying ymg's tin command...

 

See attachment...

 

M.R.

POINTS - Delunay.dwg

Share this post


Link to post
Share on other sites
aloy

Marko, Could you give a link to the version you used or better still if you can attach the file in a reply. I want to try it in my AutoCAD 2013.

Regards,

Aloy

Share this post


Link to post
Share on other sites
BIGAL

I really compliment people to producing solutions available for free or nearly free but the free programs to do triangulation, contours, long sections and cross sections has been around for a long time, the free verison limited number of points, shareware unlimited, I know I downloaded well in excess of ten years ago. I believe what is missing is spageti the ability to take field code data not only create a dtm but also create create a string plan view, including breaklines, then produce long and cross sections. Take a csv level book produce a plan view did that 20+ years ago including strings yeah it had a cost. Ok go and get today a commercial product around $2,500.

 

Some may say I am criticizing but I am supporting I spent a significant time of my life as a Civil Software dealer so don't reinvent the wheel make it better spokes and 21"

 

I remember talking to software owner and discussing how many triangles per second could be produced. It was thousands remember 486.

Share this post


Link to post
Share on other sites
ymg3

aloy,

 

I did run your point list and I obtain same result as Marko on first run.

 

Find attached the latest version. Do bear in mind that it is still a work

in progress.

 

ymg

TriangV0.5.5.LSP

Share this post


Link to post
Share on other sites
marko_ribar

ymg3, yes, I used your version... Thanks a lot for your hard work... M.R.

Share this post


Link to post
Share on other sites
ymg3

Marko,

 

Thanks for the kind words.

 

ymg

Share this post


Link to post
Share on other sites
aloy

" I believe what is missing is spageti the ability to take field code data not only create a dtm but also create create a string plan view, including breaklines, then produce long and cross sections."

This is the most important thing. I am a C&S engineer. People do not construct road like what they do in factories. The most a developing or any other country will construct is one expressway or a highway per year. So the speed in the process of triangulation does not have much relevance. The software the designers use should be flexible to build the safest roads and allow the user to manipulate the cross section freely (fully string based) without limiting it to templates.

Share this post


Link to post
Share on other sites
ymg3

aloy,

 

Here is your drawing with some triangle edited out

and contour interval at 0.1m

 

ymg

Aloy.dwg

aloy.png

Share this post


Link to post
Share on other sites
aloy

Thanks ymg,

I too have been trying to adopt a programme originally from Burke. It was for a dynamic Delaunay triangulation which I modified for static. I found that the supertriangle did not work correctly halfway. I was however able to prevent those long line being drawn without having to erase them manually.

Thanks for you effort in this endevour.

I will try out your code later.

Aloy

Share this post


Link to post
Share on other sites
aloy

ymg,

I only tried to get the tin and it worked as it should and will be useful for me to get the long and cross sections of road. I was also trying on a different concept without the use of supertriangle. Thanks very much.

With Best Regards to the team.

Edited by aloy

Share this post


Link to post
Share on other sites
BIGAL

Re long sections & cross as your creating 3dfaces I am sure there is a intersect with example out there, I did a multiple line one, a long time ago, using VL-intersectwith should make this easier, only problem I see is that a pline will cross a 3d face twice, not sure how to get both sides, bit like circle answers. Will have a play. Use pline then this becomes "fence" option for selecting objects.

Share this post


Link to post
Share on other sites
ymg3

BIGAL,

 

Command "c:prof" does extract the profile from 3dface.

 

However I am not satisfied with the interface as it is.

The getneighbour routine is too slow in the published version.

 

I have accelerated it by a factor of 3 (to be published).

 

Also as the dialog box open, I want the elevation range

to be displayed. Also want to add option for displaying

grid etc.

 

Badly need a good way to represent alignment including

Spirals, Circular curve and Vertical curve.

 

ymg

Edited by ymg3

Share this post


Link to post
Share on other sites
ymg3

BIGAL,

 

Here's an alternate way to get the set of 3dfaces under a polyline.

 

  ;; getfencesel        by ymg                                               ;
  ;;                                                                         ;
  ;; Arguments:  en,  Linear Entity Name (Polylines, Arc, Ellipse etc.)      ;
  ;;            flt,  A valid Entity filter Ex: '((0 . "3DFACE"))  or nil    ;
  ;;                                                                         ;
  ;;   Returns: A Selection Set of Entities touching the selecting entity.   ;
  ;;                                                                         ;
  ;;  Requires: Express Tools                                                ;
  ;;                                                                         ;

  (defun getfencesel (en flt / fe px ss)    
     (acet-ss-zoom-extents (setq ss (ssadd en)))
     (setq px (* 0.75 (acet-geom-pixel-unit))
           fe (acet-list-remove-adjacent-dups (acet-geom-object-point-list en (/ px 2.0)))
           ss (if flt (ssget "_F" fe flt) (ssget "_F" fe))
     )      
  )

 

Once you have the selection set, there is basically two ways.

You can exploit information in ssnamex or go with the intersectwith method.

 

Right now the version you have makes use of a third method which utilize the

Lawson's walk to locate which 3dface is under a given point on your selecting poly.

 

ymg

Share this post


Link to post
Share on other sites
aloy

ymg3,

To my mind what is needed is to follow civil3D closely and do what ever enhancements later. That is also a way of not re-inventing the wheel. As for the centerlines (with or without spirals) were done way back in early 90s. Even the flexible cross section were also done at that time and roads/highways were constructed. At that time the survey was always done on a defined centerline. Now I have to find a way to fix two IPs and move the other with the mouse( perhaps with the help of LeeMac), while my horizontal alignment program runs and give the points at regular intervals. ymg3's Lawson walk can locate the triangle and get z (with vector dot and cross products). Another snippet can produce the long section base on which the cross sections can be produced. It appears to me the process is 90% complete (except for the quantities) and summit of MT. Everest is in sight.

Regards,

Aloy

Share this post


Link to post
Share on other sites
ymg3

Normally for Cross Section, what I plan to implement

is yet another dialog where you would choose an alignment

and then extract section of a given width at a given interval

including the significant points of the alignment. (tc ct etc.)

 

ymg

Edited by ymg3

Share this post


Link to post
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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