Skip to content

Commit

Permalink
Initial version of refactored S3D code
Browse files Browse the repository at this point in the history
This is a first attempt at refactoring the S3D profile code into a more modular approach. The next step after this would be to integrate the current cura code into the same data models, so that the only difference between S3D and cura is in the templates used.

This introduces a new requirement, using Jinja to render the output files.

This is still work in progress, there are several open questions and bugs in the output.
  • Loading branch information
kirberich committed Mar 26, 2017
1 parent 1ad6ee0 commit 44840c1
Show file tree
Hide file tree
Showing 15 changed files with 940 additions and 567 deletions.
592 changes: 25 additions & 567 deletions SigmaProfileGenerator.py

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import json
import os


def get_data(folder):
data_files = [f for f in os.listdir(folder) if f.endswith('.json')]
data = {}
for filename in data_files:
with open(os.path.join(folder, filename)) as quality_file:
file_data = json.load(quality_file)
data[file_data['id']] = file_data
return data


qualities = get_data(os.path.join('Profiles Data', 'Quality Presets'))
Loading

0 comments on commit 44840c1

Please sign in to comment.