cad怎么返回一个多边形的面积呢?在api有没有这个函数呢?[求助]
转化成面域即可求面积。
行用物件area性質.....
Specifies the enclosed area of an arc, circle, ellipse, lightweight polyline, polyline, region, or planar-closed spline.Signature
object.Area
object Arc, Circle, Ellipse, LightweightPolyline, Polyline, Region, Spline
The object or objects this property applies to.
Area Double; read-write
The area of the object specified in square drawing units.
Remarks
Wide polylines:
The area is defined by the center of the width.
Regions:
The area equals the combined area for all the objects in the region .
Open objects such as arcs, spline curves, and open polylines:
The area is computed as though a straight line connects the start point and endpoint.
用area
先将这个多边形用多段线封闭,比如这个多段线对象是plineobjmsgbox plineobj.area
就可以了!
这个我在行了,^_^
呵呵,我天天都是在计算房屋的产权面积,如果说到算面积,不好意思,版主,也容我说两句,好么,详细点是,先用(set pline (bpoly (getpoint "在多边形中定位一点")))捕获polyline 当然有时有复杂的弧线时会小有问题,然后用(command "area" "e" pline) 算出面积来,再用系统变量“area” 就是 (set area (getvar "area"))获得面积,现在给你我得这个程序vlisp水平你比我高多了~~~呵呵~~
我拿去仔细研究研究一下,:)
页:
[1]