ifcopenshell.api.style.remove_surface_style

Module Contents

ifcopenshell.api.style.remove_surface_style.remove_surface_style(file: ifcopenshell.file, style: ifcopenshell.entity_instance) None

Removes a presentation item from a presentation style

Parameters:

style (ifcopenshell.entity_instance) – The IfcPresentationItem to remove.

Returns:

None

Return type:

None

Example:

# Create a new surface style
style = ifcopenshell.api.style.add_style(model)

# Create a simple shading colour and transparency.
shading = ifcopenshell.api.style.add_surface_style(model,
    style=style, ifc_class="IfcSurfaceStyleShading", attributes={
        "SurfaceColour": { "Name": None, "Red": 1.0, "Green": 0.8, "Blue": 0.8 },
        "Transparency": 0., # 0 is opaque, 1 is transparent
    })

# Remove the shading item
ifcopenshell.api.style.remove_surface_style(model, style=shading)