[PATCH 2/7] GeomPlate_BuildAveragePlane: BasePlan: Don't set yvector to zero. See...
authorblobfish <blobfish@gmx.com>
Tue, 29 Sep 2020 10:36:13 +0000 (06:36 -0400)
committerKurt Kremitzki <kkremitzki@debian.org>
Sun, 24 Jan 2021 01:02:43 +0000 (01:02 +0000)
    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));