Hollow polyline

Discussion in 'AutoCAD' started by Yvan Chaine, May 12, 2004.

  1. Yvan Chaine

    Yvan Chaine Guest

    Hi,

    Is there a polyline property that can be set so it looks hollow?

    I need to get an effet similar to a polyline representation when the FILL
    setting is set to OFF but only on user selected polyline.

    Thanks
     
    Yvan Chaine, May 12, 2004
    #1
  2. Yvan Chaine

    mataeux Guest

    not the best idea, but it works

    (setq elist(entget(car(entsel"\nSelect Polyline: "))))
    (entmod(subst'(210 1e-5 0 1)(assoc 210 elist)elist))
     
    mataeux, May 13, 2004
    #2
  3. Yvan Chaine

    TCEBob Guest

    Check out Dotsoft.com, where Toolpac comes from. They have a routine
    which replaces plines with lines along the width. Very good; recognizes
    variable widths. Naturally you should buy the whole package but some
    subsets are available separately and some routines are free.

    rs
     
    TCEBob, May 13, 2004
    #3
  4. Yvan Chaine

    Joe Burke Guest

    Yvan,

    See a thread dated 4/28/2004 called "Looking for a Routine". I posted a demo program
    there which offsets selected lines, arcs or lwplines both sides by user input
    distance. Then it caps the ends and deletes the source object.

    With a little more code the new objects could be joined to form a single pline.

    An alternate to user input offset distance would be use the global width of an
    existing pline. But that would only work with plines, and only those which have a
    global width other than zero. I think the other approach is more flexible.

    Joe Burke
     
    Joe Burke, May 13, 2004
    #4
  5. Yvan Chaine

    Larry Travis Guest

    Yvan, unfortunately you have stumbled on a shortcoming of autocad at this
    time. You are needing on single object type (a polyline) that has both an
    outline and a fill and except for mlines, this is just not possible. Mlines
    are an option, but they are difficult to modify and cannot include arcs.
    The only workaround I can think of:

    1) Create your polyline with the width you want.
    2) Create a duplicate of that polyline exactly over the top of the first
    one, but make its width a tiny bit less then the original polyline.
    3) Change the color of the new polyline to a color that plots white (usually
    255 in your plot style table).
    4) now you should see the "white" polyline as well as the original
    polyline's outline behind it. This gives the effect of the hollow polyline
    upon plotting.
    5) Now, to be able to stretch, copy, scale, etc these two plines as a single
    unit, just group them. I would prefer to use an unnamed group. Now you
    polyline will act as one polyline when you do such things as grip-edits,
    stretches, etc. Unfortunately, if you wanted to do any pediting, you would
    have to do it separately on each polyline. Also, this hollow "polyline" is
    open on the ends so you may also want to trim off a tiny portion from each
    end of the "white" polyline to effectively create "caps" on each end.


    That is admittedly not a perfect solution but I believe it is all we have
    right now.


    FWIW,
    LT
     
    Larry Travis, May 13, 2004
    #5
  6. Yvan Chaine

    David Kozina Guest

    However, mlines *can* *approximate* an arc (just add more vertices) - which
    may or may not be sufficient in this case... :)

    BTW, Terry Dotson's ToolPac contains a couple of routines to accomplish this
    by: 1- converting a curved pline or spline to a polyline with straight
    segments, (about as finely as one would want), and then 2- converting said
    polyline to an mline.
    Again, not a perfect solution, but perhaps sufficient.

    hth,
    David Kozina
     
    David Kozina, May 13, 2004
    #6
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.