Can we intersect all this line at once Help!!!!
Link copied
@pullstackautocad wrote:@Moshe-A sir Actually, I offset these lines from footing.
Have you had a chance to look for what you need yet? Will something like these do what you need
Or
Or
https://www.theswamp.org/index.php?topic=58344.msg614957#msg614957
@pendeanIt did not work, sir; I want all the lines to intersects, not join... each line should be single.
thankyou.
@Moshe-A sir Actually, I offset these lines from footing.
This was not an answer to my question, i wanted to now how do you end up getting this drawing?
until you'll get other solution, here is a command 2db to let you select 4 lines and draw a rectangle on top. to get it on a another layer\color switch layer.
works in a loop (save you the activation of 2db times again)
enjoy
Moshe
;; Selection Set Bounding Box - Lee Mac
;; Returns a list of the lower-left and upper-right WCS coordinates of a
;; rectangular frame bounding all objects in a supplied selection set.
;; sel - [sel] Selection set for which to return bounding box
(defun LM:ssboundingbox ( sel / idx llp ls1 ls2 obj urp )
(repeat (setq idx (sslength sel))
(setq obj (vlax-ename->vla-object (ssname sel (setq idx (1- idx)))))
(if (and (vlax-method-applicable-p obj 'getboundingbox)
(not (vl-catch-all-error-p (vl-catch-all-apply 'vla-getboundingbox (list obj 'llp 'urp))))
)
(setq ls1 (cons (vlax-safearray->list llp) ls1)
ls2 (cons (vlax-safearray->list urp) ls2)
)
)
)
(if (and ls1 ls2)
(mapcar '(lambda ( a b ) (apply 'mapcar (cons a b))) '(min max) (list ls1 ls2))
)
); LM:ssboundingbox
(defun c:2db (/ ss0 ss1 ss2 l i ename pr0 pr1 p0 p1)
(setvar "cmdecho" 0)
(command "._undo" "_begin")
(while (and
(setq ss0 (ssget '((0 . "line,polyline,lwpolyline"))))
(= (setq l (sslength ss0)) 4)
)
(setq i -1 ss1 (ssadd) ss2 (ssadd))
(repeat l
(setq ename (ssname ss0 (setq i (1+ i))))
(setq pr0 (vlax-curve-getStartParam ename))
(setq pr1 (vlax-curve-getEndParam ename))
(setq p0 (vlax-curve-getPointAtParam ename pr0))
(setq p1 (vlax-curve-getPointAtParam ename pr1))
(cond
((or
(equal (angle p0 p1) 0.0 1e-3)
(equal (angle p0 p1) pi 1e-3)
)
(ssadd ename ss1)
); case
((or
(equal (angle p0 p1) (* pi 0.5) 1e-3)
(equal (angle p0 p1) (* pi 1.5) 1e-3)
)
(ssadd ename ss2)
); case
); cond
); repeat
(if (not
(and (= (sslength ss1) 2)
(= (sslength ss2) 2)
)
)
(prompt "\n*non orthogonal lines is prohibited*")
(progn
(setq i -1)
(repeat (sslength ss2)
(setq ename (ssname ss2 (setq i (1+ i))))
(ssadd ename ss1)
); repeat
(setq b1 (LM:ssboundingbox ss1))
(command "._rectangle" (car b1) (cadr b1))
); progn
); if
); while
(command "._undo" "_end")
(setvar "cmdecho" 1)
(princ)
)
In that very particular kind of situation, in very simplest terms, this seems to work:
(defun C:XXX (/ ss n lin)
(setvar 'edgemode 1)
(setq ss (ssget '((0 . "LINE"))))
(command "_.extend" ss "")
(repeat (setq n (sslength ss))
(setq lin (ssname ss (setq n (1- n))))
(command
(getpropertyvalue lin "StartPoint")
(getpropertyvalue lin "EndPoint")
); command
); repeat
(command)
(prin1)
)
It just uses all the selected Lines as boundaries in an EXTEND command, with EDGEMODE set to Extend all of them as boundaries, and picks on each end of each Line. It probably won't work as nicely if the conditions are not as "clean" as in your video, but it could do most of what you want, leaving a little cleaning up to do.
Maybe the use of MLINES would be beneficial for the initial creation of the footing plans.
Bounding box didnot wotk, i manually do is fillet
it didnot work sir, i need lines to be individual not joined.
thankyou
It's not that they're joined, but that some of them Extend to a Line farther away than the one you want them to, and overlap another Line. It seems a little better if you Zoom in -- for me, there was only one overlap. This Line, in the middle:
is overlapped by the one coming up from below, but all the rest are individual and non-overlapping.
EDIT: That one Line coming up from below went farther because initially it is not like those at other intersections, but it already reaches the level of the horizontal Lines:
So in Extend it goes past there, to the next horizontal, and therefore overlaps the highlighted short one. If I pull that end downward so it's off the virtual intersection a little, like all the others, then it works as you intend.
this is the result in mine..
this is the file,
Well, it was written assuming all the Lines are a little bit short of the virtual intersection points you want them to change to. When they're not, some will Extend differently. Handling all possible relationships "correctly" is probably not possible for a routine to figure out.
Honestly, it looks like all of the lines will LENGTHEN the same distance.
This can probably be easily accomplished with the LENGTHEN command.
I'm sure an automated solution could even be created using that command.
Best,
~DD
My $0.05 I have code that does this its based on design of concrete on ground slabs, you draw outside pline then work your way in with internal beams, lastly remove all the crossing portions in the TEE and X cross section.
There was a post the other day asking the same questions but with piers to be added. @ec-cad and I answered. My answer being get the right code to draw the slabs, mine is cheap but not free, has like 6 modules/tasks.
This image is drawn starting with white outline number of beams within section is asked for and line work auto created. Much, much more options. The reason for a cost is that each user has preferences about how the slabs are drawn obvious is feet v's metric. The linetypes and layers are set with the code. There are rules for concrete slab design, re beam spacing.
@CodeDing wrote:
.... it looks like all of the lines will LENGTHEN the same distance. ....
Not so. See the second image in Message 11, which is right from their sample drawing.
@pullstackautocad if you are simply trying to get the centerlines for footings, the use of MLINES can simplify this. The outline below was created with MLines, then edited with MLEdit > Merged Tee:
You can see the grips at the center points for the pier placement. If you just need the centerlines, explode the MLines and delete the red polylines, which are defined in the MLine Style.
If you want the MLines and the Centerlines, copy the MLines and perform the above on the copy.
You can also automate things, like trimming the tee and cross sections by modifying the code found here:
https://www.thecadforums.com/threads/mledit-lisp.27996/
There are a few ways to go about this.
yes can you please show me the instruction through clip. thankyou