cargo fmt
This commit is contained in:
parent
468cbde5e1
commit
ca07268c7c
204 changed files with 13988 additions and 5516 deletions
|
|
@ -26,7 +26,11 @@ impl TruckConvertible for MLine {
|
|||
|
||||
// Center spine.
|
||||
for v in &self.vertices {
|
||||
pts.push([v.position.x as f32, v.position.y as f32, v.position.z as f32]);
|
||||
pts.push([
|
||||
v.position.x as f32,
|
||||
v.position.y as f32,
|
||||
v.position.z as f32,
|
||||
]);
|
||||
}
|
||||
if closed && n >= 2 {
|
||||
pts.push([
|
||||
|
|
@ -79,7 +83,7 @@ impl TruckConvertible for MLine {
|
|||
[
|
||||
[f32::NAN; 3],
|
||||
[px + mx * (-half), py + my * (-half), pz + mz * (-half)],
|
||||
[px + mx * half, py + my * half, pz + mz * half ],
|
||||
[px + mx * half, py + my * half, pz + mz * half],
|
||||
]
|
||||
};
|
||||
pts.extend_from_slice(&cap_v(&self.vertices[0]));
|
||||
|
|
@ -90,7 +94,13 @@ impl TruckConvertible for MLine {
|
|||
let key_verts: Vec<[f32; 3]> = self
|
||||
.vertices
|
||||
.iter()
|
||||
.map(|v| [v.position.x as f32, v.position.y as f32, v.position.z as f32])
|
||||
.map(|v| {
|
||||
[
|
||||
v.position.x as f32,
|
||||
v.position.y as f32,
|
||||
v.position.z as f32,
|
||||
]
|
||||
})
|
||||
.collect();
|
||||
|
||||
let snap_pts = self
|
||||
|
|
@ -98,7 +108,11 @@ impl TruckConvertible for MLine {
|
|||
.iter()
|
||||
.map(|v| {
|
||||
(
|
||||
Vec3::new(v.position.x as f32, v.position.y as f32, v.position.z as f32),
|
||||
Vec3::new(
|
||||
v.position.x as f32,
|
||||
v.position.y as f32,
|
||||
v.position.z as f32,
|
||||
),
|
||||
SnapHint::Node,
|
||||
)
|
||||
})
|
||||
|
|
@ -122,7 +136,11 @@ impl Grippable for MLine {
|
|||
.map(|(i, v)| {
|
||||
square_grip(
|
||||
i,
|
||||
Vec3::new(v.position.x as f32, v.position.y as f32, v.position.z as f32),
|
||||
Vec3::new(
|
||||
v.position.x as f32,
|
||||
v.position.y as f32,
|
||||
v.position.z as f32,
|
||||
),
|
||||
)
|
||||
})
|
||||
.collect()
|
||||
|
|
@ -174,12 +192,15 @@ impl PropertyEditable for MLine {
|
|||
} else {
|
||||
value == "true"
|
||||
};
|
||||
self.flags.set(acadrust::entities::MLineFlags::CLOSED, closed);
|
||||
self.flags
|
||||
.set(acadrust::entities::MLineFlags::CLOSED, closed);
|
||||
return;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
let Ok(v) = value.trim().parse::<f64>() else { return };
|
||||
let Ok(v) = value.trim().parse::<f64>() else {
|
||||
return;
|
||||
};
|
||||
if field == "ml_scale" && v != 0.0 {
|
||||
self.scale_factor = v;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue