mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-07 11:28:28 +00:00
Add Vertex::new
This commit is contained in:
parent
58902150ba
commit
07096243b1
@ -12,7 +12,7 @@ impl Sketch {
|
||||
pub fn to_face(&self, surface: Plane) -> Face {
|
||||
let vertices = self.points.iter().copied().map(|point| {
|
||||
let point = surface.point_from_local(point);
|
||||
let vertex = Vertex::from(point);
|
||||
let vertex = Vertex::new(point);
|
||||
Handle::new(vertex)
|
||||
});
|
||||
|
||||
|
@ -12,6 +12,11 @@ pub struct Vertex {
|
||||
}
|
||||
|
||||
impl Vertex {
|
||||
pub fn new(point: impl Into<Point<3>>) -> Self {
|
||||
let point = point.into();
|
||||
Self { point }
|
||||
}
|
||||
|
||||
pub fn translate(self, offset: impl Into<Vector<3>>) -> Self {
|
||||
Self {
|
||||
point: self.point + offset,
|
||||
|
Loading…
Reference in New Issue
Block a user