Search in sources :

Example 1 with AxisAlignedBoundingBox2D

use of org.bimserver.geometry.AxisAlignedBoundingBox2D in project BIMserver by opensourceBIM.

the class IfcUtils method getBoundingBox2D.

public static AxisAlignedBoundingBox2D getBoundingBox2D(List<IfcCartesianPoint> points) throws GeometryException {
    AxisAlignedBoundingBox2D box2d = new AxisAlignedBoundingBox2D();
    for (IfcCartesianPoint ifcCartesianPoint : points) {
        EList<Double> coordinates = ifcCartesianPoint.getCoordinates();
        if (coordinates.size() > 2) {
            throw new GeometryException("Too many dimensions (" + coordinates.size() + ") for 2D boundingbox");
        }
        box2d.process(coordinates);
    }
    return box2d;
}
Also used : IfcCartesianPoint(org.bimserver.models.ifc2x3tc1.IfcCartesianPoint) AxisAlignedBoundingBox2D(org.bimserver.geometry.AxisAlignedBoundingBox2D)

Aggregations

AxisAlignedBoundingBox2D (org.bimserver.geometry.AxisAlignedBoundingBox2D)1 IfcCartesianPoint (org.bimserver.models.ifc2x3tc1.IfcCartesianPoint)1