Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/17/2020 in all areas

  1. 22/7 is only an approximation for PI.
    1 point
  2. I'm in the Netherlands, where they slap 30% customs duties on any imported computer, computer component or software but that doesn't really affect my question. Yes, Windows is free, and MS Office is free if you mom or dad has a family license. And the CAD programs are also free for as long as the dearest student remains a registered student.
    1 point
  3. This is my 1st version need to improve the angle check. A quick cheat for polylines is if you do "explode" you can repick via code the line that now exists work out the new point then do a "Undo" so pline is returned lisp will remember the point. ; Do a chamfer on two lines given chord length ; By Alan H Aug 2020 (defun AH:getend ( / tp1 tpp1 d2 d1) (setq tp1 (entsel "\nSelect line near end : ")) (setq tpp1 (entget (car tp1))) (setq pt1 (cdr (assoc 10 tpp1))) (setq pt1 (list (car pt1) (cadr pt1) 0.0)) ;reset z to zero (setq pt2 (cdr (assoc 11 tpp1))) (setq pt2 (list (car pt2) (cadr pt2) 0.0)) ;reset z to zero (setq pt3 (cadr tp1)) (setq d1 (distance pt1 pt3)) (setq d2 (distance pt2 pt3)) (if (> d1 d2) (progn (setq temp pt1) (setq pt1 pt2) (setq pt2 temp) ) ) (setq ang (angle pt1 pt2)) ) (defun c:test ( / oldang oldsnap pt1 pt2 pt3 pt4 pt5 pt6 pt7) (setq oldang (getvar 'aunits)) (setvar 'aunits 3) (setq oldsnap (getvar 'osmode)) (setvar 'osmode 0) (AH:getend) (setq pt4 pt1 pt5 pt2) (AH:getend) (setq pt3 (mapcar '+ pt1 pt4) ) (setq pt3 (mapcar '(lambda (x) (/ x 2.0)) pt3)) (command "dimangular" pt4 pt1 pt3) (setq ang (cdr (assoc 42 (entget (entlast))))) (command "erase" "L" "") (setq intpt (inters pt4 pt5 pt1 pt2)) (setq dist (getreal "\nEnter chord distance")) (setq d2 (* (/ 1.0 (cos (- (/ pi 2.0) (/ ang 2.0)))) (/ dist 2.0))) (setq pt6 (polar intpt (angle pt5 pt4) d2)) (setq pt7 (polar intpt (angle pt2 pt1) d2)) (command "line" pt6 pt7 "") (setvar 'aunits oldang) (setvar 'osmode oldsnap) (princ) ) (c:test)
    1 point
×
×
  • Create New...