Jump to content

Recommended Posts

Posted

I wrote something similar in VBA. I used "intersectwith" method but had a problem with embankment with curvature bigger than 90deg. (I know what problem it is and how to solve it but don't have time to wrote it ;/) does it work in yours code?

...and what will happen if bottom slope will be shorter than upper? ;)

Posted

Theres some other programs here also search for "batters"

  • 5 months later...
  • 1 month later...
  • 4 months later...
Posted

dude i would like to draw slope with different symbol..like half circle..

Posted

See above search for "batters" it uses a block for the downhill direction so you could change the block.

  • 7 months later...
Posted

Ghostware, very nice lisp. Could it be modified easily to draw triangles rather than lines?

Posted
Ghostware, very nice lisp. Could it be modified easily to draw triangles rather than lines?

See post #7 by BIGAL.

  • 3 months later...
Posted

i cant use this lsp on my map 3d 2010. i try with 2 pline (and 2 spline), but i cant. im taking this report "; error: no function definition: VLAX-ENAME->VLA-OBJECT"

 

Pls Help Me!!

Posted
i cant use this lsp on my map 3d 2010. i try with 2 pline (and 2 spline), but i cant. im taking this report "; error: no function definition: VLAX-ENAME->VLA-OBJECT"

 

Pls Help Me!!

add (vl-load-com) to the top of the code.

Posted

Thanks, nice lisp!

Seems to work slowly with big splines...why?

Posted

Excellent. For my use afstand changed the variable to a real value.

Allows greater freedom in the scale factor.

It is much like another routine dtal.vlx

 

(setq afstand (getreal "\ nLine slope distance:"))

 

DTAL.zip

  • 1 year later...
Posted

It works perfectly. I used it for detailing a digitalized 20 km corridor

Posted

Here is my revision... Fixed bug with splines - it should finish routine; you shouldn't finish it when hitting ESC... Now is OK...

 

M.R.

SLOPE-LINE.lsp

  • 1 year later...
  • 2 months later...
Posted

Hi,

What should be changed in slope-line.lsp to have the second tick 30% in length of the first one not 50%.

 

thanks!

Posted

Look into red comment :

 

(defun c:slope-line (/            is-on-pl?    talud_boven
                    talud_onder  afstand      afstand_totaal
                    count        p1           p2
                    kleur
                   )

 (defun is-on-pl? (ename pkt /)
   (vl-catch-all-apply
     'vlax-curve-getdistatpoint
     (list
       ename
       pkt
     ) ;_ end of list
   ) ;_ end of vlax-curve-getdistatpoint
   pkt
 ) ;_ end defun

 (vl-load-com)

 (if (and (setq talud_boven (car (entsel "\nSelect top slope: ")))
          (setq talud_onder (car (entsel "\nSelect bottom slope: ")))
          (setq afstand (getdist "\nLine slope distance:"))
          (setq kleur (acad_colordlg )
     ) ;_ end of and

   (progn
     (setq afstand_totaal 0)
     (setq count 0)
     (setq p1 (vlax-curve-getstartpoint
                talud_boven
              ) ;_ end of vlax-curve-getstartpoint
     ) ;_ end of setq
     (while p1
       (if (equal (/ count 2.0) (fix (/ count 2.0)) 0.001)
         (setq p2
                (vlax-curve-getclosestpointto
                  talud_onder
                  p1
                ) ;_ end of vlax-curve-getclosestpointto
         ) ;_ end of setq
         (setq
           p2 (mapcar '(lambda (x) (/ x 2)) [color=red];;; Change (/ x 2) to (* x 0.3) for 30% of distances ;;;[/color]
                      (mapcar '+
                              p1
                              (vlax-curve-getclosestpointto
                                talud_onder
                                p1
                              ) ;_ end of vlax-curve-getclosestpointto
                      ) ;_ end of mapcar
              ) ;_ end of mapcar
         ) ;_ end of setq
       ) ;_ end of if
       (entmake
         (list '(0 . "LINE")
               (cons 10 p1)
               (cons 11 p2)
                                       ;'(62 . 1) ; standaard kleur
               (cons 62 kleur)         ; kleur dia dialog instellen

         ) ;_ end of list
       ) ;_ end of entmake
       (if (not (vl-catch-all-error-p
                  (setq
                    p1
                     (is-on-pl?
                       talud_boven
                       (vl-catch-all-apply
                         'vlax-curve-getpointatdist
                         (list talud_boven
                               (if (<
                                     (setq afstand_totaal
                                            (+ afstand_totaal afstand)
                                     )
                                     (vlax-curve-getdistatpoint
                                       talud_boven
                                       (vlax-curve-getendpoint talud_boven)
                                     )
                                   )
                                 afstand_totaal
                                 nil
                               ) ;_ end of if
                         ) ;_ end of list
                       ) ;_ end of vl-catch-all-apply
                     ) ;_ end of is-on-pl?
                  ) ;_ end of setq
                ) ;_ end of vl-catch-all-error-p
           ) ;_ end of not
         p1
         (setq p1 nil)
       ) ;_ end of if
       (setq count (1+ count))
     ) ;_ end of while
   ) ;_ end of progn
 ) ;_ end of if
 (princ)
) ;_ end of defun

 

HTH, M.R.

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