@Anonymous wrote:
....
Insufficient specification.... You'll need to define additionally at least one angle.
... or, that it should be an isosceles trapezoid -- that would be enough information, if that's what is needed.
But I would also want to know: The User should presumably be asked for some location point, which should be -- what? The midpoint of the bottom edge? The overall middle [halfway between the midpoints of opposite edges? The lower left corner? Something else?
In super-simple terms, with isosceles shape and the midpoint of the bottom as specified location:
(defun C:TRAPI (/ base bottom height top); = TRAPezoid, Isosceles
(setq
base (getpoint "\nMidpoint of bottom edge: ")
bottom (getdist "\nLength of bottom edge: ")
height (getdist "\nHeight: ")
top (getdist "\nLength of top edge: ")
); setq
(command "_.pline"
"_none" (polar base pi (/ bottom 2))
"_none" (polar base 0 (/ bottom 2))
"_none" (polar (polar base (/ pi 2) height) 0 (/ top 2))
"_none" (polar (polar base (/ pi 2) height) pi (/ top 2))
"_close"
); command
); defun
Kent Cooper, AIA