Esempio n. 1
0
        public enum SubContextIdentifier { Axis, Body, BoundingBox, FootPrint, PlanSymbol3d, PlanSymbol2d };        // Surface };
        public IfcGeometricRepresentationSubContext SubContext(SubContextIdentifier nature)
        {
            IfcGeometricRepresentationSubContext result = null;

            if (mSubContexts.TryGetValue(nature, out result))
            {
                return(result);
            }
            string identifier = "Body";
            IfcGeometricProjectionEnum        projection = IfcGeometricProjectionEnum.MODEL_VIEW;
            IfcGeometricRepresentationContext context    = null;

            if (nature == SubContextIdentifier.Axis)
            {
                identifier = "Axis";
                projection = IfcGeometricProjectionEnum.GRAPH_VIEW;
            }
            else if (nature == SubContextIdentifier.BoundingBox)
            {
                projection = IfcGeometricProjectionEnum.MODEL_VIEW;
                identifier = "Box";
            }
            else if (nature == SubContextIdentifier.FootPrint)
            {
                identifier = "FootPrint";
            }
            else if (nature == SubContextIdentifier.PlanSymbol3d)
            {
                projection = IfcGeometricProjectionEnum.PLAN_VIEW;
                identifier = "Annotation";
            }
            else if (nature == SubContextIdentifier.PlanSymbol2d)
            {
                projection = IfcGeometricProjectionEnum.PLAN_VIEW;
                identifier = "Annotation";
                context    = GeometricRepresentationContext(ContextIdentifier.Annotation);
            }
            if (context == null)
            {
                context = GeometricRepresentationContext(ContextIdentifier.Model);
            }
            result = new IfcGeometricRepresentationSubContext(context, projection)
            {
                ContextIdentifier = identifier
            };
            mSubContexts.Add(nature, result);
            return(result);
        }
Esempio n. 2
0
 public IfcGeometricRepresentationSubContext SubContext(SubContextIdentifier nature)
 {
     if (nature == SubContextIdentifier.Axis)
     {
         if (mSubContxtAxis == null)
         {
             mSubContxtAxis = new IfcGeometricRepresentationSubContext(mGeomRepContxt, IfcGeometricProjectionEnum.MODEL_VIEW)
             {
                 ContextIdentifier = "Axis"
             }
         }
         ;
         return(mSubContxtAxis);
     }
     else if (nature == SubContextIdentifier.PlanSymbol)
     {
         if (mSubContxtPlanSymbol == null)
         {
             mSubContxtPlanSymbol = new IfcGeometricRepresentationSubContext(mGeomRepContxt, IfcGeometricProjectionEnum.PLAN_VIEW)
             {
                 ContextIdentifier = "Annotation"
             }
         }
         ;
         return(mSubContxtPlanSymbol);
     }
     if (mSubContxtBody == null)
     {
         mSubContxtBody = new IfcGeometricRepresentationSubContext(mGeomRepContxt, IfcGeometricProjectionEnum.MODEL_VIEW)
         {
             ContextIdentifier = "Body"
         }
     }
     ;
     return(mSubContxtBody);
 }
Esempio n. 3
0
 public IfcGeometricRepresentationSubContext SubContext(SubContextIdentifier nature)
 {
     if (nature == SubContextIdentifier.Axis)
     {
         if (mSubContxtAxis == null)
             mSubContxtAxis = new IfcGeometricRepresentationSubContext(GeometricRepresentationContext, IfcGeometricProjectionEnum.MODEL_VIEW) { ContextIdentifier = "Axis" };
         return mSubContxtAxis;
     }
     else if (nature == SubContextIdentifier.PlanSymbol)
     {
         if (mSubContxtPlanSymbol == null)
             mSubContxtPlanSymbol = new IfcGeometricRepresentationSubContext(GeometricRepresentationContext, IfcGeometricProjectionEnum.PLAN_VIEW) { ContextIdentifier = "Annotation" };
         return mSubContxtPlanSymbol;
     }
     if (mSubContxtBody == null)
         mSubContxtBody = new IfcGeometricRepresentationSubContext(GeometricRepresentationContext, IfcGeometricProjectionEnum.MODEL_VIEW) { ContextIdentifier = "Body" };
     return mSubContxtBody;
 }