home *** CD-ROM | disk | FTP | other *** search
/ EDUCORP 8 / Educorp2Compilation.sit / educorp2 / Demos / PEGASYS II Demo / Macros / Bracket < prev    next >
Encoding:
Text File  |  1988-08-04  |  1.2 KB  |  36 lines

  1. {---------------------- BRACKET ---------------------------
  2.  
  3. {  The BRACKET macro draws rounded corner brackets with the
  4. {Fillet command using a user defined fillet. The bracket will be 
  5. {drawn on the right side of the two points that are entered.  The
  6. {top half is then Mirror-Copied and then grouped.  The Class and
  7. {Layer is set to 100.
  8.  
  9. {User locates the two endpoints for the bracket and enters radius.
  10. PROMPT Prompt=`Locate bracket endpoint:` Var=#P1 Type=Coor
  11. Point [#P1|;] 
  12. PROMPT Prompt=`Locate opposite endpoint:` Var=#P2 Type=Coor
  13. Point [#P2|;] 
  14. PROMPT Prompt=`Enter Radius of Corner` Var=#F1 Type=Num
  15.  
  16. Delete [-|-|;]
  17. {System measures the distance and angle between points entered.
  18. DS,P Silent [#P1|#P2|;]
  19. #d=%ds.d / 2   {Total distance between points divided by 2
  20. #a=%ds.a        {Angle created by the two points
  21.  
  22. {One half of bracket is drawn in with Fillet command.
  23. FL #F1 Cl=100 Lay=100 Pe=0 [#P1|p,#F1,#a-90|p,#d,#a|p,#F1,#a-90|;]
  24.  
  25. {System stores last point entered in variables. 
  26. #X1=%CD.x
  27. #Y1=%CD.y
  28.  
  29. {Other half of bracket is drawn in with Fillet command.
  30. FL #F1 Cl=100 Lay=100 Pe=0 [A,#X1,#Y1|p,#F1,#a+90|p,#d,#a|p,#F1,#a+90|;]
  31.  
  32. {The two halves are now grouped together.
  33. GP Cl=100 Tag=`Bracket` [A,#X1,#Y1|-|-|;]
  34.  
  35. Return
  36.