From 09c79c95b5e3b23381167663ec575af51bb7a325 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=BCbner?= Date: Sun, 28 May 2017 19:25:01 +0200 Subject: [PATCH] Add StlConverterTest and fix class --- .../Service/Stl/StlConverterService.php | 23 +- .../StlConverterTest.php} | 7 +- .../fixtures/ldraw/p/2-4edge.dat | 0 .../fixtures/ldraw/p/3-4edge.dat | 0 .../fixtures/ldraw/p/4-4edge.dat | 0 .../fixtures/ldraw/parts/3820.dat | 318 ++++++++++++++++++ .../StlConverter/fixtures/ldraw/parts/983.dat | 12 + 7 files changed, 343 insertions(+), 17 deletions(-) rename tests/Service/Stl/{StlConvertor/StlConvertorTest.php => StlConverter/StlConverterTest.php} (84%) rename tests/Service/Stl/{StlConvertor => StlConverter}/fixtures/ldraw/p/2-4edge.dat (100%) rename tests/Service/Stl/{StlConvertor => StlConverter}/fixtures/ldraw/p/3-4edge.dat (100%) rename tests/Service/Stl/{StlConvertor => StlConverter}/fixtures/ldraw/p/4-4edge.dat (100%) create mode 100644 tests/Service/Stl/StlConverter/fixtures/ldraw/parts/3820.dat create mode 100644 tests/Service/Stl/StlConverter/fixtures/ldraw/parts/983.dat diff --git a/src/AppBundle/Service/Stl/StlConverterService.php b/src/AppBundle/Service/Stl/StlConverterService.php index ec6c526..26c0fd5 100644 --- a/src/AppBundle/Service/Stl/StlConverterService.php +++ b/src/AppBundle/Service/Stl/StlConverterService.php @@ -17,7 +17,9 @@ class StlConverterService */ private $ldview; - /** @var StlFixerService */ + /** + * @var StlFixerService + */ private $stlFixer; /** @@ -30,11 +32,6 @@ class StlConverterService */ private $ldrawLibraryContext; - /** - * @var bool - */ - private $rewrite = false; - /** * StlConverterService constructor. * @@ -61,13 +58,14 @@ class StlConverterService * Convert LDraw model from .dat format to .stl by using LDView * stores created file to $stlStorage filesystem. * - * @param $file + * @param string $file + * @param bool $rewrite * * @throws ConvertingFailedException * * @return File */ - public function datToStl($file) + public function datToStl($file, $rewrite = false) { if (!$this->ldrawLibraryContext) { throw new LDLibraryMissingException(); @@ -79,7 +77,7 @@ class StlConverterService $newFile = 'models'.DIRECTORY_SEPARATOR.basename($file, '.dat').'.stl'; - if (!$this->mediaFilesystem->has($newFile) || $this->rewrite) { + if (!$this->mediaFilesystem->has($newFile) || $rewrite) { $this->runLDView([ $file, '-LDrawDir='.$this->ldrawLibraryContext->getAdapter()->getPathPrefix(), @@ -105,13 +103,14 @@ class StlConverterService * Convert LDraw model from .dat format to .stl by using LDView * stores created file to $stlStorage filesystem. * - * @param $file + * @param string $file + * @param bool $rewrite * * @throws ConvertingFailedException * * @return File */ - public function datToPng($file) + public function datToPng($file, $rewrite = false) { if (!$this->ldrawLibraryContext) { throw new LDLibraryMissingException(); @@ -123,7 +122,7 @@ class StlConverterService $newFile = 'images'.DIRECTORY_SEPARATOR.basename($file, '.dat').'.png'; - if (!$this->mediaFilesystem->has($newFile) || $this->rewrite) { + if (!$this->mediaFilesystem->has($newFile) || $rewrite) { $this->runLDView([ $file, '-LDrawDir='.$this->ldrawLibraryContext->getAdapter()->getPathPrefix(), diff --git a/tests/Service/Stl/StlConvertor/StlConvertorTest.php b/tests/Service/Stl/StlConverter/StlConverterTest.php similarity index 84% rename from tests/Service/Stl/StlConvertor/StlConvertorTest.php rename to tests/Service/Stl/StlConverter/StlConverterTest.php index db6a8be..856c34a 100644 --- a/tests/Service/Stl/StlConvertor/StlConvertorTest.php +++ b/tests/Service/Stl/StlConverter/StlConverterTest.php @@ -7,7 +7,7 @@ use League\Flysystem\Adapter\Local; use League\Flysystem\Filesystem; use Tests\AppBundle\Service\BaseTest; -class StlConvertorTest extends BaseTest +class StlConverterTest extends BaseTest { /** @var StlConverterService */ private $stlConverter; @@ -15,10 +15,7 @@ class StlConvertorTest extends BaseTest public function setUp() { - $ldview = $this->_container->getParameter('ldview_bin'); - $stlFixer = $this->get('service.stl.fixer'); - - $this->stlConverter = new StlConverterService($ldview, $this->filesystem, $stlFixer); + $this->stlConverter = $this->get('service.stl.converter'); $adapter = new Local(__DIR__.'/fixtures/ldraw'); $ldrawLibraryContext = new Filesystem($adapter); diff --git a/tests/Service/Stl/StlConvertor/fixtures/ldraw/p/2-4edge.dat b/tests/Service/Stl/StlConverter/fixtures/ldraw/p/2-4edge.dat similarity index 100% rename from tests/Service/Stl/StlConvertor/fixtures/ldraw/p/2-4edge.dat rename to tests/Service/Stl/StlConverter/fixtures/ldraw/p/2-4edge.dat diff --git a/tests/Service/Stl/StlConvertor/fixtures/ldraw/p/3-4edge.dat b/tests/Service/Stl/StlConverter/fixtures/ldraw/p/3-4edge.dat similarity index 100% rename from tests/Service/Stl/StlConvertor/fixtures/ldraw/p/3-4edge.dat rename to tests/Service/Stl/StlConverter/fixtures/ldraw/p/3-4edge.dat diff --git a/tests/Service/Stl/StlConvertor/fixtures/ldraw/p/4-4edge.dat b/tests/Service/Stl/StlConverter/fixtures/ldraw/p/4-4edge.dat similarity index 100% rename from tests/Service/Stl/StlConvertor/fixtures/ldraw/p/4-4edge.dat rename to tests/Service/Stl/StlConverter/fixtures/ldraw/p/4-4edge.dat diff --git a/tests/Service/Stl/StlConverter/fixtures/ldraw/parts/3820.dat b/tests/Service/Stl/StlConverter/fixtures/ldraw/parts/3820.dat new file mode 100644 index 0000000..29f88bb --- /dev/null +++ b/tests/Service/Stl/StlConverter/fixtures/ldraw/parts/3820.dat @@ -0,0 +1,318 @@ +0 Minifig Hand +0 Name: 3820.dat +0 Author: Orion Pobursky [OrionP] +0 !LDRAW_ORG Part UPDATE 2009-03 +0 !LICENSE Redistributable under CCAL version 2.0 : see CAreadme.txt + +0 !HELP The Hand angle is 14.5 degrees +0 !HELP To rotate the hand to 90 degrees horizontal use the following rotation +0 !HELP matrix: 1 0 0 0 0.968148 0.25038 0 -0.25038 0.968148 +0 !HELP After the rotation matrix is applied: +0 !HELP The center of the bottom of the hand will be x, y+2.2259, z-9.3739 +0 !HELP The center of the top of the hand will be x, y-9.7741, z-9.3739 +0 !HELP where x, y, and z are the origin coordinates of the part +0 !HELP Example: for the following DAT line: +0 !HELP 1 16 1 1 1 1 0 0 0 0.968148 0.25038 0 -0.25038 0.968148 3820.dat +0 !HELP The origin of the part is 1,1,1 +0 !HELP The center of the bottom of the hand is 1, 3.2259, -8.3739 + +0 BFC CERTIFY CCW + +0 !HISTORY 2002-11-30 [PTadmin] Official Update 2002-05 +0 !HISTORY 2002-12-31 [PTadmin] Official Update 2002-06 +0 !HISTORY 2007-07-29 [PTadmin] Header formatted for Contributor Agreement +0 !HISTORY 2008-07-01 [PTadmin] Official Update 2008-01 +0 !HISTORY 2008-07-07 [DeannaEarley] Removed erroneous BFC CERTIFY entries (2005-08-29 +0 !HISTORY 2008-07-07 [WilliamH] Added conditional lines to underside (2006-08-17) +0 !HISTORY 2009-08-24 [PTadmin] Moved from 983 +0 !HISTORY 2009-12-29 [PTadmin] Official Update 2009-03 + +0 // Post + + +1 16 0 0 0 2.5 0 0 0 0 -2.5 0 13 0 4-4cyli.dat +1 16 0 0 13 2.5 0 0 0 0 -2.5 0 16 0 4-4edge.dat +1 16 0 0 0 2.5 0 0 0 0 -2.5 0 16 0 4-4edge.dat +0 BFC INVERTNEXT +1 16 0 0 13 2.5 0 0 0 0 -2.5 0 16 0 4-4disc.dat +0 Hand +1 16 0 4.502 -8.518 -6 0 0 0 -11.6178 -1.5023 0 -3.0046 5.8089 2-4cyli.dat +0 BFC INVERTNEXT +1 16 0 4.502 -8.518 -4 0 0 0 -11.6178 -1.0015 0 -3.0046 3.8726 2-4cyli.dat +1 16 0 4.502 -8.518 -2 0 0 0 -0.9681 -0.5008 0 -0.2504 1.9363 2-4ring2.dat +0 BFC INVERTNEXT +1 16 0 -7.116 -11.522 -2 0 0 0 -0.9681 -0.5008 0 -0.2504 1.9363 2-4ring2.dat +1 16 0 -7.116 -11.522 -4.2426 0 -4.2426 1.0623 -0.9681 -1.0623 -4.1075 -0.2504 4.1075 3-4edge.dat +1 16 0 -7.116 -11.522 -2.8284 0 -2.8284 0.7082 -0.9681 -0.7082 -2.7383 -0.2504 2.7383 3-4edge.dat +1 16 0 4.502 -8.518 -6 0 0 0 -0.9681 -1.5023 0 -0.2504 5.8089 2-4edge.dat +1 16 0 4.502 -8.518 -4 0 0 0 -0.9681 -1.0015 0 -0.2504 3.8726 2-4edge.dat +3 16 6 4.5023 -8.5179 6 -7.1155 -11.5224 5.543 -6.5406 -13.7453 +3 16 -5.543 -6.5406 -13.7453 -6 -7.1155 -11.5224 -6 4.5023 -8.5179 +4 16 5.767 4.6838 -9.6794 6 4.5023 -8.5179 5.543 -6.5406 -13.7453 5.543 4.635 -10.8551 +4 16 -5.543 -6.5406 -13.7453 -6 4.5023 -8.5179 -5.767 4.6838 -9.6794 -5.543 4.635 -10.8551 +2 24 6 4.5023 -8.5179 5.767 4.6838 -9.6794 +2 24 -6 4.5023 -8.5179 -5.767 4.6838 -9.6794 +2 24 -5.767 4.6838 -9.6794 -5.543 4.635 -10.8551 +2 24 5.767 4.6838 -9.6794 5.543 4.635 -10.8551 +4 16 3.847 4.6472 -9.2773 3.696 4.6934 -10.0498 3.696 -6.7322 -13.0047 4 4.5023 -8.5179 +4 16 -3.696 -6.7322 -13.0047 -3.696 4.6934 -10.0498 -3.847 4.6472 -9.2773 -4 4.5023 -8.5179 +2 24 3.847 4.6472 -9.2773 3.696 4.6934 -10.0498 +2 24 -3.847 4.6472 -9.2773 -3.696 4.6934 -10.0498 +2 24 3.847 4.6472 -9.2773 4 4.5023 -8.5179 +2 24 -3.847 4.6472 -9.2773 -4 4.5023 -8.5179 +3 16 4 -7.1155 -11.5224 4 4.5023 -8.5179 3.696 -6.7322 -13.0047 +5 24 6 4.5023 -8.5179 6 -7.1155 -11.5224 5.543 -6.5406 -13.7453 5.5434 -7.69097 -9.29893 +5 24 4 -7.1155 -11.5224 4 4.5023 -8.5179 3.696 -6.7322 -13.0047 3.6956 -7.49931 -10.04 +5 24 -6 4.5023 -8.5179 -6 -7.1155 -11.5224 -5.543 -6.5406 -13.7453 -5.5434 -7.69097 -9.29893 +5 24 -4 -7.1155 -11.5224 -4 4.5023 -8.5179 -3.696 -6.7322 -13.0047 -3.6956 -7.49931 -10.04 +3 16 -3.696 -6.7322 -13.0047 -4 4.5023 -8.5179 -4 -7.1155 -11.5224 +4 16 -5.543 4.635 -10.8551 -4.861 4.3639 -11.9808 -4.243 -6.0531 -15.6303 -5.543 -6.5406 -13.7453 +4 16 4.243 -6.0531 -15.6303 4.861 4.3639 -11.9808 5.543 4.635 -10.8551 5.543 -6.5406 -13.7453 +3 16 -4.861 4.3639 -11.9808 -4.243 3.8636 -13.0657 -4.243 -6.0531 -15.6303 +3 16 4.243 -6.0531 -15.6303 4.243 3.8636 -13.0657 4.861 4.3639 -11.9808 +2 24 -5.543 4.635 -10.8551 -4.861 4.3639 -11.9808 +2 24 5.543 4.635 -10.8551 4.861 4.3639 -11.9808 +2 24 -4.861 4.3639 -11.9808 -4.243 3.8636 -13.0657 +2 24 4.861 4.3639 -11.9808 4.243 3.8636 -13.0657 +3 16 -2.828 -6.4074 -14.2604 -2.828 4.5244 -11.4332 -3.255 4.6497 -10.7418 +3 16 3.255 4.6497 -10.7418 2.828 4.5244 -11.4332 2.828 -6.4074 -14.2604 +4 16 -3.255 4.6497 -10.7418 -3.696 4.6934 -10.0498 -3.696 -6.7322 -13.0047 -2.828 -6.4074 -14.2604 +4 16 3.696 -6.7322 -13.0047 3.696 4.6934 -10.0498 3.255 4.6497 -10.7418 2.828 -6.4074 -14.2604 +2 24 2.828 4.5244 -11.4332 3.255 4.6497 -10.7418 +2 24 -2.828 4.5244 -11.4332 -3.255 4.6497 -10.7418 +2 24 3.255 4.6497 -10.7418 3.696 4.6934 -10.0498 +2 24 -3.255 4.6497 -10.7418 -3.696 4.6934 -10.0498 +4 16 2 4.3383 -12.0536 2 -6.2687 -14.7967 2.828 -6.4074 -14.2604 2.828 4.5244 -11.4332 +4 16 -2.828 -6.4074 -14.2604 -2 -6.2687 -14.7967 -2 4.3383 -12.0536 -2.828 4.5244 -11.4332 +2 24 -2 4.3383 -12.0536 -2.828 4.5244 -11.4332 +2 24 2 4.3383 -12.0536 2.828 4.5244 -11.4332 +4 16 -2.712 2.7973 -14.3981 -2.296 2.3041 -14.8117 -2.296 -5.7276 -16.8889 -2.712 -5.797 -16.6207 +4 16 2.296 -5.7276 -16.8889 2.296 2.3041 -14.8117 2.712 2.7973 -14.3981 2.712 -5.797 -16.6207 +2 24 -2.712 2.7973 -14.3981 -2.296 2.3041 -14.8117 +2 24 2.712 2.7973 -14.3981 2.296 2.3041 -14.8117 +4 16 -3.187 3.2182 -13.9608 -2.712 2.7973 -14.3981 -2.712 -5.797 -16.6207 -3.187 -5.8766 -16.3128 +4 16 2.712 -5.797 -16.6207 2.712 2.7973 -14.3981 3.187 3.2182 -13.9608 3.187 -5.8766 -16.3128 +2 24 3.187 3.2182 -13.9608 2.712 2.7973 -14.3981 +2 24 -3.187 3.2182 -13.9608 -2.712 2.7973 -14.3981 +4 16 -3.703 3.5723 -13.5128 -3.187 3.2182 -13.9608 -3.187 -5.8766 -16.3128 -3.703 -5.963 -15.9788 +4 16 3.187 -5.8766 -16.3128 3.187 3.2182 -13.9608 3.703 3.5723 -13.5128 3.703 -5.963 -15.9788 +2 24 3.703 3.5723 -13.5128 3.187 3.2182 -13.9608 +2 24 -3.703 3.5723 -13.5128 -3.187 3.2182 -13.9608 +4 16 -4.243 -6.0531 -15.6303 -4.243 3.8636 -13.0657 -3.703 3.5723 -13.5128 -3.703 -5.963 -15.9788 +4 16 3.703 3.5723 -13.5128 4.243 3.8636 -13.0657 4.243 -6.0531 -15.6303 3.703 -5.963 -15.9788 +2 24 4.243 3.8636 -13.0657 3.703 3.5723 -13.5128 +2 24 -4.243 3.8636 -13.0657 -3.703 3.5723 -13.5128 +4 16 -2.296 -5.7276 -16.8889 -2.296 2.3041 -14.8117 -2 2.1756 -14.9059 -2 -5.7129 -16.946 +4 16 2.296 -5.7276 -16.8889 2 -5.7129 -16.946 2 2.1756 -14.9059 2.296 2.3041 -14.8117 +2 24 -2.296 2.3041 -14.8117 -2 2.1756 -14.9059 +2 24 2.296 2.3041 -14.8117 2 2.1756 -14.9059 +3 16 2 2.1756 -14.9059 2 2.8733 -14.3247 2.296 2.3041 -14.8117 +5 24 2 2.8733 -14.3247 2.296 2.3041 -14.8117 2 2.1756 -14.9059 2.712 2.7973 -14.3981 +3 16 2.296 2.3041 -14.8117 2 2.8733 -14.3247 2.712 2.7973 -14.3981 +5 24 2 2.8733 -14.3247 2.712 2.7973 -14.3981 2.296 2.3041 -14.8117 2 3.4727 -13.647 +3 16 2 3.4727 -13.647 2.712 2.7973 -14.3981 2 2.8733 -14.3247 +5 24 2 3.4727 -13.647 2.712 2.7973 -14.3981 2 2.8733 -14.3247 3.187 3.2182 -13.9608 +3 16 2.712 2.7973 -14.3981 2 3.4727 -13.647 3.187 3.2182 -13.9608 +5 24 2 3.4727 -13.647 3.187 3.2182 -13.9608 2.712 2.7973 -14.3981 2 3.965 -12.8866 +3 16 2 3.965 -12.8866 3.187 3.2182 -13.9608 2 3.4727 -13.647 +5 24 2 3.965 -12.8866 3.187 3.2182 -13.9608 2 3.4727 -13.647 3.703 3.5723 -13.5128 +3 16 3.187 3.2182 -13.9608 2 3.965 -12.8866 3.703 3.5723 -13.5128 +5 24 2 3.965 -12.8866 3.703 3.5723 -13.5128 3.187 3.2182 -13.9608 2.828 4.5244 -11.4332 +3 16 2.828 4.5244 -11.4332 3.703 3.5723 -13.5128 2 3.965 -12.8866 +5 24 2.828 4.5244 -11.4332 2 3.965 -12.8866 2 4.3383 -12.0536 3.703 3.5723 -13.5128 +3 16 2.828 4.5244 -11.4332 2 3.965 -12.8866 2 4.3383 -12.0536 +5 24 3.703 3.5723 -13.5128 2.828 4.5244 -11.4332 4.243 3.8636 -13.0657 2 3.965 -12.8866 +3 16 3.703 3.5723 -13.5128 2.828 4.5244 -11.4332 4.243 3.8636 -13.0657 +5 24 2.828 4.5244 -11.4332 4.243 3.8636 -13.0657 3.703 3.5723 -13.5128 3.255 4.6497 -10.7418 +3 16 3.255 4.6497 -10.7418 4.243 3.8636 -13.0657 2.828 4.5244 -11.4332 +5 24 3.255 4.6497 -10.7418 4.243 3.8636 -13.0657 2.828 4.5244 -11.4332 4.861 4.3639 -11.9808 +3 16 4.243 3.8636 -13.0657 3.255 4.6497 -10.7418 4.861 4.3639 -11.9808 +5 24 3.255 4.6497 -10.7418 4.861 4.3639 -11.9808 4.243 3.8636 -13.0657 3.696 4.6934 -10.0498 +3 16 3.696 4.6934 -10.0498 4.861 4.3639 -11.9808 3.255 4.6497 -10.7418 +5 24 3.696 4.6934 -10.0498 4.861 4.3639 -11.9808 3.255 4.6497 -10.7418 5.543 4.635 -10.8551 +3 16 4.861 4.3639 -11.9808 3.696 4.6934 -10.0498 5.543 4.635 -10.8551 +5 24 3.696 4.6934 -10.0498 5.543 4.635 -10.8551 4.861 4.3639 -11.9808 3.847 4.6472 -9.2773 +3 16 3.847 4.6472 -9.2773 5.543 4.635 -10.8551 3.696 4.6934 -10.0498 +5 24 3.847 4.6472 -9.2773 5.543 4.635 -10.8551 3.696 4.6934 -10.0498 5.767 4.6838 -9.6794 +3 16 5.543 4.635 -10.8551 3.847 4.6472 -9.2773 5.767 4.6838 -9.6794 +5 24 3.847 4.6472 -9.2773 5.767 4.6838 -9.6794 5.543 4.635 -10.8551 5 4.5023 -8.5179 +3 16 5.767 4.6838 -9.6794 3.847 4.6472 -9.2773 5 4.5023 -8.5179 +5 24 3.847 4.6472 -9.2773 5 4.5023 -8.5179 5.767 4.6838 -9.6794 4 4.5023 -8.5179 +3 16 4 4.5023 -8.5179 5 4.5023 -8.5179 3.847 4.6472 -9.2773 +5 24 5.767 4.6838 -9.6794 5 4.5023 -8.5179 6 4.5023 -8.5179 3.847 4.6472 -9.2773 +3 16 5.767 4.6838 -9.6794 5 4.5023 -8.5179 6 4.5023 -8.5179 +5 24 4 4.5023 -8.5179 6 4.5023 -8.5179 5.767 4.6838 -9.6794 5.5434 3.92703 -6.29493 +5 24 -2 2.8733 -14.3247 -2.296 2.3041 -14.8117 -2 2.1756 -14.9059 -2.712 2.7973 -14.3981 +5 24 -2 2.8733 -14.3247 -2.712 2.7973 -14.3981 -2.296 2.3041 -14.8117 -2 3.4727 -13.647 +5 24 -2 3.4727 -13.647 -2.712 2.7973 -14.3981 -2 2.8733 -14.3247 -3.187 3.2182 -13.9608 +5 24 -2 3.4727 -13.647 -3.187 3.2182 -13.9608 -2.712 2.7973 -14.3981 -2 3.965 -12.8866 +5 24 -2 3.965 -12.8866 -3.187 3.2182 -13.9608 -2 3.4727 -13.647 -3.703 3.5723 -13.5128 +5 24 -2 3.965 -12.8866 -3.703 3.5723 -13.5128 -3.187 3.2182 -13.9608 -2.828 4.5244 -11.4332 +5 24 -2.828 4.5244 -11.4332 -2 3.965 -12.8866 -2 4.3383 -12.0536 -3.703 3.5723 -13.5128 +5 24 -3.703 3.5723 -13.5128 -2.828 4.5244 -11.4332 -4.243 3.8636 -13.0657 -2 3.965 -12.8866 +5 24 -2.828 4.5244 -11.4332 -4.243 3.8636 -13.0657 -3.703 3.5723 -13.5128 -3.255 4.6497 -10.7418 +5 24 -3.255 4.6497 -10.7418 -4.243 3.8636 -13.0657 -2.828 4.5244 -11.4332 -4.861 4.3639 -11.9808 +5 24 -3.255 4.6497 -10.7418 -4.861 4.3639 -11.9808 -4.243 3.8636 -13.0657 -3.696 4.6934 -10.0498 +5 24 -3.696 4.6934 -10.0498 -4.861 4.3639 -11.9808 -3.255 4.6497 -10.7418 -5.543 4.635 -10.8551 +5 24 -3.696 4.6934 -10.0498 -5.543 4.635 -10.8551 -4.861 4.3639 -11.9808 -3.847 4.6472 -9.2773 +5 24 -3.847 4.6472 -9.2773 -5.543 4.635 -10.8551 -3.696 4.6934 -10.0498 -5.767 4.6838 -9.6794 +5 24 -3.847 4.6472 -9.2773 -5.767 4.6838 -9.6794 -5.543 4.635 -10.8551 -5 4.5023 -8.5179 +5 24 -3.847 4.6472 -9.2773 -5 4.5023 -8.5179 -5.767 4.6838 -9.6794 -4 4.5023 -8.5179 +5 24 -5.767 4.6838 -9.6794 -5 4.5023 -8.5179 -6 4.5023 -8.5179 -3.847 4.6472 -9.2773 +5 24 -4 4.5023 -8.5179 -6 4.5023 -8.5179 -5.767 4.6838 -9.6794 -5.5434 3.92703 -6.29493 +3 16 -3.703 3.5723 -13.5128 -2 3.965 -12.8866 -3.187 3.2182 -13.9608 +3 16 -3.187 3.2182 -13.9608 -2 3.4727 -13.647 -2.712 2.7973 -14.3981 +3 16 -2.712 2.7973 -14.3981 -2 2.8733 -14.3247 -2.296 2.3041 -14.8117 +3 16 -2.828 4.5244 -11.4332 -2 3.965 -12.8866 -3.703 3.5723 -13.5128 +3 16 -2.828 4.5244 -11.4332 -4.243 3.8636 -13.0657 -3.255 4.6497 -10.7418 +3 16 -4.243 3.8636 -13.0657 -2.828 4.5244 -11.4332 -3.703 3.5723 -13.5128 +3 16 -4.861 4.3639 -11.9808 -3.255 4.6497 -10.7418 -4.243 3.8636 -13.0657 +3 16 -3.255 4.6497 -10.7418 -4.861 4.3639 -11.9808 -3.696 4.6934 -10.0498 +3 16 -5.543 4.635 -10.8551 -3.696 4.6934 -10.0498 -4.861 4.3639 -11.9808 +3 16 -3.696 4.6934 -10.0498 -5.543 4.635 -10.8551 -3.847 4.6472 -9.2773 +3 16 -3.847 4.6472 -9.2773 -5 4.5023 -8.5179 -4 4.5023 -8.5179 +3 16 -5 4.5023 -8.5179 -3.847 4.6472 -9.2773 -5.767 4.6838 -9.6794 +3 16 -5.767 4.6838 -9.6794 -3.847 4.6472 -9.2773 -5.543 4.635 -10.8551 +3 16 -6 4.5023 -8.5179 -5 4.5023 -8.5179 -5.767 4.6838 -9.6794 +4 16 -2.8284 -6.4073 -14.2608 -3.6956 -6.7322 -13.0044 -5.5433 -6.5406 -13.7453 -4.2426 -6.0532 -15.6299 +4 16 -3.6956 -6.7322 -13.0044 -4 -7.1155 -11.5224 -5.9999 -7.1155 -11.5224 -5.5433 -6.5406 -13.7453 +4 16 4 -7.1155 -11.5224 3.6956 -6.7322 -13.0044 5.5433 -6.5406 -13.7453 5.9999 -7.1155 -11.5224 +4 16 3.6956 -6.7322 -13.0044 2.8284 -6.4073 -14.2608 4.2426 -6.0532 -15.6299 5.5433 -6.5406 -13.7453 +5 24 5.543 -6.5406 -13.7453 5.543 4.635 -10.8551 6 -7.1155 -11.5224 4.243 -6.0531 -15.6303 +5 24 -5.543 -6.5406 -13.7453 -5.543 4.635 -10.8551 -6 -7.1155 -11.5224 -4.243 -6.0531 -15.6303 +5 24 -4.243 -6.0531 -15.6303 -4.243 3.8636 -13.0657 -5.543 -6.5406 -13.7453 -2.296 -5.7276 -16.8889 +5 24 4.243 -6.0531 -15.6303 4.243 3.8636 -13.0657 5.543 -6.5406 -13.7453 2.296 -5.7276 -16.8889 +5 24 -2.296 -5.7276 -16.8889 -2.296 2.3041 -14.8117 -4.243 -6.0531 -15.6303 -2 -5.7129 -16.946 +5 24 2.296 -5.7276 -16.8889 2.296 2.3041 -14.8117 4.243 -6.0531 -15.6303 2 -5.7129 -16.946 +4 16 -4.243 -6.0531 -15.6303 -2.296 -5.7276 -16.8889 -2 -6.2687 -14.7967 -2.828 -6.4074 -14.2604 +4 16 2 -6.2687 -14.7967 2.296 -5.7276 -16.8889 4.243 -6.0531 -15.6303 2.828 -6.4074 -14.2604 +2 24 4.243 -6.0531 -15.6303 2.296 -5.7276 -16.8889 +2 24 -4.243 -6.0531 -15.6303 -2.296 -5.7276 -16.8889 +2 24 -2 -6.2687 -14.7967 -2.828 -6.4074 -14.2604 +2 24 2 -6.2687 -14.7967 2.828 -6.4074 -14.2604 +3 16 -2 -5.7129 -16.946 -2 -6.2687 -14.7967 -2.296 -5.7276 -16.8889 +3 16 2.296 -5.7276 -16.8889 2 -6.2687 -14.7967 2 -5.7129 -16.946 +2 24 2 -5.7129 -16.946 2 -6.2687 -14.7967 +2 24 -2 -5.7129 -16.946 -2 -6.2687 -14.7967 +2 24 2 -5.7129 -16.946 2.296 -5.7276 -16.8889 +2 24 -2 -5.7129 -16.946 -2.296 -5.7276 -16.8889 +5 24 -2.828 -6.4074 -14.2604 -2.828 4.5244 -11.4332 -3.696 -6.7322 -13.0047 -2 -6.2687 -14.7967 +5 24 2.828 -6.4074 -14.2604 2.828 4.5244 -11.4332 3.696 -6.7322 -13.0047 2 -6.2687 -14.7967 +5 24 3.696 -6.7322 -13.0047 3.696 4.6934 -10.0498 4 -7.1155 -11.5224 2.828 -6.4074 -14.2604 +5 24 -3.696 -6.7322 -13.0047 -3.696 4.6934 -10.0498 -4 -7.1155 -11.5224 -2.828 -6.4074 -14.2604 +4 16 -2 1.6198 -12.7566 -2 -6.2687 -14.7967 -2 -5.7129 -16.946 -2 2.1756 -14.9059 +4 16 2 -5.7129 -16.946 2 -6.2687 -14.7967 2 1.6198 -12.7566 2 2.1756 -14.9059 +3 16 -2.296 2.3041 -14.8117 -2 2.8733 -14.3247 -2 2.1756 -14.9059 +3 16 -2 2.8733 -14.3247 -2.712 2.7973 -14.3981 -2 3.4727 -13.647 +3 16 -2 3.4727 -13.647 -3.187 3.2182 -13.9608 -2 3.965 -12.8866 +3 16 -2 4.3383 -12.0536 -2 3.965 -12.8866 -2.828 4.5244 -11.4332 +4 16 -2 2.1756 -14.9059 -2 2.8733 -14.3247 -2 3.4727 -13.647 -2 1.6198 -12.7566 +4 16 -2 4.3383 -12.0536 -2 1.6198 -12.7566 -2 3.4727 -13.647 -2 3.965 -12.8866 +4 16 2 3.4727 -13.647 2 2.8733 -14.3247 2 2.1756 -14.9059 2 1.6198 -12.7566 +4 16 2 3.4727 -13.647 2 1.6198 -12.7566 2 4.3383 -12.0536 2 3.965 -12.8866 +2 24 -2 2.1756 -14.9059 -2 2.8733 -14.3247 +2 24 -2 2.8733 -14.3247 -2 3.4727 -13.647 +2 24 -2 3.4727 -13.647 -2 3.965 -12.8866 +2 24 -2 4.3383 -12.0536 -2 3.965 -12.8866 +2 24 2 2.1756 -14.9059 2 2.8733 -14.3247 +2 24 2 2.8733 -14.3247 2 3.4727 -13.647 +2 24 2 3.4727 -13.647 2 3.965 -12.8866 +2 24 2 4.3383 -12.0536 2 3.965 -12.8866 +2 24 -2 2.1756 -14.9059 -2 -5.7129 -16.946 +2 24 -2 4.3383 -12.0536 -2 -6.2687 -14.7967 +2 24 2 2.1756 -14.9059 2 -5.7129 -16.946 +2 24 2 4.3383 -12.0536 2 -6.2687 -14.7967 +0 Cuff +3 16 2.1213 -2.1213 0 1.5546 -2.5 0 2.1213 -2.1213 -1.4641 +5 24 2.1213 -2.1213 0 2.1213 -2.1213 -1.4641 2.7717 -1.1481 0 1.5546 -2.5 0 +4 16 2.7717 -1.1481 -4.5817 2.7717 -1.1481 0 2.1213 -2.1213 0 2.1213 -2.1213 -1.4641 +3 16 2.6602 -1.3149 -4.5478 2.7717 -1.1481 -4.5817 2.1213 -2.1213 -1.4641 +5 24 2.7717 -1.1481 0 2.7717 -1.1481 -4.5817 3 0 0 2.1213 -2.1213 0 +4 16 3 0 -4.4423 3 0 0 2.7717 -1.1481 0 2.7717 -1.1481 -4.5817 +5 24 3 0 0 3 0 -4.4423 2.7717 1.1481 0 2.7717 -1.1481 0 +4 16 2.7717 1.1481 -3.9877 2.7717 1.1481 0 3 0 0 3 0 -4.4423 +5 24 2.7717 1.1481 0 2.7717 1.1481 -3.9877 2.1213 2.1213 0 3 0 0 +4 16 2.2962 1.8596 -3.4756 2.2962 1.8596 0 2.7717 1.1481 0 2.7717 1.1481 -3.9877 +4 16 2.1213 2.1213 0 2.2962 1.8596 0 2.2962 1.8596 -3.4756 2.1213 2.1213 -3.4995 +5 24 2.1213 2.1213 0 2.1213 2.1213 -3.4995 1.1481 2.7717 0 2.7717 1.1481 0 +4 16 1.1481 2.7717 -3.0039 1.1481 2.7717 0 2.1213 2.1213 0 2.1213 2.1213 -3.4995 +5 24 1.1481 2.7717 -3.0039 1.1481 2.7717 0 2.1213 2.1213 0 0 3 0 +4 16 0 3 -2.7094 0 3 0 1.1481 2.7717 0 1.1481 2.7717 -3.0039 +5 24 0 3 -2.7094 0 3 0 1.1481 2.7717 0 -1.1481 2.7717 0 +3 16 -2.1213 -2.1213 -1.4641 -1.5546 -2.5 0 -2.1213 -2.1213 0 +5 24 -2.1213 -2.1213 0 -2.1213 -2.1213 -1.4641 -2.7717 -1.1481 0 -1.5546 -2.5 0 +4 16 -2.1213 -2.1213 0 -2.7717 -1.1481 0 -2.7717 -1.1481 -4.5817 -2.1213 -2.1213 -1.4641 +3 16 -2.1213 -2.1213 -1.4641 -2.7717 -1.1481 -4.5817 -2.6602 -1.3149 -4.5478 +5 24 -2.7717 -1.1481 0 -2.7717 -1.1481 -4.5817 -3 0 0 -2.1213 -2.1213 0 +4 16 -2.7717 -1.1481 0 -3 0 0 -3 0 -4.4423 -2.7717 -1.1481 -4.5817 +5 24 -3 0 0 -3 0 -4.4423 -2.7717 1.1481 0 -2.7717 -1.1481 0 +4 16 -3 0 0 -2.7717 1.1481 0 -2.7717 1.1481 -3.9877 -3 0 -4.4423 +5 24 -2.7717 1.1481 0 -2.7717 1.1481 -3.9877 -2.1213 2.1213 0 -3 0 0 +4 16 -2.7717 1.1481 0 -2.2962 1.8596 0 -2.2962 1.8596 -3.4756 -2.7717 1.1481 -3.9877 +4 16 -2.2962 1.8596 -3.4756 -2.2962 1.8596 0 -2.1213 2.1213 0 -2.1213 2.1213 -3.4995 +5 24 -2.1213 2.1213 0 -2.1213 2.1213 -3.4995 -1.1481 2.7717 0 -2.7717 1.1481 0 +4 16 -2.1213 2.1213 0 -1.1481 2.7717 0 -1.1481 2.7717 -3.0039 -2.1213 2.1213 -3.4995 +5 24 -1.1481 2.7717 -3.0039 -1.1481 2.7717 0 -2.1213 2.1213 0 0 3 0 +4 16 -1.1481 2.7717 0 0 3 0 0 3 -2.7094 -1.1481 2.7717 -3.0039 +0 Cuff Intersect Lines +2 24 0 3 -2.7094 -1.1481 2.7717 -3.0039 +2 24 -2.2962 1.8596 -3.4756 -2.1213 2.1213 -3.4995 +2 24 -2.7717 1.1481 -3.9877 -3 0 -4.4423 +2 24 -2.2962 1.8596 -3.4756 -2.7717 1.1481 -3.9877 +2 24 -3 0 -4.4423 -2.7717 -1.1481 -4.5817 +2 24 -2.7717 -1.1481 -4.5817 -2.6602 -1.3149 -4.5478 +2 24 -2.1213 -2.1213 -1.4641 -2.6602 -1.3149 -4.5478 +2 24 -2.1213 -2.1213 -1.4641 -1.5546 -2.5 0 +2 24 -1.1481 2.7717 -3.0039 -2.1213 2.1213 -3.4995 +2 24 0 3 -2.7094 1.1481 2.7717 -3.0039 +2 24 2.2962 1.8596 -3.4756 2.1213 2.1213 -3.4995 +2 24 2.7717 1.1481 -3.9877 3 0 -4.4423 +2 24 2.2962 1.8596 -3.4756 2.7717 1.1481 -3.9877 +2 24 3 0 -4.4423 2.7717 -1.1481 -4.5817 +2 24 2.7717 -1.1481 -4.5817 2.6602 -1.3149 -4.5478 +2 24 2.1213 -2.1213 -1.4641 2.6602 -1.3149 -4.5478 +2 24 2.1213 -2.1213 -1.4641 1.5546 -2.5 0 +2 24 1.1481 2.7717 -3.0039 2.1213 2.1213 -3.4995 +2 24 -1.5546 -2.5 0 1.5546 -2.5 0 +0 Cuff Ring +3 16 0 -2.5 0 -0.9567 -2.3098 0 -1.5546 -2.5 0 +3 16 1.5546 -2.5 0 0.9567 -2.3098 0 0 -2.5 0 +4 16 2.5 0 0 2.3098 -0.9567 0 2.7717 -1.148 0 3 0 0 +4 16 2.3098 -0.9567 0 1.7678 -1.7678 0 2.1213 -2.1213 0 2.7717 -1.148 0 +4 16 1.7678 -1.7678 0 0.9567 -2.3098 0 1.5546 -2.5 0 2.1213 -2.1213 0 +4 16 -0.9567 -2.3098 0 -1.7678 -1.7678 0 -2.1213 -2.1213 0 -1.5546 -2.5 0 +4 16 -1.7678 -1.7678 0 -2.3098 -0.9567 0 -2.7717 -1.148 0 -2.1213 -2.1213 0 +4 16 -2.3098 -0.9567 0 -2.5 0 0 -3 0 0 -2.7717 -1.148 0 +4 16 -2.5 0 0 -2.3098 0.9567 0 -2.7717 1.148 0 -3 0 0 +4 16 -2.3098 0.9567 0 -1.7678 1.7677 0 -2.1213 2.1213 0 -2.7717 1.148 0 +4 16 -1.7678 1.7677 0 -0.9567 2.3098 0 -1.148 2.7717 0 -2.1213 2.1213 0 +4 16 -0.9567 2.3098 0 0 2.5 0 0 3 0 -1.148 2.7717 0 +4 16 0 2.5 0 0.9567 2.3098 0 1.148 2.7717 0 0 3 0 +4 16 0.9567 2.3098 0 1.7678 1.7677 0 2.1213 2.1213 0 1.148 2.7717 0 +4 16 1.7678 1.7677 0 2.3098 0.9567 0 2.7717 1.148 0 2.1213 2.1213 0 +4 16 2.3098 0.9567 0 2.5 0 0 3 0 0 2.7717 1.148 0 +2 24 2.1213 -2.1213 0 1.5546 -2.5 0 +2 24 -2.1213 -2.1213 0 -1.5546 -2.5 0 +2 24 3 0 0 2.7717 -1.1481 0 +2 24 2.7717 -1.1481 0 2.1213 -2.1213 0 +2 24 -2.1213 -2.1213 0 -2.7717 -1.1481 0 +2 24 -2.7717 -1.1481 0 -3 0 0 +2 24 -3 0 0 -2.7717 1.1481 0 +2 24 -2.7717 1.1481 0 -2.1213 2.1213 0 +2 24 -2.1213 2.1213 0 -1.1481 2.7717 0 +2 24 -1.1481 2.7717 0 0 3 0 +2 24 0 3 0 1.1481 2.7717 0 +2 24 1.1481 2.7717 0 2.1213 2.1213 0 +2 24 2.1213 2.1213 0 2.7717 1.1481 0 +2 24 2.7717 1.1481 0 3 0 0 +0 Flat part of Cuff +4 16 -1.5546 -2.5 0 -2.1213 -2.1213 -1.4641 2.1213 -2.1213 -1.4641 1.5546 -2.5 0 +4 16 0 -2.1213 -1.4641 -2.1213 -2.1213 -1.4641 -2.2962 -1.3762 -4.3124 0 -1.4914 -3.8706 +3 16 -2.1213 -2.1213 -1.4641 -2.6602 -1.3149 -4.5478 -2.2962 -1.3762 -4.3124 +4 16 2.2962 -1.3762 -4.3124 2.1213 -2.1213 -1.4641 0 -2.1213 -1.4641 0 -1.4914 -3.8706 +3 16 2.2962 -1.3762 -4.3124 2.6602 -1.3149 -4.5478 2.1213 -2.1213 -1.4641 +2 24 -2.6602 -1.3149 -4.5478 -2.2962 -1.3762 -4.3124 +2 24 2.2962 -1.3762 -4.3124 0 -1.4914 -3.8706 +2 24 2.6602 -1.3149 -4.5478 2.2962 -1.3762 -4.3124 +2 24 -2.2962 -1.3762 -4.3124 0 -1.4914 -3.8706 +0 diff --git a/tests/Service/Stl/StlConverter/fixtures/ldraw/parts/983.dat b/tests/Service/Stl/StlConverter/fixtures/ldraw/parts/983.dat new file mode 100644 index 0000000..37e0dfe --- /dev/null +++ b/tests/Service/Stl/StlConverter/fixtures/ldraw/parts/983.dat @@ -0,0 +1,12 @@ +0 ~Moved to 3820 +0 Name: 983.dat +0 Author: [PTadmin] +0 !LDRAW_ORG Part UPDATE 2009-03 +0 !LICENSE Redistributable under CCAL version 2.0 : see CAreadme.txt + +0 BFC CERTIFY CCW + +0 !HISTORY 2009-12-29 [PTadmin] Official Update 2009-03 + +0 // Minifig Hand +1 16 0 0 0 1 0 0 0 1 0 0 0 1 3820.dat