无果树 发表于 2003-2-25 09:43:00

cad怎么返回一个多边形的面积呢?在api有没有这个函数呢?[求助]

龙龙仔 发表于 2003-2-26 08:13:00

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.

myfreemind 发表于 2003-4-19 00:09:00

先将这个多边形用多段线封闭,比如这个多段线对象是plineobj
msgbox plineobj.area
就可以了!

Taoyimaier 发表于 2003-4-19 00:45:00

呵呵,我天天都是在计算房屋的产权面积,如果说到算面积,不好意思,版主,也容我说两句,好么,详细点是,先用(set pline (bpoly (getpoint "在多边形中定位一点")))捕获polyline 当然有时有复杂的弧线时会小有问题,然后用(command "area" "e" pline) 算出面积来,再用系统变量“area” 就是 (set area (getvar "area"))获得面积,现在给你我得这个程序

myfreemind 发表于 2003-4-19 01:00:00

我拿去仔细研究研究一下,:)
页: [1]
查看完整版本: cad怎么返回一个多边形的面积呢?在api有没有这个函数呢?[求助]