@mlightcad/geometry-engine
Version:
The geometry-engine package provides comprehensive geometric entities, mathematical operations, and transformations for 2D and 3D space. This package mimics AutoCAD ObjectARX's AcGe (Geometry) classes and provides the mathematical foundation for CAD opera
40 lines • 1.59 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { AcGeVector2d } from './AcGeVector2d';
/**
* The class representing a point in 2-dimensional space.
*/
var AcGePoint2d = /** @class */ (function (_super) {
__extends(AcGePoint2d, _super);
function AcGePoint2d() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* Convert one point array to one number array
* @param array Input one point array
* @returns Return converted number array
*/
AcGePoint2d.pointArrayToNumberArray = function (array) {
var numberArray = new Array(array.length * 2);
array.forEach(function (item, index) {
item.toArray(numberArray, index * 2);
});
return numberArray;
};
return AcGePoint2d;
}(AcGeVector2d));
export { AcGePoint2d };
//# sourceMappingURL=AcGePoint2d.js.map