pub struct Angle {
pub group: Group,
pub line_a: EntityHandle<LineSegment>,
pub line_b: EntityHandle<LineSegment>,
pub angle: f64,
pub workplane: Option<EntityHandle<Workplane>>,
pub supplementary: bool,
}Expand description
Constrain the angle between line_a and line_b, in degrees.
This constraint equation is written in the form
(A dot B)/(|A||B|) = cos(valA)where A and B are vectors in the directions of lines A and B. This equation
does not specify the angle unambiguously; for example, note that valA = +/- 90
degrees will produce the same equation.
If supplementary is true, then the constraint is instead that
(A dot B)/(|A||B|) = -cos(valA)Note that the solver will fail if the two lines are initially parallel to each other.
Fields§
§group: GroupThe group that Angle belongs to.
line_a: EntityHandle<LineSegment>§line_b: EntityHandle<LineSegment>§angle: f64The angle between line_a and line_b, in degrees.
workplane: Option<EntityHandle<Workplane>>If provided, constraint applies when projected onto this workplane.
supplementary: boolIf true, sets the supplementary angle.
Implementations§
Source§impl Angle
impl Angle
Sourcepub fn new(
group: Group,
line_a: EntityHandle<LineSegment>,
line_b: EntityHandle<LineSegment>,
angle: f64,
workplane: Option<EntityHandle<Workplane>>,
supplementary: bool,
) -> Self
pub fn new( group: Group, line_a: EntityHandle<LineSegment>, line_b: EntityHandle<LineSegment>, angle: f64, workplane: Option<EntityHandle<Workplane>>, supplementary: bool, ) -> Self
Create a new Angle instance.
Trait Implementations§
Source§impl AsConstraintData for Angle
impl AsConstraintData for Angle
Source§impl<'de> Deserialize<'de> for Angle
impl<'de> Deserialize<'de> for Angle
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Angle
impl StructuralPartialEq for Angle
Auto Trait Implementations§
impl Freeze for Angle
impl RefUnwindSafe for Angle
impl Send for Angle
impl Sync for Angle
impl Unpin for Angle
impl UnwindSafe for Angle
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
Mutably borrows from an owned value. Read more