pyflightstream.workspace.prop_slice (provisional)¶
Generated from the docstrings at build time: every one of the 3 names in the __all__ of pyflightstream.workspace.prop_slice has an entry below. The names a guide or an example uses come first; the others follow under Advanced.
Slice a propeller OBJ or IGES into blade sections and the propeller definition.
Pipeline role: the workspace layer's reader and writer around the pure slicer
:mod:pyflightstream.geometry._propeller_slice. An OBJ is read as its polygons; an IGES is
imported by the gmsh kernel in a worker process of its own, triangulated finely and every
section point is projected back onto its exact face. The folder written holds the propeller
definition propeller.toml that rebuilds the propeller, one normalized profile per
station under sections/, the table table.csv and the record prop-slice.json
(docs/propeller.md, "Slicing an existing propeller").
Advanced¶
pyflightstream.workspace.prop_slice.OBJ_UNITS
module-attribute
¶
OBJ_UNITS = {"mm": 1.0, "cm": 10.0, "m": 1000.0, "in": 25.4}
pyflightstream.workspace.prop_slice.TABLE_COLUMNS
module-attribute
¶
TABLE_COLUMNS = (
"r_R",
"c_R",
"beta_deg",
"t_c",
"camber",
"te_gap_c",
"skew_deg",
"rake_x_R",
"airfoil",
)
pyflightstream.workspace.prop_slice.slice_propeller
¶
slice_propeller(
geometry: str | Path,
*,
blades: int,
out: str | Path,
axis: Sequence[float] | None = None,
origin: Sequence[float] | None = None,
blade_dir: Sequence[float] | None = None,
stations: Sequence[float] | None = None,
unit: str = "mm",
overwrite: bool = False,
) -> dict[str, Any]
Cut one blade of a propeller at radial stations and write its propeller definition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
geometry
|
str or Path
|
The propeller, an OBJ ( |
required |
blades
|
int
|
The number of blades; the blades found about the axis must match it. |
required |
out
|
str or Path
|
The folder to write: |
required |
axis
|
sequence of float
|
The thrust direction, the builder's |
None
|
origin
|
sequence of float
|
A point of the shaft in mm, the builder's |
None
|
blade_dir
|
sequence of float
|
The reference blade direction, the builder's |
None
|
stations
|
sequence of float
|
r/R of the sections, at least four, increasing, up to 1; default 21 equal steps from the blade root to the tip, and 0.7. |
None
|
unit
|
str
|
The length unit of an OBJ: |
'mm'
|
overwrite
|
bool
|
Replace |
False
|
Returns:
| Type | Description |
|---|---|
dict
|
The record written to |
Raises:
| Type | Description |
|---|---|
InputArtifactError
|
The file is missing, its suffix is not .obj, .igs or .iges, no blade is found, or
|
InputValueError
|
The blade count is not a positive integer or does not match the blades found, or a station or a direction is invalid. |
MissingExtraError
|
An IGES is given and the gmsh library cannot load. |