mirror of
https://github.com/ToxicCrack/PrintABrick.git
synced 2025-05-16 12:20:09 -07:00
Fix StlRenderer
This commit is contained in:
parent
eaefb6c3d1
commit
a6fab6c0be
@ -41,7 +41,7 @@ class ImageLoader extends BaseLoader
|
|||||||
$path = $this->rebrickableDownloadUrl."ldraw/parts_{$color}.zip";
|
$path = $this->rebrickableDownloadUrl."ldraw/parts_{$color}.zip";
|
||||||
|
|
||||||
$file = $this->downloadFile($path);
|
$file = $this->downloadFile($path);
|
||||||
$zip = new \ZipArchive($file);
|
$zip = new \ZipArchive();
|
||||||
|
|
||||||
if ($zip->open($file) === true) {
|
if ($zip->open($file) === true) {
|
||||||
$this->writeOutput([
|
$this->writeOutput([
|
||||||
@ -83,7 +83,7 @@ class ImageLoader extends BaseLoader
|
|||||||
try {
|
try {
|
||||||
$this->loadModelImage($this->mediaFilesystem->getAdapter()->getPathPrefix().$model->getPath());
|
$this->loadModelImage($this->mediaFilesystem->getAdapter()->getPathPrefix().$model->getPath());
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->logger->error('Error rendering model '.$model->getId().' image');
|
$this->logger->error('Error rendering model '.$model->getId().' image', [$e->getMessage()]);
|
||||||
}
|
}
|
||||||
$this->progressBar->advance();
|
$this->progressBar->advance();
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ class StlRendererService
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!file_exists($to)) {
|
if (!file_exists($to)) {
|
||||||
mkdir($to);
|
mkdir($to, 0777, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$filename = pathinfo($file)['filename'];
|
$filename = pathinfo($file)['filename'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user