pub struct RoofSpec {
pub roof_type: RoofType,
pub pitch: Expr,
pub height: Option<Expr>,
pub secondary_pitch: Option<Expr>,
pub overhang: Expr,
pub ridge_offset: Expr,
pub fascia_depth: Expr,
pub tier_height: Option<Expr>,
pub ridge_axis: Option<Axis>,
}Expand description
Expression-valued roof parameters as they appear in the grammar.
The interpreter evaluates every field against the current shape’s context
and produces a resolved RoofConfig for the geometry builder. pitch
and height are mutually exclusive ways to set the roof’s steepness:
when height is Some, the pitch is derived from it and the scope’s
half-span at derivation time (CGA byHeight parity), letting mixed-width
wings share one ridge line.
Fields§
§roof_type: RoofType§pitch: ExprPrimary pitch angle in degrees, exclusive range (0°, 90°). Ignored
when height is set.
height: Option<Expr>Absolute roof rise in world units (height= named arg). Overrides
pitch when present.
secondary_pitch: Option<Expr>Secondary pitch in degrees for Gambrel / Mansard.
overhang: ExprEave overhang beyond the footprint, world units. Default 0.
ridge_offset: ExprRidge offset fraction for Saltbox. Default 0.5.
fascia_depth: ExprFascia band depth below each perimeter eave. Default 0.
tier_height: Option<Expr>Pitch-break height fraction for tiered types.
ridge_axis: Option<Axis>Forces the ridge to run along the given scope axis (ridge=X /
ridge=Z), overriding the default longest-axis heuristic.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RoofSpec
impl<'de> Deserialize<'de> for RoofSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<RoofConfig> for RoofSpec
Wraps every numeric field of a resolved config back into literal
expressions — the programmatic bridge for builders that think in numbers.
impl From<RoofConfig> for RoofSpec
Wraps every numeric field of a resolved config back into literal expressions — the programmatic bridge for builders that think in numbers.
Source§fn from(c: RoofConfig) -> Self
fn from(c: RoofConfig) -> Self
impl StructuralPartialEq for RoofSpec
Auto Trait Implementations§
impl Freeze for RoofSpec
impl RefUnwindSafe for RoofSpec
impl Send for RoofSpec
impl Sync for RoofSpec
impl Unpin for RoofSpec
impl UnsafeUnpin for RoofSpec
impl UnwindSafe for RoofSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more