mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
fixed api_WIP, minor cleanup in other nodes
This commit is contained in:
@@ -59,22 +59,8 @@ class SvIfcCreateShape(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.
|
||||
def process(self):
|
||||
self.sv_input_names = ["file", "entity"]
|
||||
super().process()
|
||||
|
||||
def process_helper(self):
|
||||
print("Hello from helper")
|
||||
sv_inputs_nested = []
|
||||
for name in self.sv_input_names:
|
||||
sv_inputs_nested.append(self.inputs[name].sv_get())
|
||||
print(24*"#","\n", "sv_input: ", self.inputs[name].sv_get(), "input type: ", type(self.inputs[name].sv_get()), "\n", "#"*24)
|
||||
for sv_input_nested in zip_long_repeat(*sv_inputs_nested):
|
||||
for sv_input in zip_long_repeat(*sv_input_nested):
|
||||
sv_input = list(sv_input)
|
||||
print(24*"#","\n", "sv_input post zip_long_repeat: ", sv_input, "input type: ", type(sv_input), "\n", "#"*24)
|
||||
self.process_ifc(*sv_input)
|
||||
|
||||
def process_ifc(self, file, entity):
|
||||
print("process ifc...")
|
||||
print("entity: ", entity)
|
||||
try:
|
||||
if not entity.is_a("IfcProduct"):
|
||||
return
|
||||
@@ -88,7 +74,7 @@ class SvIfcCreateShape(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.
|
||||
obj = bpy.data.objects.new("IFC Element", mesh)
|
||||
bpy.context.scene.collection.objects.link(obj)
|
||||
except:
|
||||
print("Entity could not be converted into a shape", entity)
|
||||
raise Exception("Entity could not be converted into a shape. Entity: {}".format(entity))
|
||||
|
||||
|
||||
def register():
|
||||
|
||||
Reference in New Issue
Block a user