forked from 1b-agent/opencadstudio-upstream
fix(surface): refresh construction display
This commit is contained in:
1 parent
4201b0a031
commit
2f2d894eee
5 files changed
+27
-3
No files matched your search
@@ -584,6 +584,23 @@ mod tests {
|
||||
assert!(tri_count(&pyramid_solid(c, 5.0, 9.0, 6).unwrap()) >= 8, "pyramid");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn planar_display_uses_independent_isoline_counts() {
|
||||
let body = box_solid([0.0; 3], 10.0, 10.0, 10.0).unwrap();
|
||||
let display = |counts, planar| {
|
||||
display_from_solid(&body, [0.7, 0.7, 0.7, 1.0], 1.0, None, counts, planar)
|
||||
.unwrap()
|
||||
.0
|
||||
.edge_verts
|
||||
.len()
|
||||
};
|
||||
let boundaries = display([0, 0], false);
|
||||
|
||||
assert_eq!(display([1, 0], true) - boundaries, 12);
|
||||
assert_eq!(display([0, 2], true) - boundaries, 24);
|
||||
assert_eq!(display([2, 2], false), boundaries);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn every_primitive_is_the_size_it_was_asked_for() {
|
||||
// Triangle counts say a mesh exists; the volume says it is the right
|
||||
|
||||
Reference in new issue
Block a user