View direction of vectors

Hi,

Is it possible to see in what direction a vector goes?

For instance, if I draw a polyline based shape in a counter clockwise direction, I obviously know the direction. But if I draw a shape which is built up out of different shapes, exploded, trimmed, and joined again, I have no idea of the direction of the vectors. For cnc tool radius correction, it's important to know in what direction it goes.

Comments

  • You can use a linetype with arrows.

    *ARROWS,Arrows -> -> ->
    A,1,[ZIG,ltypeshp.shx,r=-90,x=-0.25,y=0.25,s=0.25],-1
    
  • Also when changing Length in Properties - which end will change?

  • @Roy Klein Gebbinck said:
    You can use a linetype with arrows.

    *ARROWS,Arrows -> -> ->
    A,1,[ZIG,ltypeshp.shx,r=-90,x=-0.25,y=0.25,s=0.25],-1
    

    Roy, thank you!

    Feels a bit like a workaround, but in my workflow it actually works fine.

  • @Tom Foster said:
    Also when changing Length in Properties - which end will change?

    Will this work with closed polylines?

  • There are a few is anticlockwise lisps for plines then can do Pedit R.

    ;; get closed polygon's area

    (defun ss-pts2area (l)
    (/ (apply (function +)
    (mapcar (function (lambda (x y)
    (- (* (car x) (cadr y)) (* (car y) (cadr x)))))
    (cons (last l) l)
    l))
    2.)
    )

    ;_force pointset CCW
    (setq plent (entsel "\nPick pline"))
    (setq co-ord (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget (car plent)))))

    (if (< (ss-pts2area co-ord) 0)
    (command "pedit" plent "R" "")
    )

  • The arrow line type works great!

    I have a somewhat related question.
    Cad seems to register in what order one draws shapes. If I draw some straightforward shapes, ie first a circle, then a rectangle, the cnc router will first cut out the circle, then the rectangle.

    Is there a way to view in what order the shapes have been drawn, and even change this order?
  • The issue of drawn order has been asked before, I think some code was put forward to remake the entities in a new pick order Google. Re view order try a plain ssget pretty sure selects in drawn order. If you want a fancy zoom to object etc a lot more code.

    (defun c:qkdirty ( / ss x)
    (setq ss (ssget))
    (repeat (setq x (sslength ss))
    (command "CHPROP" (ssname ss (setq x (1- x))) "" "C" 1 "")
    (alert "Look move this alert out of way")
    )
    (princ)
    )
    (c:qkdirty)