C++
GE_DLLEXPIMPORT Adesk::Boolean area( double startParam, double endParam, double& value, const AcGeTol& tol = AcGeContext::gTol ) const;
Description
Returns the area of the interval of the curve defined by startParam and endParam. Returns Adesk::kTrue if area was successfully computed to within the specified tolerance. If the curve is not planar, then the area cannot be calculated and a value of Adesk::kFalse is returned.
If the points at startParam and endParam are the same, then this function returns the area of the closed curve. If the points are different, then this function connects the two points with a line segment and return the signed area between the curve and the line segment.
If the line segment does not intersect the curve at any points between startParam and endParam, then the returned area is positive. If the line segment intersects the curves at any points between startParam and endParam, then the returned area is the sum of the sub-areas created by the intersection of the line segment with the curve.
Each sub-area has a positive or negative area, depending on whether the curve lies above or below the line segment. The total area returned by this function can therefore be positive, negative, or 0.
Parameters
Parameters | Description |
---|---|
startParam | Input parameter value of interval start |
endParam | Input parameter value of interval end (must be larger than startParam) |
value | Output area of curve between startParam and endParam |
tol | Input tolerance |