コード例 #1
0
        private static IFCAnyHandle ExportBoundingBoxBase(ExporterIFC exporterIFC, XYZ cornerXYZ, double xDim, double yDim, double zDim)
        {
            double eps = MathUtil.Eps();

            if (xDim < eps || yDim < eps || zDim < eps)
            {
                return(null);
            }

            IFCFile      file            = exporterIFC.GetFile();
            IFCAnyHandle cornerHnd       = ExporterUtil.CreateCartesianPoint(file, cornerXYZ);
            IFCAnyHandle boundingBoxItem = IFCInstanceExporter.CreateBoundingBox(file, cornerHnd, xDim, yDim, zDim);

            if (IFCAnyHandleUtil.IsNullOrHasNoValue(boundingBoxItem))
            {
                return(null);
            }

            IFCAnyHandle contextOfItems = exporterIFC.Get3DContextHandle("Box");

            return(RepresentationUtil.CreateBoundingBoxRep(exporterIFC, contextOfItems, boundingBoxItem));
        }