[PATCH 2/7] GeomPlate_BuildAveragePlane: BasePlan: Don't set yvector to zero. See...
authorblobfish <blobfish@gmx.com>
Sun, 14 May 2023 09:37:53 +0000 (10:37 +0100)
committerTobias Frost <tobi@debian.org>
Sun, 14 May 2023 09:37:53 +0000 (10:37 +0100)
    When we return, the yvector is crossed with x and we crash.
    The z vector is passed in and we calculate the x vector, so just cross those 2 in this case to get y.

Gbp-Pq: Name 0002-GeomPlate_BuildAveragePlane-BasePlan-Don-t-set-yvect.patch

src/GeomPlate/GeomPlate_BuildAveragePlane.cxx

index c058110ec1a0a7bfa06cd8f10af16da91884476b..7b7e9cdeeae69361686499b49422f5eddb1cb318 100644 (file)
@@ -436,7 +436,7 @@ void GeomPlate_BuildAveragePlane::BasePlan(const gp_Vec& OZ)
           || ((Abs(n2)<=myTol)&&(Abs(n3)<=myTol))
           || ((Abs(n1)<=myTol)&&(Abs(n3)<=myTol))) {
       myOX.SetCoord(V3(1),V3(2),V3(3));
-      myOY.SetCoord(0,0,0);
+      myOY = OZ ^ myOX;
     }
     else {
       myOX.SetCoord(V3(1),V3(2),V3(3));