internal static StepDirection CreateFromSyntaxList(StepSyntaxList syntaxList, int id) { var stepDirection = new StepDirection(); stepDirection.SyntaxList = syntaxList; stepDirection.Id = id; return((StepDirection)AssignTo(stepDirection, syntaxList)); }
internal static StepCartesianPoint CreateFromSyntaxList(StepSyntaxList syntaxList, int id) { var item = new StepCartesianPoint(); item.SyntaxList = syntaxList; item.Id = id; return((StepCartesianPoint)AssignTo(item, syntaxList)); }
internal static StepVertexPoint CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList) { var vertex = new StepVertexPoint(); syntaxList.AssertListCount(2); vertex.Name = syntaxList.Values[0].GetStringValue(); binder.BindValue(syntaxList.Values[1], v => vertex.Location = v.AsType <StepCartesianPoint>()); return(vertex); }
internal static StepPlane CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList) { var plane = new StepPlane(); syntaxList.AssertListCount(2); plane.Name = syntaxList.Values[0].GetStringValue(); binder.BindValue(syntaxList.Values[1], v => plane.Position = v.AsType <StepAxis2Placement3D>()); return(plane); }
internal static StepLine CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList) { var line = new StepLine(); syntaxList.AssertListCount(3); line.Name = syntaxList.Values[0].GetStringValue(); binder.BindValue(syntaxList.Values[1], v => line.Point = v.AsType <StepCartesianPoint>()); binder.BindValue(syntaxList.Values[2], v => line.Vector = v.AsType <StepVector>()); return(line); }
internal static StepCircle CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList) { var circle = new StepCircle(); syntaxList.AssertListCount(3); circle.Name = syntaxList.Values[0].GetStringValue(); binder.BindValue(syntaxList.Values[1], v => circle.Position = v.AsType <StepAxis2Placement>()); circle.Radius = syntaxList.Values[2].GetRealVavlue(); return(circle); }
internal static StepFaceBound CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList) { syntaxList.AssertListCount(3); var faceBound = new StepFaceBound(); faceBound.Name = syntaxList.Values[0].GetStringValue(); binder.BindValue(syntaxList.Values[1], v => faceBound.Bound = v.AsType <StepLoop>()); faceBound.Orientation = syntaxList.Values[2].GetBooleanValue(); return(faceBound); }
internal static StepAxis2Placement2D CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList) { var axis = new StepAxis2Placement2D(); syntaxList.AssertListCount(3); axis.Name = syntaxList.Values[0].GetStringValue(); binder.BindValue(syntaxList.Values[1], v => axis.Location = v.AsType <StepCartesianPoint>()); binder.BindValue(syntaxList.Values[2], v => axis.RefDirection = v.AsType <StepDirection>()); return(axis); }
internal static StepVector CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList) { var vector = new StepVector(); syntaxList.AssertListCount(3); vector.Name = syntaxList.Values[0].GetStringValue(); binder.BindValue(syntaxList.Values[1], v => vector.Direction = v.AsType <StepDirection>()); vector.Length = syntaxList.Values[2].GetRealVavlue(); return(vector); }
internal static StepClosedShell CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id) { var closedShell = new StepClosedShell(); closedShell.SyntaxList = syntaxList; syntaxList.AssertListCount(2); closedShell.Id = id; closedShell.Name = syntaxList.Values[0].GetStringValue(); closedShell.BindSyntaxList(binder, syntaxList); return(closedShell); }
internal static StepAxis2Placement2D CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id) { var axis = new StepAxis2Placement2D(); axis.SyntaxList = syntaxList; axis.Id = id; syntaxList.AssertListCount(3); axis.Name = syntaxList.Values[0].GetStringValue(); axis.BindSyntaxList(binder, syntaxList, 1); return(axis); }
internal static StepDynamicItem CreateFromSyntaxList(StepBinder binder, StepSimpleItemSyntax stepSimpleSyntax, int id) { StepSyntaxList syntaxList = stepSimpleSyntax.Parameters; var dynamicItem = new StepDynamicItem(); dynamicItem.SyntaxList = syntaxList; dynamicItem.Id = id; dynamicItem.Keyword = stepSimpleSyntax.Keyword; dynamicItem.BindSyntaxList(binder, syntaxList, 0); return(dynamicItem); }
internal static StepStyledItem CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id) { var styledItem = new StepStyledItem(); styledItem.SyntaxList = syntaxList; syntaxList.AssertListCount(3); styledItem.Id = id; styledItem.Name = syntaxList.Values[0].GetStringValue(); styledItem.BindSyntaxList(binder, syntaxList, 1); return(styledItem); }
internal static StepEllipse CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList) { var ellipse = new StepEllipse(); syntaxList.AssertListCount(4); ellipse.Name = syntaxList.Values[0].GetStringValue(); binder.BindValue(syntaxList.Values[1], v => ellipse.Position = v.AsType <StepAxis2Placement2D>()); ellipse.SemiAxis1 = syntaxList.Values[2].GetRealVavlue(); ellipse.SemiAxis2 = syntaxList.Values[3].GetRealVavlue(); return(ellipse); }
internal static StepProduct CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id) { var product = new StepProduct(); syntaxList.AssertListCount(4); product.Id = id; product.Name = syntaxList.Values[0].GetStringValue(); product.Description = syntaxList.Values[1].GetStringValue(); return(product); }
private void ApplyFileName(StepSyntaxList valueList) { valueList.AssertListCount(7); _file.Name = valueList.Values[0].GetStringValue(); _file.Timestamp = valueList.Values[1].GetDateTimeValue(); _file.Author = valueList.Values[2].GetConcatenatedStringValue(); _file.Organization = valueList.Values[3].GetConcatenatedStringValue(); _file.PreprocessorVersion = valueList.Values[4].GetStringValue(); _file.OriginatingSystem = valueList.Values[5].GetStringValue(); _file.Authorization = valueList.Values[6].GetStringValue(); }
internal static StepCircle CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id) { var circle = new StepCircle(); circle.SyntaxList = syntaxList; circle.Id = id; syntaxList.AssertListCount(3); circle.Name = syntaxList.Values[0].GetStringValue(); circle.BindSyntaxList(binder, syntaxList, 1, 2); circle.Radius = syntaxList.Values[2].GetRealVavlue(); return(circle); }
internal static StepEdgeCurve CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList) { var edgeCurve = new StepEdgeCurve(); syntaxList.AssertListCount(5); edgeCurve.Name = syntaxList.Values[0].GetStringValue(); binder.BindValue(syntaxList.Values[1], v => edgeCurve.EdgeStart = v.AsType <StepVertex>()); binder.BindValue(syntaxList.Values[2], v => edgeCurve.EdgeEnd = v.AsType <StepVertex>()); binder.BindValue(syntaxList.Values[3], v => edgeCurve.EdgeGeometry = v.AsType <StepCurve>()); edgeCurve.IsSameSense = syntaxList.Values[4].GetBooleanValue(); return(edgeCurve); }
internal static StepFillAreaStyle CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id) { var fillAreaStyle = new StepFillAreaStyle(); fillAreaStyle.SyntaxList = syntaxList; syntaxList.AssertListCount(2); fillAreaStyle.Id = id; fillAreaStyle.Name = syntaxList.Values[0].GetStringValue(); fillAreaStyle.BindSyntaxList(binder, syntaxList, 1); return(fillAreaStyle); }
public StepSyntax GetItemSyntax(StepRepresentationItem item) { if (_inlineReferences) { var parameters = new StepSyntaxList(-1, -1, item.GetParameters(this)); return(new StepSimpleItemSyntax(item.ItemType.GetItemTypeString(), parameters)); } else { return(new StepEntityInstanceReferenceSyntax(_itemMap[item])); } }
internal static StepTriple AssignTo(StepTriple triple, StepSyntaxList values) { values.AssertListCount(2); triple.Name = values.Values[0].GetStringValue(); var pointValues = values.Values[1].GetValueList(); pointValues.AssertListCount(triple.MinimumValueCount, 3); triple.X = pointValues.GetRealValueOrDefault(0); triple.Y = pointValues.GetRealValueOrDefault(1); triple.Z = pointValues.GetRealValueOrDefault(2); return(triple); }
internal static StepOrientedEdge CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList) { var orientedEdge = new StepOrientedEdge(); syntaxList.AssertListCount(5); orientedEdge.Name = syntaxList.Values[0].GetStringValue(); binder.BindValue(syntaxList.Values[1], v => orientedEdge.EdgeStart = v.AsType <StepVertex>()); binder.BindValue(syntaxList.Values[2], v => orientedEdge.EdgeEnd = v.AsType <StepVertex>()); binder.BindValue(syntaxList.Values[3], v => orientedEdge.EdgeElement = v.AsType <StepEdge>()); orientedEdge.Orientation = syntaxList.Values[4].GetBooleanValue(); return(orientedEdge); }
internal static StepFaceBound CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id) { syntaxList.AssertListCount(3); var faceBound = new StepFaceBound(); faceBound.SyntaxList = syntaxList; faceBound.Id = id; faceBound.Name = syntaxList.Values[0].GetStringValue(); faceBound.BindSyntaxList(binder, syntaxList, 1); faceBound.Orientation = syntaxList.Values[2].GetBooleanValue(); return(faceBound); }
internal static StepEllipse CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id) { var ellipse = new StepEllipse(); ellipse.SyntaxList = syntaxList; ellipse.Id = id; syntaxList.AssertListCount(4); ellipse.Name = syntaxList.Values[0].GetStringValue(); ellipse.BindSyntaxList(binder, syntaxList, 1, 2); ellipse.SemiAxis1 = syntaxList.Values[2].GetRealVavlue(); ellipse.SemiAxis2 = syntaxList.Values[3].GetRealVavlue(); return(ellipse); }
internal static new StepAdvancedFace CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id) { var face = new StepAdvancedFace(); face.SyntaxList = syntaxList; syntaxList.AssertListCount(4); face.Id = id; face.Name = syntaxList.Values[0].GetStringValue(); face.BindSyntaxList(binder, syntaxList, 1, 3); face.SameSense = syntaxList.Values[3].GetBooleanValue(); return(face); }
internal static StepColourRGB CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id) { var colourRGB = new StepColourRGB(); syntaxList.AssertListCount(4); colourRGB.Id = id; colourRGB.Name = syntaxList.Values[0].GetStringValue(); colourRGB.R = syntaxList.Values[1].GetRealVavlue(); colourRGB.G = syntaxList.Values[2].GetRealVavlue(); colourRGB.B = syntaxList.Values[3].GetRealVavlue(); return(colourRGB); }
private StepSyntax GetItemSyntax(StepRepresentationItem item, int expectedId) { if (!_itemMap.ContainsKey(item)) { var parameters = new StepSyntaxList(-1, -1, item.GetParameters(this)); var syntax = new StepSimpleItemSyntax(item.ItemType.GetItemTypeString(), parameters); _itemMap.Add(item, expectedId); return(syntax); } else { return(GetItemSyntax(item)); } }
internal static StepEdgeLoop CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList) { syntaxList.AssertListCount(2); var edgeSyntaxList = syntaxList.Values[1].GetValueList(); var edgeLoop = new StepEdgeLoop(string.Empty, new StepOrientedEdge[edgeSyntaxList.Values.Count]); edgeLoop.Name = syntaxList.Values[0].GetStringValue(); for (int i = 0; i < edgeSyntaxList.Values.Count; i++) { var j = i; // capture to avoid rebinding binder.BindValue(edgeSyntaxList.Values[j], v => edgeLoop.EdgeList[j] = v.AsType <StepOrientedEdge>()); } return(edgeLoop); }
private void ApplyFileSchema(StepSyntaxList valueList) { valueList.AssertListCount(1); foreach (var schemaName in valueList.Values[0].GetValueList().Values.Select(v => v.GetStringValue())) { StepSchemaTypes schemaType; if (StepSchemaTypeExtensions.TryGetSchemaTypeFromName(schemaName, out schemaType)) { _file.Schemas.Add(schemaType); } else { _file.UnsupportedSchemas.Add(schemaName); } } }
internal static StepSurfaceSideStyle CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id) { var surfaceSideStyle = new StepSurfaceSideStyle(); syntaxList.AssertListCount(2); surfaceSideStyle.Id = id; surfaceSideStyle.Name = syntaxList.Values[0].GetStringValue(); var referList = syntaxList.Values[1].GetValueList(); surfaceSideStyle.SurfaceStyleFillAreaList.Clear(); surfaceSideStyle.SurfaceStyleFillAreaList.AddRange(Enumerable.Range(0, referList.Values.Count).Select(_ => (StepSurfaceStyleFillArea)null)); for (int i = 0; i < referList.Values.Count; i++) { var j = i; // capture to avoid rebinding binder.BindValue(referList.Values[j], v => surfaceSideStyle.SurfaceStyleFillAreaList[j] = v.AsType <StepSurfaceStyleFillArea>()); } return(surfaceSideStyle); }