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)
|
||||
run("spatial.assign_container", model, relating_structure=storey, product=item)
|
||||
|
||||
|
||||
model.write(name)
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
arg = sys.argv[1]
|
||||
print(f">> filename:{arg}")
|
||||
if (arg == "list"):
|
||||
print(os.listdir("./files"))
|
||||
p = "./files/" + arg + ".ifc"
|
||||
print(os.listdir("../ifc"))
|
||||
p = "../ifc/" + arg + ".ifc"
|
||||
if os.path.exists(p):
|
||||
model = load_model(p)
|
||||
lst = get_walls(model)
|
||||
select(model,"IfcBuildingStorey")
|
||||
create("test.ifc",lst)
|
||||
create("../output/test.ifc",lst)
|
||||
else:
|
||||
print(os.listdir("./files"))
|
||||
print(os.listdir("../ifc"))
|
||||
|
||||
else:
|
||||
print("extract [filepath]")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue