Lisp_is possible to make the irregular shape of polygon beauty in difference angle (0,45,90,135,180,225,270,315,360,,.)?

Lisp_is possible to make the irregular shape of polygon beauty in difference angle (0,45,90,135,180,225,270,315,360,,.)?

skchui6159
Advocate Advocate
1,648 Views
13 Replies
Message 1 of 14

Lisp_is possible to make the irregular shape of polygon beauty in difference angle (0,45,90,135,180,225,270,315,360,,.)?

skchui6159
Advocate
Advocate

Like that :(Before)

skchui6159_1-1732695447390.png

After:

skchui6159_0-1732695426638.png

Before:

skchui6159_2-1732695478329.png

After:

skchui6159_3-1732695485959.png

Anyone can help?

0 Likes
Accepted solutions (2)
1,649 Views
13 Replies
Replies (13)
Message 2 of 14

skchui6159
Advocate
Advocate

The sample file

0 Likes
Message 3 of 14

Kent1Cooper
Consultant
Consultant

You need to spell out more specific criteria.  If I take your left example in the sample drawing, and change the non-rectified presumed "before" to green to distinguish the difference, and position them over the rectified white presumed "after" based at the upper right corner of the L-shaped outlines, I get this:

Kent1Cooper_0-1732716714471.png

What determines the different leg lengths of the L shape [one leg is shorter, the other is longer]?  What determines the increase in width of the L legs?  What determines the different sizes of the rectangles [the left one is larger in both directions in the "after," but the right one is smaller horizontally but larger vertically]?  Why and/or how are the double outlines in the "before" reduced to single outlines in the "after"?  Should the "after" be a modification of the inner or the outer of the double outlines?

 

What's more, none of your "after" edges that I checked are accurately at 0 / 45 / 90 / etc. angles, but at angles like 0°7'40.59" and 89°52'19.41" and 45°7'40.59".  Etc., etc.

 

I have a routine that can force Polyline vertices to be at clean multiples of round-number X & Y coordinate values, but your "after" Polylines are not like that -- they're at nowhere-in-particular locations.  And the routine can result in segments lengths that are clean multiples of the specified increment, if the segment directions end up at good angles, but the lengths of your "after" segments and Lines are not clean multiples of anything, so apparently that's not a criterion.

And I have a routine that can force Lines to run in the direction that is the closest multiple of a specified angle [in your case 45°), but it works only with Line objects, not Polyline line segments.

Kent Cooper, AIA
0 Likes
Message 4 of 14

Sea-Haven
Mentor
Mentor

Agree with @Kent1Cooper why not draw correct in 1st place if you think about concrete tilt panels you pick a shape and then just enter values and its drawn all square. Shape on an angle could be added by rotating final result. 

Use RECTANG D and enter the sizes get a perfect rectang. 

 

Obvious is rectang, "L" left or right side, up or down, 4 choices, U.

SeaHaven_0-1732751433546.png

 

You can use a pop menu or a custom dcl for shape choice.

 

0 Likes
Message 5 of 14

skchui6159
Advocate
Advocate

Sir, Sorry , It should be one polygon only not double like that:

skchui6159_0-1732754305143.png

 

0 Likes
Message 6 of 14

skchui6159
Advocate
Advocate

skchui6159_0-1732754598446.png

I want to make the rectangular/polygon like that nearly/no any increase leg length of the original object just like the previous post (Revcloud to Polygon and Revcloud to Rectangular) (Lineweight and linetype not the consideration, it only only the outcome look like). 

Below item is also the target object:

skchui6159_1-1732755253818.png

 

0 Likes
Message 7 of 14

Kent1Cooper
Consultant
Consultant
Accepted solution

[For the rectangular ones, when orthogonal, there's the DBB command in DrawBoundingBox.lsp, >here<.  But that won't do those at the 45°-multiple angles, nor the L- and/or Z-shaped ones.]

Kent Cooper, AIA
0 Likes
Message 8 of 14

skchui6159
Advocate
Advocate

Thank you very much, but can the lisp delete/erase the original one?

0 Likes
Message 9 of 14

Sea-Haven
Mentor
Mentor

For the rectangs on angle if you pick a segment then rotate object to ortho angle 0.0 etc then can get a bounding box then rotate back, for the L's or multi segment not sure. Maybe something similar. It looks like a field survey of buildings where they can be out of square and corner measurement introduces small XY errors.

SeaHaven_0-1732770765277.png

 

0 Likes
Message 10 of 14

skchui6159
Advocate
Advocate

L Shape can not work...

0 Likes
Message 11 of 14

Sea-Haven
Mentor
Mentor

That is correct the bounding box only works for 4 point rectang style shape. Just an idea is find longest line and use that to align the shape, then introduce 90 corners. 

0 Likes
Message 12 of 14

Kent1Cooper
Consultant
Consultant
Accepted solution

@skchui6159 wrote:

... can the lisp delete/erase the original one?


For the DBB command [individual boxes around each object in a multiple selection], add this line:

....

    ); command

    (entdel (ssname ss n))
  ); repeat

....

 

For the DBBM command [one box around multiple objects' overall extents], change this line:

  (command "_.rectangle" "_none" (trans LL 0 1) "_none" (trans UR 0 1))

to this:

  (command

    "_.rectangle" "_none" (trans LL 0 1) "_none" (trans UR 0 1)

    "_.erase" ss ""

  ); command

 

Kent Cooper, AIA
0 Likes
Message 13 of 14

skchui6159
Advocate
Advocate

Thank you very much!

0 Likes
Message 14 of 14

Sea-Haven
Mentor
Mentor

Just a comment, this was drawn using a pline and using the .X & .Y option picking the mid point of the shape with ortho on. So averaging the line direction to ortho. With some manual overides.

SeaHaven_0-1733101293627.png

 

I can not see any easy way to determine how to move a point there is just to much which point to move. In top corner I redid the fillet. 

SeaHaven_1-1733101486710.png

Having worked with survey plans for too many years I know our surveyors used various methods to get corner building points as close as possible to true. When looking at a plan would not know they were not correct, so I would suggest look at survey technique, our guys used 25mm prism targets rather than the big 75mm ones for corners.

0 Likes