You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error("MPR: Too large penetration (prerequisite of MPR violated). Centers are overlapping. Look at shapeA = ", shapeA, "shapeB = ", shapeB)
70
+
error("MPR: Too large penetration (prerequisite of MPR violated). Centers are overlapping. Look at $(Modia3D.fullName(shapeA)) and $(Modia3D.fullName(shapeB)).")
79
71
end
80
72
end
81
73
@@ -94,7 +86,7 @@ function checkIfShapesArePlanar(r0::SupportPoint,r1::SupportPoint,r2::SupportPoi
94
86
# Shape is purely planar. Computing the shortest distance for a planar shape
95
87
# requires an MPR 2D algorithm (using lines instead of triangles as portals).
96
88
# However, this is not implemented and therefore the shortest distance cannot be computed
97
-
error("MPR: Shapes are planar and MPR2D is not supported. abs(dot((r2.p-r1.p),n2)). Look at shapeA = ", shapeA, "shapeB = ", shapeB)
89
+
error("MPR: Shapes are planar and MPR2D is not supported. abs(dot((r2.p-r1.p),n2)). Look at $(Modia3D.fullName(shapeA)) and $(Modia3D.fullName(shapeB)).")
98
90
end
99
91
# new normal to the triangle plane (r0-r1-r2_new)
100
92
n3 =cross(r1.p-r0.p, r2.p-r0.p) # |n3| > 0 guaranteed, due to construction
@@ -114,7 +106,7 @@ function checkIfShapesArePlanar(r0::SupportPoint,r1::SupportPoint,r2::SupportPoi
114
106
# Shape is purely planar. Computing the shortest distance for a planar shape
115
107
# requires an MPR 2D algorithm (using lines instead of triangles as portals).
116
108
# However, this is not implemented and therefore the shortest distance cannot be computed
117
-
error("MPR: Shapes are planar and MPR2D is not supported. r1, r2, r3 are on the same ray. abs(dot((r3.p-r1.p),r3.n)) <= neps. Look at shapeA = ", shapeA, "shapeB = ", shapeB)
109
+
error("MPR: Shapes are planar and MPR2D is not supported. r1, r2, r3 are on the same ray. abs(dot((r3.p-r1.p),r3.n)) <= neps. Look at $(Modia3D.fullName(shapeA)) and $(Modia3D.fullName(shapeB)).")
118
110
end
119
111
end
120
112
@@ -126,9 +118,13 @@ end
126
118
# loop around to "ensure" the tetrahedron r0,r1,r2 and r3 encloses the origin
127
119
# stimmt so nicht wirklich, muss ich nochmal nachlesen!!!
@@ -148,9 +144,13 @@ function tetrahedronEncloseOrigin(r0::SupportPoint,r1::SupportPoint,r2::SupportP
148
144
break
149
145
end
150
146
if success !=true
151
-
error("MPR: Max. number of iterations is reached in phase2. Look at shapeA = ", shapeA, " shapeB = ", shapeB)
147
+
if niter_max <=100
148
+
@warn("MPR (phase 2): Max. number of iterations (= $niter_max) is reached. niter_max increased locally by 10 and phase 2 is rerun. Look at $(Modia3D.fullName(shapeA)) and $(Modia3D.fullName(shapeB)).")
error("MPR (phase 2): Max. number of iterations (= $niter_max) is reached and $niter_max > 100, look at $(Modia3D.fullName(shapeA)) and $(Modia3D.fullName(shapeB)).")
@@ -166,7 +166,7 @@ function constructR4(r0::SupportPoint,r1::SupportPoint,r2::SupportPoint,r3::Supp
166
166
# Shape is purely planar. Computing the shortest distance for a planar shape
167
167
# requires an MPR 2D algorithm (using lines instead of triangles as portals).
168
168
# However, this is not implemented and therefore the shortest distance cannot be computed
169
-
error("MPR: Shapes are planar and MPR2D is not supported. abs(dot((r3.p-r1.p),r3.n)). Look at shapeA = ", shapeA, "shapeB = ", shapeB)
169
+
error("MPR: Shapes are planar and MPR2D is not supported. abs(dot((r3.p-r1.p),r3.n)). Look at $(Modia3D.fullName(shapeA)) and $(Modia3D.fullName(shapeB)).")
170
170
end
171
171
n4 =cross(r2.p-r1.p, r3.p-r1.p) # |n4| > 0 guaranteed, due to construction
172
172
end
@@ -178,8 +178,8 @@ function constructR4(r0::SupportPoint,r1::SupportPoint,r2::SupportPoint,r3::Supp
@warn("MPR (phase 3): Numerical issues with distance computation between $(Modia3D.fullName(shapeA)) and $(Modia3D.fullName(shapeB)). tol_rel increased locally for this computation to $new_tol.")
@warn("MPR (phase 3): Numerical issues with distance computation between $(Modia3D.fullName(shapeA)) and $(Modia3D.fullName(shapeB)). Max. number of iterations (= $niter_max) is reached. niter_max increased locally by 10 and phase 3 is rerun.")
@warn("MPR (phase 3): Max. number of iterations (= $niter_max) is reached and $niter_max > 100, look at $(Modia3D.fullName(shapeA)) and $(Modia3D.fullName(shapeB)). tol_rel increased locally for this computation to $new_tol.")
0 commit comments