Pipe

class compas_ifc.representations.Pipe(directrix, radius, inner_radius=None, name=None)

Bases: Geometry

A swept disk solid: circular cross-section swept along a directrix curve.

Directly corresponds to IfcSweptDiskSolid. Preserves the parametric data (directrix path, radius) that is lost when ifcopenshell evaluates the shape into tessellated or OCC geometry.

Parameters:
directrixPolyline

The 3D curve along which the circular disk is swept.

radiusfloat

Outer radius of the circular disk.

inner_radiusfloat, optional

Inner radius for hollow pipes (annular cross-section). None for solid pipes.

namestr, optional

Optional name for the pipe.

Attributes:
directrixPolyline
radiusfloat
inner_radiusfloat or None
namestr or None

Methods

__init__

copy

Return a deep copy of this pipe.

surface_area

Approximate surface area from mesh discretisation.

to_mesh

Convert the pipe to a compas.datastructures.Mesh.

to_vertices_and_faces

Discretise the pipe into vertices and faces.

transform

Transform the pipe by transforming its directrix.

volume

Compute the volume of the swept disk solid.

Inherited Methods

ToString

Converts the instance to a string.

compute_aabb

Compute the axis-aligned bounding box of the geometry.

compute_obb

Compute the oriented bounding box of the geometry.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

rotate

Rotate the geometry.

rotated

Returns a rotated copy of this geometry.

scale

Scale the geometry.

scaled

Returns a scaled copy of this geometry.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

transformed

Returns a transformed copy of this geometry.

translate

Translate the geometry.

translated

Returns a translated copy of this geometry.

validate_data

Validate the data against the object's data schema.