Varkon MBS Programmers manual
Returns the area projected on the active XY-plane by of a planar region bounded by any combination of lines, arcs or curves. Optional interior holes or islands are excluded. Accuracy is controlled by a step parameter.
a:=area(step, id_1, id_2....id_n); float a; float step; ref id_1, id_2...id_n;
step | - Step length for numerical accuracy. |
id_1 | - Identity of first line, arc or curve in boundary. |
id_2...id_n | - Identity of additional lines, arcs or curves in exterior or interior boundary. |
A FLOAT value equal to the calculated area.
a:=area(0.01, #4, #5, #19); ! Calculates the area bounded by #4, #5 and #19. Step length is set to 0.01.
The area is computed by numerical integration along the positive X-axis in steps equal to parameter step. A small value for step gives a more accurate result but takes longer time to compute. For a circle with radius = 1 a step of 0.1 gives an area = 3.15. A step of 0.01 gives an area of 3.1419. The exact area is PI = 3.1415927
Boundary entities can be specified in any order of choice but must form one or more well defined boundaries where all entities in each boundary are connected in their endpoints. If more than one boundary is defined one of them must enclose all the other. Boundaries should not cross or touch each other.
Before the calculation starts, the boundary is projected to the XY-plane of the currently active coordinate system. It is thus possible to create the boundary in one plane and calculate the area of the projection in another not neccesarily parallell plane.
Varkon 1.19D svn # 120M