@Anonymous wrote:
How to determine when surfase is a flat surface. ....
For object types that qualify in the "curve" class [perhaps not your images]:
(vl-load-com); if needed
(vlax-curve-isPlanar (car (entsel)))
Then pick something -- returns T if it's flat, nil if it's not.
For other kinds of things, if one is flat and lies in or parallel to the WCS construction plane, you could get its bounding box and compare the Z coordinates of the corners -- if they're the same, it's flat. The same could be done for something flat in any orthogonal plane, by comparing different coordinates of the corners.
If it's not parallel to an orthogonal plane, and it's something that defines a UCS, a similar approach could be taken, aligning the UCS with it and involving the (trans) function when comparing coordinates.
Kent Cooper, AIA