yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12783
[Bug 1604125] [NEW] gtsSurfaceBestFitOBB() broken
Public bug reported:
Hello,
It seems the pack.gtsSurfaceBestFitOBB() function is broken in recent
YADE versions. Just type the following (using a gts file present in the
sources) in your YADE terminal:
******************************
import gts
surface=gts.read(open('parallellepiped.gts')) # the one from examples/jointedCohesiveFrictionalPM
pred=pack.inGtsSurface(surface)
print 'Dim from pred.dim = ',pred.dim()
center,dim,orientation=gtsSurfaceBestFitOBB(surface)
print 'Dim from gtsSurfaceBestFitOBB =',dim
*******************************
I get the correct output with a not up to date YADE version as follows:
*******************************
Dim from pred.dim = Vector3(0.9999999404,2.0000000002092895,1)
Dim from gtsSurfaceBestFitOBB = Vector3(0.4999999702,1.0000000001046447,0.5) # two are "equal" with a normal factor 2
*******************************
Whereas an up to date YADE version returns:
*******************************
Dim from pred.dim = Vector3(0.9999999404,2.0000000002092895,1)
Dim from gtsSurfaceBestFitOBB = Vector3(6.91989746778284e-310,3.47644378095352e-310,5e-324)
*******************************
These two versions differ for instance in the related function bestFitOBB() in py/pack/_packObb.cpp, in relation with this commit: (the difference is exactly the one introduced by this commit)
https://github.com/yade/trunk/commit/4f66360db75afb82029bbe37ae4a4dac36899a33
The bug affects for instance the use of randomDensePack() function with GTS predicates:
https://answers.launchpad.net/yade/+question/297125
Any ideas ? (Anton, we need you once again ?)
Jerome
** Affects: yade
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1604125
Title:
gtsSurfaceBestFitOBB() broken
Status in Yade:
New
Bug description:
Hello,
It seems the pack.gtsSurfaceBestFitOBB() function is broken in recent
YADE versions. Just type the following (using a gts file present in
the sources) in your YADE terminal:
******************************
import gts
surface=gts.read(open('parallellepiped.gts')) # the one from examples/jointedCohesiveFrictionalPM
pred=pack.inGtsSurface(surface)
print 'Dim from pred.dim = ',pred.dim()
center,dim,orientation=gtsSurfaceBestFitOBB(surface)
print 'Dim from gtsSurfaceBestFitOBB =',dim
*******************************
I get the correct output with a not up to date YADE version as follows:
*******************************
Dim from pred.dim = Vector3(0.9999999404,2.0000000002092895,1)
Dim from gtsSurfaceBestFitOBB = Vector3(0.4999999702,1.0000000001046447,0.5) # two are "equal" with a normal factor 2
*******************************
Whereas an up to date YADE version returns:
*******************************
Dim from pred.dim = Vector3(0.9999999404,2.0000000002092895,1)
Dim from gtsSurfaceBestFitOBB = Vector3(6.91989746778284e-310,3.47644378095352e-310,5e-324)
*******************************
These two versions differ for instance in the related function bestFitOBB() in py/pack/_packObb.cpp, in relation with this commit: (the difference is exactly the one introduced by this commit)
https://github.com/yade/trunk/commit/4f66360db75afb82029bbe37ae4a4dac36899a33
The bug affects for instance the use of randomDensePack() function with GTS predicates:
https://answers.launchpad.net/yade/+question/297125
Any ideas ? (Anton, we need you once again ?)
Jerome
To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1604125/+subscriptions
Follow ups