Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion crates/smlib/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ impl Body {
/// solidcore pin to a rev with a new flag fails until it is added here.
pub(crate) fn fixes() -> UpstreamFixes {
let mut f = UpstreamFixes::default();
f.fillet_retry_radius_as_first = true;
f.fillet_refuse_rails_leaving_faces = true;
f.fillet_refuse_face_consuming_blends = true;
f.fillet_refuse_non_manifold_result = true;
Expand Down
40 changes: 23 additions & 17 deletions solidcore/crates/solidcore/src/blend/fillet_geom/p2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1719,11 +1719,11 @@ impl FilletBrep {
// Get the TsectPnts and call the solver.
let (vu1, mut tsect1) = self.rail_end_tsect(v, Some(fillet_geom1), None, OP)?;
let (vu2, mut tsect2) = self.rail_end_tsect(v, Some(fillet_geom2), None, OP)?;
// Fork tangency-labs/smlib@465b62b (`fixes.fillet_retry_radius_as_first`, WR-300):
// the radii are held at their end values only at a corner calculated as constant
// radius, as the rail/side-edge search holds them; upstream holds them anywhere.
let hold_end_radii =
!k.fixes.fillet_retry_radius_as_first || corners.corner(corner)?.is_calc_as_const_rad();
// WR-300 (the fork's tangency-labs/smlib@465b62b): the radii are held at their
// end values only at a corner calculated as constant radius, as the rail/side-edge
// search holds them; upstream holds them anywhere, so the rails met at a ball that
// is not the law's.
let hold_end_radii = corners.corner(corner)?.is_calc_as_const_rad();
let found = solvers.rail_rail_intersect(
k,
target,
Expand Down Expand Up @@ -2111,14 +2111,12 @@ impl FilletBrep {
fs.set_extension_factor(2.0 * ext_factor);

// WR-300 (#1023): upstream's retry holds the radius at a corner not
// calculated as constant radius too; the fix holds it only as the first
// calculated as constant radius too; this holds it only as the first
// search did.
let retry_si = if k.fixes.fillet_retry_radius_as_first
&& !corners.corner(corner)?.is_calc_as_const_rad()
{
None
} else {
let retry_si = if corners.corner(corner)?.is_calc_as_const_rad() {
Some(si)
} else {
None
};
for &guess in &guess_edge_parameters {
let _ = solvers.solver(si)?;
Expand Down Expand Up @@ -2308,13 +2306,23 @@ impl FilletBrep {
// Temporarily change this to a constant-radius function.
let si = RailSolvers::geom_solver(self, g2)?;
let _ = solvers.solver(si)?;
// WR-300 (#1023): upstream holds the adjacent round's radius here at every
// corner; this holds it only at a corner calculated as constant radius, as
// the first round's search and retry do. Where the side edge is not square
// to the round's edge, the ball meeting it is not the end's, and the end
// radius put the rail's end off the round.
let temp_si = if corners.corner(corner)?.is_calc_as_const_rad() {
Some(si)
} else {
None
};
let r = rail_edgeuse_intersect(
self,
k,
g2,
solvers,
target,
Some(si),
temp_si,
other_rail_index,
side_eu2,
guess,
Expand Down Expand Up @@ -3501,11 +3509,9 @@ impl FilletBrep {
corners.corner(corner)?.filleted_vertex().ok_or_else(|| {
SolidError::blend_missing(OP, "the corner's filleted vertex")
})?;
// Fork tangency-labs/smlib@465b62b (`fixes.fillet_retry_radius_as_first`):
// the rails' meeting point holds the radii only at a corner calculated
// as constant radius.
let hold_end_radii =
!k.fixes.fillet_retry_radius_as_first || the_corner.is_calc_as_const_rad();
// WR-300 (the fork's tangency-labs/smlib@465b62b): the rails' meeting
// point holds the radii only at a corner calculated as constant radius.
let hold_end_radii = the_corner.is_calc_as_const_rad();
let new_uv = solvers.cubic(si1, si2, OP, |s1, s2| {
create_cubic_rail_rail_interpolant(
k,
Expand Down
11 changes: 5 additions & 6 deletions solidcore/crates/solidcore/src/blend/fillet_solver/p2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2247,9 +2247,8 @@ impl FilletSolver {
/// Returns `rbFoundIntersection`; when found, both tsect points get their UV points
/// and further solution values. `hold_end_radii` is the fork's `bHoldEndRadii`
/// (tangency-labs/smlib@465b62b): the variable radii are held at their end values
/// (`SmTemporaryRadiusChange`) only when it is set; upstream always holds them, so
/// callers pass `true` unless `fixes.fillet_retry_radius_as_first` is on and their
/// corner is not calculated as constant radius.
/// (`SmTemporaryRadiusChange`) only when it is set; upstream always holds them, and
/// callers pass it only at a corner calculated as constant radius (WR-300).
///
/// # Errors
///
Expand Down Expand Up @@ -2321,9 +2320,9 @@ impl FilletSolver {
// Temporarily replace the variable-radius functions with a constant. [Reg Iter:306]
// `SmTemporaryRadiusChange::SetUp` does nothing unless the solver is an
// `SmVariableRadiusFS` (`SM_CAST_PTR`), first for this solver, then the other.
// Fork tangency-labs/smlib@465b62b (`fixes.fillet_retry_radius_as_first`, WR-300):
// only where `hold_end_radii` (a corner calculated as constant radius, as the
// callers decide); `SmTemporaryRadiusChange(NULL, ..)` does nothing.
// WR-300 (the fork's tangency-labs/smlib@465b62b): only where `hold_end_radii`
// (a corner calculated as constant radius, as the callers decide);
// `SmTemporaryRadiusChange(NULL, ..)` does nothing.
let other_side_eu = other.solver().edgeuse(other_rail_index)?;
let this_side_eu = ops.solver().edgeuse(rail_index)?;
let temp_this = match (ops.variable_radius_mut(), other_side_eu) {
Expand Down
2 changes: 0 additions & 2 deletions solidcore/crates/solidcore/src/kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,6 @@ pub struct UpstreamFixes {
/// failed point evaluation is the call's status and a zero area is
/// `SM_ERR_INVALID_INPUT`, where upstream's turns give `(0, 0, 1)`.
pub curve_loop_normal_from_area: bool,
/// `CalcRailIntEdgeuse`'s retry rail search holds a variable round's radius only where its first search does (at a corner calculated as constant radius), so the rail misses the arc it would meet only at that radius and the corner cuts the round off against the body; needs `fillet_nx1_end_rib_global_merge` there (WR-300, #1023). `RailRailIntersect` holds the radii at their end values only there too (its callers `CalcRailIntRail` and `CalcRailRailInterpolation`'s cubic rail interpolant): held at any other corner, two variable rounds meeting at a box's corner met where the laws are smaller and the trace from there failed with 1001 (the fork's tangency-labs/smlib@465b62b, the rule of 1d06159).
pub fillet_retry_radius_as_first: bool,
/// The fillet executive refuses a blend whose rails leave the faces they roll on (`RailsFitTheirFaces`, no room) (WR-302, #1024/#841).
pub fillet_refuse_rails_leaving_faces: bool,
/// `create_fillet_brep` refuses blends that take the whole of a face they roll on (`FacesOutlastTheirBlends`, no room) (WR-320, #879).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ fn operand(k: &mut Kernel) -> Brep {
/// issue's configuration).
fn solidcraft_fixes() -> UpstreamFixes {
let mut f = UpstreamFixes::default();
f.fillet_retry_radius_as_first = true;
f.fillet_refuse_rails_leaving_faces = true;
f.fillet_refuse_face_consuming_blends = true;
f.fillet_refuse_non_manifold_result = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ fn write_issue_1818_operand() {
/// SolidCraft's `core::fixes()` as `issue_1476_swept_bar_shell.rs` lists them.
fn solidcraft_fixes() -> UpstreamFixes {
let mut f = UpstreamFixes::default();
f.fillet_retry_radius_as_first = true;
f.fillet_refuse_rails_leaving_faces = true;
f.fillet_refuse_face_consuming_blends = true;
f.fillet_refuse_non_manifold_result = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ fn sc_fixes(k: &mut Kernel) {
k.fixes.temporary_radius_setup_errors = true;
k.fixes.fillet_trim_status = true;
k.fixes.curve_loop_normal_from_area = true;
k.fixes.fillet_retry_radius_as_first = true;
k.fixes.fillet_refuse_rails_leaving_faces = true;
k.fixes.fillet_refuse_face_consuming_blends = true;
k.fixes.fillet_refuse_overlapping_bands = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ fn drilled(k: &mut Kernel) -> Brep {
/// SolidCraft's `core::fixes()` (as `issue_1476_swept_bar_shell.rs` lists them).
fn solidcraft_fixes() -> UpstreamFixes {
let mut f = UpstreamFixes::default();
f.fillet_retry_radius_as_first = true;
f.fillet_refuse_rails_leaving_faces = true;
f.fillet_refuse_face_consuming_blends = true;
f.fillet_refuse_non_manifold_result = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ fn solidcraft_flags(k: &mut Kernel) {
k.fixes.fillet_refuse_overlapping_bands = true;
k.fixes.fillet_refuse_rails_leaving_faces = true;
k.fixes.fillet_removal_takes_ring_fillets = true;
k.fixes.fillet_retry_radius_as_first = true;
k.fixes.fillet_run_on_past_far_end_only = true;
k.fixes.fillet_split_edge_keeps_near_half = true;
k.fixes.fillet_trace_reaches_rails = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ const SOLIDCRAFT_C494A18: &[&str] = &[
"fillet_refuse_overlapping_bands",
"fillet_refuse_rails_leaving_faces",
"fillet_removal_takes_ring_fillets",
"fillet_retry_radius_as_first",
"fillet_round_ends_at_tangent_continuation",
"fillet_run_on_bspline_trims",
"fillet_run_on_past_far_end_only",
Expand Down
1 change: 0 additions & 1 deletion solidcore/crates/solidcore/tests/kernel_cases/fixes.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"bend_volume_bbox_contains_wide_angle_and_inf_u",
"bend_volume_trim_param_box_across_period",
"curve_loop_normal_from_area",
"fillet_retry_radius_as_first",
"fillet_refuse_rails_leaving_faces",
"fillet_refuse_face_consuming_blends",
"fillet_refuse_overlapping_bands",
Expand Down
Loading
Loading