0 Members and 1 Guest are viewing this topic.
(defun c:pb ()(setvar"ORTHOMODE"(BOOLE(getvar"ORTHOMODE")1))(setq peacc (getvar "peditaccept"))(setvar "peditaccept" 0)(SETVAR "OSMODE" 512)(setq pt1 (getpoint "\nFirst Point: "))(SETVAR "OSMODE" 128)(setq pt2 (getpoint pt1 "\nSecond Point: "))(SETVAR "OSMODE" 0)(setq d1 (distance pt1 pt2))(setq a1 (angle pt1 pt2))(setq d2 (/ d1 9.0))(setq pt3 (polar pt1 a1 (/ d1 4)))(setq pt4 (polar pt3 (+ a1 (/ pi 2)) d2))(setq pt5 (polar pt1 a1 (/ d1 2)))(setq pt6 (polar pt5 a1 (/ d1 4)))(setq pt7 (polar pt6 (- a1 (/ pi 2)) d2))(setq pt8 (polar pt6 (+ a1 (/ pi 2)) d2))(command "arc" pt1 pt4 pt5)(setq e1 (entlast))(command "arc" pt5 pt7 pt2)(setq e2 (entlast))(command "arc" pt2 pt8 pt5)(setq e3 (entlast))(command "pedit" e1 "y" "j" e2 e3 "" "")(setvar "peditaccept" peacc)(setvar"ORTHOMODE"(BOOLE(getvar"ORTHOMODE")0))(princ))
Try this .
Tharwat, Thank you very much! I'm very glad to meet you here
You are my god!
You're welcome , try the routine and let me know
The routine is good! but have a little defects,
I did not account for that process , anyway I modified the code for you .
Quote from: Tharwat on April 24, 2014, 07:57:50 AMI did not account for that process , anyway I modified the code for you .Okey ! Tharwat, Thank you again!
Command: pipebreak Specify first point on [Line,Polyline] :neato Specify opposite point : Specify parallel point to first point :neato Should pick a point on Line or Polyline ! No line found in Point number Four !
;; put break pipe symbols and break pipe within(defun C:SYP(/ ang ang+ ang- cop osm p1 p2 pc pp sset symp)(alert "Pick two pipe sides to be trimmed at the end")(setq osm (getvar 'osmode))(setvar 'osmode 512)(setq p1 (getpoint "\nFirst Line: "))(setq sset (ssadd))(setq pp (ssname (ssget p1) 0))(ssadd pp sset)(setvar 'osmode 128)(setq p2 (getpoint p1 "\nSecond Line: "))(setq pc (mapcar '* (mapcar '+ p1 p2) (list 0.5 0.5 0.5)))(setq ang (angle p1 p2) ang- (- ang (/ pi 4)) ang+ (+ (+ ang pi) (/ pi 4)) ang- (vl-princ-to-string (/ (* ang- 180) pi)) ang+ (vl-princ-to-string (/ (* ang+ 180) pi)))(command "_PLINE" "_non" p1 "A" "D" ang- "_non" pc "_non" p2 "D" ang+ "_non" pc "" )(setq symp (entlast))(ssadd symp sset)(command "_copy" symp "" "_non" pc "_non" pc)(command "_rotate" (entlast) "" "_non" pc "180")(setvar 'osmode 512)(command "_move" (entlast) "" "_non" p1 "_non" (getpoint p1 "\nNew Location: "))(setq cop (entlast))(ssadd cop sset)(command "_trim" sset "" pause pause "")(setvar 'osmode osm)(princ) )