Skip to content

Commit

Permalink
it would be nice if this worked by monday
Browse files Browse the repository at this point in the history
  • Loading branch information
kanzure committed Jul 17, 2009
1 parent 5d1467c commit 257b63a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pymates/monday.py
@@ -0,0 +1,24 @@
#!/usr/bin/python
import yaml
import pymates
import settings

block = pymates.Part(name="block with hole", cadfile="http://adl.serveftp.org/lab/models/blockwithhole.iges")
peg = pymates.Part(name="peg", cadfile="http://adl.serveftp.org/lab/models/peg.iges")

possibilities = pymates.compatibility(block, peg)

for each in possibilities:
complex_geom = fuse(block, peg)
volume_diff = pymates.algorithms.calculate_volume_difference(complex_geom)
total_volume = pymates.algorithms.calculate_volume_total(complex_geom)
if settings.mode == 'pythonOCC': #we're in pythonOCC
display.__draw3d__(each) #draw the possibility
elif settings.mode == 'shell': #non-graphical
#assuming it has a nice __repr__ method definition
print each
elif settings.mode == 'web':
#generate svg and cache?
#generate 3D rendering and cache?
pass
pass

0 comments on commit 257b63a

Please sign in to comment.