Skip to content

Commit

Permalink
stabilize SHA of CreateTruckFace
Browse files Browse the repository at this point in the history
  • Loading branch information
MattFerraro committed May 18, 2024
1 parent 06a4fa7 commit 2e505e4
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/cadmium/src/oplog/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ impl Operation {
workbench_id,
solid_id,
face,
} => hasher.update(format!("{workbench_id}-{solid_id}-{face:?}").as_bytes()),
} => hasher.update(format!("{}", self.pretty_print()).as_bytes()),

Operation::CreateExtrusion {
nonce,
Expand Down Expand Up @@ -987,7 +987,8 @@ impl Operation {
}
}
Operation::CreateSolid { nonce, solid } => {
hasher.update(format!("{nonce}-{solid:?}").as_bytes())
let str = self.pretty_print();
hasher.update(format!("{nonce}-{str:?}").as_bytes())
}
Operation::FuseSolids { solid1, solid2 } => {
hasher.update(format!("{solid1}-{solid2}").as_bytes())
Expand Down Expand Up @@ -1183,15 +1184,15 @@ impl Operation {
solid_id,
face,
} => {
let mut lengths = vec![];
for boundary in face.boundaries().iter() {
lengths.push(boundary.len());
}
format!(
"CreateTruckFace: {} {} {:?}",
"CreateTruckFace: {} {} lengths: {:?}",
workbench_id.to_owned()[..num_chars].to_string(),
solid_id.to_owned()[..num_chars].to_string(),
face.display(FDF::BoundariesAndID {
wire_format: WDF::VerticesList {
vertex_format: VDF::AsPoint,
},
})
lengths
)
}
Operation::CreateExtrusion {
Expand Down

0 comments on commit 2e505e4

Please sign in to comment.