svg from IfcConvert

I've found this Tweet from @aothms
I very much like the Idea of making quick sections from the command line while knowing orientation and location.
However, I don't manage to produce anything beside a empty svg file.
Am I doing something wrong, or does IFC convert for SVG currently not work?

steverugiAce

Comments

  • It probably works, but it's a swamp of command line flags you need to learn how to navigate.

    Here are some old flags I found lying around:

                input.ifc 
                output.svg
                -qy --plan --model
                --section-height-from-storeys --section-height=1.2 
                --door-arcs --print-space-names
                --auto-section --auto-elevation
                --bounds=420x297
                --scale=1:50 
                --svg-xmlns --svg-project
                --svg-poly
                --svg-write-poly
                --draw-storey-heights=left
                --storey-height-line-length=1.0
                --exclude entities IfcOpeningElement       
    

    You can also run this from python with perhaps a more sensible command line interface https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.8.0/src/ifcopenshell-python/ifcopenshell/draw.py

    Or just use Bonsai?

  • Thank you for the hint, @aothms
    Seems like my problem was, that i had no elevation set on my IfcBuildingStorey.
    But I can't figure out yet, how i make a section cutting through my building.

    import ifcopenshell.draw
    
    draw_settings = ifcopenshell.draw.draw_settings(
        auto_floorplan=True,
        auto_elevation=True,
    )                                            
    
    output_data = ifcopenshell.draw.main(draw_settings, files=[ifc_file], merge_projection=False)
    
  • edited September 2024
    draw_settings = ifcopenshell.draw.draw_settings(
        auto_floorplan=True,
        auto_elevation=True,
        auto_section =True,
    )
    
  • Thank you!
    Can i also control where to draw the section (section plane)?
    And the depth of the section?

  • Not with auto_section, but you can create a IfcAnnotation(ObjectType=DRAWING) programatically to manually create a section at a location you want. There is currently no control for depth (as far as I recall, you're probably not the first to bring this up).

Sign In or Register to comment.