[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob include/vob/vobs/Fillet.hxx vob/demo/mul...
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] libvob include/vob/vobs/Fillet.hxx vob/demo/mul... |
Date: |
Fri, 27 Jun 2003 06:39:31 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Branch:
Changes by: Janne V. Kujala <address@hidden> 03/06/27 06:39:31
Modified files:
include/vob/vobs: Fillet.hxx
vob/demo/multifil: randgraph.py
Log message:
fix sqsize etc.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/include/vob/vobs/Fillet.hxx.diff?tr1=1.30&tr2=1.31&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/randgraph.py.diff?tr1=1.18&tr2=1.19&r1=text&r2=text
Patches:
Index: libvob/include/vob/vobs/Fillet.hxx
diff -u libvob/include/vob/vobs/Fillet.hxx:1.30
libvob/include/vob/vobs/Fillet.hxx:1.31
--- libvob/include/vob/vobs/Fillet.hxx:1.30 Fri Jun 27 06:11:48 2003
+++ libvob/include/vob/vobs/Fillet.hxx Fri Jun 27 06:39:31 2003
@@ -1,7 +1,7 @@
/*
Trivial.hxx
*
- * Copyright (c) 2003, Tuomas J. Lukka
+ * Copyright (c) 2003, Tuomas J. Lukka and Janne V. Kujala
* This file is part of LibVob.
*
* LibVob is free software; you can redistribute it and/or modify it under
@@ -21,7 +21,7 @@
*
*/
/*
- * Written by Tuomas J. Lukka
+ * Written by Tuomas J. Lukka and Janne V. Kujala
*/
#ifndef VOB_VOBS_FILLET
@@ -134,12 +134,12 @@
}
template<class T> float crad(const T &t) const {
- return t.getSqSize().x;
+ return 0.5 * t.getSqSize().x;
}
struct Conn {
template<class T> float crad(const T &t) const {
- return t.getSqSize().x;
+ return 0.5 * t.getSqSize().x;
}
float th;
float a;
@@ -297,9 +297,9 @@
const Transform &t1 = *t[3];
const Transform &t2 = *t[4];
- ZVec p0 = t0.transform(t0.getSqSize());
- ZVec p1 = t1.transform(t1.getSqSize()) ;
- ZVec p2 = t2.transform(t2.getSqSize()) ;
+ ZVec p0 = t0.transform(0.5 * t0.getSqSize());
+ ZVec p1 = t1.transform(0.5 * t1.getSqSize()) ;
+ ZVec p2 = t2.transform(0.5 * t2.getSqSize()) ;
ZVec ctr = p0;
Vec v1 = p1 - ctr;
@@ -523,7 +523,7 @@
}
template<class T> float crad(const T &t) const {
- return t.getSqSize().x;
+ return 0.5 * t.getSqSize().x;
}
ZVec norm(ZVec v) const {
@@ -539,8 +539,8 @@
const Transform &t0 = *t[2];
const Transform &t1 = *t[3];
- ZVec p0 = t0.transform(t0.getSqSize());
- ZVec p1 = t1.transform(t1.getSqSize());
+ ZVec p0 = t0.transform(0.5 * t0.getSqSize());
+ ZVec p1 = t1.transform(0.5 * t1.getSqSize());
float d = (p1 - p0).length() / 2;
float r = crad(t0);
Index: libvob/vob/demo/multifil/randgraph.py
diff -u libvob/vob/demo/multifil/randgraph.py:1.18
libvob/vob/demo/multifil/randgraph.py:1.19
--- libvob/vob/demo/multifil/randgraph.py:1.18 Fri Jun 27 06:11:48 2003
+++ libvob/vob/demo/multifil/randgraph.py Fri Jun 27 06:39:31 2003
@@ -59,7 +59,7 @@
SlideLin("ang", 21, 3, "Rotation angle", "Prior", "Next"),
Toggle("fillets", 1, "Toggle filleting", "f"),
SlideLin("seed", 42, 1, "seed number", "A", "a"),
- SlideLin("size", 50, 5, "Node size", "K", "k"),
+ SlideLin("size", 100, 10, "Node size", "K", "k"),
SlideLin("dice", 20, 1, "Dice factor", "P", "p"),
Toggle("fillet3d", 0, "3D fillets", "3"),
SlideLin("linewidth", 2, 1, "line width", "B", "b"),
@@ -129,8 +129,8 @@
nodes = [ {
"cs" : vs.orthoBoxCS(cs, "node%s" % i,
(rng.random() - .5) * box,
- (rng.random() - .5) * box - self.size,
- (rng.random() - .5) * box - self.size,
+ (rng.random() - .5) * box - 0.5*self.size,
+ (rng.random() - .5) * box - 0.5*self.size,
1, 1, self.size, self.size),
"conns" : [ ],
} for i in range(0,self.N) ]
- [Gzz-commits] libvob include/vob/vobs/Fillet.hxx vob/demo/mul..., Tuomas J. Lukka, 2003/06/06
- [Gzz-commits] libvob include/vob/vobs/Fillet.hxx vob/demo/mul..., Janne V. Kujala, 2003/06/25
- [Gzz-commits] libvob include/vob/vobs/Fillet.hxx vob/demo/mul..., Janne V. Kujala, 2003/06/26
- [Gzz-commits] libvob include/vob/vobs/Fillet.hxx vob/demo/mul..., Janne V. Kujala, 2003/06/26
- [Gzz-commits] libvob include/vob/vobs/Fillet.hxx vob/demo/mul..., Janne V. Kujala, 2003/06/27
- [Gzz-commits] libvob include/vob/vobs/Fillet.hxx vob/demo/mul...,
Janne V. Kujala <=
- [Gzz-commits] libvob include/vob/vobs/Fillet.hxx vob/demo/mul..., Janne V. Kujala, 2003/06/27