forked from 1b-agent/opencadstudio-upstream
Align spline fit properties and menu arrows
This commit is contained in:
1 parent
753fa17b68
commit
14b98231f5
5 files changed
+19
-14
No files matched your search
+10
-8
@@ -4,8 +4,8 @@ use cadkernel::space::{NurbsCurve3, Parameterization};
|
||||
|
||||
use crate::command::EntityTransform;
|
||||
use crate::entities::common::{
|
||||
dropdown_grip, edit_prop as edit, edit_scalar_prop as edit_scalar, format_length,
|
||||
parse_f64, ro_prop as ro, round_grip, square_grip,
|
||||
dropdown_grip, edit_prop as edit, edit_scalar_prop as edit_scalar, parse_f64,
|
||||
ro_prop as ro, round_grip, square_grip,
|
||||
};
|
||||
use crate::entities::traits::RenderConvertible;
|
||||
use crate::scene::convert::acad_to_render::{RenderEntity, RenderObject};
|
||||
@@ -639,7 +639,7 @@ fn properties(spline: &Spline) -> Vec<PropSection> {
|
||||
count.to_string(),
|
||||
),
|
||||
index_prop(
|
||||
t!("Current Fit point").as_ref(),
|
||||
t!("Current fit point").as_ref(),
|
||||
"current_fit_point",
|
||||
index,
|
||||
count,
|
||||
@@ -790,10 +790,10 @@ fn properties(spline: &Spline) -> Vec<PropSection> {
|
||||
]);
|
||||
}
|
||||
if show_fit {
|
||||
misc.push(ro(
|
||||
misc.push(edit(
|
||||
t!("Fit tolerance").as_ref(),
|
||||
"fit_tolerance",
|
||||
format_length(spline.fit_tolerance),
|
||||
spline.fit_tolerance,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -858,9 +858,6 @@ fn apply_geom_prop(spline: &mut Spline, field: &str, value: &str) {
|
||||
{
|
||||
return;
|
||||
}
|
||||
if field == "fit_tolerance" {
|
||||
return;
|
||||
}
|
||||
if matches!(field, "ctrl_pt_x" | "ctrl_pt_y" | "ctrl_pt_z" | "weight")
|
||||
&& uses_fit_method(spline)
|
||||
&& !convert_to_control_method(spline)
|
||||
@@ -916,6 +913,11 @@ fn apply_geom_prop(spline: &mut Spline, field: &str, value: &str) {
|
||||
fp.z = v;
|
||||
}
|
||||
}
|
||||
"fit_tolerance" => {
|
||||
if v.is_finite() && v >= 0.0 {
|
||||
spline.fit_tolerance = v;
|
||||
}
|
||||
}
|
||||
"start_tan_x" | "start_tan_y" | "start_tan_z" => {
|
||||
if !tangent_is_set(&spline.begin_tangent) {
|
||||
spline.begin_tangent = effective_begin_tangent;
|
||||
|
||||
Reference in new issue
Block a user