[PATCH 2/7] GeomPlate_BuildAveragePlane: BasePlan: Don't set yvector to zero. See...
authorblobfish <blobfish@gmx.com>
Fri, 24 May 2024 17:00:24 +0000 (19:00 +0200)
committerTobias Frost <tobi@debian.org>
Fri, 24 May 2024 17:00:24 +0000 (19:00 +0200)
    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 557906d138b1e1519139f6344b281ccffcf27583..9b1dcb05c15b61efe4fae097f152fc72b956fc9e 100644 (file)
@@ -434,7 +434,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));