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)).")
71
71
end
72
72
end
73
73
@@ -86,7 +86,7 @@ function checkIfShapesArePlanar(r0::SupportPoint,r1::SupportPoint,r2::SupportPoi
86
86
# Shape is purely planar. Computing the shortest distance for a planar shape
87
87
# requires an MPR 2D algorithm (using lines instead of triangles as portals).
88
88
# However, this is not implemented and therefore the shortest distance cannot be computed
89
-
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)).")
90
90
end
91
91
# new normal to the triangle plane (r0-r1-r2_new)
92
92
n3 =cross(r1.p-r0.p, r2.p-r0.p) # |n3| > 0 guaranteed, due to construction
@@ -106,7 +106,7 @@ function checkIfShapesArePlanar(r0::SupportPoint,r1::SupportPoint,r2::SupportPoi
106
106
# Shape is purely planar. Computing the shortest distance for a planar shape
107
107
# requires an MPR 2D algorithm (using lines instead of triangles as portals).
108
108
# However, this is not implemented and therefore the shortest distance cannot be computed
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 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)).")
110
110
end
111
111
end
112
112
@@ -144,11 +144,11 @@ function tetrahedronEncloseOrigin(r0::SupportPoint, r1::SupportPoint,
144
144
break
145
145
end
146
146
if success !=true
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.")
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.")
151
+
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)).")
152
152
end
153
153
end
154
154
return (r1, r2, r3)
@@ -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
@@ -312,11 +312,11 @@ function phase3(r0::SupportPoint, r1::SupportPoint, r2::SupportPoint, r3::Suppor
312
312
end
313
313
end
314
314
end
315
-
if niter_max <100
315
+
if niter_max <=100
316
316
@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. tol_rel increased locally for this computation to $new_tol.")
319
+
@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