Jump to content

Distribute vertices along a polyline with a specific length interval


Recommended Posts

Posted

Hello again :oops:

 

i been testing the code with stations that i will acounter for sure and find that the points positioned precisely on stright ortographic polilynes only where the path distance is equal to the polyline length(RED LINE)

 

in all other polylines as you can see in the image the points are not position correctly

 

what can i do?

 

Thanks

Shay

 

Attached

DWG

Image

LSP

m2.dwg

m2.jpg

m2.LSP

Posted

Still not sure.

 

Try this demo:

 

(defun c:demo2 (/ getPoly ptst pten wall front back exist in seglen pt ppt pc
	pr ptList)
 (defun getPoly (ent msg)
   (if	(setq ent (car (entsel msg)))
     (if (eq (cdr (assoc 0 (entget ent))) "LWPOLYLINE")
ent
     ) ;_if
     (alert "\nThe selected object is not a polyline")
   ) ;_if
 )
 (if (and
(setq ptst (getpoint "\nStart point of path: "))
(setq pten (getpoint ptst "\nEndpoint of path: "))
     )

   (progn
     (setq wall (getPoly wall "\nSelect Wall eleveation line"))
     (redraw wall 3)
     (setq front (getPoly front "\nSelect Front eleveation line"))
     (redraw front 3)
     (setq back (getPoly back "\nSelect Back eleveation line"))
     (redraw back 3)
     (setq exist (getPoly exist "\nSelect Exist eleveation line"))
     (mapcar '(lambda (e) (redraw e 4)) (list wall front back))
;;;	 testing purposes only				;;;
;;; 	insert your interval "thingy" here instead	;;;
     (Setq in 6.25
    seglen in
    ptList nil
     )
;;;							;;;

     (while (Setq pt (vlax-curve-getPointAtDist wall seglen))
(setq ppt (vlax-curve-getparamatpoint wall pt))
(vlax-invoke
  (vlax-ename->vla-object wall)
  'AddVertex
  (1+ (fix ppt))
  (progn
    (setq ptList (cons (setq p (list (car pt) (Cadr pt))) ptList))
    p
  )
)
(setq seglen (+ seglen in))
     )

     (foreach pline_ (list front back exist)
(foreach pt ptList
  (setq
    pc (vlax-curve-getClosestPointToProjection pline_ pt '(0 1 0))
  )
  (setq pr (vlax-curve-getparamatpoint pline_ pc))
  (vlax-invoke
    (vlax-ename->vla-object pline_)
    'AddVertex
    (1+ (fix pr))
    (list (car pc) (Cadr pc))
  )
)
     )
     (foreach p ptList
(command "xline" "V" "_non" p "")
     )
   )
 )
 (princ)
)

Posted
Still not sure.

 

Try this demo:

 

(defun c:demo2 (/ getPoly ptst pten wall front back exist in seglen pt ppt pc
       pr ptList)
 (defun getPoly (ent msg)
   (if    (setq ent (car (entsel msg)))
     (if (eq (cdr (assoc 0 (entget ent))) "LWPOLYLINE")
   ent
     ) ;_if
     (alert "\nThe selected object is not a polyline")
   ) ;_if
 )
 (if (and
   (setq ptst (getpoint "\nStart point of path: "))
   (setq pten (getpoint ptst "\nEndpoint of path: "))
     )

   (progn
     (setq wall (getPoly wall "\nSelect Wall eleveation line"))
     (redraw wall 3)
     (setq front (getPoly front "\nSelect Front eleveation line"))
     (redraw front 3)
     (setq back (getPoly back "\nSelect Back eleveation line"))
     (redraw back 3)
     (setq exist (getPoly exist "\nSelect Exist eleveation line"))
     (mapcar '(lambda (e) (redraw e 4)) (list wall front back))
;;;     testing purposes only                ;;;
;;;     insert your interval "thingy" here instead    ;;;
     (Setq in 6.25
       seglen in
       ptList nil
     )
;;;                            ;;;

     (while (Setq pt (vlax-curve-getPointAtDist wall seglen))
   (setq ppt (vlax-curve-getparamatpoint wall pt))
   (vlax-invoke
     (vlax-ename->vla-object wall)
     'AddVertex
     (1+ (fix ppt))
     (progn
       (setq ptList (cons (setq p (list (car pt) (Cadr pt))) ptList))
       p
     )
   )
   (setq seglen (+ seglen in))
     )

     (foreach pline_ (list front back exist)
   (foreach pt ptList
     (setq
       pc (vlax-curve-getClosestPointToProjection pline_ pt '(0 1 0))
     )
     (setq pr (vlax-curve-getparamatpoint pline_ pc))
     (vlax-invoke
       (vlax-ename->vla-object pline_)
       'AddVertex
       (1+ (fix pr))
       (list (car pc) (Cadr pc))
     )
   )
     )
     (foreach p ptList
   (command "xline" "V" "_non" p "")
     )
   )
 )
 (princ)
)

 

Hello

Im in work

I have snatch it andin first glance it seems exactly what im after

I saw also lots of new things for me to learn in your code

God..how did you manage to shorten my code like this….welldone!

Billion of thanks dude

I wish to be like you one day !

Shay

Posted

Hi

Learning from the best!

 

(vl-load-com)
(defun c:demo2 (/ getPoly ptst pten wall front back exist in seglen pt ppt pc
       pr ptList)
 (defun getPoly (ent msg)
   (if    (setq ent (car (entsel msg)))
     (if (eq (cdr (assoc 0 (entget ent))) "LWPOLYLINE")
   ent
     ) ;_if
     (alert "\nThe selected object is not a polyline")
   ) ;_if
 )
 (if (and
   (setq ptst (getpoint "\nStart point of path: "))
   (setq pten (getpoint ptst "\nEndpoint of path: "))
     )

   (progn
     (setq wall (getPoly wall "\nSelect Wall eleveation line"))
    [b][color=red] (redraw wall 3)[/color][/b]
     (setq front (getPoly front "\nSelect Front eleveation line"))
    [color=red][b] (redraw front 3)[/b][/color]
     (setq back (getPoly back "\nSelect Back eleveation line"))
    [b][color=red] (redraw back 3)[/color][/b]
     (setq exist (getPoly exist "\nSelect Exist eleveation line"))
    [color=red] [b](mapcar '(lambda (e) (redraw e 4)) (list wall front back))[/b][/color]
;;;     testing purposes only                ;;;
;;;     insert your interval "thingy" here instead    ;;;
     (Setq in 6.25
     [b][color=lime][color=red] seglen in[/color]
      [color=red] ptList nil[/color][/color][/b]
     )
;;;                            ;;;

     (while (Setq pt (vlax-curve-getPointAtDist wall seglen))
   (setq ppt (vlax-curve-getparamatpoint wall pt))
   (vlax-invoke
     (vlax-ename->vla-object wall)
     'AddVertex
     (1+ (fix ppt))
     (progn
      [color=red] [b](setq ptList (cons (setq p (list (car pt) (Cadr pt))) ptList))[/b][/color]
       p
     )
   )
   [b][color=red](setq seglen (+ seglen in))[/color][/b]
     )

     (foreach pline_ (list front back exist)
   (foreach pt ptList
     (setq
      [color=red] [b]pc (vlax-curve-getClosestPointToProjection pline_ pt '(0 1 0))[/b][/color]
     )
  [b]  [color=darkorange] [color=red](setq pr (vlax-curve-getparamatpoint pline_ pc))[/color][/color][/b]
     (vlax-invoke
       (vlax-ename->vla-object pline_)
       'AddVertex
       (1+ (fix pr))
      [color=red][b] (list (car pc) (Cadr pc))[/b][/color]
     )
   )
     )
     (foreach p ptList
   (command "xline" "V" "_non" p "")
     )
   )
 )
 (princ)
)

can you please explain to me those lines marked as RED?

 

 

  1. why did u use masted defun?
  2. why did you use redraw?
  3. what mapcar is doing and what is "e"
  4. why you assign in to seglen?
  5. why you assaign nill to ptlist?
  6. what getClosestPointToProjection does (in a simple therms)?
  7. what is pc?

Thanks

Shay

Posted
Still not sure.

 

Try this demo:

 

(defun c:demo2 (/ getPoly ptst pten wall front back exist in seglen pt ppt pc
	pr ptList)
 (defun getPoly (ent msg)
   (if	(setq ent (car (entsel msg)))
     (if (eq (cdr (assoc 0 (entget ent))) "LWPOLYLINE")
ent
     ) ;_if
     (alert "\nThe selected object is not a polyline")
   ) ;_if
 )
 (if (and
(setq ptst (getpoint "\nStart point of path: "))
(setq pten (getpoint ptst "\nEndpoint of path: "))
     )

   (progn
     (setq wall (getPoly wall "\nSelect Wall eleveation line"))
     (redraw wall 3)
     (setq front (getPoly front "\nSelect Front eleveation line"))
     (redraw front 3)
     (setq back (getPoly back "\nSelect Back eleveation line"))
     (redraw back 3)
     (setq exist (getPoly exist "\nSelect Exist eleveation line"))
     (mapcar '(lambda (e) (redraw e 4)) (list wall front back))
;;;	 testing purposes only				;;;
;;; 	insert your interval "thingy" here instead	;;;
     (Setq in 6.25
    seglen in
    ptList nil
     )
;;;							;;;

     (while (Setq pt (vlax-curve-getPointAtDist wall seglen))
(setq ppt (vlax-curve-getparamatpoint wall pt))
(vlax-invoke
  (vlax-ename->vla-object wall)
  '[color="red"][b]AddVertex[/b][/color]
  (1+ (fix ppt))
  (progn
    (setq ptList (cons (setq p (list (car pt) (Cadr pt))) ptList))
    p
  )
)
(setq seglen (+ seglen in))
     )

     (foreach pline_ (list front back exist)
(foreach pt ptList
  (setq
    pc (vlax-curve-getClosestPointToProjection pline_ pt '(0 1 0))
  )
  (setq pr (vlax-curve-getparamatpoint pline_ pc))
  (vlax-invoke
    (vlax-ename->vla-object pline_)
    'AddVertex
    (1+ (fix pr))
    (list (car pc) (Cadr pc))
  )
)
     )
     (foreach p ptList
(command "xline" "V" "_non" p "")
     )
   )
 )
 (princ)
)

 

In yr code u use 'addVertex

What's that syntax and where I can find it Qin the help.

Shay

Posted
cant see 'addVertex

 

Its right there on the link on LMs' post

 

Hi

 

  1. why did u use masted defun?
  2. why did you use redraw?
  3. what mapcar is doing and what is "e"
  4. why you assign in to seglen?
  5. why you assaign nill to ptlist?
  6. what getClosestPointToProjection does (in a simple therms)?
  7. what is pc?

Thanks

Shay

 

To answer this:

why nested? The function is declared local, reason for that it there by any chance a function loaded with the same name [getPoly] after this routine. It will then use that function instead of the one intended.

 

You may notice some of our fellow forum member use function name as

LM:Getpoly... AT:Banana? or even (defun V^V ()..... chances of those functions having the same name as other functions are virtually nil. On those cases, there is no harm not "nesting" the function

 

redraw: to emulate ssget highlighting

 

what mapcar is doing and what is "e" mapcar process each element of a given list. in this case the first element is assign to variable e as an argument per iteration. so.

 

first element : wall - > e

second element: front - > e

.......

 

why you assign in to seglen? you already know the answer to that

 

why you assaign nill to ptlist? for every loop . I need to empty this variable as i am using the function cons to build a list.

 

what getClosestPointToProjection does (in a simple therms)? as defined on the help file

 

Returns the closest point (in WCS) on a curve after projecting the curve onto a plane

 

it cannot get any simpler than that. Tell you what, try this and see what happens

 

(setq pline (Car (entsel)))
     (command "_point" "_non" (vlax-curve-getClosestPointToProjection pline (getpoint) '([b]1 0 0[/b])))
     )

(setq pline (Car (entsel)))
     (command "_point" "_non" (vlax-curve-getClosestPointToProjection pline (getpoint) '([b]0 1 0[/b])))
     )

 

what is pc? that is the result from vlax-curve-getClosestPointToProjection function

 

HTH

  • 2 weeks later...
Posted
Its right there on the link on LMs' post

 

(setq pline (Car (entsel)))

(command "_point" "_non" (vlax-curve-getClosestPointToProjection pline (getpoint) '(0 1 0)))

)

[/code]

 

 

what is (0 1 0)? can u write a simple defun that can show how this function differ from (vlax-curve-getPointAtDist) ?

 

BDW..your example returns nill

Posted

Of course it will return nil. but do you see the "point" entity? (pdmode 34)

 

Anyhoo, Draw a line from 0,0 to 5,5

 

(defun c:test ()
(setq object (Car (entsel))))
(command "_line"
              "_non"
              (vlax-curve-getClosestPointToProjection
                object
                '(4 1 0)
                '(0 [b]1[/b] 0)
              )
              "_non"
              '(4 1 0)
              "_non"
              (vlax-curve-getClosestPointToProjection
                object
                '(4 1 0)
                '([b]1[/b] 0 0) ""
              )
     )
)

 

You see where the first point is? projected from (4.0 1.0) to (4.0 4.0) "Y" direction (vertical)

Third point: projected from (4.0 1.0) to (1.0 1.0) "X" projection (Horizontal)

 

Supplying an interval along the "curve" (the lines) to get the coordinates , getPointAtDist will not work in this case

as you have lines of varying angles (image at post # 21). plus the fact that startpoint varies as well.

 

Got it?

  • 1 month later...
Posted

(Defun c:demo ()
 (if (and (setq pline (car (entsel "\nSelect Polyline:")))
          (eq (cdr (assoc 0 (entget pline))) "LWPOLYLINE")
          (setq int (getdist "\nEnter Interval:"))
          (setq in int)
     )
   (while (Setq pt (vlax-curve-getPointAtDist pline int))
     (setq ppt (vlax-curve-getparamatpoint pline pt))
     (vlax-invoke
       (vlax-ename->vla-object pline)
       'AddVertex
       (1+ (fix ppt))
       (list (car pt) (Cadr pt))
     )
     (setq int (+ int in))
   )
 )
)

 

This works fine on polylines where all segements are just straight. But if I have a polyline with arcs it will remove the arc and replace it with straight segments at the specified distance. Is there another version of this that also works on polylines which contain arcs?

 

Feargt

Posted

Here, try this - not tested, but it should work...

 

(defun c:demo ( / add_vtx pl int in pt flag )
 
 (vl-load-com)
 
 (defun add_vtx ( obj add_pt ent_name / bulg )
     (vla-addVertex
         obj
         (1+ (fix add_pt))
         (vlax-make-variant
             (vlax-safearray-fill
                 (vlax-make-safearray vlax-vbdouble (cons 0 1))
                     (list
                         (car (trans (vlax-curve-getpointatparam obj add_pt) 0 ent_name))
                         (cadr (trans (vlax-curve-getpointatparam obj add_pt) 0 ent_name))
                     )
             )
         )
     )
     (setq bulg (vla-GetBulge obj (fix add_pt)))
     (vla-SetBulge obj
         (fix add_pt)
         (/
             (sin (/ (* 4 (atan bulg) (- add_pt (fix add_pt))) 4))
             (cos (/ (* 4 (atan bulg) (- add_pt (fix add_pt))) 4))
         )
     )
     (vla-SetBulge obj
         (1+ (fix add_pt))
         (/
             (sin (/ (* 4 (atan bulg) (- (1+ (fix add_pt)) add_pt)) 4))
             (cos (/ (* 4 (atan bulg) (- (1+ (fix add_pt)) add_pt)) 4))
         )
     )
     (vla-update obj)
 )
 
 (setq pl (car (entsel "\nSelect pline entity")))
 (if (not (wcmatch (cdr (assoc 0 (entget pl))) "*POLYLINE"))
   (progn
     (alert "\nPicked entity isn't polyline - quitting")
     (exit)
   )
   (if (and (or (eq (cdr (assoc 70 (entget pl))) 0) (eq (cdr (assoc 70 (entget pl))) 1)) (eq (cdr (assoc 0 (entget pl))) "POLYLINE"))
     (progn
       (setq flag T)
       (command "_.convertpoly" "l" pl "")
     )
     (if (not (eq (cdr (assoc 0 (entget pl))) "LWPOLYLINE"))
       (progn
         (alert "\nYou picked 3d polyline - quitting")
         (exit)
       )
     )
   )
 )
 (setq int (getdist "\nEnter Interval: "))
 (setq in int)
 (while (setq pt (vlax-curve-getPointAtDist pl int))
   (add_vtx (vlax-ename->vla-object pl) (vlax-curve-getparamatpoint pl (vlax-curve-getclosestpointto pl pt)) pl)
   (setq int (+ int in))
 )
 (if flag
   (command "_.convertpoly" "h" pl "")
 )
 (princ)
)

M.R.

Posted

Thank you Marko,

works a treat!

Posted

spn - spd.LSP

load attached file

spn = by number

spd = by distance

 

ahsattarian2@gmail.com

+989126049289

 

;;; object 2 pline by selecting number of segments

(setq s2pnnumber 100)

(setq s2perasemode "Yes")

(defun c:spn (/ ss cmdecho osmode clayer count ent lay lng pt-list cnt

pn)

(vl-load-com)

(print "the current number of segments is:")

(print s2pnnumber)

(if (setq nn (getint "\n the new number of segments:"))

(setq s2pnnumber nn)

)

(print "current erase mode of selected object is:")

(print s2perasemode)

(if (setq key (getstring "\n erase objects? (Yes/No): "))

(progn

(if (or (= key "Yes")

(= key "YES")

(= key "yes")

(= key "Y")

(= key "y")

)

(setq s2perasemode "Yes")

)

(if (or (= key "No")

(= key "NO")

(= key "no")

(= key "N")

(= key "n")

)

(setq s2perasemode "No")

)

)

)

(vl-load-com)

(setq ss (ssget

(list

(cons -4 "

(cons 0 "SPLINE")

(cons 0 "ELLIPSE")

(cons 0 "LWPOLYLINE")

(cons 0 "POLYLINE")

(cons 0 "LINE")

(cons 0 "ARC")

(cons 0 "CIRCLE")

(cons -4 "or>")

)

)

)

(setq cmdecho (getvar "cmdecho")

osmode (getvar "osmode")

clayer (getvar "clayer")

count 0

)

(setvar "cmdecho" 0)

(command ".undo" "begin")

(setvar "osmode" 0)

(repeat (sslength ss)

(setq obj (ssname ss count)

ent (vlax-ename->vla-object obj)

lay (vlax-get-property ent "layer")

pt-list (list (vlax-curve-getstartpoint ent))

cnt 1.0

)

(command "lengthen" obj "")

(setq le (getvar "perimeter"))

(setq ep (vlax-curve-getendpoint ent))

(setq en (entget (ssname ss count)))

(setq objtype (cdr (assoc 0 en)))

(print ">>>>>>>>>>>>>>>")

(print objtype)

(print "Length of object:")

(print le)

(setq ple (/ le s2pnnumber))

(print "Length of pline segments:")

(print ple)

(print "

(repeat (1- s2pnnumber)

(setq pt-list (cons (vlax-curve-getpointatdist

ent

(* le (/ cnt s2pnnumber))

)

pt-list

)

)

(setq cnt (1+ cnt))

)

(setq pt-list (cons ep pt-list))

(setq k 0)

(setvar "clayer" lay)

(command ".3dpoly"

(repeat (length pt-list)

(command (nth k pt-list))

(setq k (1+ k))

""

)

)

(setq count (1+ count))

)

(if (= s2perasemode "Yes")

(command ".erase" ss "")

)

(setvar "osmode" osmode)

(setvar "clayer" clayer)

(command ".undo" "end")

(setvar "cmdecho" cmdecho)

(princ)

)

;;; object 2 pline by selecting distance between segments

(setq s2pddist 1)

(setq s2perasemode "Yes")

(defun c:spd (/ ss cmdecho osmode clayer count ent lay lng pt-list cnt

pn)

(vl-load-com)

(print "the current distance between segments is:")

(print s2pddist)

(if (setq ll (getdist "\n the new distance between segments:"))

(setq s2pddist ll)

)

(print "current erase mode of selected object is:")

(print s2perasemode)

(if (setq key (getstring "\n erase objects? (Yes/No): "))

(progn

(if (or (= key "Yes")

(= key "YES")

(= key "yes")

(= key "Y")

(= key "y")

)

(setq s2perasemode "Yes")

)

(if (or (= key "No")

(= key "NO")

(= key "no")

(= key "N")

(= key "n")

)

(setq s2perasemode "No")

)

)

)

(setq ss (ssget

(list

(cons -4 "

(cons 0 "SPLINE")

(cons 0 "ELLIPSE")

(cons 0 "LWPOLYLINE")

(cons 0 "POLYLINE")

(cons 0 "LINE")

(cons 0 "ARC")

(cons 0 "CIRCLE")

(cons -4 "or>")

)

)

)

(setq cmdecho (getvar "cmdecho")

osmode (getvar "osmode")

clayer (getvar "clayer")

count 0

)

(setvar "cmdecho" 0)

(command ".undo" "begin")

(setvar "osmode" 0)

(repeat (sslength ss)

(setq obj (ssname ss count)

ent (vlax-ename->vla-object obj)

lay (vlax-get-property ent "layer")

pt-list (list (vlax-curve-getstartpoint ent))

cnt 1

)

(command "lengthen" obj "")

(setq le (getvar "perimeter"))

(setq ep (vlax-curve-getendpoint ent))

(setq en (entget (ssname ss count)))

(setq objtype (cdr (assoc 0 en)))

(print ">>>>>>>>>>>>>>>")

(print objtype)

(print "Length of object:")

(print le)

(setq nu (fix (/ le s2pddist)))

(print "Number of pline segments:")

(print (1+ nu))

(print "

(repeat nu

(setq

pt-list (cons (vlax-curve-getpointatdist ent (* cnt s2pddist))

pt-list

)

)

(setq cnt (1+ cnt))

)

(setq pt-list (cons ep pt-list))

(setq cnt 0)

(setvar "clayer" lay)

(command ".pline"

(repeat (length pt-list)

(command (nth cnt pt-list))

(setq cnt (1+ cnt))

""

)

)

(setq count (1+ count))

)

(if (= s2perasemode "Yes")

(command ".erase" ss "")

)

(setvar "osmode" osmode)

(setvar "clayer" clayer)

(command ".undo" "end")

(setvar "cmdecho" cmdecho)

(princ)

)

  • 11 months later...
Posted

Is it possible to use this code for adding vertices to 3D polylines?

Posted

yes of course it is possible sir/madam

there is nothing impossible if algorithm of it is clear

if u need such a thing tell me to help u

waiting for your reply

Amir

Posted

Yes - Are you able to help me with some code for adding vertices along a 3D polyline and setting the 3D level of the new vertex based on an interpolated level between the two surrounding vertices.

 

Thanks.

Posted (edited)
;;;   add 3dpoly vertices   
(setq number 100)
(defun c:a ()
 (princ "written by: Amir Hossein Sattarian (+98)9126049289")
 (princ "\n [email]ahsattarian2@gmail.com[/email]")
 (setq ss (ssget (list (cons 0 "POLYLINE"))))
 (setq n (sslength ss))
 (setq k -1)
 (repeat n
   (setq k (1+ k))
   (setq s (ssname ss k))
   (setq obj (vlax-ename->vla-object s))
   (setq sp (vlax-curve-getstartpoint obj))
   (setq ep (vlax-curve-getendpoint obj))
   (setq ptlist nil)
   (setq ptlist (append ptlist (list sp)))
   (setq kk 0.0)
   (command "lengthen" s "")
   (setq le (getvar "perimeter"))
   (repeat (1- number)
     (setq kk (1+ kk))
     (setq po (vlax-curve-getpointatdist obj (* le (/ kk number))))
     (setq ptlist (append ptlist (list po)))
   )
   (setq ptlist (append ptlist (list ep)))
   (command "3dpoly")
   (foreach a ptlist
     (command a)
   )
   (command "")
 )
 (command "erase" ss "")
)

Edited by SLW210
added code tags!
  • 1 year later...
Posted

hi

 

i need to divide points along a curve but in a specific range. this is the code i've come to but points are not distributed evenly...cant figur out why.

 

thanks

 

(defun destribute (obj strPrm endPrm  /  d w ppt ppts d pv x)
 (setvar "osmode" 2048)
 (if (setq obj (vlax-ename->vla-object obj))
     (progn
     (setq d (vlax-curve-getDistAtParam obj strPrm)                         ;_get the distance from curv start to strPrm
    w (- (vlax-curve-getDistAtParam obj endPrm) d)                   ;_get the distance from strPrm to endPrm
    x (/ w (/ (* w 90)100)))                                         ;_divide w by 90 % of it
     (setq pv strPrm)
     (while (< pv endPrm)                                            ;_while pv is smaller than endPrm
     
       (setq pv (vlax-curve-getParamAtDist obj d))                   ;_get the parameter point  at d as pv
       (setq d (+ d x))                                              ;_add pv to list
       (setq ppts (cons (vlax-curve-getPointAtParam obj pv) ppts))   ;_walk d x units
       
       

)
     )
   )
 
 ppts
 )

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