Example #1
0
        public IfcGeometricRepresentationContext GeometricRepresentationContext(ContextIdentifier nature)
        {
            IfcGeometricRepresentationContext result = null;

            if (mContexts.TryGetValue(nature, out result))
            {
                return(result);
            }
            string type      = "Model";
            int    dimension = 3;

            if (nature == ContextIdentifier.Annotation)
            {
                type = "Annotation";
            }

            result = new IfcGeometricRepresentationContext(mDatabase, dimension, mDatabase.Tolerance)
            {
                ContextType = type
            };
            IfcContext context = mDatabase.Context;

            if (context != null)
            {
                context.addRepresentationContext(result);
            }
            mContexts.Add(nature, result);
            return(result);
        }