예제 #1
0
        public void WriteFaceOuterBoundTest()
        {
            var faceOuterBound = new StepFaceOuterBound(
                "",
                new StepEdgeLoop(
                    "",
                    new StepOrientedEdge(
                        "",
                        null,
                        null,
                        new StepEdgeCurve(
                            "",
                            null,
                            null,
                            StepLine.FromPoints(0.0, 0.0, 0.0, 1.0, 0.0, 0.0),
                            true),
                        true)),
                true);

            AssertFileContains(faceOuterBound, @"
#1=CARTESIAN_POINT('',(0.0,0.0,0.0));
#2=DIRECTION('',(1.0,0.0,0.0));
#3=VECTOR('',#2,1.0);
#4=LINE('',#1,#3);
#5=EDGE_CURVE('',*,*,#4,.T.);
#6=ORIENTED_EDGE('',*,*,#5,.T.);
#7=EDGE_LOOP('',(#6));
#8=FACE_OUTER_BOUND('',#7,.T.);
");
        }
예제 #2
0
        private static Line ToLine(StepLine stepLine)
        {
            var dx = stepLine.Vector.Direction.X * stepLine.Vector.Length;
            var dy = stepLine.Vector.Direction.Y * stepLine.Vector.Length;
            var dz = stepLine.Vector.Direction.Z * stepLine.Vector.Length;
            var p1 = ToPoint(stepLine.Point);
            var p2 = p1 + new Vector(dx, dy, dz);

            return(new Line(p1, p2));
        }
예제 #3
0
        public void WriteEdgeLoopTest()
        {
            var edgeLoop = new StepEdgeLoop(
                "",
                new StepOrientedEdge("", null, null, new StepEdgeCurve("", null, null, StepLine.FromPoints(1.0, 2.0, 3.0, 4.0, 5.0, 6.0), true), true),
                new StepOrientedEdge("", null, null, new StepEdgeCurve("", null, null, StepLine.FromPoints(7.0, 8.0, 9.0, 10.0, 11.0, 12.0), false), false));

            AssertFileContains(edgeLoop, @"
#1=CARTESIAN_POINT('',(1.0,2.0,3.0));
#2=DIRECTION('',(0.58,0.58,0.58));
#3=VECTOR('',#2,5.2);
#4=LINE('',#1,#3);
#5=EDGE_CURVE('',*,*,#4,.T.);
#6=ORIENTED_EDGE('',*,*,#5,.T.);
#7=CARTESIAN_POINT('',(7.0,8.0,9.0));
#8=VECTOR('',#2,5.2);
#9=LINE('',#7,#8);
#10=EDGE_CURVE('',*,*,#9,.F.);
#11=ORIENTED_EDGE('',*,*,#10,.F.);
#12=EDGE_LOOP('',(#6,#11));
");
        }