Skip to content

Section Result Types¤

compas_model.geometry.section ¤

Classes¤

ClipElementResult ¤

ClipElementResult(
    section: SectionElementResult,
    geometry: Mesh | Brep | None = None,
    name: str | None = None,
)

Negative-half-space geometry paired with its section record.

Attributes¤
classification property ¤
classification: SectionClassification

SectionClassification: Position of the source geometry.

source_guid property ¤
source_guid: str

str: GUID of the source element.

Methods:¤
transform ¤
transform(transformation: Transformation) -> None

Transform the section and retained geometry.

transformed ¤
transformed(transformation: Transformation) -> ClipElementResult

Return a transformed copy of the clip result.

ClipResult ¤

ClipResult(
    frame: Frame,
    elements: Iterable[ClipElementResult] | None = None,
    tolerance: float = 1e-06,
    cap: bool = True,
    name: str | None = None,
)

Ordered negative-half-space geometry and associated section results.

Attributes¤
geometry property ¤
geometry: list[Mesh | Brep]

list[Mesh or Brep]: Retained geometry in element order.

section property ¤
section: SectionResult

SectionResult: The section geometry associated with this clip.

Methods:¤
transform ¤
transform(transformation: Transformation) -> None

Transform the cutting frame and every element clip result.

transformed ¤
transformed(transformation: Transformation) -> ClipResult

Return a transformed copy of the complete clip result.

SectionElementResult ¤

SectionElementResult(
    source_guid: str,
    classification: SectionClassification,
    representation: SectionRepresentation,
    regions: Iterable[PlanarRegion] | None = None,
    open_curves: Iterable[Polyline] | None = None,
    name: str | None = None,
)

Section geometry associated with one source element.

Parameters:

  • source_guid (str) –

    String representation of the source element GUID.

  • classification (SectionClassification) –

    Position of the source geometry relative to the cutting plane.

  • representation (SectionRepresentation) –

    Geometry representation used for sectioning.

  • regions (Iterable[PlanarRegion] | None, default: None ) –

    Closed planar section faces.

  • open_curves (Iterable[Polyline] | None, default: None ) –

    Open intersection chains that could not form regions.

  • name (str | None, default: None ) –

    A human-readable name.

Raises:

  • ValueError –

    If the classification or representation is unsupported.

Attributes¤
outlines property ¤
outlines: list[Polyline]

list[Polyline]: Closed region boundaries followed by open curves.

Methods:¤
transform ¤
transform(transformation: Transformation) -> None

Transform all section geometry stored in the result.

transformed ¤
transformed(transformation: Transformation) -> SectionElementResult

Return a transformed copy of the result.

SectionResult ¤

SectionResult(
    frame: Frame,
    elements: Iterable[SectionElementResult] | None = None,
    tolerance: float = 1e-06,
    name: str | None = None,
)

Ordered section geometry from model elements and an oriented plane.

Attributes¤
behind property ¤

list[SectionElementResult]: Records entirely behind the plane.

coplanar property ¤

list[SectionElementResult]: Records coplanar with the plane.

front property ¤

list[SectionElementResult]: Records entirely in front of the plane.

intersecting property ¤
intersecting: list[SectionElementResult]

list[SectionElementResult]: Records intersecting the plane.

open_curves property ¤
open_curves: list[Polyline]

list[Polyline]: All open section curves in element order.

outlines property ¤
outlines: list[Polyline]

list[Polyline]: All closed boundaries and open curves.

regions property ¤
regions: list[PlanarRegion]

list[PlanarRegion]: All closed section faces in element order.

Methods:¤
by_classification ¤
by_classification(classification: SectionClassification) -> list[SectionElementResult]

Return element records with a specific classification.

classify_point ¤
classify_point(point: Point) -> Literal['front', 'behind', 'coplanar']

Classify a point relative to the cutting plane.

signed_distance ¤
signed_distance(point: Point) -> float

Compute signed distance along the cutting frame's Z axis.

transform ¤
transform(transformation: Transformation) -> None

Transform the cutting frame and all section geometry.

transformed ¤
transformed(transformation: Transformation) -> SectionResult

Return a transformed copy of the complete section result.