1
0
mirror of https://github.com/ToxicCrack/PrintABrick.git synced 2025-05-15 20:00:08 -07:00
2020-03-20 08:11:45 +01:00
2017-06-29 10:06:33 +02:00
2020-03-19 17:21:42 +01:00
2017-06-29 10:03:09 +02:00
2017-05-17 20:17:14 +02:00
2017-06-02 13:04:06 +02:00
2017-05-18 00:48:27 +02:00
2017-01-17 12:17:24 +01:00
2017-06-03 23:07:55 +02:00
2017-06-29 10:03:09 +02:00
2017-06-29 10:11:15 +02:00
2017-06-08 18:07:27 +02:00
2017-05-29 11:47:59 +02:00
2017-06-03 23:07:55 +02:00
2017-06-24 11:46:46 +02:00
2020-03-20 08:11:45 +01:00

Changes

src/LoaderBundle/Service/ModelLoader.php Added an iteration counter for parent models and abort model if it has too many parents.

src/LoaderBundle/Service/RebrickableLoader.php Added a fourth column "material_id" which is new in the csv file. You have to add this field in the database manually! (material_id, varchar 128, null)

Install Notes

The easiest way to run Elastisearch is with the docker image. Download Version 5.5.0

docker pull docker.elastic.co/elasticsearch/elasticsearch:5.5.0

and run it with

docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:5.5.0

If you run PHP > 7.2, then you have to run composer with composer install --ignore-platform-reqs

PrintABrick

Web catalogue of LEGO® parts for 3D printing

A Symfony project

Install

System requirements

  • PHP needs to be a minimum version of PHP 7.0
  • PHP Extensions
    • FTP
    • SOAP
    • GD
    • PDO
    • Zip
  • date.timezone setting set in php.ini

You can check if your system meets requirements by running $ bin/symfony_requirements

For full requirements see Symfony 3.3 docs.

Required

  • Elasticsearch >= 5

    Instructions for installing and deploying Elasticsearch may be found here.

  • POV-Ray source.

  • stl2pov source.

  • ADMesh

  • LDView OSMesa >= 4.2.1 source.

Installing

Back-end

  1. Make sure your system meets the application requirements
  2. Install dependencies via Composer, $ composer install

Front-end

  1. Install dependencies via npm, $ npm install
  2. Install bower dependencies via bower, $ bower install
  3. Compile assets by running Gulp, $ gulp default [--env production]

Initialization

Setup database
  1. Set application parameters in app/config/parameters.yml
  2. Generate an empty database by running command (if it does not yet exist) $ bin/console doctrine:database:create
  3. Create database tables/schema by running command$ bin/console doctrine:schema:create
  4. Load database fixtures $ bin/console doctrine:fixtures:load
Load data

You can load initial application data by running command $ bin/console app:init

This command consists of multiple subcommands that can be called separately:

  1. Load LDraw models into database by running commad $ bin/console app:load:ldraw [--ldraw=PATH] [--all] [--file=FILE] [--update]
  2. Load Rebrickable data into database by running command $ bin/console app:load:rebrickable
  3. Load relations between LDraw models and Rebrickable parts by running command $ bin/console app:load:relations
  4. Download images of models from rebrickable.com $ bin/console app:load:images [--color=INT] [--rebrickable] [--missing]
  5. Populate Elastisearch index $ bin/console fos:elastica:populate
Adding part relation

Relations between LDraw models and Rebrickable parts are matched automatically by identical (or similar) id/name when executing command $ bin/console app:load:relation.

Unmatched relations can be specified by adding relation of IDs to app/Resources/relations/part_model.yml

Testing

The test database must be created before the first test runs. You can create new one by running:

  1. Generate an empty database by running command (if it does not yet exist) $ bin/console doctrine:database:create --env=test
  2. Create database tables/schema by running command$ bin/console doctrine:schema:create --env=test

You can run complete system tests by $ phpunit. These should cover the main system functions and the functionality of calling the third-party programs that are required are needed to seamlessly retrieve the necessary application data.

Description
No description provided
Readme GPL-2.0 5.2 MiB
Languages
PHP 78.7%
Twig 15.5%
JavaScript 3.1%
SCSS 2.1%
Dockerfile 0.4%
Other 0.2%