-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opennurbs patches weren't working with system patch on Ubuntu
- Loading branch information
1 parent
0ccc807
commit 39b869f
Showing
22 changed files
with
1,919 additions
and
1,921 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 |
---|---|---|
@@ -1,26 +1,26 @@ | ||
--- opennurbs/opennurbs_brep.cpp 2023-12-20 11:23:16.137987286 -0500 | ||
+++ OPENNURBS_BLD/opennurbs_brep.cpp 2023-12-20 11:22:15.331051837 -0500 | ||
--- opennurbs/opennurbs_brep.cpp 2024-02-16 13:44:43.176776155 -0500 | ||
+++ OPENNURBS_BLD/opennurbs_brep.cpp 2024-02-16 13:49:38.419887610 -0500 | ||
@@ -3578,6 +3578,10 @@ | ||
} | ||
} | ||
|
||
+ // BRL-CAD uses this for a tolerance check below | ||
+ const ON_Surface *surf = loop.Face()->SurfaceOf(); | ||
+ double urange = (surf) ? (surf->Domain(0)[1] - surf->Domain(0)[0]) : DBL_MAX; | ||
+ double vrange = (surf) ? (surf->Domain(1)[1] - surf->Domain(1)[0]) : DBL_MAX; | ||
|
||
// make sure ends of trims jibe | ||
int ci0, ci1, next_lti; | ||
} | ||
} | ||
|
||
+ // BRL-CAD uses this for a tolerance check below | ||
+ const ON_Surface *surf = loop.Face()->SurfaceOf(); | ||
+ double urange = (surf) ? (surf->Domain(0)[1] - surf->Domain(0)[0]) : DBL_MAX; | ||
+ double vrange = (surf) ? (surf->Domain(1)[1] - surf->Domain(1)[0]) : DBL_MAX; | ||
|
||
// make sure ends of trims jibe | ||
int ci0, ci1, next_lti; | ||
@@ -3606,6 +3610,12 @@ | ||
// didn't get flagged as bad. | ||
double xtol = (fabs(P0.x) + fabs(P1.x))*1.0e-10; | ||
double ytol = (fabs(P0.y) + fabs(P1.y))*1.0e-10; | ||
+ | ||
+ // Oct 12 2009 Rather than using the above check, BRL-CAD uses | ||
+ // relative uv size if it is available | ||
+ xtol = (urange < DBL_MAX) ? urange * trim0.m_tolerance[0] : xtol; | ||
+ ytol = (vrange < DBL_MAX) ? vrange * trim0.m_tolerance[1] : ytol; | ||
+ | ||
if ( xtol < ON_ZERO_TOLERANCE ) | ||
xtol = ON_ZERO_TOLERANCE; | ||
if ( ytol < ON_ZERO_TOLERANCE ) | ||
// didn't get flagged as bad. | ||
double xtol = (fabs(P0.x) + fabs(P1.x))*1.0e-10; | ||
double ytol = (fabs(P0.y) + fabs(P1.y))*1.0e-10; | ||
+ | ||
+ // Oct 12 2009 Rather than using the above check, BRL-CAD uses | ||
+ // relative uv size if it is available | ||
+ xtol = (urange < DBL_MAX) ? urange * trim0.m_tolerance[0] : xtol; | ||
+ ytol = (vrange < DBL_MAX) ? vrange * trim0.m_tolerance[1] : ytol; | ||
+ | ||
if ( xtol < ON_ZERO_TOLERANCE ) | ||
xtol = ON_ZERO_TOLERANCE; | ||
if ( ytol < ON_ZERO_TOLERANCE ) |
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
--- opennurbs/opennurbs_brep.h 2023-12-20 11:23:14.382018010 -0500 | ||
+++ OPENNURBS_BLD/opennurbs_brep.h 2023-12-20 11:22:19.090985982 -0500 | ||
--- opennurbs/opennurbs_brep.h 2024-02-16 13:44:43.176776155 -0500 | ||
+++ OPENNURBS_BLD/opennurbs_brep.h 2024-02-16 14:00:20.173055503 -0500 | ||
@@ -4141,6 +4141,7 @@ | ||
); | ||
|
||
// helpers for validation checking | ||
+public: | ||
bool IsValidTrim(int trim_index,ON_TextLog* text_log) const; | ||
bool IsValidTrimTopology(int trim_index,ON_TextLog* text_log) const; | ||
bool IsValidTrimGeometry(int trim_index,ON_TextLog* text_log) const; | ||
); | ||
|
||
// helpers for validation checking | ||
+public: | ||
bool IsValidTrim(int trim_index,ON_TextLog* text_log) const; | ||
bool IsValidTrimTopology(int trim_index,ON_TextLog* text_log) const; | ||
bool IsValidTrimGeometry(int trim_index,ON_TextLog* text_log) const; | ||
@@ -4166,6 +4167,7 @@ | ||
bool IsValidVertexGeometry(int vertex_index,ON_TextLog* text_log) const; | ||
bool IsValidVertexTolerancesAndFlags(int vertex_index,ON_TextLog* text_log) const; | ||
|
||
+protected: | ||
void SetTolsFromLegacyValues(); | ||
|
||
// read helpers to support various versions | ||
bool IsValidVertexGeometry(int vertex_index,ON_TextLog* text_log) const; | ||
bool IsValidVertexTolerancesAndFlags(int vertex_index,ON_TextLog* text_log) const; | ||
|
||
+protected: | ||
void SetTolsFromLegacyValues(); | ||
|
||
// read helpers to support various versions |
Oops, something went wrong.