Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/19/2020 in all areas

  1. Perhaps something like this? (defun reginter-p ( rg1 rg2 / rtn tr1 tr2 ) (setq tr1 (vla-copy rg1) tr2 (vla-copy rg2) ) (vla-boolean tr1 acunion tr2) (setq rtn (< (vla-get-area tr1) (+ (vla-get-area rg1) (vla-get-area rg2)))) (vla-delete tr1) rtn )
    1 point
  2. Hi, The program was recreating the points due to the active list of entities along with the entdel function. Its not a good practice to feed While function with T and force to end stop the program with ESC button so try the following instead. (defun c:3pC2 (/ ss i sn ers lst) ;;; Tharwat 19. Nov. 2020 ;;; (while (and (princ "\nSelect THREE points to create a circle between them : ") (setq ers nil ss (ssget '((0 . "POINT")))) ) (if (eq (setq i (sslength ss)) 3) (progn (repeat i (setq sn (ssname ss (setq i (1- i)))) (setq ers (cons sn ers)) (setq lst (cons (cdr (assoc 10 (entget sn))) lst)) ) (command "_.circle" "_3P" "_none" (nth 0 lst) "_none" (nth 1 lst) "_none" (nth 2 lst) ) (foreach x ers (entdel x)) ) (alert "Error ... Please select 3 points only") ) ) (princ) )
    1 point
  3. When one starts with pattern definition files and see all the figures, it can be alarming! But each line is limited to 80 characters, and if there is any opportunity to use exact numbers (with fewer than two decimal places) then that saves the number of characters. It is necessary to make use of all those decimal places when the hatch is a long way from the origin otherwise the lines split apart (as you have seen). I do not use any artificial help, but prefer to manually follow the pattern of the definition file (as pictured below). If you draw every thing out it is not hard to pick up all the information to make the hatch file. The first 8 lines, those beginning with 0 or 90 are the block outlines, drawn starting at 0,0. The next 12 lines are the circles. First of all, i drew a 12 sided polygon, and copied it to form the hatch pattern. Using a circle of radius 11, I drew an inscribed and a circumscribed 12 sided polygon, measured the lengths of both, and then decided to use a side length of 5.75 (cutting down on the number of decimal places). Then I projected one of the lines to see where it hit another circle. It doesn't actually hit one, but 15 rows over it nearly hits one. So I altered the angle from 15° to 14.931417°, not a lot, but enough to make the lines to be in line. Then I redrew the polygon using the new angle, and drew the dash line. I then offset this through similar points on the shapes until a pattern emerged from which I can measure the sideways repeat lengths. Then I worked my way around the shape, picking the lengths and angles from the working drawing. Simple! Finally, at the end of the file, I have found that if there is an asterisk at the start of the end line followed by comments, one does not have to leave a blank line at the end of the file.
    1 point
×
×
  • Create New...