• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

insert diagonals inside geometric figures

  • Thread starter Thread starter micheledag
  • Start date Start date

micheledag

Guest
Good morning to all the friends of the forum.
in order to speed up the resolution of one of the many problems that afflict me during the designs, I ask you if you can get the following.
Taking inspiration from a lisp already treated in this forum, called diag that inserts the diagonals inside rectangle polylines, it would very convenient a lisp that allows to insert all the diagonals possible within any geometric shape.
I explain better, given for example a pentagon formed by lines or polylines, of vertices to,b,c,d,e:
PENT.webpthe lisp once launched, after asking to select the sides of the pentagon, will insert a link lines of the vertices: ac, ad, bd, be, ce. the other diagonals, obviously coincide with those already inserted (e.g. db or ca) and therefore should not be drawn.


If then, you could make the lisp the operation required even on several figures with common sides (of course empty inside) would be the top. e.g. data 4 rectangles (but could also be hexagons, octagons, dodecagoni...) with common sides:RETT.webpthe lisp should, once you select all the lines, insert all the diagonals inside the figures (obviously without crossing them: e.g., an ah or bg line is not allowed).
thanks to those who will have the patience to reason us on, and to solve the question eventually.
autocad 2007, 2011, 2014.
 
(1)
until it comes to insert diagonals in a rectangle ok, a pentagon ok.
a 6-sided polygon has 8, from 7 it has 14, from 8 it has 20 etc.
but what do you need 20 diagonals in an octagon?
Figure 2)
the bpoly command creates the contour of a closed figure; selecting an internal point at the rectangle abed you get a polyline to use for the calculation of the diagonals.

in any case, after having solved everything, that you win?
 
I know the ppoli command to create closed polylines. The example of flanked rectangles is an example, they had been hexagons, my problem, which is to model fields with biella, remains. That's why I need something to do what I wrote. Thank you.
ps, you win a nice sicula lunch;)
 
the question about figure 1 was to punctuate the fact that drawing the diagonals of a rectangle is simple, of a polygon with 8 sides much more complicated; Ultimately, if it is better to put a limit on the sides of the polygon.
for point 2, instead of selecting lines, via lisp, select the internal point so you can calculate the figures in a simpler way.
 
ah ok. we make a limit of figures with 6 sides. I hope I don't have more complex figures.
 
Great!
paid dinner!! !

ps, do not kill me, but you could have a variant for inclined figures in space :wink: ....
 
thank you so much!!!a further proposal instead of having to select each time an internal point for each range would it be possible to select them all and have the diagonal?
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top