private static IfcVector ToIfcVector(this Vector3 v, Document doc) { var dir = v.ToIfcDirection(); var vector = new IfcVector(dir, new IfcLengthMeasure(0)); doc.AddEntity(dir); return(vector); }
public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: _repeatFactor = (IfcVector)(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: _repeatFactor = (IfcVector)value.EntityVal; break; default: this.HandleUnexpectedAttribute(propIndex, value); break; } }
/// <summary> /// Converts an Ifc 3D vector to an Xbim Vector3D /// </summary> /// <returns></returns> public static XbimVector3D XbimVector3D(this IfcVector ifcVec) { XbimVector3D vec; if (ifcVec.Orientation.Dim > 2) { vec = new XbimVector3D(ifcVec.Orientation.X, ifcVec.Orientation.Y, ifcVec.Orientation.Z); } else if (ifcVec.Orientation.Dim == 2) { vec = new XbimVector3D(ifcVec.Orientation.X, ifcVec.Orientation.Y, 0); } else { vec = new XbimVector3D(); } vec = vec.Normalized(); //orientation is not normalized vec *= ifcVec.Magnitude; return(vec); }
public IfcOneDirectionRepeatFactor(IfcVector __RepeatFactor) { this._RepeatFactor = __RepeatFactor; }
public IfcTwoDirectionRepeatFactor(IfcVector __RepeatFactor, IfcVector __SecondRepeatFactor) : base(__RepeatFactor) { this._SecondRepeatFactor = __SecondRepeatFactor; }