pub struct Circle {
pub radius: f64,
pub fa: f64,
pub fs: f64,
pub fn_: usize,
}Expand description
Creates a circle at origin
Fields§
§radius: f64Circle radius
fa: f64minimum angle (in degrees) of each fragment
fs: f64minimum circumferential length of each fragment
fn_: usizefixed number of fragments in 360 degrees. Values of 3 or more override $fa and $fs
Implementations§
Source§impl Circle
impl Circle
pub fn new<T>(radius: T, fa: T, fs: T, fn: usize) -> Circlewhere
T: Number,
pub fn with_diameter<T>(self, radius: T) -> Circlewhere
T: Number,
pub fn with_radius<T>(self, radius: T) -> Circlewhere
T: Number,
pub fn with_fa<T>(self, fa: T) -> Circlewhere
T: Number,
pub fn with_fs<T>(self, fs: T) -> Circlewhere
T: Number,
pub fn with_fn(self, fn: usize) -> Circle
pub const fn center(&self) -> DVec2
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Circle
impl<'de> Deserialize<'de> for Circle
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Circle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Circle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl OpenscadCodegen for Circle
impl OpenscadCodegen for Circle
Source§impl Serialize for Circle
impl Serialize for Circle
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl ToDynamic for Circle
impl ToDynamic for Circle
fn to_dynamic(&self) -> DynamicObject
impl Copy for Circle
impl TwoDimensional for Circle
Auto Trait Implementations§
impl Freeze for Circle
impl RefUnwindSafe for Circle
impl Send for Circle
impl Sync for Circle
impl Unpin for Circle
impl UnsafeUnpin for Circle
impl UnwindSafe for Circle
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> CenterObject for Twhere
T: Object,
impl<T> CenterObject for Twhere
T: Object,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ColorObject for Twhere
T: Object,
impl<T> ColorObject for Twhere
T: Object,
fn colored(self, color: impl ColorFormat) -> Colored<T>
Source§impl<T> DifferenceObject for Twhere
T: Object,
impl<T> DifferenceObject for Twhere
T: Object,
fn difference<Other>(self, other: Other) -> Difference<Self, Other>where
Other: Object,
Source§impl<T> ExportObject for Twhere
T: OpenscadCodegen,
impl<T> ExportObject for Twhere
T: OpenscadCodegen,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntersectionObject for Twhere
T: Object,
impl<T> IntersectionObject for Twhere
T: Object,
fn intersection<Other>(self, other: Other) -> Intersection<Self, Other>where
Other: Object,
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§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
Source§impl<T> LinearExtrudeObject for Twhere
T: TwoDimensional,
impl<T> LinearExtrudeObject for Twhere
T: TwoDimensional,
fn linear_extrude<T>(self, height: T) -> LinearExtrude<Self>
Source§impl<T> LinearPatternObject for T
impl<T> LinearPatternObject for T
Source§impl<T> MirrorObject for Twhere
T: Object,
impl<T> MirrorObject for Twhere
T: Object,
fn mirror<T>(self, x: T, y: T, z: T) -> Mirror<Self>
fn mirror_x<T>(self, x: T) -> Mirror<Self>
fn mirror_y<T>(self, y: T) -> Mirror<Self>
fn mirror_z<T>(self, z: T) -> Mirror<Self>
fn mirror_xy<T>(self, x: T, y: T) -> Mirror<Self>
fn mirror_xz<T>(self, x: T, z: T) -> Mirror<Self>
fn mirror_yz<T>(self, y: T, z: T) -> Mirror<Self>
Source§impl<T> OffsetObject for Twhere
T: TwoDimensional,
impl<T> OffsetObject for Twhere
T: TwoDimensional,
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);Source§impl<T> ProjectionObject<T> for Twhere
T: Object,
impl<T> ProjectionObject<T> for Twhere
T: Object,
fn project(self) -> Projection<Self>
Source§impl<T> RotateExtrudeObject for Twhere
T: TwoDimensional,
impl<T> RotateExtrudeObject for Twhere
T: TwoDimensional,
fn rotate_extrude(self) -> RotateExtrude<Self>where
Self: Sized,
Source§impl<T> RotateObject for Twhere
T: Object,
impl<T> RotateObject for Twhere
T: Object,
fn rotate<T>(self, x: T, y: T, z: T) -> Rotate<Self>
fn rotate_x<T>(self, x: T) -> Rotate<Self>
fn rotate_y<T>(self, y: T) -> Rotate<Self>
fn rotate_z<T>(self, z: T) -> Rotate<Self>
fn rotate_xy<T>(self, x: T, y: T) -> Rotate<Self>
fn rotate_yz<T>(self, y: T, z: T) -> Rotate<Self>
fn rotate_xz<T>(self, x: T, z: T) -> Rotate<Self>
Source§impl<T> ScaleObject for Twhere
T: Object,
impl<T> ScaleObject for Twhere
T: Object,
fn scale_uniform<T>(self, scaler: T) -> Scale<Self>
fn scale<T>(self, x: T, y: T, z: T) -> Scale<Self>
fn scale_x<T>(self, x: T) -> Scale<Self>
fn scale_y<T>(self, y: T) -> Scale<Self>
fn scale_z<T>(self, z: T) -> Scale<Self>
fn scale_xy<T>(self, x: T, y: T) -> Scale<Self>
fn scale_xz<T>(self, x: T, z: T) -> Scale<Self>
fn scale_yz<T>(self, y: T, z: T) -> Scale<Self>
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
MaybeRef].