Refactoring Matrix.cpp/.h

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
wmayer
Founder
Posts: 18779
Joined: Thu Feb 19, 2009 10:32 am

Re: Refactoring Matrix.cpp/.h

Post by wmayer »

Fine, and as proposed by openBrain the standard Precision::Confusion should do it.
But note that we cannot pull in an OCC dependency to FreeCAD core (it's a design decision). So, instead of using Precision::Confusion() use directly the value 1e-7.
openBrain
Veteran
Posts: 7988
Joined: Fri Nov 09, 2018 5:38 pm

Re: Refactoring Matrix.cpp/.h

Post by openBrain »

wmayer wrote: Fri Feb 04, 2022 6:56 pm But note that we cannot pull in an OCC dependency to FreeCAD core (it's a design decision).
Didn't know, my mistake for bad advice.
Could we create a 'Base::Confusion' value that we could use all over the core?
wmayer
Founder
Posts: 18779
Joined: Thu Feb 19, 2009 10:32 am

Re: Refactoring Matrix.cpp/.h

Post by wmayer »

openBrain wrote: Fri Feb 04, 2022 7:07 pm Could we create a 'Base::Confusion' value that we could use all over the core?
I have thought about this too and support your suggestion.
User avatar
Kunda1
Veteran
Posts: 12692
Joined: Thu Jan 05, 2017 9:03 pm

Re: Refactoring Matrix.cpp/.h

Post by Kunda1 »

openBrain, can you x-post this forum thread to the commit summary of the commit via git commit --amend thanks!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
openBrain
Veteran
Posts: 7988
Joined: Fri Nov 09, 2018 5:38 pm

Re: Refactoring Matrix.cpp/.h

Post by openBrain »

Kunda1 wrote: Fri Feb 04, 2022 7:15 pm openBrain, can you x-post this forum thread to the commit summary of the commit via git commit --amend thanks!
Sorry, can't give a sense to this sentence... :?
wmayer wrote: Fri Feb 04, 2022 7:10 pm I have thought about this too and support your suggestion.
Would you support it up to creating the variable? :? I don't want to add it in a file that you will tell me it's not the good one when reviewing the PR. :lol:
wmayer
Founder
Posts: 18779
Joined: Thu Feb 19, 2009 10:32 am

Re: Refactoring Matrix.cpp/.h

Post by wmayer »

I would create the file src/Base/Precision.h where we copy the most relevant functions from OCC.
User avatar
Kunda1
Veteran
Posts: 12692
Joined: Thu Jan 05, 2017 9:03 pm

Re: Refactoring Matrix.cpp/.h

Post by Kunda1 »

git commit --amend 'Base: Uniform scaling of matrix' -m 'See discussion in https://forum.freecadweb.org/viewtopic.php?f=10&t=65959'
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
openBrain
Veteran
Posts: 7988
Joined: Fri Nov 09, 2018 5:38 pm

Re: Refactoring Matrix.cpp/.h

Post by openBrain »

Kunda1 wrote: Fri Feb 04, 2022 7:45 pm git commit --amend 'Base: Uniform scaling of matrix' -m 'See discussion in https://forum.freecadweb.org/viewtopic.php?f=10&t=65959'
Are you sure? Having links to forum in commit message is awful.
I'd happily add the link into PR description, but I'd vote against adding it in commit message.
wmayer wrote: Fri Feb 04, 2022 7:43 pm I would create the file src/Base/Precision.h where we copy the most relevant functions from OCC.
Thx
User avatar
Kunda1
Veteran
Posts: 12692
Joined: Thu Jan 05, 2017 9:03 pm

Re: Refactoring Matrix.cpp/.h

Post by Kunda1 »

openBrain wrote: Fri Feb 04, 2022 7:55 pm Are you sure? Having links to forum in commit message is awful.
Not married to the idea :D
Just that it gives some context. What do you propose?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
openBrain
Veteran
Posts: 7988
Joined: Fri Nov 09, 2018 5:38 pm

Re: Refactoring Matrix.cpp/.h

Post by openBrain »

Kunda1 wrote: Fri Feb 04, 2022 8:02 pm Not married to the idea :D
Just that it gives some context. What do you propose?
Again : add the link in the PR description. ;)
Post Reply