Ish Posted November 1, 2023 Share Posted November 1, 2023 Dear members, I need a lisp to convert single pline to multi close pline , for rebar purpose please see attached image thanks By layer: layer name - Bar01 : T =thickness : R= radius By user input in mm and draw in meter Or if have any other trick or program please share with me Thanks Quote Link to comment Share on other sites More sharing options...
exceed Posted November 1, 2023 Share Posted November 1, 2023 (edited) If the R value of the inner and outer lines is the same, it's width is different in curve. Is it sure that picture you want? if YES, and T is smaller than R, you can use this routine. 1. set global width of polyline to T, by properties window (ctrl+1) 2. get outline of polylines by MPOLYOUTLINE http://www.lee-mac.com/polyoutline.html 3. make fillet in once by FMP. https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fillet-multiple-polyline-all-at-once-by-lisp/m-p/6473166/highlight/true#M343470 if NO, 1. set global width of polyline to T, by properties window (ctrl+1) 2. make fillet in once by FMP. https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/fillet-multiple-polyline-all-at-once-by-lisp/m-p/6473166/highlight/true#M343470 3. get outline of polylines by MPOLYOUTLINE. (link is different from the one above.) http://www.lee-mac.com/advpolyoutline.html It is more advanced version of MPOLYOUTLINE, because it recognizes arcs, but it is difficult to execute on complex drawings. so before execution, the drawing must be simply organized. Edited November 1, 2023 by exceed 2 1 Quote Link to comment Share on other sites More sharing options...
Nikon Posted November 1, 2023 Share Posted November 1, 2023 (edited) The bending radius depends on the diameter of the armature, and the inner and outer diameters of the bent rod are different. 2 LISP programs for rounding rods depending on the diameter and class of fittings. Аnd Dynamic block G-mod. details ∅10-32Dynamic block G-mod.details ∅10-32.zip Edited November 1, 2023 by Nikon Quote Link to comment Share on other sites More sharing options...
Steven P Posted November 1, 2023 Share Posted November 1, 2023 (edited) Ignoring the radius thing highlighted above (assume this was just a quick sketch and you'd not set the inner radius differently) I assume that these are 2 segment rebars though the codes should work for many bends? Fillet the polyline segments with radius r (r being the outer radius?) Offset inwards by thickness t (the radius will now be (r - t) ) Join the ends together as one polyline Let us know if the drawn lines ('single lines') are the outside edge, inner edge or centre of the rebar and if the radius is the inner as on the sketch. Also are there defaults for the radius and thickness that can be preset into the LISP... and then it should be fairly easy to make up. Edited November 1, 2023 by Steven P 1 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 1, 2023 Share Posted November 1, 2023 For some reo bars there is a simple rad=Bar dia * value. This could be put in as a default value for rad once dia is entered. Quote Link to comment Share on other sites More sharing options...
Ish Posted November 6, 2023 Author Share Posted November 6, 2023 On 11/1/2023 at 6:09 PM, Steven P said: Ignoring the radius thing highlighted above (assume this was just a quick sketch and you'd not set the inner radius differently) I assume that these are 2 segment rebars though the codes should work for many bends? Fillet the polyline segments with radius r (r being the outer radius?) Offset inwards by thickness t (the radius will now be (r - t) ) Join the ends together as one polyline Let us know if the drawn lines ('single lines') are the outside edge, inner edge or centre of the rebar and if the radius is the inner as on the sketch. Also are there defaults for the radius and thickness that can be preset into the LISP... and then it should be fairly easy to make up. Currently I require only for 2 segment only, and possibility also for more segments/bends. Q- Fillet the polyline segments with radius r (r being the outer radius?) Ans- Yes , currently use outer R will be less than T.(T>R) Q- Join the ends together as one polyline. Ans- Yes Q-Let us know if the drawn lines ('single lines') are the outside edge. Ans- that is inner edge , Yes I need offset above the single polyline. Thanks Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 6, 2023 Share Posted November 6, 2023 (edited) Only missing answer what is radius formula ? eg Bar thickness * 12 normally based on centreline or inner radius. Edited November 6, 2023 by BIGAL 1 Quote Link to comment Share on other sites More sharing options...
Ish Posted November 11, 2023 Author Share Posted November 11, 2023 On 11/7/2023 at 3:42 AM, BIGAL said: Only missing answer what is radius formula ? eg Bar thickness * 12 normally based on centreline or inner radius. Sir, Based on center line, currently assume R =T/3. Thanks Quote Link to comment Share on other sites More sharing options...
Ish Posted November 19, 2023 Author Share Posted November 19, 2023 Any possibility Sir Quote Link to comment Share on other sites More sharing options...
BIGAL Posted November 20, 2023 Share Posted November 20, 2023 (edited) Try this, I have reset the radius as T/3 is not suitable. ; https://www.cadtutor.net/forum/topic/78583-single-pline-to-multi-line-with-radiusstart-and-end-close/ (defun c:test ( / bar barsz ent ent1 ent2 ent3 ent4 off1 off2 st1 st2 end1 end2 obj) (setq bar (list "Please choose" "6" "8" "10" "12" "14" "16" "18" "20" "22" "25" "28" "32" "36" "40")) (if (not AH:Butts)(load "Multi Radio buttons.lsp")) (setq barsz (atof (ah:butts 1 "v" bar))) (setq ent (car (entsel "\nChoose bar pline "))) (setq obj (vlax-ename->vla-object ent)) (setq oldsnap (getvar 'osmode)) (setvar 'osmode 0) (setvar 'filletrad (* barsz 4)) (command "fillet" "P" ent ) (vla-offset obj (/ barsz 2.0)) (setq ent1 (entlast)) (setq off1 (vlax-ename->vla-object ent1 )) (vla-offset obj (- (/ barsz 2.0))) (setq ent2 (entlast)) (setq off2 (vlax-ename->vla-object ent2)) (setq st1 (vlax-curve-getstartPoint off1)) (setq end1 (vlax-curve-getEndPoint off1)) (setq st2 (vlax-curve-getstartPoint off2)) (setq end2 (vlax-curve-getEndPoint off2)) (command "line" st1 st2 "") (setq ent3 (entlast)) (command "line" end1 end2 "") (setq ent4 (entlast)) (command "pedit" ent1 "Join" ent3 ent2 ent4 "" "exit") (entdel ent) (setvar 'osmode oldsnap) (princ) ) (c:test) Edited November 20, 2023 by BIGAL 2 Quote Link to comment Share on other sites More sharing options...
Ish Posted September 20 Author Share Posted September 20 Dear @BIGALError is coming, Load failed: "multi radio buttons.lsp" Thanks Quote Link to comment Share on other sites More sharing options...
Nikon Posted September 20 Share Posted September 20 (edited) 1 hour ago, Ish said: Load failed: "multi radio buttons.lsp" https://www.cadtutor.net/forum/files/file/20-multi-radio-buttonslsp/ Download and install it in the folder where lisp is located... (if (not AH:Butts)(load "Multi Radio buttons.lsp")) Multi radio buttons-2.lsp change to Multi radio buttons.lsp Edited September 20 by Nikon 1 Quote Link to comment Share on other sites More sharing options...
Ish Posted September 20 Author Share Posted September 20 Thanks sir, working perfectly Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.