gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] libvob/include/vob geom/Fillets2.hxx vobs/Fille...


From: Janne V. Kujala
Subject: [Gzz-commits] libvob/include/vob geom/Fillets2.hxx vobs/Fille...
Date: Wed, 25 Jun 2003 05:44:11 -0400

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Branch:         
Changes by:     Janne V. Kujala <address@hidden>        03/06/25 05:44:11

Modified files:
        include/vob/geom: Fillets2.hxx 
        include/vob/vobs: Fillet.hxx 

Log message:
        geometry fixes

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/geom/Fillets2.hxx.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/vobs/Fillet.hxx.diff?tr1=1.22&tr2=1.23&r1=text&r2=text

Patches:
Index: libvob/include/vob/geom/Fillets2.hxx
diff -u libvob/include/vob/geom/Fillets2.hxx:1.21 
libvob/include/vob/geom/Fillets2.hxx:1.22
--- libvob/include/vob/geom/Fillets2.hxx:1.21   Tue Jun 24 10:30:04 2003
+++ libvob/include/vob/geom/Fillets2.hxx        Wed Jun 25 05:44:11 2003
@@ -147,8 +147,10 @@
                v = v - dir.dot(v-node.ctr) * dir;
            }
 #endif
-           float f = (l - node.r) / (d - node.r);          
-           if (f >= 1)
+           float f = (l - node.r) / (d - node.r);
+           if (d <= node.r)
+               v.z = node.ctr.z;
+           else if (f >= 1)
                v.z = z;
            else if (f >= 0)
                v.z = lerp(node.ctr.z, z, f);
Index: libvob/include/vob/vobs/Fillet.hxx
diff -u libvob/include/vob/vobs/Fillet.hxx:1.22 
libvob/include/vob/vobs/Fillet.hxx:1.23
--- libvob/include/vob/vobs/Fillet.hxx:1.22     Tue Jun 24 10:30:04 2003
+++ libvob/include/vob/vobs/Fillet.hxx  Wed Jun 25 05:44:11 2003
@@ -163,7 +163,7 @@
            // XXX: interpolate angle to zero from the point of
            // "overlap" (i.e., where the beginning and end of the side
            // of a fillet meet) to when the nodes coincide.
-           float f = d / r0;
+           float f = d / (cos(a) * r0);
            if (f < 1.0) a = asin(t / r0) * sin(M_PI_2 * f);
 
            DBG(dbg_vfillets) << 
@@ -312,8 +312,8 @@
        float th1 = conn1.th;
        float th2 = conn2.th;
 
-       bool overlap1 = 2 * d1 <= (csize + crad(t1)) * cos(conn1.a);
-       bool overlap2 = 2 * d2 <= (csize + crad(t2)) * cos(conn2.a);
+       bool overlap1 = d1 <= csize * cos(conn1.a);
+       bool overlap2 = d2 <= csize * cos(conn2.a);
 
        DBG(dbg_vfillets) << "P: "<<ctr<<" "<<csize<<" "<<
                    a1<<" "<<d1<<" "<<th1<<" "<<




reply via email to

[Prev in Thread] Current Thread [Next in Thread]