コード例 #1
0
    def __init__(self, basefile, collname, backend_root):
        BaseElement.__init__(self, basefile)
        self.filename = basefile["filename"]
        #TODO: move this out so that collname and backend_root can be dropped
        self.path = join(backend_root, collname, self.filename)

        self.versions = {}
        for version in iglob(self.path + ".*"):
            ext = splitext(version)[1][1:]
            self.versions[ext] = version
コード例 #2
0
ファイル: drawings.py プロジェクト: CibolaDuo/BOLTS
	def __init__(self,basefile,collname,backend_root):
		BaseElement.__init__(self,basefile)
		self.filename = basefile["filename"]
		#TODO: move this out so that collname and backend_root can be dropped
		self.path = join(backend_root,collname,self.filename)

		self.versions = {}
	 	for version in iglob(self.path + ".*"):
			ext = splitext(version)[1][1:]
			self.versions[ext] = version
コード例 #3
0
ファイル: drawings.py プロジェクト: DaleDunn/BOLTS
	def __init__(self,basefile,collname,backend_root):
		BaseElement.__init__(self,basefile,collname)
		self.collection = collname
		self.filename = basefile["filename"]
		self.path = join(backend_root,collname,self.filename)
		self.classids = basefile["classids"]

		self.versions = {}
	 	for version in iglob(self.path + ".*"):
			ext = splitext(version)[1][1:]
			self.versions[ext] = version
コード例 #4
0
    def __init__(self, mod, basefile, collname):
        check_schema(mod, "basemodule", ["name", "arguments", "classids"],
                     ["parameters", "connectors"])
        check_schema(basefile, "basemodule",
                     ["filename", "author", "license", "type", "modules"],
                     ["source"])

        BaseElement.__init__(self, basefile)

        self.name = mod["name"]
        self.arguments = mod["arguments"]
        self.classids = mod["classids"]

        self.parameters = Parameters(mod.get("parameters", {"types": {}}))
コード例 #5
0
ファイル: openscad.py プロジェクト: CibolaDuo/BOLTS
	def __init__(self,mod,basefile,collname):
		check_schema(mod,"basemodule",
			["name", "arguments","classids"],
			["parameters","connectors"])
		check_schema(basefile,"basemodule",
			["filename","author","license","type","modules"],
			["source"])

		BaseElement.__init__(self,basefile)

		self.name = mod["name"]
		self.arguments = mod["arguments"]
		self.classids = mod["classids"]

		self.parameters = Parameters(mod.get("parameters",{"types" : {}}))
コード例 #6
0
ファイル: drawings.py プロジェクト: jreinhardt/bolttools
	def __init__(self,basefile,collname,backend_root):
		BaseElement.__init__(self,basefile,collname)
		check_schema(basefile,"drawing",
			["filename","author","license","type","classids"],
			["source"]
		)
		self.collection = collname
		self.filename = basefile["filename"]
		self.path = join(backend_root,collname,self.filename)
		self.classids = basefile["classids"]

		self.versions = {}
	 	for version in iglob(self.path + ".*"):
			ext = splitext(version)[1][1:]
			self.versions[ext] = version
コード例 #7
0
    def __init__(self, designtable, collname, backend_root):
        BaseElement.__init__(self, designtable, collname)
        check_schema(designtable, "basesolidworks", [
            "filename", "author", "license", "type", "suffix", "params",
            "classes"
        ], ["source", "metadata"])

        self.filename = designtable["filename"]
        self.path = join(backend_root, collname, self.filename)

        self.suffix = designtable["suffix"]

        self.outname = "%s-%s.xls" % (splitext(self.filename)[0], self.suffix)

        self.params = designtable["params"]

        self.metadata = designtable.get("metadata", {})

        self.classes = []
        for cl in designtable["classes"]:
            self.classes.append(DesignTableClass(cl))
コード例 #8
0
ファイル: solidworks.py プロジェクト: CibolaDuo/BOLTS
	def __init__(self,designtable,collname,backend_root):
		BaseElement.__init__(self,designtable,collname)
		check_schema(designtable,"basesolidworks",
			["filename","author","license","type","suffix","params","classes"],
			["source","metadata"]
		)

		self.filename = designtable["filename"]
		self.path = join(backend_root,collname,self.filename)

		self.suffix = designtable["suffix"]

		self.outname = "%s-%s.xls" % (splitext(self.filename)[0],self.suffix)

		self.params = designtable["params"]

		self.metadata = designtable.get("metadata",{})

		self.classes = []
		for cl in designtable["classes"]:
			self.classes.append(DesignTableClass(cl))
コード例 #9
0
ファイル: openscad.py プロジェクト: CibolaDuo/BOLTS
	def __init__(self,basefile,collname):
		BaseElement.__init__(self,basefile)
		self.filename = basefile["filename"]
		self.path = join(collname,self.filename)
コード例 #10
0
ファイル: freecad.py プロジェクト: jreinhardt/bolttools
	def __init__(self,basefile,collname,backend_root):
		BaseElement.__init__(self,basefile,collname)
		self.filename = basefile["filename"]
		self.path = join(backend_root,collname,self.filename)
コード例 #11
0
 def __init__(self, basefile, collname):
     BaseElement.__init__(self, basefile)
     self.filename = basefile["filename"]
     self.path = join(collname, self.filename)
コード例 #12
0
ファイル: freecad.py プロジェクト: revilor/BOLTS
	def __init__(self,basefile,collname,backend_root):
		BaseElement.__init__(self,basefile)
		self.filename = basefile["filename"]
		self.path = join(backend_root,collname,self.filename)