Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

How to join rectangles and circles between them

tongkezhou21
Participant

How to join rectangles and circles between them

tongkezhou21
Participant
Participant

I have a pattern made up of a lot of lines and circles between lines. I fill (off) and regen it. Some rectangles and circles are generated. But there are a lot of lines inside circles. And I want to join all of them and then get some closed polygons. How could I do? 1.png is snapshot of a part of pattern after fill and regen. 2.png is the cirles with lines. 3.png is what I want.

 

Thanks a lot for your kind help.

0 Likes
Reply
3,475 Views
22 Replies
Replies (22)

dmfrazier
Advisor
Advisor

"I fill (off) and regen it."

 

What is the purpose of doing the "fill"?

0 Likes

Kent1Cooper
Consultant
Consultant

Are the "lines" [and the rectangles] actually Polylines with width?

Kent Cooper, AIA

Kent1Cooper
Consultant
Consultant

@dmfrazier wrote:

"I fill (off) and regen it."

What is the purpose of doing the "fill"?


I think they mean that they turn FILLMODE off, so that [my assumption] Polylines with width are not filled.  REGEN is needed after changing the FILLMODE value, to visually get rid of the fill.

Kent Cooper, AIA

leeminardi
Mentor
Mentor

To get a drawing like your figure 3 from figure 1 I would use the boundary command.   Draw a rectangle around the entire figure 1 then use boundary followed by a click just inside the rectangle to create a polyline of the outer boundary.  Use boundary again to make polylines for the inner islands.

lee.minardi

tongkezhou21
Participant
Participant

yes, it is.

0 Likes

Kent1Cooper
Consultant
Consultant

@leeminardi wrote:

... use the boundary command.   Draw a rectangle around the entire figure 1 then use boundary ....


Maybe.  If the "lines" are Polylines with width, as suggested by one of their original images, that won't work.  Boundary does not "see" Polyline width, but goes to the center-line path of a Polyline.  Given the left situation here, that approach produces the dashed green on the right:

Kent1Cooper_0-1680703550203.png

 

Kent Cooper, AIA
0 Likes

tongkezhou21
Participant
Participant

exactly!

tongkezhou21
Participant
Participant

yes, it is. This is what I want to say.

tongkezhou21_0-1680703753825.png

 

tongkezhou21
Participant
Participant

In my opining, could we convert every line to closed rectangle and then convert it to a region, and then use union command.

0 Likes

Kent1Cooper
Consultant
Consultant

Part of a solution could be PLWtoOutline.lsp with its PLWO command, >here<.  That will make all those edges recognizable to BOUNDARY.  It would remain to ERASE those outlines and the Circles.

Kent Cooper, AIA
0 Likes

Kent1Cooper
Consultant
Consultant

@tongkezhou21 wrote:

In my opining, could we convert every line to closed rectangle and then convert it to a region, and then use union command.


The conversion part, see Message 11.  [But please use correct terminology -- the word "line" has a specific meaning in AutoCAD, and these are not Lines.]  I hadn't thought of the Region approach, but it looks like it would work [also converting the Circles to Regions].

Kent Cooper, AIA
0 Likes

tongkezhou21
Participant
Participant

Thanks for you correction. I am going to try immediately. Thanks a lot.

tongkezhou21
Participant
Participant

Hi Kent, Sorry to bother you. I have another question. I have converted polylines to rectangles successfully using PLWO command. As you can see, there are many circles in my file. When I want to convert them by calling PLWO command, it didn't work. Autocad showed:

select object:

can't call (command) from *error* before call (*push-error-using-command*).

suggest convert (command) to (command-s).

And a very big circle appeared.

Do you know what it means? Thanks a lot.

0 Likes

tongkezhou21
Participant
Participant

When I convert circles by calling PLWO command, I can only convert circle one by one. And There will be a small circle and a big circle. Could you please help me?

dmfrazier
Advisor
Advisor

I think this is (perhaps) because the "circles" were made with the "DONUT" command, with an inside diameter and an outside diameter specified. This actually creates a 2D polyline (similar to your "lines") "circle" (two arcs joined) with thickness based on the difference between the two diameters. The LSP routine converts this into two circles in the same way it converts a thick polyline into two lines.

0 Likes

tongkezhou21
Participant
Participant

I think maybe you are right. So could I replace them by circles, or magnify every circles at the same time based on their own centers? Thanks a lot.

0 Likes

dmfrazier
Advisor
Advisor

If they all should have the same diameter, then you can select them (use Selectsimilar or Filter) and use Properties to change them all at once.

Otherwise, you will have to pick and choose based on diameter.

Unless someone else can come up with a nifty tool that does some (more) magic.

0 Likes

tongkezhou21
Participant
Participant

Unfortunately, their diameters are different. It would be better if we could magnify them in proportion, such as 1:2.

0 Likes

tongkezhou21
Participant
Participant

Sorry, what do you mean? This is a link about golf

0 Likes