forked from 1b-agent/opencadstudio-upstream
Preserve spline grip display mode after smooth solve
This commit is contained in:
1 parent
5497f455ef
commit
025398bbb1
2 files changed
+3
-1
No files matched your search
@@ -128,7 +128,6 @@ pub(crate) fn replace_with_nurbs(spline: &mut Spline, curve: &NurbsCurve3) {
|
|||||||
spline.fit_points = fit_points;
|
spline.fit_points = fit_points;
|
||||||
spline.begin_tangent = acadrust::types::Vector3::ZERO;
|
spline.begin_tangent = acadrust::types::Vector3::ZERO;
|
||||||
spline.end_tangent = acadrust::types::Vector3::ZERO;
|
spline.end_tangent = acadrust::types::Vector3::ZERO;
|
||||||
spline.cv_frame_visible = true;
|
|
||||||
spline.flags.rational = spline.weights.windows(2)
|
spline.flags.rational = spline.weights.windows(2)
|
||||||
.any(|pair| (pair[0] - pair[1]).abs() > 1e-12);
|
.any(|pair| (pair[0] - pair[1]).abs() > 1e-12);
|
||||||
spline.flags.closed = false;
|
spline.flags.closed = false;
|
||||||
|
|||||||
@@ -2979,6 +2979,9 @@ fn solve_scope(
|
|||||||
.collect();
|
.collect();
|
||||||
if changed {
|
if changed {
|
||||||
let mut updated = spline.clone();
|
let mut updated = spline.clone();
|
||||||
|
if crate::entities::spline::uses_fit_method(spline) {
|
||||||
|
updated.cv_frame_visible = true;
|
||||||
|
}
|
||||||
updated.degree = curve.degree as i32;
|
updated.degree = curve.degree as i32;
|
||||||
updated.knots = curve.knots.clone();
|
updated.knots = curve.knots.clone();
|
||||||
updated.control_points = control_points;
|
updated.control_points = control_points;
|
||||||
|
|||||||
Reference in new issue
Block a user