Drawing a rectangle inside a complex polyline using the "main four acute angles"

Drawing a rectangle inside a complex polyline using the "main four acute angles"

Anonymous
適用対象外
1,370件の閲覧回数
8件の返信
メッセージ1/9

Drawing a rectangle inside a complex polyline using the "main four acute angles"

Anonymous
適用対象外

Hello everyone,

 

Drawing a rectangle inside a complex polyline using the "main four acute angles" that are curving to the side of closing the polygon. It does not matter if the new rectangle are crossing the original complex polyline boundaries.

 

 

My goal is to classify  the polyline segments in three categories (front, lateral and back) where the front side (that can be more than one when is in the corner) will be the segments closest to the orange polyline, the opposite side normally will be the back and others will be lateral sides. Check before and after images.

 

Tips, references and clues are welcome.

 

Thanks in advance + regards,

Lzucco

0 件のいいね
1,371件の閲覧回数
8件の返信
返信 (8)
メッセージ2/9

Kent1Cooper
Consultant
Consultant

"Rectangle" is not the right word, nor is "acute."  If you mean "quadrilateral," you need to decide what you really want -- your right-most example has five  sides/angles.  And only one of its angles might be acute [it looks like it could be a right angle].  All the examples also contain obtuse  angles.

 

But once that is cleared up, what do you mean by "classify the polyline segments"?  Do you want to mark them in some way in the drawing?  Put some kind of listing into a text or spreadsheet file, or a Table in the drawing?  Something else?

Kent Cooper, AIA
0 件のいいね
メッセージ3/9

Anonymous
適用対象外

Thanks for the interest on helping me.

 

Indeed it's difficult to identify as a rectangule using acute angles, but it was the way I found to say. But, you are right. Sorry for that. Sometimes the main angles to form the quadrilalateral will be five, sometimes four... Well, the important factor is to identify which one are the most importants that are making the form to close the polyline.

 

What do I want is to create a list that will have each coordinate and the category of it until the next vertice and so on.

0 件のいいね
メッセージ4/9

Anonymous
適用対象外

What do I want is to create a list that will have each coordinate and the category of it until the next vertice and so on.

I have posted categories.png image to explain it better.

0 件のいいね
メッセージ5/9

ВeekeeCZ
Consultant
Consultant

Using C3D's Simplify Drawing Cleanup Tool with tolerance set to 3 (or experiment yourself) I got almost the same result as you wanted.

Some manual check would be necessary, but considering plenty of dev-time saved you can do that in detail.

メッセージ6/9

Anonymous
適用対象外

Great for the drawing rebuilding, especially on the polygons with more than 4 vertex (using tolerance 5). It is possible to use MAPCLEAN simplify objects inside a LISP routine?

 

But, still missing the categorization part. Anyway, I already have some ideas of how to do it.


Many thanks

0 件のいいね
メッセージ7/9

Anonymous
適用対象外

I have figured out how to create a .dpf file. It's just SAVE the selection on the MAPCLEAN screen box.

(command "_-mapclean" "lead.dpf")

Now, how to also filter the selection to get only polyline with more than 4 vertices?

0 件のいいね
メッセージ8/9

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:

.... how to also filter the selection to get only polyline with more than 4 vertices?


 

I don't know whether this will be usable in conjunction with MAPCLEAN, but in AutoLisp terms:

 

(setq ss (ssget '((0 . "LWPOLYLINE") (-4 . ">") (90 . 4))))

 

But be aware that if you have any 4-sided Polylines that are not "closed"  in AutoCAD's meaning of the word, but only "visually" closed, i.e. drawn around with a last vertex picked in the same place as the first, they will be "found" by that code, because they'll have 5 vertices.

Kent Cooper, AIA
メッセージ9/9

Anonymous
適用対象外

Thanks Kent,

 

I couldn't manage to include the "number of vertex" filter inside the .dpf file. So, I handle this issue allowing the "_-mapclean" command to do it's job on all polylines of the selected layer and after that deleting the polylines with 4 vertices or less.

 

Now I'm working on the categorization of the polyline segments.

 

Best regards

 

0 件のいいね