public IfcLinearPlacement(IfcCurve __PlacementRelTo, IfcDistanceExpression __Distance, IfcOrientationExpression __Orientation, IfcAxis2Placement3D __CartesianPosition) { this.PlacementRelTo = __PlacementRelTo; this.Distance = __Distance; this.Orientation = __Orientation; this.CartesianPosition = __CartesianPosition; }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _basisCurve = (IfcCurve)(value.EntityVal); return; case 1: _trim1.InternalAdd((IfcTrimmingSelect)value.EntityVal); return; case 2: _trim2.InternalAdd((IfcTrimmingSelect)value.EntityVal); return; case 3: _senseAgreement = value.BooleanVal; return; case 4: _masterRepresentation = (IfcTrimmingPreference)System.Enum.Parse(typeof(IfcTrimmingPreference), value.EnumVal, true); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public void AddInnerBoundary(IfcCurve inner) { if (_innerBoundaries == null) this.SetModelValue(this, ref _innerBoundaries, new CurveSet(this), v => _innerBoundaries = v, "InnerBoundaries"); _innerBoundaries.Add_Reversible(inner); }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _directrix = (IfcCurve)value.EntityVal; break; case 1: _radius = value.RealVal; break; case 2: _innerRadius = value.RealVal; break; case 3: _startParam = new IfcParameterValue(value.RealVal); break; case 4: _endParam = new IfcParameterValue(value.RealVal); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
/// <summary> /// /// </summary> /// <param name="model"></param> /// <param name="AlignmentCurve"> Die benötigte AlignmentCurve soll verwendet werden, um die Komponenten an die richtige Stelle zu platzieren </param> /// <param name="distancealong">Abstand Start zu Plazierungspunkt muss angegeben werden</param> /// <returns></returns> public IfcLinearPlacement AddLinearPlacement(ref IfcStore model, IfcCurve AlignmentCurve, double distancealong) { // ToDo: Identify chosen alignment by its GUID var linearPlacement = model.Instances.New <IfcLinearPlacement>(); // Füge DistanceExpression hinzu var distanceExpression = model.Instances.New <IfcDistanceExpression>(); distanceExpression.DistanceAlong = distancealong; distanceExpression.OffsetLateral = 1; distanceExpression.OffsetVertical = 0; distanceExpression.OffsetLongitudinal = 0; distanceExpression.AlongHorizontal = true; var orientationExpression = model.Instances.New <IfcOrientationExpression>(); // Füge Informationen für OrientationExpression hinzu var lateralAxisDirection = model.Instances.New <IfcDirection>(lAD => lAD.SetXYZ(1, 0, 0)); var verticalAxisDirection = model.Instances.New <IfcDirection>(vAD => vAD.SetXYZ(0, 0, 1)); //Fülle OrientationExpression orientationExpression.LateralAxisDirection = lateralAxisDirection; orientationExpression.VerticalAxisDirection = verticalAxisDirection; //Fülle den Hauptoperator mit den benötigten Inputs linearPlacement.PlacementMeasuredAlong = AlignmentCurve; linearPlacement.Distance = distanceExpression; linearPlacement.Orientation = orientationExpression; return(linearPlacement); }
private static void Shape(Stack operandStack) { var curveList = new List <IfcCurve>(); var poppedValue = operandStack.Pop(); while (poppedValue.GetType() != typeof(char)) { curveList.Add((IfcCurve)poppedValue); poppedValue = operandStack.Pop(); } // Construct IFC closed profile IfcCurve outerCurve = curveList[curveList.Count - 1]; //remove the outer curve from the list to have a list of the innercurves curveList.RemoveRange(curveList.Count - 1, 1); if (curveList.Count == 0) { // only outer curve without voids operandStack.Push(new IfcArbitraryClosedProfileDef(IfcProfileTypeEnum.AREA, null, outerCurve)); } else { // outer curve with voids operandStack.Push(new IfcArbitraryProfileDefWithVoids(IfcProfileTypeEnum.AREA, null, outerCurve, curveList.ToArray())); } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _directrix = (IfcCurve)(value.EntityVal); return; case 1: _radius = value.RealVal; return; case 2: _innerRadius = value.RealVal; return; case 3: _startParam = value.RealVal; return; case 4: _endParam = value.RealVal; return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public IfcSweptDiskSolid(IfcCurve __Directrix, IfcPositiveLengthMeasure __Radius, IfcPositiveLengthMeasure?__InnerRadius, IfcParameterValue?__StartParam, IfcParameterValue?__EndParam) { this._Directrix = __Directrix; this._Radius = __Radius; this._InnerRadius = __InnerRadius; this._StartParam = __StartParam; this._EndParam = __EndParam; }
internal static IfcSweptDiskSolid SweptDiskSolidCreate(IfcStore model, IfcCurve prof, double radius) { IfcSweptDiskSolid body = model.Instances.New <IfcSweptDiskSolid>(); body.Directrix = prof; body.Radius = radius; return(body); }
public IfcFixedReferenceSweptAreaSolid(IfcProfileDef __SweptArea, IfcAxis2Placement3D __Position, IfcCurve __Directrix, IfcParameterValue?__StartParam, IfcParameterValue?__EndParam, IfcDirection __FixedReference) : base(__SweptArea, __Position) { this._Directrix = __Directrix; this._StartParam = __StartParam; this._EndParam = __EndParam; this._FixedReference = __FixedReference; }
/// <summary> /// returns a Hash for the geometric behaviour of this object /// </summary> /// <param name="solid"></param> /// <returns></returns> public static int GetGeometryHashCode(this IfcCurve curve) { if (curve is IfcPolyline) { return(((IfcPolyline)curve).GetGeometryHashCode()); } return(curve.GetHashCode()); //this will mostly give a hash, the geometric hash functions for curves needs to be implemented, for now this avoids problems }
/// <summary> /// Compares two objects for geometric equality /// </summary> /// <param name="a"></param> /// <param name="b">object to compare with</param> /// <returns></returns> public static bool GeometricEquals(this IfcCurve a, IfcCurve b) { if (a is IfcPolyline && b is IfcPolyline) { return(((IfcPolyline)a).GeometricEquals((IfcPolyline)b)); } return(a.Equals(b)); //comparing two objects from different models hould always fails, this needs a proper implementation, but for now this ensure correctness but does find true duplicates }
public void AddInnerBoundary(IfcCurve inner) { if (_innerBoundaries == null) { this.SetModelValue(this, ref _innerBoundaries, new CurveSet(this), v => _innerBoundaries = v, "InnerBoundaries"); } _innerBoundaries.Add(inner); }
public IfcGridAxis(IfcLabel?__AxisTag, IfcCurve __AxisCurve, IfcBoolean __SameSense) { this.AxisTag = __AxisTag; this.AxisCurve = __AxisCurve; this.SameSense = __SameSense; this.PartOfW = new HashSet <IfcGrid>(); this.PartOfV = new HashSet <IfcGrid>(); this.PartOfU = new HashSet <IfcGrid>(); this.HasIntersections = new HashSet <IfcVirtualGridIntersection>(); }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _basisCurve = (IfcCurve)(value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public static IfcLinearPlacement MakeLinearPlacementWithoutPoint(IfcStore m, IfcCurve constructAlign, IfcDistanceExpression dist, IfcOrientationExpression orientation = null) { return(m.Instances.New <IfcLinearPlacement>(l => { l.PlacementRelTo = constructAlign; l.Distance = dist; if (null != l.Orientation) { l.Orientation = orientation; } l.CartesianPosition = ToAx3DWithoutLoc(m, l); })); }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _basisCurve = (IfcCurve) value.EntityVal; break; case 1: _pointParameter = value.RealVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _outerBoundary = (IfcCurve) value.EntityVal; break; case 1: if (_innerBoundaries == null) _innerBoundaries = new CurveSet(this); _innerBoundaries.Add((IfcCurve)value.EntityVal); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: base.IfcParse(propIndex, value); break; case 2: _outerCurve = (IfcCurve) value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _directrix = (IfcCurve)(value.EntityVal); return; case 1: _crossSections.InternalAdd((IfcProfileDef)value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: base.IfcParse(propIndex, value); break; case 2: _outerCurve = (IfcCurve)value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
private static ICurve ToCurve(this IfcCurve curve, bool closed) { if (curve is IfcBoundedCurve) { if (curve is IfcCompositeCurve) { throw new Exception("IfcCompositeCurve is not supported yet."); } else if (curve is IfcPolyline) { var pl = (IfcPolyline)curve; if (closed) { return(pl.ToPolygon(true)); } else { return(pl.ToPolyline()); } } else if (curve is IfcTrimmedCurve) { throw new Exception("IfcTrimmedCurve is not supported yet."); } else if (curve is IfcBSplineCurve) { throw new Exception("IfcBSplineCurve is not supported yet."); } } else if (curve is IfcConic) { throw new Exception("IfcConic is not supported yet."); } else if (curve is IfcOffsetCurve2D) { throw new Exception("IfcOffsetCurve2D is not supported yet."); } else if (curve is IfcOffsetCurve3D) { throw new Exception("IfcOffsetCurve3D is not supported yet."); } return(null); }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _curve3D = (IfcCurve)(value.EntityVal); return; case 1: _associatedGeometry.InternalAdd((IfcPcurve)value.EntityVal); return; case 2: _masterRepresentation = (IfcPreferredSurfaceCurveRepresentation)System.Enum.Parse(typeof(IfcPreferredSurfaceCurveRepresentation), value.EnumVal, true); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _basisSurface = (IfcPlane)(value.EntityVal); return; case 1: _outerBoundary = (IfcCurve)(value.EntityVal); return; case 2: _innerBoundaries.InternalAdd((IfcCurve)value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _transition = (IfcTransitionCode)System.Enum.Parse(typeof(IfcTransitionCode), value.EnumVal, true); return; case 1: _sameSense = value.BooleanVal; return; case 2: _parentCurve = (IfcCurve)(value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _outerBoundary = (IfcCurve)value.EntityVal; break; case 1: if (_innerBoundaries == null) { _innerBoundaries = new CurveSet(this); } _innerBoundaries.Add((IfcCurve)value.EntityVal); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
private IfcDimensionCount DimElem(object elem) { IfcPoint pt = elem as IfcPoint; IfcCurve cv = elem as IfcCurve; IfcSurface sf = elem as IfcSurface; if (pt != null) { return(pt.Dim); } if (cv != null) { return(cv.Dim); } if (sf != null) { return(sf.Dim); } return(0); }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: case 1: base.IfcParse(propIndex, value); break; case 2: _edgeGeometry = (IfcCurve)value.EntityVal; break; case 3: _sameSense = (bool)value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _axisTag = value.StringVal; break; case 1: _axisCurve = (IfcCurve)value.EntityVal; break; case 2: _sameSense = value.BooleanVal; break; default: throw new ArgumentOutOfRangeException(string.Format("P21 index value out of range in {0}", this.GetType().Name)); } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: case 1: base.Parse(propIndex, value, nestedIndex); return; case 2: _edgeGeometry = (IfcCurve)(value.EntityVal); return; case 3: _sameSense = value.BooleanVal; return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _basisCurve = (IfcCurve)(value.EntityVal); return; case 1: _distance = value.RealVal; return; case 2: _selfIntersect = value.BooleanVal; return; case 3: _refDirection = (IfcDirection)(value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _placementRelTo = (IfcCurve)(value.EntityVal); return; case 1: _distance = (IfcDistanceExpression)(value.EntityVal); return; case 2: _orientation = (IfcOrientationExpression)(value.EntityVal); return; case 3: _cartesianPosition = (IfcAxis2Placement3D)(value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
public IfcArbitraryClosedProfileDef(IfcProfileTypeEnum __ProfileType, IfcLabel?__ProfileName, IfcCurve __OuterCurve) : base(__ProfileType, __ProfileName) { this._OuterCurve = __OuterCurve; }
public IfcArbitraryProfileDefWithVoids(IfcProfileTypeEnum __ProfileType, IfcLabel?__ProfileName, IfcCurve __OuterCurve, IfcCurve[] __InnerCurves) : base(__ProfileType, __ProfileName, __OuterCurve) { this.InnerCurves = new HashSet <IfcCurve>(__InnerCurves); }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _basisSurface = (IfcPlane) value.EntityVal; break; case 1: _outerBoundary = (IfcCurve) value.EntityVal; break; case 2: _innerBoundaries.Add((IfcCurve) value.EntityVal); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _directrix = (IfcCurve) value.EntityVal; break; case 1: _radius = value.RealVal; break; case 2: _innerRadius = value.RealVal; break; case 3: _startParam = new IfcParameterValue(value.RealVal); break; case 4: _endParam = new IfcParameterValue(value.RealVal); break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
/// <summary> /// Compares two objects for geometric equality /// </summary> /// <param name="a"></param> /// <param name="b">object to compare with</param> /// <returns></returns> public static bool GeometricEquals(this IfcCurve a, IfcCurve b) { if(a is IfcPolyline && b is IfcPolyline) return ((IfcPolyline)a).GeometricEquals((IfcPolyline)b); return a.Equals(b); //comparing two objects from different models hould always fails, this needs a proper implementation, but for now this ensure correctness but does find true duplicates }
public override void IfcParse(int propIndex, IPropertyValue value) { switch (propIndex) { case 0: _basisCurve = (IfcCurve) value.EntityVal; break; case 1: _distance = value.RealVal; break; case 2: _selfIntersect = value.BooleanVal; break; case 3: _refDirection = (IfcDirection) value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
public IXbimWire CreateWire(IfcCurve curve) { return _engine.CreateWire(curve); }