bah026 Posted July 3, 2020 Author Posted July 3, 2020 (edited) Hello M.R. Trying to load this routine I'm getting C:\temp\Downloaded-examples\regs2lws.lsp load successfully! Command: Error: incorrect type - nil Command: Any idea what I missed? Edited July 3, 2020 by bah026 Quote
bah026 Posted September 18, 2020 Author Posted September 18, 2020 The problem is when I try to create a region , for example on the simple drawing, I'm getting only one region , where I have 3 regions, Region1=V1,V2,V3, V1 Region 2=V2,V4,V5, V3, V2 and Region 3=V1, V2, V4, V5, V3, V1. Quote
marko_ribar Posted September 18, 2020 Posted September 18, 2020 Can you post DWG with explanation what's going wrong... Before and expected result would be nice... REGION command applied on your picture should create 3 regions, so after you select them, routine should convert all 3 regions to 3 lwpolylines... Quote
bah026 Posted September 19, 2020 Author Posted September 19, 2020 See the attached dwg, When I select Region command and select all the lines in the drawing I only get 1 Region and not 3 as I expacted. The main goal is to get a close Polyline from the the lines that have an interesection point. Attached example drawing that I'm working on, of course the real needis to generate a polylines from big drawing with many lines in it. Thanks for your help Drawing2.dwg Quote
marko_ribar Posted September 19, 2020 Posted September 19, 2020 (edited) I've just tested your DWG... When I use REGION command and select all lines, CAD creates 3 regions like it's supposed to... For your future guidience I suggest that you check each intersection of many lines by selecting them and then activating grip with move mouse - if you see preview that all connected lines are stretching, then intersection is fine - hit ESC to terminate stretching... You should check each intersection in this manner... Finally you should check if all lines are coplanar - there is no quick solution for 3D orientations, but if all your lines are drawn in 2D in WCS, you can select them all, open properties palette (ctrl+1) and look for starting Z coordinate, ending Z coordinate and delta Z value - if this is 0, then all your lines lie in UCS - WCS; otherwise if you see VARIES value then you should modify your lines - flatten them... Anyway this should be your first checking - coplanarity and then you should check for intersections and correct those lines not stretching when grip moved... If all this is OK, when you use REGION and select them all, all regions should be created... Then you can apply my routine on them to get lwpolylines... I know that this is probably unnecessary as you can do many things with regions just like with lwpolylines, but you can't sweep along regions or extrude by path or loft with regions as shapes... Sometimes reference entities must belong to curves, and regions are not those... Edited September 19, 2020 by marko_ribar Quote
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.