예제 #1
0
파일: StepPlane.cs 프로젝트: suruz/Step
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        internal static StepPresentationStyleAssignment CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id)
        {
            var presentationStyleAssignment = new StepPresentationStyleAssignment();

            presentationStyleAssignment.SyntaxList = syntaxList;
            syntaxList.AssertListCount(1);
            presentationStyleAssignment.Id = id;
            presentationStyleAssignment.BindSyntaxList(binder, syntaxList, 0);
            return(presentationStyleAssignment);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
파일: StepLine.cs 프로젝트: suruz/Step
        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);
        }
예제 #7
0
        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);
        }
예제 #8
0
        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 StepRepresentationItem CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList)
        {
            syntaxList.AssertListCount(3);
            var surface = new StepCylindricalSurface();

            surface.Name = syntaxList.Values[0].GetStringValue();
            binder.BindValue(syntaxList.Values[1], v => surface.Position = v.AsType <StepAxis2Placement3D>());
            surface.Radius = syntaxList.Values[2].GetRealVavlue();
            return(surface);
        }
예제 #10
0
        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);
        }
예제 #11
0
        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);
        }
예제 #12
0
        internal static StepSurfaceStyleFillArea CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id)
        {
            var surfaceStyleFillArea = new StepSurfaceStyleFillArea();

            syntaxList.AssertListCount(1);
            surfaceStyleFillArea.Id = id;

            binder.BindValue(syntaxList.Values[0], v => surfaceStyleFillArea.FillAreaStyle = v.AsType <StepFillAreaStyle>());

            return(surfaceStyleFillArea);
        }
        internal static StepShapeDefinitionRepresentation CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id)
        {
            var shapeDefinitionRepresentation = new StepShapeDefinitionRepresentation();

            shapeDefinitionRepresentation.SyntaxList = syntaxList;
            syntaxList.AssertListCount(2);
            shapeDefinitionRepresentation.Id = id;

            shapeDefinitionRepresentation.BindSyntaxList(binder, syntaxList, 0);
            return(shapeDefinitionRepresentation);
        }
예제 #14
0
        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);
        }
예제 #15
0
        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);
        }
예제 #16
0
        internal static StepShapeRepresentation CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id)
        {
            var shapeRepresentation = new StepShapeRepresentation();

            shapeRepresentation.SyntaxList = syntaxList;
            syntaxList.AssertListCount(3);
            shapeRepresentation.Id   = id;
            shapeRepresentation.Name = syntaxList.Values[0].GetStringValue();
            shapeRepresentation.BindSyntaxList(binder, syntaxList, 1);
            return(shapeRepresentation);
        }
예제 #17
0
        internal static StepSurfaceStyleFillArea CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id)
        {
            var surfaceStyleFillArea = new StepSurfaceStyleFillArea();

            surfaceStyleFillArea.SyntaxList = syntaxList;
            syntaxList.AssertListCount(1);
            surfaceStyleFillArea.Id = id;

            surfaceStyleFillArea.BindSyntaxList(binder, syntaxList, 0);
            return(surfaceStyleFillArea);
        }
예제 #18
0
 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();
 }
예제 #19
0
        internal static StepManifoldSolidBrep CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id)
        {
            var manifoldSolidBrep = new StepManifoldSolidBrep();

            manifoldSolidBrep.SyntaxList = syntaxList;
            syntaxList.AssertListCount(2);
            manifoldSolidBrep.Id   = id;
            manifoldSolidBrep.Name = syntaxList.Values[0].GetStringValue();
            manifoldSolidBrep.BindSyntaxList(binder, syntaxList, 1);
            return(manifoldSolidBrep);
        }
예제 #20
0
        internal static StepManifoldSolidBrep CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id)
        {
            var manifoldSolidBrep = new StepManifoldSolidBrep();

            syntaxList.AssertListCount(2);
            manifoldSolidBrep.Id   = id;
            manifoldSolidBrep.Name = syntaxList.Values[0].GetStringValue();
            binder.BindValue(syntaxList.Values[1], v => manifoldSolidBrep.ClosedShell = v.AsType <StepClosedShell>());

            return(manifoldSolidBrep);
        }
예제 #21
0
파일: StepEllipse.cs 프로젝트: suruz/Step
        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);
        }
예제 #22
0
        internal static StepSurfaceStyleUsage CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id)
        {
            var surfaceStyleUsage = new StepSurfaceStyleUsage();

            syntaxList.AssertListCount(2);
            surfaceStyleUsage.Id   = id;
            surfaceStyleUsage.Side = syntaxList.Values[0].GetEnumerationValue();

            binder.BindValue(syntaxList.Values[1], v => surfaceStyleUsage.SurfaceSideStyle = v.AsType <StepSurfaceSideStyle>());

            return(surfaceStyleUsage);
        }
예제 #23
0
        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);
        }
예제 #24
0
        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);
        }
예제 #25
0
        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);
        }
예제 #26
0
        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);
        }
예제 #27
0
        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);
        }
예제 #28
0
        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 StepFillAreaStyleColour CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id)
        {
            var fillAreaStyleColor = new StepFillAreaStyleColour();

            syntaxList.AssertListCount(2);
            fillAreaStyleColor.Id   = id;
            fillAreaStyleColor.Name = syntaxList.Values[0].GetStringValue();

            binder.BindValue(syntaxList.Values[1], v => fillAreaStyleColor.Colour = v.AsType <StepColourRGB>());

            return(fillAreaStyleColor);
        }
예제 #30
0
        internal static StepShapeDefinitionRepresentation CreateFromSyntaxList(StepBinder binder, StepSyntaxList syntaxList, int id)
        {
            var shapeDefinitionRepresentation = new StepShapeDefinitionRepresentation();

            syntaxList.AssertListCount(2);
            shapeDefinitionRepresentation.Id = id;

            binder.BindValue(syntaxList.Values[0], v => shapeDefinitionRepresentation.DefinitionShape    = v.AsType <StepProductDefinitionShape>());
            binder.BindValue(syntaxList.Values[1], v => shapeDefinitionRepresentation.UsedRepresentation = v.AsType <StepShapeRepresentation>());

            return(shapeDefinitionRepresentation);
        }