Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to join rectangles and circles between them

22 REPLIES 22
Reply
Message 1 of 23
tongkezhou21
2224 Views, 22 Replies

How to join rectangles and circles between them

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.

Labels (1)
22 REPLIES 22
Message 2 of 23
dmfrazier
in reply to: tongkezhou21

"I fill (off) and regen it."

 

What is the purpose of doing the "fill"?

Message 3 of 23
Kent1Cooper
in reply to: tongkezhou21

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

Kent Cooper, AIA
Message 4 of 23
Kent1Cooper
in reply to: dmfrazier


@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
Message 5 of 23
leeminardi
in reply to: tongkezhou21

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
Message 6 of 23
tongkezhou21
in reply to: Kent1Cooper

yes, it is.

Message 7 of 23
Kent1Cooper
in reply to: leeminardi


@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
Message 8 of 23
tongkezhou21
in reply to: Kent1Cooper

exactly!

Message 9 of 23
tongkezhou21
in reply to: Kent1Cooper

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

tongkezhou21_0-1680703753825.png

 

Message 10 of 23
tongkezhou21
in reply to: Kent1Cooper

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

Message 11 of 23
Kent1Cooper
in reply to: tongkezhou21

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
Message 12 of 23
Kent1Cooper
in reply to: tongkezhou21


@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
Message 13 of 23
tongkezhou21
in reply to: Kent1Cooper

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

Message 14 of 23
tongkezhou21
in reply to: Kent1Cooper

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.

Message 15 of 23
tongkezhou21
in reply to: tongkezhou21

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?

Message 16 of 23
dmfrazier
in reply to: tongkezhou21

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.

Message 17 of 23
tongkezhou21
in reply to: dmfrazier

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.

Message 18 of 23
dmfrazier
in reply to: tongkezhou21

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.

Message 19 of 23
tongkezhou21
in reply to: dmfrazier

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

Message 20 of 23
tongkezhou21
in reply to: jobscount

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report