Hatch origin

Discussion in 'AutoCAD' started by Fredbr, Jan 16, 2004.

  1. Fredbr

    Fredbr Guest

    "Softdesk S8" had a function in hatching that made possible
    "moving"it, to fit properly in the place you wanted to. e.g. having
    brick edges fit on the wall edge. So you get a clean perfect alignment
    in the drawing.
    Is there a similar function in ADT3, or Cad2002?
    Pardon my misspelling.
    Thank you,
    Fredbr
     
    Fredbr, Jan 16, 2004
    #1
  2. Fredbr

    George B Guest

    snapbase
     
    George B, Jan 16, 2004
    #2
  3. Yes, but it depends on the design of the hatch. Hatches are generated with
    respect to the current UCS. I have written a few for precisely this kind of
    us and they are all designed to work if the origin is at the lower left
    corner of the area you want to hatch (see my site) at a scale of 1. To get
    them to properly align, I first change the origin (UCS>>O>>Pick point) and
    then hatch. Someone else's hatches might be referenced to that or some other
    point. If you start with a rectangle from 0,0 to some point, and hatch it
    you should be able to figure out what that point is and then adjust you UCS
    accordingly.
     
    Michael Bulatovich, Jan 16, 2004
    #3
  4. Fredbr

    Paul Turvill Guest

    No need to mess with the UCS ... just move the SNAPBASE.
    ___
     
    Paul Turvill, Jan 16, 2004
    #4
  5. Nice to know, but not really simpler-especially if you are doing lots of
    individual bits that need individual realignment. If you need rotation in
    the hatch orientation, or actual mirrored hatching then is the only way,
    isn't it?
     
    Michael Bulatovich, Jan 16, 2004
    #5
  6. Fredbr

    Paul Turvill Guest

    No, not at all. We align hatches to objects all the time, and we work in
    multiple UCS's. The SNAPBASE works in any UCS; and if you're working in a
    non-World UCS, then temporarily setting SNAPBASE, IMO, is less prone to
    problems than using yet another UCS setting.
    ___
     
    Paul Turvill, Jan 16, 2004
    #6
  7. OK. You CAN rotate the hatch in the hatch command itself for each
    orientation. In terms of clicks and keystrokes, say the two methods are a
    wash. But what about mirrored hatch? Using UCS>>Z>>180>>O>>Pick point: I
    can get the hatch to run "backwards".
     
    Michael Bulatovich, Jan 16, 2004
    #7
  8. Fredbr

    Paul Turvill Guest

    Yes you can. I just can't remember ever needing to mirror a hatch. But like
    most other AutoCAD operations, there are a number of ways to do just about
    anything, and I've always been an advocate of using whatever method makes
    one most comfortable.
    ___
     
    Paul Turvill, Jan 17, 2004
    #8
  9. I've done a number of hatches representing "real" bricks and coursing. They
    are so easy to write that I've started to write one for each masonry job
    that requires a particular coursing. (I've even thought that a LISP could do
    this for me....) The patterns runs up and to the left, and yield a whole
    brick at the left. If I do the mirror trick, I can hatch the right side of
    an elevation and get whole bricks at both ends. In the middle a line on
    defpoints is the boundary between the two and usually depicts the "closer",
    or fraction of a brick, required to complete the wall.
     
    Michael Bulatovich, Jan 17, 2004
    #9
  10. Fredbr

    Fredbr Guest

    Ok,
    That's the magical word!!
    Thank's for the tip
    Fredbr
     
    Fredbr, Feb 6, 2004
    #10
  11. Fredbr

    Eric Boehlke Guest

    ;;hm "moves" a hatch

    (defun c:hm (/ ed en p p1 p2 x y)
    (if (and (setq en (entselx "HATCH" "\nSelect hatch to \"move\": "))
    (not (redraw (setq en (car en)) 3))
    (setq p1 (getpoint "\nFirst Point: "))
    (setq p2 (getpoint p1 "\nSecond Point: ")))
    (progn (setq ed (entget en)
    x (cdr (assoc 43 ed))
    y (cdr (assoc 44 ed))
    p (polar (list x y 0) (angle p1 p2) (distance p1 p2))
    x (car p)
    y (cadr p)
    ed (subst (cons 43 x) (assoc 43 ed) ed)
    ed (subst (cons 44 y) (assoc 44 ed) ed))
    (entmod ed)
    (entupd en)))
    (if en
    (redraw en 4))
    (princ))

    (defun entselx (typ prm / en err)
    (while (not en)
    (prompt prm)
    (setq en (entsel)
    err (getvar "ERRNO")) ;setq
    (if (and en (/= (cdr (assoc 0 (entget (car en)))) typ))
    (setq en nil)) ;if
    (if (and (not en) (= err 52))
    (setq en "ENTER")) ;setq
    ) ;while
    (if (= en "ENTER")
    (setq en nil))
    en) ;defun
     
    Eric Boehlke, Nov 23, 2004
    #11
  12. Fredbr

    Bill Gilliss Guest

    Another way, assuming you know where you want the hatch's origin to be:

    1) Use UCS/Origin to indicate the desired hatch origin.
    2) Use HATCHEDIT to select the hatch you want to relocate
    3) Click the "OK" button in the Hatchedit dialog. The hatch will relocate.
    4) Use UCS/P to reset the UCS


    ==============
     
    Bill Gilliss, Dec 10, 2004
    #12
  13. Fredbr

    gruhn Guest

    2) Use HATCHEDIT to select the hatch you want to relocate
    Oh, that's nice.
     
    gruhn, Dec 10, 2004
    #13
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.