/[libvob]/libvob/include/vob/geom/Fillets.hxx
ViewVC logotype

Diff of /libvob/include/vob/geom/Fillets.hxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by tjl, Thu May 29 14:35:40 2003 UTC revision 1.3 by tjl, Thu May 29 16:14:06 2003 UTC
# Line 14  struct CircleFillet { Line 14  struct CircleFillet {
14      Vec ctr;      Vec ctr;
15      Vec filletcenter;      Vec filletcenter;
16      float filletrad;      float filletrad;
17        float dist;
18    
19      /** A unit vector pointing to the direction of the      /** A unit vector pointing to the direction of the
20       * connection side.       * connection side.
# Line 32  struct CircleFillet { Line 33  struct CircleFillet {
33              float sign,              float sign,
34              float dist,              float dist,
35              float thick) {              float thick) {
         this->r = r;  
36          this->ctr = ctr;          this->ctr = ctr;
37            this->r = r;
38            this->dist = dist;
39          Vec dir = dirVec(angle);          Vec dir = dirVec(angle);
40          Vec p = ctr + dist * dir + .5 * thick * sign * dir.cw90();          Vec p = ctr + dist * dir + .5 * thick * sign * dir.cw90();
41          this->filletcenter =          this->filletcenter =
# Line 62  struct CircleFillet { Line 64  struct CircleFillet {
64              if(succ) {              if(succ) {
65                  return (in-ctr).length();                  return (in-ctr).length();
66              } else {              } else {
67                  return r;                  return dist;
68              }              }
69    
70          } else {          } else {
# Line 183  struct FilletSpan { Line 185  struct FilletSpan {
185                          da * curvfra,                          da * curvfra,
186                                      d * r0,                                      d * r0,
187                                      f);                                      f);
188                    p.z = lerp(ctr.z, za, ((p-ctr).length() - r) / (this->da-r));
189    
190                  //DBG(dbg_fillets) << "f<.5: "<<ang<<" "<<ra<<" "<<rb<<" "<<                  //DBG(dbg_fillets) << "f<.5: "<<ang<<" "<<ra<<" "<<rb<<" "<<
191                  //          p <<"\n";                  //          p <<"\n";
# Line 205  struct FilletSpan { Line 208  struct FilletSpan {
208                          db * curvfra,                          db * curvfra,
209                                      d * r0,                                      d * r0,
210                                      f);                                      f);
211                    p.z = lerp(ctr.z, zb, ((p-ctr).length() - r) / (this->db-r));
212    
213                  return p;                  return p;
214    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26