Trim

Discussion in 'AutoCAD' started by Bill, Jun 29, 2004.

  1. Bill

    Bill Guest

    Is there a way to trim one line about another equidistant on both sides
    without offsetting the one line then trimming?
    Thanks.
    Bill
     
    Bill, Jun 29, 2004
    #1
  2. Bill

    Walt Engle Guest

    If I understand what you mean, one vertical line and one horizontal line
    running thru the vertical line and offsetting the vertical line to the
    right and left the same distance?
    How about drawing a circle using the intersection of the two lines as the
    center of the circle and making the circle with a radius to the dimension
    you want and then using extrim with the circle as the cutting edge? Then
    delete the circle.
     
    Walt Engle, Jun 29, 2004
    #2
  3. Bill

    Bill Guest

    well that is kind of what i am trying to avoid...seems to me there once was
    a command to tell trim how far on either side of a line to trim around.
     
    Bill, Jun 29, 2004
    #3
  4. Bill

    Bill Guest

    i will try
    thanks
    :)
     
    Bill, Jun 29, 2004
    #4
  5. Bill

    Walt Engle Guest

    So how much time does it take to draw a circle with desired radius and then
    issue extrim command? Try it - you'll like it.
     
    Walt Engle, Jun 29, 2004
    #5
  6. Bill

    Tom Smith Guest

    So how much time does it take to draw a circle with desired radius and
    then
    It does get tedious :)

    I used to have a macro to do exactly that, using a circle of a certain fixed
    radius. Something like: prompt for center point, pick object to trim, circle
    gets drawn, object gets trimmed to circle, then circle gets erased.
    Sometimes it's these little repetitive things that get the most annoying.
    Reducing it to one command is an advantage.
     
    Tom Smith, Jun 29, 2004
    #6
  7. Bill

    OLD-CADaver Guest

    ;;;start GAPM
    (defun etype (E)
    (setq E (Cdr (assoc 0 (entget (car E)))))
    )
    (defun askdist (R S / R S ANS)
    (setq ANS nil)
    (if (= R nil)
    (progn
    (while (or (= ANS "") (= ANS nil))
    (princ (strcat S ": "))
    (setq ANS (getdist))
    )
    (setq R ANS)
    )
    (progn
    (princ (strcat S " <" (rtos R) ">: "))
    (setq ANS (getdist))
    (if (or (= ANS nil) (= ANS ""))
    (setq R R)
    (setq R ANS)
    )
    )
    )
    R
    )
    (defun C:GAPM (/ cline cle clm entg ente entm intpt hgap)
    (setq cline (entsel "\nSelect LINE to remain continuous: "))
    (if (null cline)
    (prompt "\n Nothing Selected, Try again..")
    (progn
    (setq gapd (askdist gapd "\nGap Distance"))
    (if
    (or
    (= (etype cline) "POLYLINE")
    (= (etype cline) "LINE")
    (= (etype cline) "LWPOLYLINE")
    )
    (progn
    (setvar "cmdecho" 0)
    (setvar "highlight" 0)
    (setq cle (osnap (cadr cline) "endp")
    clm (osnap (cadr cline) "midp")
    )
    (setq entg (entsel "\nEntity to gap: "))
    (while entg
    (setq ente (osnap (cadr entg) "endp")
    entm (osnap (cadr entg) "midp")
    )
    (setq intpt (inters cle clm ente entm nil)
    hgap (/ gapd 2.0)
    )
    (command "break" (cadr entg) "F" (polar intpt (angle ente entm) hgap)
    (polar intpt (angle entm ente) hgap)
    )
    (setq entg (entsel "\nEntity to gap: "))
    )
    )
    (prompt "Entity not a line")
    )
    )
    )
    (setvar "cmdecho" 1)
    (setvar "highlight" 1)
    (princ)
    )
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    (defun etype (E)
    (setq E (Cdr (assoc 0 (entget (car E)))))
    )
    (defun askdist (R S / R S ANS)
    (setq ANS nil)
    (if (= R nil)
    (progn
    (while (or (= ANS "") (= ANS nil))
    (princ (strcat S ": "))
    (setq ANS (getdist))
    )
    (setq R ANS)
    )
    (progn
    (princ (strcat S " <" (rtos R) ">: "))
    (setq ANS (getdist))
    (if (or (= ANS nil) (= ANS ""))
    (setq R R)
    (setq R ANS)
    )
    )
    )
    R
    )
    (SETQ GAPD (* 0.125 (GETVAR "DIMSCALE")))
    (defun C:EGAP (/ cline cle clm entg osm ls pck no e1 e2 ente entm intpt hgap)
    (setq cline (entsel "\nSelect LINE to remain continuous: "))
    (if (null cline)
    (prompt "\n Nothing Selected, Try again..")
    (progn
    (setq gapd (askdist gapd "\nGap Distance"))
    (if
    (or
    (= (etype cline) "POLYLINE")
    (= (etype cline) "LINE")
    )
    (progn
    (setvar "cmdecho" 0)
    (command "undo" "m")
    (SETQ OSM (GETVAR "OSMODE")) ;
    (SETVAR "OSMODE" 0) ;
    (setq cle (osnap (cadr cline) "endp")
    clm (osnap (cadr cline) "midp")
    )
    (prompt "entities to gap: ") ;
    (setq entg (ssget) ;
    ls (sslength entg) ;
    ) ;
    ; (setq pck (getvar "pickbox")) ;
    ; (setvar "pickbox" 3) ;
    (setq no -1) ;
    (repeat ls ;
    (setq no (1+ no)) ;
    (setq e1 (list (ssname entg no))) ;
    (setq e2 (entget (car e1))) ;
    (setq ente (cdr (assoc 11 e2))) ;
    (setq entm (cdr (assoc 10 e2))) ;
    (setq intpt (inters cle clm ente entm nil)
    hgap (/ gapd 2.0)
    )
    (command "break" (POLAR INTPT (ANGLE ENTE ENTM) HGAP);
    (polar intpt (angle entm ente) hgap))
    )
    )
    (prompt "Entity not a line")
    )
    )
    )
    ;(setvar "pickbox" pck) ;
    (SETVAR "OSMODE" OSM) ;
    (setvar "cmdecho" 1)
    (princ)
    )

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     
    OLD-CADaver, Jun 29, 2004
    #7
  8. Bill

    Warren Trost Guest

    How about LENGTHEN with a negative length and pick both ends?
     
    Warren Trost, Jun 29, 2004
    #8
  9. Bill

    teiarch Guest

    Walt: Good advice. I, too, use circles for not only trimming but also for determining the center of an object with unknown length -or fractional length.

    They also come in handy when working in 3D for a variety of things.

    But, of course, as exhibited further down this thread, someone is compelled to come up a long lisp routine to do something simple....
     
    teiarch, Jul 3, 2004
    #9
  10. Bill

    Walt Engle Guest

    I don't know why they do this - take something so simple and confound the heck out of it. Perhaps they don't have anything useful to do.......It's beyond me.
     
    Walt Engle, Jul 3, 2004
    #10
  11. Bill

    Randall Culp Guest

    Hmmm... breaking 20-30 lines would require drawing and erasing 20-30
    circles, selecting 20-30 circles and selecting the little bit of line to
    trim out. Or Write a function to select the lines to continue and the lines
    to break. Seems the latter makes it simple.

    heck out of it. Perhaps they don't have anything useful to do.......It's
    beyond me.
     
    Randall Culp, Jul 4, 2004
    #11
  12. Bill

    David Kozina Guest

    Bill,

    Here are a couple of additional ideas for your consideration...

    I don't know if you are using AutoCAD 2004 or 2005, but if so, have you
    considered using a wipeout for this? (I have grown to like them, as they
    are behaving like they should now, especially with regards to xref draworder
    issues.) For me, the best part is that the geometry doesn't get chopped up
    needlessly, and the drawing thus retains the maximum amount of information
    with a minimum of objects.

    Another thing you might look into, depending on what you're trimming...
    You can define a custom arrowhead that is simply a point located at -1,0.
    When you then use this "arrowhead" in relation to an aligned or linear
    dimension, the dimension line simply stops short of the object by a small
    gap (you can control the distance via the DIMASZ (arrowhead size) value).
    Plus, you get an automatic 'tag' on the line if/when you wish to use it (the
    dimension text, which can be overridden). I am finding that this method has
    worked especially well with respects to joists and beams on framing plans,
    where I typically want a small gap between the end of the joist/beam and the
    column or wall. No trimming involved. :)

    Best regards,
    David Kozina
     
    David Kozina, Jul 4, 2004
    #12
  13. Bill

    Walt Engle Guest

    Going to the extreme and saying "20-30 lines" is not what the originator was
    talking about and this would be ridiculous.
     
    Walt Engle, Jul 4, 2004
    #13
  14. Bill

    Paul Turvill Guest

    It seems to me that the most logical solution would be to draw the lines the
    right length in the first place.
    ___
     
    Paul Turvill, Jul 4, 2004
    #14
  15. Bill

    Walt Engle Guest

    I agree, but someone seems to always be making life difficult for themselves.
     
    Walt Engle, Jul 4, 2004
    #15
  16. Bill

    Randall Culp Guest

    A plan grid with several dozen lines is crossed by a dimension line requires
    each of the grid lines to be broken around the dim line. You could erase
    all the grid lines and redraw them, stopping and starting on each side of
    the dim line after it has been placed or you could write a little routine to
    break the grid lines at a specified distance on either side of the dim line.
    The latter is less difficult.
     
    Randall Culp, Jul 4, 2004
    #16
  17. Bill

    teiarch Guest

    Paul T: It's absolutely outrageous to suggest that a cad user draw something accurately! It suppresses the free spirit of design and requires you to think about what you're doing! Also requires that one be able to visualize the end result....too much to ask of many cad "operators", I think.
     
    teiarch, Jul 15, 2004
    #17
  18. Bill

    Paul Turvill Guest

    ;-)
    ___

    something accurately! It suppresses the free spirit of design and requires
    you to think about what you're doing! Also requires that one be able to
    visualize the end result....too much to ask of many cad "operators", I
    think.
     
    Paul Turvill, Jul 16, 2004
    #18
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.