load_dxf#
- sectionproperties.pre.geometry.load_dxf(dxf_filepath: str | pathlib.Path, spline_delta: float, degrees_per_segment: float) Geometry | CompoundGeometry [source]#
Import any-old-shape in
.dxf
format for analysis.- Parameters:
dxf_filepath (str | pathlib.Path) – Path to
.dxf
file to loadspline_delta (float) – Splines are not supported in
shapely
, so they are approximated as polylines, this argument affects the spline sampling ratedegrees_per_segment (float) – The number of degrees discretised as a single line segment
- Raises:
ImportError – If
cad_to_shapely
is not installed. To enable dxf features usepip install sectionproperties[dxf]
.RuntimeError – No polygon objects are found in the file
ValueError – The filepath does not exist
- Returns:
Geometry or CompoundGeometry loaded from
.dxf
file- Return type: