Skip to content

draw function #3535

Answered by Moult
idoglanz asked this question in Q&A
Aug 2, 2023 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

I tested and it seems to work for me (I turned of merge projection on my end since I have some issues on my local dev environment):

import ifcopenshell
import ifcopenshell.draw

filename = "/home/dion/tmp/test_2.ifc"
ifc_file = ifcopenshell.open(filename)

output_file = filename.replace(".ifc", ".svg")
draw_settings = ifcopenshell.draw.draw_settings(auto_floorplan=True,)
output_data = ifcopenshell.draw.main(draw_settings, files=[ifc_file,], merge_projection=False)

open(output_file, "wb").write(output_data)

I get an SVG which has all three floors superimposed one on top of another. If I go into Inkscape I can move them separately:

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@idoglanz
Comment options

@Moult
Comment options

@idoglanz
Comment options

@Moult
Comment options

Answer selected by Moult
@idoglanz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants