I've figured out how to speed proccess of creating this DWG (no need for step weldplsvertices on exploded pedited multiple projected block between 2 curves - !!! this takes long time):
-hatch (modifying boundaries that hatch can be reproduced multiple times in both directions)
-explode hatch
-pedit "multiple" (ssget "_P")...
-plintav-adv.lsp posted above ...select inner hatch lines and boundary LWPOLYLINE... (note that !!! this hatch needs ADV version as lines inside hatch doesn't touch each other - you can check this when zooming !!! normally you should use plintav.lsp posted
here).
-refineboundaryvertices.lsp posted here
-check for match of upper and lower vertices on boundary (use XLINE Vertical and pick lower vertices and then use zc.lsp with zz.lsp posted below inlast post) !!! if vertices doesn't meet in single cross vertex - intersection of XLINE and upper edge boundary LWPOLYLINE, modify them to touch this intersection...
-check lower vertices on boundary (use zc.lsp with zz.lsp posted below inlast post) !!! if vertices doesn't meet in single cross vertex - intersection of XLINE and lower edge boundary LWPOLYLINE, modify them to touch this intersection... Possible to have extra small line passing below lower edge boundary - delete them...
-weldplsvertices.lsp posted above
-explode
-e0l.lsp posted below in last post
-pedit "multiple" select inner lines...
-weldplsvertices.lsp posted above
-explode
-convert inner lines to block
-make side guide lines for next step and erase boundary LWPOLYLINE
-AlignBM.lsp - multiple block align on curves by Gian Paolo Cattaneo (modified AlignHatch.lsp)
more info here :
http://www.cadtutor.net/forum/showthread.php?73335-AlignH-Align-hatch-on-curved-path&highlight=Align+Hatch-explode
-your code Stefan : intlines2regions.lsp (slower variant - my code posted here should work too and it's much faster and everything is well prepared to this point my version should do the job correct)
-erase outer region boundary(ies)
-2colvalmulthatch.lsp - posted on forum Show Stuff :
http://www.theswamp.org/index.php?topic=45751.new#new(defun c:refineboundaryvertices ( / pl vl pll vln vll k vx vy vn vnn vlnl ss i plv plvn pld )
(while (not pl)
(setq pl (entsel "\nPick outer boundary LWPOLYLINE"))
(if (null pl) (prompt "\nMissed, try again...") (setq pl (car pl)))
)
(setq vl (acet-list-m-assoc 10 (setq pll (entget pl))))
(setq vln vl vll vl)
(setq k -1)
(repeat (length vl)
(setq v (nth (setq k (1+ k)) vln))
(setq vx (cadr v) vy (caddr v))
(setq vn v vll vl)
(while (setq vn (vl-member-if '(lambda ( x ) (equal (cadr x) vx 1e-4)) (setq vll (vl-remove vn vll))))
(progn
(setq vn (car vn))
(setq vnn (subst vx (cadr vn) vn))
(setq vln (subst vnn vn vln))
)
)
(setq vn v vll vl)
(while (setq vn (vl-member-if '(lambda ( x ) (equal (caddr x) vy 1e-4)) (setq vll (vl-remove vn vll))))
(progn
(setq vn (car vn))
(setq vnn (subst vy (caddr vn) vn))
(setq vln (subst vnn vn vln))
)
)
)
(setq vlnl (mapcar '(lambda ( a b ) (list a b)) vln vl))
(foreach v vlnl
(setq pll (subst (car v) (cadr v) pll))
)
(entmod pll)
(entupd (cdr (assoc -1 pll)))
(prompt "\nSelect inner LWPOLYLINES")
(while (not ss)
(setq ss (ssget "_:L" '((0 . "LWPOLYLINE"))))
)
(setq i -1)
(while (setq pl (ssname ss (setq i (1+ i))))
(setq plv (mapcar 'cdr (acet-list-m-assoc 10 (entget pl))))
(foreach v plv
(setq vn (car (vl-member-if '(lambda ( x ) (equal x v 1e-4)) (mapcar 'cdr vln))))
(setq plvn (cons vn plvn))
)
(setq plvn (reverse plvn))
(setq plvn (vl-remove nil plvn))
(setq pld (entget pl))
(foreach vn plvn
(setq pld (subst (cons 10 vn) (car (vl-member-if '(lambda ( x ) (equal (cons 10 vn) x 1e-4)) (acet-list-m-assoc 10 pld))) pld))
)
(entmod pld)
(entupd (cdr (assoc -1 pld)))
)
(princ)
)
;Create regions in a grid of lines
(defun c:intlines2regions ( / *error* ms ss i lst )
(vl-load-com)
(or acDoc (setq acDoc (vla-get-activedocument (vlax-get-acad-object))))
(setq ms (vlax-get acDoc (if (= 1 (getvar 'cvport)) 'paperspace 'modelspace)))
(vla-startundomark acDoc)
(defun *error* (msg)
(and
msg
(not (wcmatch (strcase msg) "*CANCEL*,*QUIT*,*EXIT*"))
(princ (strcat "\nError: " msg))
)
(vla-endundomark acDoc)
(princ)
)
(if
(setq ss (ssget '((0 . "LINE"))))
(progn
(repeat (setq i (sslength ss))
(setq lst (cons (vlax-ename->vla-object (ssname ss (setq i (1- i)))) lst))
)
(vlax-invoke ms 'AddRegion lst)
)
(princ "\nEmpty selection...Try again...")
)
(vla-endundomark acDoc)
(princ)
)
M.R.