-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c47285e
commit 52f995d
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
use fj_interop::debug::DebugInfo; | ||
use fj_kernel::{algorithms::Tolerance, shape::Shape}; | ||
use fj_math::Aabb; | ||
|
||
use super::ToShape; | ||
|
||
impl ToShape for fj::Difference3d { | ||
fn to_shape( | ||
&self, | ||
_tolerance: Tolerance, | ||
_debug_info: &mut DebugInfo, | ||
) -> Shape { | ||
// TASK: Implement algorithm from "Boundary Representation Modelling | ||
// Techniques", section 6.1.1 (pages 127 ff.). | ||
|
||
// TASK: Find interactions between objects by comparing each face in one | ||
// with each face in the other. | ||
// TASK: Check for intersection between the surfaces of each face. This | ||
// might result in a curve where they intersect. | ||
// TASK: Check that curve against the faces, to find curve sections that | ||
// lie in the faces. | ||
// TASK: Find common curve sections that lie in both faces. | ||
// TASK: Add common curve sections to faces. (What does that mean | ||
// specifically? Are we creating a new edge, and therefore new | ||
// faces, there?) | ||
|
||
// TASK: Implement. | ||
todo!() | ||
} | ||
|
||
fn bounding_volume(&self) -> Aabb<3> { | ||
// This is a conservative estimate of the bounding box: It's never going | ||
// to be bigger than the bounding box of the original shape that another | ||
// is being subtracted from. | ||
self.shapes()[0].bounding_volume() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters