chiark / gitweb /
Add back the ultimaker platform, and made the platform mesh simpler.
[cura.git] / Cura / slice / cura_sf / skeinforge_application / skeinforge_utilities / skeinforge_profile.py
1 """
2 Profile is a script to set the craft types setting for the skeinforge chain.
3
4 Profile presents the user with a choice of the craft types in the profile_plugins folder.  The chosen craft type is used to determine the craft type profile for the skeinforge chain.  The default craft type is extrusion.
5
6 """
7
8 from __future__ import absolute_import
9
10 from fabmetheus_utilities import archive
11
12 def getCraftTypeName():
13         return 'extrusion'
14
15 def getProfileName(craftTypeName):
16         return 'Cura profile:' + craftTypeName
17
18 def addListsToCraftTypeRepository(fileNameHelp, repository):
19         #print('addListsToCraftTypeRepository:', fileNameHelp, repository)
20         repository.name = fileNameHelp.split('.')[-2]
21         repository.preferences = []
22
23 def getCraftTypePluginModule( craftTypeName = ''):
24         "Get the craft type plugin module"
25         if craftTypeName == '':
26                 craftTypeName = getCraftTypeName()
27         profilePluginsDirectoryPath = getPluginsDirectoryPath()
28         return archive.getModuleWithDirectoryPath( profilePluginsDirectoryPath, craftTypeName )
29
30 def getPluginsDirectoryPath():
31         "Get the plugins directory path."
32         return archive.getSkeinforgePluginsPath('profile_plugins')
33