コード例 #1
0
ファイル: PipeDrawingTests.cs プロジェクト: Macad3D/Macad3D
        public void SimplePipe()
        {
            var pipe    = TestGeomGenerator.CreatePipe();
            var drawing = PipeDrawing.Create(pipe.Body);

            Assert.IsNotNull(drawing.Extents);
            var svg = _Export(drawing);

            AssertHelper.IsSameTextFile(Path.Combine(_BasePath, "SimplePipe.svg"), svg, AssertHelper.TextCompareFlags.IgnoreFloatPrecision);
        }
コード例 #2
0
ファイル: PipeDrawingTests.cs プロジェクト: Macad3D/Macad3D
        public void SelectBestPosition()
        {
            var           sketch = Sketch.Create();
            SketchBuilder sb     = new SketchBuilder(sketch);

            sb.StartPath(0.0, -48.0);
            sb.LineTo(0.0, 5.0);
            sb.LineTo(-9.0, 4.0);
            sb.LineTo(-18.0, -7.0);
            var body = Body.Create(sketch);
            var pipe = Pipe.Create(body);

            Assume.That(pipe.Make(Shape.MakeFlags.None));

            var drawing = PipeDrawing.Create(pipe.Body);

            Assert.IsNotNull(drawing.Extents);
            var svg = _Export(drawing);

            AssertHelper.IsSameTextFile(Path.Combine(_BasePath, "SelectBestPosition.svg"), svg, AssertHelper.TextCompareFlags.IgnoreFloatPrecision);
        }
コード例 #3
0
        public void MultipleDimensionEntities()
        {
            var           sketch = Sketch.Create();
            SketchBuilder sb     = new SketchBuilder(sketch);

            sb.StartPath(0.0, -48.0);
            sb.LineTo(0.0, 5.0);
            sb.LineTo(-9.0, 4.0);
            sb.LineTo(-18.0, -7.0);
            var body = Body.Create(sketch);
            var pipe = Pipe.Create(body);

            Assume.That(pipe.Make(Shape.MakeFlags.None));

            var     pipeDrawing = PipeDrawing.Create(pipe.Body);
            Drawing drawing     = new();

            drawing.Add(pipeDrawing);

            var dxf = DxfDrawingExporter.Export(drawing, DxfVersion.AC1015);

            AssertHelper.IsSameTextFile(Path.Combine(_BasePath, "MultipleDimensionEntities.dxf"), dxf, AssertHelper.TextCompareFlags.IgnoreFloatPrecision);
        }