+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 25
  1. #1
    Senior Member
    Using
    not specified
    Join Date
    Feb 2006
    Posts
    243

    Default replacing polyline with 3d polyline getting elevation(z)from reading other polyline

    Registered forum members do not see this ad.

    hello friends
    can any one help to draw 3dpolyline with enterval(x) getting elevation (z value)
    from(y value of 2d polyline minus y value of datum value)
    please see attached drawing for illustration
    the aim of routine to get elevation directly from 3dployline in plan instead of going back to profile and measur chainage then elevation
    thanks
    Attached Files

  2. #2
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    3,780

    Default

    You need pick pline1 pick pline2 create pline 3 I dont have a coded answer but basicly you need to work with the two plines stepping and increment along them at same time get x1,y1 and x2,y2=Z after datum scale adjust then make a list x1,y1,z for new pline. Theres lots of posts here about stepping along a pline and pulling co-ords out just need to duplicate inside routine to run for each pline.
    A man who never made mistakes never made anything

  3. #3
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows XP
    Discipline
    Construction
    pBe's Discipline Details
    Discipline
    Construction
    Details
    Camp Construction planning and details
    Using
    AutoCAD 2009
    Join Date
    Apr 2010
    Posts
    2,089

    Default

    That is a tall order motee-z, but doable.

  4. #4
    Senior Member
    Using
    not specified
    Join Date
    Feb 2006
    Posts
    243

    Default

    I think this is will be very interesting routin for a wide number of engineers
    and no one try to write a routin about it waiting for response
    thanks

  5. #5
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows XP
    Discipline
    Construction
    pBe's Discipline Details
    Discipline
    Construction
    Details
    Camp Construction planning and details
    Using
    AutoCAD 2009
    Join Date
    Apr 2010
    Posts
    2,089

    Default

    Quote Originally Posted by motee-z View Post
    I think this is will be very interesting routin for a wide number of engineers
    and no one try to write a routin about it waiting for response
    thanks
    Its only been a few days motee-z, be patient

  6. #6
    Forum Deity
    Using
    Civil 3D 2013
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    3,780

    Default

    The wide number of engineers would use something like CIV3d which can do this as you would use a surface and a pline draped on the surface.

    Again as a start search for "export co-ords of a pline" and "chainages along a pline". Theres more need for a excel long & cross section routine and this could do also what you want.
    A man who never made mistakes never made anything

  7. #7
    Senior Member
    Using
    not specified
    Join Date
    Feb 2006
    Posts
    243

    Default

    thanks to BIGAl and PBe to response i know civil3d not do like that draping polyline to surface from plan to plan not from profile to alignment

  8. #8
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows XP
    Discipline
    Construction
    pBe's Discipline Details
    Discipline
    Construction
    Details
    Camp Construction planning and details
    Using
    AutoCAD 2009
    Join Date
    Apr 2010
    Posts
    2,089

    Default

    Do one manually and show us the result motee-z

  9. #9
    Senior Member
    Using
    not specified
    Join Date
    Feb 2006
    Posts
    243

    Default

    here is an example
    Attached Files

  10. #10
    Forum Deity pBe's Avatar
    Computer Details
    pBe's Computer Details
    Operating System:
    Windows XP
    Discipline
    Construction
    pBe's Discipline Details
    Discipline
    Construction
    Details
    Camp Construction planning and details
    Using
    AutoCAD 2009
    Join Date
    Apr 2010
    Posts
    2,089

    Default

    Registered forum members do not see this ad.

    _GetZelev re-write
    Remove creation of temporary lines for intersect
    Code:
    (defun c:3DChainage (/ _GetZelev datum interval v1 chnProfile Alignment int v ptlist lst 3dpoints sp key scl)
      (vl-load-com)
    ;;;  3dpoly from Profile & Alignment	;;;
    ;;;       pBe Mar2013 V.1.2		;;;
      (defun _GetZelev (en1 in d v l / mn mx dist tmpht i HtList pts)
        (setq sp (car l)
        	   mn    (list (apply 'min (mapcar 'car l)) (apply 'min (mapcar 'cadr l)))
              mx    (list (apply 'max (mapcar 'car l)) (apply 'max (mapcar 'cadr l)))
              dist  (- (car mx) (car mn))
              tmpht (- (cadr mx) (cadr mn))
              i     in
        )
        (while (< i dist)
          (setq p1 (polar mn 0 i)
                p2 (polar p1 (/ pi 2.0) tmpht)
          )
          (setq p3p4 (vl-some '(lambda (x y)
                                 (if (<= (car x) (car p1) (car y))
                                   (list x y)
                                 )
                               )
                              l
                              (cdr l)
                     )
          )
          (setq HtList (append HtList (list (inters p1 p2 (car p3p4) (cadr p3p4))))
                i      (+ i in)
          )
          (setq l (member (car p3p4) l))
        )
        (setq pts (mapcar (function (lambda (j) (+ d v (- (cadr j) (cadr sp)))))
                          (append HtList (list (last l)))
                  )
        )
        (cons (+ d v) pts)
      )
      (cond ((and (setq datum (getint "\nEnter Datum Value: "))
                  (setq interval (getdist "\nEnter Interval Distance: "))
                  (setq scl (getreal "\nEnter Vertical/Horizental Ratio: "))
                  (setq ptlist nil
                        v1     (getdist "\nEnter Start V1 Value: ")
                  )
                  (setq v1 (/ v1 scl))
                  (setq chnProfile (car (entsel "\nSelect Chainage Profile: ")))
                  (setq Alignment (car (entsel "\nSelect Alignment: ")))
                  (setq int interval)
                  (while (setq v (vlax-curve-getPointAtDist Alignment int))
                    (setq ptlist (append ptlist (list v))
                          int    (+ int interval)
                    )
                  )
                  (setq ptlist (cons (vlax-curve-getStartPoint Alignment)
                                     (append ptlist (list (vlax-curve-getEndPoint Alignment)))
                               )
                  )
                  (setq sp  (vlax-curve-getStartPoint chnProfile)
                        key (Cadr sp)
                        lst (cons sp
                                  (mapcar '(lambda (j) (list (car j) (+ key (/ (- (cadr j) key) scl))))
                                          (cdr (mapcar 'cdr (vl-remove-if-not '(lambda (ent) (= (car ent) 10)) (entget chnProfile)))
                                          )
                                  )
                            )
                  )
                  (setq 3dpoints (mapcar (function (lambda (j k) (list (car j) (cadr j) k)))
                                         ptlist
                                         (_GetZelev (vlax-ename->vla-object chnProfile) interval datum v1 lst)
                                 )
                  )
                  (progn (command "_spline") (foreach pt 3dpoints (command "_non" pt)) (command "" "" ""))
             )
            )
      )
      (princ)
    )
    command: 3DChainage
    Enter Datum Value: 20
    Enter Interval Distance: 5
    Enter Vertical/Horizental Ratio: 10
    Enter Start V1 Value: 66.055 <or pick two points from Datum line to start point of chainage profile>
    Select Chainage Profile: <Select chainage profile polyline>
    Select Alignment: <Select Alignment polyline>



    Last edited by pBe; 15th Mar 2013 at 10:12 am. Reason: Vertical/Horizontal Ratio

Similar Threads

  1. 3d polyline with elevation gained from a 3d face
    By ewock76 in forum AutoLISP, Visual LISP & DCL
    Replies: 8
    Last Post: 31st Aug 2012, 01:56 pm
  2. Snap Polyline to the block insertion without changing the orientation of Polyline
    By Dhuliya_jay in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 9th Oct 2011, 09:49 am
  3. Replies: 10
    Last Post: 13th Jul 2011, 01:51 pm
  4. lisp to move largest room polyline to another layer for floor gross polyline
    By TheresaT in forum AutoLISP, Visual LISP & DCL
    Replies: 6
    Last Post: 25th Aug 2010, 07:11 pm
  5. Polyline elevation and LISP...
    By ramis in forum AutoCAD Beginners' Area
    Replies: 10
    Last Post: 7th Jun 2007, 02:07 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts