mirror of https://github.com/hannobraun/Fornjot
Remove `PartialCurve::with_path`
This commit is contained in:
parent
6772f0d559
commit
a1638400df
|
@ -39,9 +39,11 @@ impl TransformObject for PartialCurve {
|
|||
|
||||
// Don't need to transform `self.path`, as that's defined in surface
|
||||
// coordinates, and thus transforming `surface` takes care of it.
|
||||
Ok(Self::default()
|
||||
Ok(PartialCurve {
|
||||
path: self.path,
|
||||
..Default::default()
|
||||
}
|
||||
.with_surface(surface)
|
||||
.with_path(self.path)
|
||||
.with_global_form(global_form))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,13 +36,19 @@ impl CurveBuilder for PartialCurve {
|
|||
}
|
||||
|
||||
fn update_as_circle_from_radius(self, radius: impl Into<Scalar>) -> Self {
|
||||
self.with_path(Some(SurfacePath::circle_from_radius(radius)))
|
||||
Self {
|
||||
path: Some(SurfacePath::circle_from_radius(radius)),
|
||||
..self
|
||||
}
|
||||
}
|
||||
|
||||
fn update_as_line_from_points(
|
||||
self,
|
||||
points: [impl Into<Point<2>>; 2],
|
||||
) -> Self {
|
||||
self.with_path(Some(SurfacePath::line_from_points(points)))
|
||||
Self {
|
||||
path: Some(SurfacePath::line_from_points(points)),
|
||||
..self
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,14 +22,6 @@ pub struct PartialCurve {
|
|||
}
|
||||
|
||||
impl PartialCurve {
|
||||
/// Provide a path for the partial curve
|
||||
pub fn with_path(mut self, path: Option<SurfacePath>) -> Self {
|
||||
if let Some(path) = path {
|
||||
self.path = Some(path);
|
||||
}
|
||||
self
|
||||
}
|
||||
|
||||
/// Provide a surface for the partial curve
|
||||
pub fn with_surface(mut self, surface: Option<Handle<Surface>>) -> Self {
|
||||
if let Some(surface) = surface {
|
||||
|
|
Loading…
Reference in New Issue