otuput
This commit is contained in:
parent
a6b52e416c
commit
b5c1eec1c9
4 changed files with 18 additions and 5 deletions
1
output/.gitignore
vendored
Normal file
1
output/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
*.ifc
|
||||||
1
output/README.md
Normal file
1
output/README.md
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
# Output
|
||||||
12
python/Makefile
Normal file
12
python/Makefile
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
# https://stackoverflow.com/questions/6273608/how-to-pass-argument-to-makefile-from-command-line
|
||||||
|
args = `arg="$(filter-out $@,$(MAKECMDGOALS))" && echo $${arg:-${1}}`
|
||||||
|
create:
|
||||||
|
python3 create.py
|
||||||
|
extract:
|
||||||
|
python3 extract.py $(call args,none)
|
||||||
|
arguments:
|
||||||
|
@echo action $(filter-out $@,$(MAKECMDGOALS))
|
||||||
|
test:
|
||||||
|
@echo $(call args, default)
|
||||||
|
%: # thanks to chakrit
|
||||||
|
@: # thanks to William Pursell
|
||||||
|
|
@ -67,22 +67,21 @@ def create(name,objects):
|
||||||
print("adding",item)
|
print("adding",item)
|
||||||
run("spatial.assign_container", model, relating_structure=storey, product=item)
|
run("spatial.assign_container", model, relating_structure=storey, product=item)
|
||||||
|
|
||||||
|
|
||||||
model.write(name)
|
model.write(name)
|
||||||
|
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
arg = sys.argv[1]
|
arg = sys.argv[1]
|
||||||
print(f">> filename:{arg}")
|
print(f">> filename:{arg}")
|
||||||
if (arg == "list"):
|
if (arg == "list"):
|
||||||
print(os.listdir("./files"))
|
print(os.listdir("../ifc"))
|
||||||
p = "./files/" + arg + ".ifc"
|
p = "../ifc/" + arg + ".ifc"
|
||||||
if os.path.exists(p):
|
if os.path.exists(p):
|
||||||
model = load_model(p)
|
model = load_model(p)
|
||||||
lst = get_walls(model)
|
lst = get_walls(model)
|
||||||
select(model,"IfcBuildingStorey")
|
select(model,"IfcBuildingStorey")
|
||||||
create("test.ifc",lst)
|
create("../output/test.ifc",lst)
|
||||||
else:
|
else:
|
||||||
print(os.listdir("./files"))
|
print(os.listdir("../ifc"))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print("extract [filepath]")
|
print("extract [filepath]")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue