Welcome to the AutoLISP.com Forum Index.
Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    5

    Default autolisp make hatch

    hi
    I am new in your froms
    i try to m,ake an lisp to make hatch as seen in attached file
    but it seen to me that it is impossilbe so can anybody help me plz
    thankssample.dwg

    sample.JPG

  2. #2
    Senior Member
    Join Date
    Jan 2009
    Location
    Anchorage, Alaska
    Posts
    295

    Default

    A hatch pattern is generally made up of lines and arcs, except for the special "solid" hatch. A hatch is all on one layer, all the same color. So I don't believe you can make a hatch pattern that is made up some pattern of solids, or of differing colors.

    You will have to use 3 separate color solid hatches to make up the pattern, just as shown in the sample drawing.

    If you had to fill a lot of areas, to save time you may want to write a lisp to create this pattern.

  3. #3
    Junior Member
    Join Date
    Feb 2010
    Posts
    5

    Default

    thank you CarlAK

    the problem that i used this type of hatch lot of time
    so i make at the first hatch from line and after that i explode it and make solid hatch between the lines after that i erase the line and keep the solid hatch but i take a lot of time to make it so i try to make a lisp to help me but i did not solve it so i need help to make this lisp and some ideas may help

    thanks

  4. #4
    Senior Member
    Join Date
    Jan 2009
    Location
    Anchorage, Alaska
    Posts
    295

    Default

    OK some ideas-

    the approach may change depending on what shapes you expect to be hatching, the simpler the sghapes the simpler the code.

    User selects an object to be hatched, should be a closed polyline
    Determine the furthest "upper left" and "lower right" points of the polyline.

    determine approximate center midway between these points, start a hatch segment there. Draw temporary lines at 45 degrees for use in dividing hatch segments.

    hatch the 3 different colors running the "hatch" command and giving it the internal points within segments.

    To ensure no errors you may have to determine the 2 intersection points of the temporary lines with the polyline, to guide you in determining an internal point.

  5. #5
    Junior Member
    Join Date
    Feb 2010
    Posts
    5

    Default

    thank you

    I make the lines at 45 degrees and after that i explode them the problem is that i cannot give a good internal point for the soild hatch
    so how can solve that problem to give good point

    thanks

  6. #6
    Junior Member
    Join Date
    Feb 2010
    Posts
    5

    Default

    What going on
    no body can solve this problem

  7. #7
    Senior Member
    Join Date
    Jan 2009
    Location
    Anchorage, Alaska
    Posts
    295

    Default

    Could you clarify your process in creating the hatch; what part of it do you want to do with a lisp, what you have working already.

    -do you just want one internal point for a selected polyline?

  8. #8
    Junior Member
    Join Date
    Feb 2010
    Posts
    5

    Default

    i want to know how ssget "x" select the objects from right to left or from down to top may it help

  9. #9
    Senior Member
    Join Date
    May 2010
    Posts
    638

    Default

    Hi
    I still could not understand your point with hatch , the first hatch you wanted to make by Lisp is impossible due to the shape which looks like a photo,besides that to make hatch in Autocad is much easier than any other program, because it the Autocad specialization.

    Regards.
    Tharwat

  10. #10
    Senior Member
    Join Date
    May 2010
    Posts
    638

    Default

    Hi
    to get an internal point , it is better to use the following funtion;

    Examples

    (setq a '(1.0 1.0)
    b '(9.0 9.0))
    (setq c '(4.0 1.0)
    d '(4.0 2.0))
    So a,b,c, and d must be changed according to your chosen points in
    your program, followed with the next one.
    Command: (inters a b c d)

    Regards
    Tharwat

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Back to top