diff --git a/libraries/bezier-rs/src/subpath/transform.rs b/libraries/bezier-rs/src/subpath/transform.rs index d6a2b86e0..82b6309cf 100644 --- a/libraries/bezier-rs/src/subpath/transform.rs +++ b/libraries/bezier-rs/src/subpath/transform.rs @@ -360,11 +360,9 @@ impl Subpath { /// The intersections of segments of the subpath are joined using the method specified by the `join` argument. /// pub fn offset(&self, distance: f64, join: Join) -> Subpath { - assert!(self.len_segments() > 1, "Cannot offset an empty Subpath."); - // An offset at a distance 0 from the curve is simply the same curve // An offset of a single point is not defined - if distance == 0. || self.len() == 1 { + if distance == 0. || self.len() <= 1 || self.len_segments() < 1 { return self.clone(); } diff --git a/node-graph/gcore/src/lib.rs b/node-graph/gcore/src/lib.rs index 991c988d5..be6487ed4 100644 --- a/node-graph/gcore/src/lib.rs +++ b/node-graph/gcore/src/lib.rs @@ -53,7 +53,7 @@ pub use raster::Color; pub use types::Cow; // pub trait Node: for<'n> NodeIO<'n> { -/// The node trait allows for defining any node. Nodes can only take one input, however they can store references to other nodes inside the struct. +/// The node trait allows for defining any node. Nodes can only take one call argument input, however they can store references to other nodes inside the struct. /// See `node-graph/README.md` for information on how to define a new node. pub trait Node<'i, Input: 'i>: 'i { type Output: 'i; diff --git a/node-graph/gcore/src/transform.rs b/node-graph/gcore/src/transform.rs index d72c08970..8e2a2d749 100644 --- a/node-graph/gcore/src/transform.rs +++ b/node-graph/gcore/src/transform.rs @@ -252,7 +252,7 @@ async fn transform + 'n + ApplyTransform + Clone + Send + Syn data } -#[node_macro::node(category("Debug"))] +#[node_macro::node(category(""))] fn replace_transform( _: (), #[implementations(VectorData, ImageFrame, GraphicGroup)] mut data: Data, diff --git a/node-graph/gcore/src/vector/vector_nodes.rs b/node-graph/gcore/src/vector/vector_nodes.rs index bfe3fb202..d7a16d2ef 100644 --- a/node-graph/gcore/src/vector/vector_nodes.rs +++ b/node-graph/gcore/src/vector/vector_nodes.rs @@ -936,10 +936,10 @@ async fn jitter_points( match handles { bezier_rs::BezierHandles::Cubic { handle_start, handle_end } => { *handle_start = vector_data.transform.transform_point2(*handle_start) + start_delta; - *handle_end += vector_data.transform.transform_point2(*handle_end) + end_delta; + *handle_end = vector_data.transform.transform_point2(*handle_end) + end_delta; } bezier_rs::BezierHandles::Quadratic { handle } => { - *handle += vector_data.transform.transform_point2(*handle) + (start_delta + end_delta) / 2.; + *handle = vector_data.transform.transform_point2(*handle) + (start_delta + end_delta) / 2.; } bezier_rs::BezierHandles::Linear => {} }