Exemplo n.º 1
0
        // This routine does no validity checking on the point, but does on attributes.
        private static XYZ ProcessIFCCartesianPointInternal(IFCAnyHandle point, IFCPointType expectedCoordinates)
        {
            IList<double> coordinates = IFCAnyHandleUtil.GetCoordinates(point);
            int numCoordinates = coordinates.Count;
            if (numCoordinates < 2)
            {
                //LOG: Warning: Expected at least 2 coordinates for IfcCartesianPoint, found {numCoordinates}.
            }
            else if (numCoordinates > 3)
            {
                //LOG: Warning: Expected at most 3 coordinates for IfcCartesianPoint, found {numCoordinates}.
            }

            if (expectedCoordinates != IFCPointType.DontCare)
            {
                if ((expectedCoordinates == IFCPointType.UVPoint) && (numCoordinates != 2))
                {
                    //LOG: Warning: Expected 2 coordinates for IfcCartesianPoint, found {numCoordinates}.
                    if (numCoordinates > 2)
                        numCoordinates = 2;               
                }
                else if ((expectedCoordinates == IFCPointType.XYZPoint) && (numCoordinates != 3))
                {
                    //LOG: Warning: Expected 3 coordinates for IfcCartesianPoint, found {numCoordinates}.
                    if (numCoordinates > 3)
                        numCoordinates = 3;
                }
            }

            return ListToXYZ(coordinates);
        }
Exemplo n.º 2
0
        private static XYZ ProcessIFCPointInternal(IFCAnyHandle point, IFCPointType expectedCoordinates)
        {
            if (IFCAnyHandleUtil.IsTypeOf(point, IFCEntityType.IfcCartesianPoint))
            {
                return(ProcessIFCCartesianPointInternal(point, IFCPointType.DontCare));
            }

            Importer.TheLog.LogUnhandledSubTypeError(point, IFCEntityType.IfcCartesianPoint, false);
            return(null);
        }
Exemplo n.º 3
0
        // This routine does no validity checking on the point, but does on attributes.
        private static XYZ ProcessIFCCartesianPointInternal(IFCAnyHandle point, IFCPointType expectedCoordinates)
        {
            IList <double> coordinates    = IFCAnyHandleUtil.GetCoordinates(point);
            int            numCoordinates = coordinates.Count;

            if (numCoordinates < 2)
            {
                //LOG: Warning: Expected at least 2 coordinates for IfcCartesianPoint, found {numCoordinates}.
            }
            else if (numCoordinates > 3)
            {
                //LOG: Warning: Expected at most 3 coordinates for IfcCartesianPoint, found {numCoordinates}.
            }

            if (expectedCoordinates != IFCPointType.DontCare)
            {
                if ((expectedCoordinates == IFCPointType.UVPoint) && (numCoordinates != 2))
                {
                    //LOG: Warning: Expected 2 coordinates for IfcCartesianPoint, found {numCoordinates}.
                    if (numCoordinates > 2)
                    {
                        numCoordinates = 2;
                    }
                }
                else if ((expectedCoordinates == IFCPointType.XYZPoint) && (numCoordinates != 3))
                {
                    //LOG: Warning: Expected 3 coordinates for IfcCartesianPoint, found {numCoordinates}.
                    if (numCoordinates > 3)
                    {
                        numCoordinates = 3;
                    }
                }
            }

            return(ListToXYZ(coordinates));
        }
Exemplo n.º 4
0
        private static XYZ ProcessIFCPointInternal(IFCAnyHandle point, IFCPointType expectedCoordinates)
        {
            if (IFCAnyHandleUtil.IsTypeOf(point, IFCEntityType.IfcCartesianPoint))
                return ProcessIFCCartesianPointInternal(point, IFCPointType.DontCare);

            Importer.TheLog.LogUnhandledSubTypeError(point, IFCEntityType.IfcCartesianPoint, false);
            return null;
        }