[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] libvob/vob demo/multifil/multifil.py demo/multi...
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] libvob/vob demo/multifil/multifil.py demo/multi... |
Date: |
Sun, 29 Jun 2003 07:22:08 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Branch:
Changes by: Janne V. Kujala <address@hidden> 03/06/29 07:22:08
Modified files:
vob/demo/multifil: multifil.py randgraph.py stretching.py
vob/fillet : light3d.py
Log message:
abstract
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/multifil.py.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/randgraph.py.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/multifil/stretching.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/fillet/light3d.py.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
Patches:
Index: libvob/vob/demo/multifil/multifil.py
diff -u libvob/vob/demo/multifil/multifil.py:1.19
libvob/vob/demo/multifil/multifil.py:1.20
--- libvob/vob/demo/multifil/multifil.py:1.19 Fri Jun 27 08:06:06 2003
+++ libvob/vob/demo/multifil/multifil.py Sun Jun 29 07:22:07 2003
@@ -43,35 +43,25 @@
def scene(self, vs):
vs.put( background((.5,1,.2)))
- #angle = vs.orthoCS(0, "Ang", 0, self.angle, 0, 0, 0);
-
- #thick = vs.orthoCS(0, "Thi", 0, self.thick, 0, 0, 0);
- #thick = vs.orthoCS(0, "Thi", 0, 100*(self.thick / (math.hypot(self.x
- 500, self.y - 500)+50)), 0, 0, 0);
-
- thick = vs.coords.rational1D22(0, self.thick, 0, 0, 1, 1, 0);
- angle = vs.coords.rational1D22(0, self.angle, 0, 0, 1, 0, 0);
- vs.matcher.add(thick, "Thi")
- vs.matcher.add(angle, "Ang")
-
a = vs.orthoBoxCS(0, "A", 0, 100, 100, 1, 1, self.size, self.size);
b = vs.orthoBoxCS(0, "B", 200, self.x, self.y, 1, 1, self.size,
self.size);
c = vs.orthoBoxCS(0, "C", 400, 200, 500, 1, 1, self.size, self.size);
d = vs.orthoBoxCS(0, "D", 600, 100, 300, 1, 1, self.size, self.size);
e = vs.orthoBoxCS(0, "E", 800, 500, 500, 1, 1, self.size, self.size);
- def pc(conns):
+ def pc(conns, cs):
# vs.put(conns, [a, b, c, d])
# vs.put(conns, [b, a, d, e]);
# vs.put(conns, [c, a]);
# vs.put(conns, [d, a, b]);
- vs.put(conns, [thick, angle, b, e]);
- vs.put(conns, [thick, angle, c, e]);
+ vs.put(conns, cs + [b, e]);
+ vs.put(conns, cs + [c, e]);
# vs.put(GLRen.createDebugSwitch("Fillets", 1));
# vs.put(GLRen.createDebugSwitch("VFillets", 1));
#vs.put(GLRen.createDebugSwitch("Quadrics", 1));
- vs.put(conns, [thick, angle, e, b, c]);
+ vs.put(conns, cs + [e, b, c]);
# vs.put(GLRen.createDebugSwitch("Fillets", 0));
# vs.put(GLRen.createDebugSwitch("VFillets", 0));
#vs.put(GLRen.createDebugSwitch("Quadrics", 0));
Index: libvob/vob/demo/multifil/randgraph.py
diff -u libvob/vob/demo/multifil/randgraph.py:1.22
libvob/vob/demo/multifil/randgraph.py:1.23
--- libvob/vob/demo/multifil/randgraph.py:1.22 Fri Jun 27 08:09:12 2003
+++ libvob/vob/demo/multifil/randgraph.py Sun Jun 29 07:22:07 2003
@@ -61,14 +61,6 @@
vs.matcher.add(cs, "Rot")
- thick = vs.coords.rational1D22(0, self.thick, 0, 0, 1, 1, 0);
- angle = vs.coords.rational1D22(0, self.angle, 0, 0, 1, 0, 0);
- #XXX: angle scaling test
- #angle = vs.coords.rational1D22(0, 1, 0, .15, 0, 1, 0);
- vs.matcher.add(thick, "Thi")
- vs.matcher.add(angle, "Ang")
-
-
nodes = [ {
"cs" : vs.orthoBoxCS(cs, "node%s" % i,
(rng.random() - .5) * box,
@@ -90,9 +82,9 @@
b["conns"].append(node["cs"])
- def pc(conns):
+ def pc(conns, cs):
for node in nodes:
if node["conns"]:
- vs.put(conns, [thick, angle, node["cs"]] + node["conns"])
+ vs.put(conns, cs + [node["cs"]] + node["conns"])
light3d.drawFillets(self, vs, pc)
Index: libvob/vob/demo/multifil/stretching.py
diff -u libvob/vob/demo/multifil/stretching.py:1.3
libvob/vob/demo/multifil/stretching.py:1.4
--- libvob/vob/demo/multifil/stretching.py:1.3 Fri Jun 27 08:06:06 2003
+++ libvob/vob/demo/multifil/stretching.py Sun Jun 29 07:22:07 2003
@@ -39,7 +39,6 @@
self,
SlideLin("x", 0, 20, "x", "Left", "Right"),
SlideLin("angle", .15, .05, "angle scaling constant", "+", "-"),
- SlideLin("thickc", 1, .1, "thickness", "T", "t"),
*light3d.commonkeys
)
def scene(self, vs):
@@ -50,11 +49,11 @@
#thick = vs.orthoCS(0, "Thi", 0, self.thick, 0, 0, 0);
#thick = vs.orthoCS(0, "Thi", 0, 100*(self.thick / (math.hypot(self.x
- 500, self.y - 500)+50)), 0, 0, 0);
- thick = vs.coords.rational1D22(0, self.thickc, 0, 0, 1, 1, 0);
+ thick = vs.coords.rational1D22(0, self.thick, 0, 0, 1, 1, 0);
angle = vs.coords.rational1D22(0, self.angle, 0, 0, 1, 0, 0);
angle = vs.coords.rational1D22(0, 1, 0, self.angle, 0, 1, 0);
- vs.matcher.add(thick, "Thi")
- vs.matcher.add(angle, "Ang")
+ vs.matcher.add(thick, "Thi2")
+ vs.matcher.add(angle, "Ang2")
N = 10
@@ -65,7 +64,7 @@
1, 1, self.size, self.size)
for i in range(0, N)]
- def pc(conns):
+ def pc(conns, cs):
for i in range(0, N):
vs.put(conns, [thick, angle, a[i], b[i]]);
Index: libvob/vob/fillet/light3d.py
diff -u libvob/vob/fillet/light3d.py:1.19 libvob/vob/fillet/light3d.py:1.20
--- libvob/vob/fillet/light3d.py:1.19 Sun Jun 29 04:47:12 2003
+++ libvob/vob/fillet/light3d.py Sun Jun 29 07:22:07 2003
@@ -169,7 +169,10 @@
conns3dblend = GLRen.createFillet3DBlend(self.dice);
-
+ thick = vs.coords.rational1D22(0, self.thick, 0, 0, 1, 1, 0);
+ angle = vs.coords.rational1D22(0, self.angle, 0, 0, 1, 0, 0);
+ vs.matcher.add(thick, "Thi")
+ vs.matcher.add(angle, "Ang")
if self.fillet3d:
vs.put(getDListNocoords("""
@@ -205,10 +208,10 @@
"""))
#if not self.blend3d:
- pc(conns3d)
+ pc(conns3d, [thick, angle])
if self.blend3d:
- pc(conns3dblend)
+ pc(conns3dblend, [thick, angle])
vs.put(getDListNocoords("""
MatrixMode PROJECTION
@@ -220,13 +223,13 @@
vs.put(getDListNocoords("""
Color 1 1 1
"""))
- if self.drawInside: pc(conns)
+ if self.drawInside: pc(conns, [thick, angle])
vs.put(getDListNocoords("""
Color 0 0 0
"""))
- if self.drawEdge: pc(conns_l)
+ if self.drawEdge: pc(conns_l, [thick, angle])
- if self.curvature : pc(conns_c)
+ if self.curvature : pc(conns_c, [thick, angle])
vs.put(getDListNocoords("""