public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: case 5: base.IfcParse(propIndex, value); break; case 6: _parentContext = (IfcGeometricRepresentationContext)value.EntityVal; break; case 7: _targetScale = value.RealVal; break; case 8: _targetView = (IfcGeometricProjectionEnum)Enum.Parse(typeof(IfcGeometricProjectionEnum), value.EnumVal, true); break; case 9: _userDefinedTargetView = value.StringVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: case 5: base.Parse(propIndex, value, nestedIndex); return; case 6: _parentContext = (IfcGeometricRepresentationContext)(value.EntityVal); return; case 7: _targetScale = value.RealVal; return; case 8: _targetView = (IfcGeometricProjectionEnum)System.Enum.Parse(typeof(IfcGeometricProjectionEnum), value.EnumVal, true); return; case 9: _userDefinedTargetView = value.StringVal; return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
internal IfcGeometricRepresentationSubContext(DatabaseIfc db, IfcGeometricRepresentationSubContext s, DuplicateOptions options) : base(db, s, options) { IfcGeometricRepresentationContext parent = s.ParentContext; if (parent != null) { IfcGeometricRepresentationContext.GeometricContextIdentifier contextId = IfcGeometricRepresentationContext.GeometricContextIdentifier.Model; if (Enum.TryParse <IfcGeometricRepresentationSubContext.GeometricContextIdentifier>(s.ContextType, out contextId)) { IfcGeometricRepresentationContext existing = null; if (db.Factory.mContexts.TryGetValue(contextId, out existing)) { ParentContext = existing; } } } if (ParentContext == null) { ParentContext = db.Factory.Duplicate(s.ParentContext, options) as IfcGeometricRepresentationContext; } mTargetScale = s.mTargetScale; mTargetView = s.mTargetView; mUserDefinedTargetView = s.mUserDefinedTargetView; IfcGeometricRepresentationSubContext.SubContextIdentifier id = IfcGeometricRepresentationSubContext.SubContextIdentifier.Axis; if (Enum.TryParse <IfcGeometricRepresentationSubContext.SubContextIdentifier>(ContextIdentifier, out id)) { db.Factory.mSubContexts[id] = this; } }
public IfcGeometricRepresentationSubContext(IfcLabel contextIdentifier, IfcLabel contextType, IfcDimensionCount coordinateSpaceDimension, IfcReal precision, IfcAxis2Placement worldCoordinateSystem, IfcDirection trueNorth, IfcGeometricRepresentationContext parentContext, IfcPositiveRatioMeasure targetScale, IfcGeometricProjectionEnum targetView, IfcLabel userDefinedTargetView) : base(contextIdentifier, contextType, coordinateSpaceDimension, precision, worldCoordinateSystem, trueNorth) { ParentContext = parentContext; TargetScale = targetScale; TargetView = targetView; UserDefinedTargetView = userDefinedTargetView; }
public IfcGeometricRepresentationSubContext(IfcGeometricRepresentationContext container, IfcGeometricProjectionEnum view) : base(container.mDatabase) { ParentContext = container; mContextType = container.mContextType; mTargetView = view; }
internal IfcGeometricRepresentationSubContext(IfcGeometricRepresentationSubContext p) : base(p) { mContainerContext = p.mContainerContext; mTargetScale = p.mTargetScale; mTargetView = p.mTargetView; mUserDefinedTargetView = p.mUserDefinedTargetView; }
internal IfcGeometricRepresentationSubContext(IfcGeometricRepresentationContext container, double scale, IfcGeometricProjectionEnum view) : base(container.mDatabase) { mContainerContext = container.mIndex; mContextType = container.mContextType; mTargetScale = scale; mTargetView = view; }
public IfcGeometricRepresentationSubContext(IfcLabel?__ContextIdentifier, IfcLabel?__ContextType, IfcDimensionCount __CoordinateSpaceDimension, IfcReal?__Precision, IfcAxis2Placement __WorldCoordinateSystem, IfcDirection __TrueNorth, IfcGeometricRepresentationContext __ParentContext, IfcPositiveRatioMeasure?__TargetScale, IfcGeometricProjectionEnum __TargetView, IfcLabel?__UserDefinedTargetView) : base(__ContextIdentifier, __ContextType, __CoordinateSpaceDimension, __Precision, __WorldCoordinateSystem, __TrueNorth) { this._ParentContext = __ParentContext; this._TargetScale = __TargetScale; this._TargetView = __TargetView; this._UserDefinedTargetView = __UserDefinedTargetView; }
internal IfcGeometricRepresentationSubContext(DatabaseIfc db, IfcGeometricRepresentationSubContext s) : base(db, s) { ParentContext = db.Factory.Duplicate(s.ParentContext) as IfcGeometricRepresentationContext; mTargetScale = s.mTargetScale; mTargetView = s.mTargetView; mUserDefinedTargetView = s.mUserDefinedTargetView; }
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); }
public GeometricRepresentationSubContext(IfcStore model, string contextIdentifier, string contextType, IfcGeometricProjectionEnum targetView, GeometricRepresentationContext parentContext) { this.contextIdentifier = contextIdentifier; this.contextType = contextType; this.targetView = targetView; this.parentContext = parentContext; ifcRepresentationSubContext = model.Instances.New <IfcGeometricRepresentationSubContext>(sc => { sc.ContextIdentifier = contextIdentifier; sc.ContextType = contextType; sc.TargetView = targetView; sc.ParentContext = parentContext.IfcRepresenationContext; }); }
internal IfcGeometricRepresentationSubContext(DatabaseIfc db, IfcGeometricRepresentationSubContext s) : base(db, s) { ContainerContext = db.Factory.Duplicate(s.ContainerContext) as IfcGeometricRepresentationContext; mTargetScale = s.mTargetScale; mTargetView = s.mTargetView; mUserDefinedTargetView = s.mUserDefinedTargetView; }
} // derived /// <summary> /// Construct a IfcGeometricRepresentationSubContext with all required attributes. /// </summary> public IfcGeometricRepresentationSubContext(IfcDimensionCount coordinateSpaceDimension, IfcAxis2Placement worldCoordinateSystem, IfcGeometricRepresentationContext parentContext, IfcGeometricProjectionEnum targetView) : base(coordinateSpaceDimension, worldCoordinateSystem) { ParentContext = parentContext; TargetView = targetView; }
private IfcGeometricProjectionEnum mTargetView; // : IfcGeometricProjectionEnum; #endregion Fields #region Constructors public IfcGeometricRepresentationSubContext(IfcGeometricRepresentationContext container, IfcGeometricProjectionEnum view) : base(container.mDatabase) { ContainerContext = container; mContextType = container.mContextType; mTargetView = view; }