internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { var index = 0; var analysisCount = Integer(parameters, index++); NodeAnalyses = Enumerable.Range(0, analysisCount).Select(_ => new IgesNodalAnalysis()).ToList(); for (int i = 0; i < analysisCount; i++) { var idx = i; binder.BindEntity(Integer(parameters, index++), e => NodeAnalyses[idx].GeneralNote = e as IgesGeneralNote); } var nodeCount = Integer(parameters, index++); for (int i = 0; i < nodeCount; i++) { var idx = i; var analysisCases = new List <IgesNodalAnalysisCase>(); NodeAnalyses[idx].Identifier = Integer(parameters, index++); binder.BindEntity(Integer(parameters, index++), e => NodeAnalyses[idx].FiniteElement = e as IgesFiniteElement); for (int j = 0; j < analysisCount; j++) { var x = Double(parameters, index++); var y = Double(parameters, index++); var z = Double(parameters, index++); var rx = Double(parameters, index++); var ry = Double(parameters, index++); var rz = Double(parameters, index++); analysisCases.Add(new IgesNodalAnalysisCase(new IgesVector(x, y, z), rx, ry, rz)); } } return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { var index = 0; binder.BindEntity(Integer(parameters, ref index), generalNote => GeneralNote = generalNote as IgesGeneralNote); if (FormNumber == 0) { binder.BindEntity(Integer(parameters, ref index), witness => { if (witness == null) { return; } else if (witness is IgesCopiousData) { WitnessLine = witness as IgesCopiousData; } else if (witness is IgesLeader) { FirstLeader = witness as IgesLeader; } }); } else if (FormNumber == 1) { binder.BindEntity(Integer(parameters, ref index), witness => WitnessLine = witness as IgesCopiousData); binder.BindEntity(Integer(parameters, ref index), leader => FirstLeader = leader as IgesLeader); } return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { Results.Clear(); int index = 0; binder.BindEntity(Integer(parameters, index++), e => GeneralNote = e as IgesGeneralNote); AnalysisSubcase = Integer(parameters, index++); AnalysisTime = DateTime(parameters, index++); var valueCount = Integer(parameters, index++); var nodeCount = Integer(parameters, index++); for (int i = 0; i < nodeCount; i++) { var result = new IgesNodalResult(); int nodeNumber = Integer(parameters, index++); // not used binder.BindEntity(Integer(parameters, index++), e => result.Node = e as IgesNode); for (int j = 0; j < valueCount; j++) { result.Values.Add(Double(parameters, index++)); } Results.Add(result); } return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { binder.BindEntity(Integer(parameters, 0), e => FirstCurve = e); binder.BindEntity(Integer(parameters, 1), e => SecondCurve = e); Direction = (IgesRuledSurfaceDirection)Integer(parameters, 2); IsDevelopable = Boolean(parameters, 3); return(4); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { binder.BindEntity(Integer(parameters, 0), e => AxisOfRevolution = e as IgesLine); binder.BindEntity(Integer(parameters, 1), e => Generatrix = e); StartAngle = Double(parameters, 2); EndAngle = Double(parameters, 3); return(4); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { var index = 0; binder.BindEntity(Integer(parameters, index++), generalNote => GeneralNote = generalNote as IgesGeneralNote); binder.BindEntity(Integer(parameters, index++), leader => FirstLeader = leader as IgesLeader); binder.BindEntity(Integer(parameters, index++), geometry => Geometry = geometry); return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { var index = 0; var stack = new Stack <object>(); var parameterCount = Integer(parameters, index++); for (int i = 0; i < parameterCount; i++) { var value = Integer(parameters, index++); if (value < 0) { // negative index stack.Push(-value); } else if (value > 0) { // operation var node = new IgesBooleanTreeOperation((IgesBooleanTreeOperationKind)value); var rightItem = stack.Pop(); var leftItem = stack.Pop(); if (rightItem is int) { binder.BindEntity((int)rightItem, e => node.RightChild = new IgesBooleanTreeEntity(e)); } else if (rightItem is IIgesBooleanTreeItem) { node.RightChild = (IIgesBooleanTreeItem)rightItem; } else { throw new InvalidOperationException("Unexpected item on stack: " + rightItem.GetType().Name); } if (leftItem is int) { binder.BindEntity((int)leftItem, e => node.LeftChild = new IgesBooleanTreeEntity(e)); } else if (leftItem is IIgesBooleanTreeItem) { node.LeftChild = (IIgesBooleanTreeItem)leftItem; } else { throw new InvalidOperationException("Unexpected item on stack: " + leftItem.GetType().Name); } stack.Push(node); } } RootNode = stack.Count == 0 ? null : (IIgesBooleanTreeItem)stack.Pop(); return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { CurveCreationType = (IgesCurveCreationType)Integer(parameters, 0); binder.BindEntity(Integer(parameters, 1), e => Surface = e); binder.BindEntity(Integer(parameters, 2), e => CurveDefinitionB = e); binder.BindEntity(Integer(parameters, 3), e => CurveDefinitionC = e); PreferredRepresentation = (IgesCurvePreferredRepresentation)Integer(parameters, 4); return(5); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { var index = 0; binder.BindEntity(Integer(parameters, ref index), generalNote => GeneralNote = generalNote as IgesGeneralNote); binder.BindEntity(Integer(parameters, ref index), leader => FirstLeader = leader as IgesLeader); binder.BindEntity(Integer(parameters, ref index), leader => SecondLeader = leader as IgesLeader); ArcCenter = IgesPoint.Point2D(parameters, ref index); return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { var index = 0; binder.BindEntity(Integer(parameters, ref index), generalNote => GeneralNote = generalNote as IgesGeneralNote); binder.BindEntity(Integer(parameters, ref index), leader => FirstLeader = leader as IgesLeader); binder.BindEntity(Integer(parameters, ref index), leader => SecondLeader = leader as IgesLeader); binder.BindEntity(Integer(parameters, ref index), witness => FirstWitnessLine = witness as IgesCopiousData); binder.BindEntity(Integer(parameters, ref index), witness => SecondWitnessLine = witness as IgesCopiousData); return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { var index = 0; binder.BindEntity(Integer(parameters, index++), point => Point = point as IgesLocation); binder.BindEntity(Integer(parameters, index++), normal => Normal = normal as IgesDirection); if (IsParameterized) { binder.BindEntity(Integer(parameters, index++), refDir => ReferenceDirection = refDir as IgesDirection); } return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { var index = 0; binder.BindEntity(Integer(parameters, index++), center => Center = center as IgesLocation); Radius = Double(parameters, index++); if (IsParameterized) { binder.BindEntity(Integer(parameters, index++), axis => AxisDirection = axis as IgesDirection); binder.BindEntity(Integer(parameters, index++), refDir => ReferenceDirection = refDir as IgesDirection); } return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { var index = 0; binder.BindEntity(Integer(parameters, index++), generalNote => GeneralNote = generalNote as IgesGeneralNote); binder.BindEntity(Integer(parameters, index++), leader => FirstLeader = leader as IgesLeader); ArcCenter = Point2(parameters, ref index); if (FormNumber == 1) { binder.BindEntity(Integer(parameters, index++), leader => SecondLeader = leader as IgesLeader); } return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { int index = 0; AreBoundaryEntitiesOnlyInModelSpace = !Boolean(parameters, index++); binder.BindEntity(Integer(parameters, index++), e => Surface = e); var boundaryItemCount = Integer(parameters, index++); for (int i = 0; i < boundaryItemCount; i++) { binder.BindEntity(Integer(parameters, index++), e => BoundaryEntities.Add(e)); } return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { int index = 0; this.CharacterBoxWidth = Double(parameters, index++); this.CharacterBoxHeight = Double(parameters, index++); var fontCode = Integer(parameters, index++); if (fontCode < 0) { binder.BindEntity(-fontCode, e => TextFontDefinition = e as IgesTextFontDefinition); this.FontCode = 0; } else { this.FontCode = fontCode; } this.SlantAngle = Double(parameters, index++); this.RotationAngle = Double(parameters, index++); this.MirroringAxis = (IgesTextMirroringAxis)Integer(parameters, index++); this.RotationType = (IgesTextRotationType)Integer(parameters, index++); this.LocationOrOffset = Vector(parameters, ref index); return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { binder.BindEntity(Integer(parameters, 0), e => Curve = e); ExtrusionLength = Double(parameters, 1); ExtrusionDirection = IgesVector.Vector3D(parameters, 2); return(5); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { Direction = IgesVector.Vector3D(parameters, 0); Distance = Double(parameters, 3); binder.BindEntity(Integer(parameters, 4), e => Surface = e); return(5); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { var index = 0; binder.BindEntity(Integer(parameters, index++), generalNote => GeneralNote = generalNote as IgesGeneralNote); binder.BindEntity(Integer(parameters, index++), witness => FirstWitnessLine = witness as IgesCopiousData); binder.BindEntity(Integer(parameters, index++), witness => SecondWitnessLine = witness as IgesCopiousData); Vertex = new IgesPoint( Double(parameters, index++), Double(parameters, index++), 0.0); LeaderArcRadius = Double(parameters, index++); binder.BindEntity(Integer(parameters, index++), leader => FirstLeader = leader as IgesLeader); binder.BindEntity(Integer(parameters, index++), leader => SecondLeader = leader as IgesLeader); return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { int index = 0; binder.BindEntity(Integer(parameters, ref index), e => Surface = e); IsOuterBoundaryD = !Boolean(parameters, ref index); var boundaryEntityCount = Integer(parameters, ref index); binder.BindEntity(Integer(parameters, ref index), e => OuterBoundary = e); for (int i = 0; i < boundaryEntityCount; i++) { binder.BindEntity(Integer(parameters, ref index), e => BoundaryEntities.Add(e)); } return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { binder.BindEntity(Integer(parameters, 0), e => CurveToOffset = e); DistanceType = (IgesOffsetDistanceType)Integer(parameters, 1); binder.BindEntity(Integer(parameters, 2), e => EntityOffsetCurveFunction = e); ParameterIndexOfFunctionEntityCurve = Integer(parameters, 3); TaperedOffsetType = (IgesTaperedOffsetType)Integer(parameters, 4); FirstOffsetDistance = Double(parameters, 5); FirstOffsetDistanceValue = Double(parameters, 6); SecondOffsetDistance = Double(parameters, 7); SecondOffsetDistanceValue = Double(parameters, 8); EntityNormal = new IgesVector(Double(parameters, 9), Double(parameters, 10), Double(parameters, 11)); StartingParameterValue = Double(parameters, 12); EndingParameterValue = Double(parameters, 13); return(14); }
internal void PopulateFromParameters(List <string> parameters, IgesReaderBinder binder, ref int index) { var charCount = IgesParameterReader.Integer(parameters, index++); BoxWidth = IgesParameterReader.Double(parameters, index++); BoxHeight = IgesParameterReader.Double(parameters, index++); var fontCode = IgesParameterReader.IntegerOrDefault(parameters, index++, 1); if (fontCode < 0) { binder.BindEntity(-fontCode, e => TextFontDefinition = e as IgesTextFontDefinition); FontCode = -1; } else { FontCode = fontCode; } SlantAngle = IgesParameterReader.Double(parameters, index++); RotationAngle = IgesParameterReader.Double(parameters, index++); MirroringAxis = (IgesTextMirroringAxis)IgesParameterReader.Integer(parameters, index++); RotationType = (IgesTextRotationType)IgesParameterReader.Integer(parameters, index++); Location = IgesParameterReader.Point3(parameters, ref index); Value = IgesParameterReader.String(parameters, index++); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { var index = 0; binder.BindEntity(Integer(parameters, index++), note => GeneralNote = note as IgesGeneralNote); var leaderCount = Integer(parameters, index++); Leaders = new IgesLeader[leaderCount].ToList(); for (int i = 0; i < leaderCount; i++) { var idx = i; binder.BindEntity(Integer(parameters, index++), leader => Leaders[idx] = leader as IgesLeader); } return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { binder.BindEntity(Integer(parameters, 0), e => Curve = e); RevolutionAmount = Double(parameters, 1); PointOnAxis = IgesPoint.Point3D(parameters, 2); AxisDirection = IgesVector.Vector3D(parameters, 5); return(8); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { int index = 0; binder.BindEntity(Integer(parameters, index++), e => BooleanTree = e as IgesBooleanTree); SelectionPoint = Point3(parameters, ref index); return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { int index = 0; this.Offset = Point3(parameters, ref index); binder.BindEntity(Integer(parameters, index++), e => DisplacementCoordinateSystem = e as IgesTransformationMatrix); return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { this.Orientation = (IgesTemplateLineFontOrientation)Integer(parameters, 0); binder.BindEntity(Integer(parameters, 1), e => Template = e as IgesSubfigureDefinition); this.CommonArcLength = Double(parameters, 2); this.ScaleFactor = Double(parameters, 3); return(4); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { var index = 0; Location = IgesPoint.Point3D(parameters, ref index); RotationAngle = Double(parameters, ref index); binder.BindEntity(Integer(parameters, ref index), note => GeneralNote = note as IgesGeneralNote); var leaderCount = Integer(parameters, ref index); Leaders = new IgesLeader[leaderCount].ToList(); for (int i = 0; i < leaderCount; i++) { var idx = i; binder.BindEntity(Integer(parameters, ref index), leader => Leaders[idx] = leader as IgesLeader); } return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { var index = 0; binder.BindEntity(Integer(parameters, index++), subfigureDefinition => SubfigureDefinition = subfigureDefinition as IgesSubfigureDefinition); Translation = new IgesVector(Double(parameters, index++), Double(parameters, index++), Double(parameters, index++)); Scale = Double(parameters, index++); return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { int index = 0; binder.BindEntity(Integer(parameters, index++), e => Curve = e); ExtrusionLength = Double(parameters, index++); ExtrusionDirection = Vector(parameters, ref index); return(index); }
internal override int ReadParameters(List <string> parameters, IgesReaderBinder binder) { int index = 0; Direction = Vector(parameters, ref index); Distance = Double(parameters, index++); binder.BindEntity(Integer(parameters, index++), e => Surface = e); return(index); }