Search in sources :

Example 1 with AxisAlignedBoundingBox3D

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

the class IfcUtils method getBoundingBox3D.

public static AxisAlignedBoundingBox3D getBoundingBox3D(List<IfcCartesianPoint> points) throws GeometryException {
    AxisAlignedBoundingBox3D box3d = new AxisAlignedBoundingBox3D();
    for (IfcCartesianPoint ifcCartesianPoint : points) {
        EList<Double> coordinates = ifcCartesianPoint.getCoordinates();
        if (coordinates.size() < 2) {
            throw new GeometryException("Not enough dimensions (" + coordinates.size() + ") for 3D boundingbox");
        }
        box3d.process(coordinates);
    }
    return box3d;
}
Also used : AxisAlignedBoundingBox3D(org.bimserver.geometry.AxisAlignedBoundingBox3D) IfcCartesianPoint(org.bimserver.models.ifc2x3tc1.IfcCartesianPoint)

Aggregations

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