ifcopenshell.api.style.remove_surface_style#

Module Contents#

class ifcopenshell.api.style.remove_surface_style.Usecase(file, style=None)#

Removes a presentation item from a presentation style

Parameters

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

Returns

None

Return type

None

Example:

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

# Create a simple shading colour and transparency.
shading = ifcopenshell.api.run("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.run("style.remove_surface_style", model, style=shading)
execute(self)#