def __init__(self, liaison, options): SplitEdge.__init__(self, liaison, options) self.liaison = liaison if options.get('coplanarity'): ridges = True
liaison = None ridges = False def __init__(self, liaison, options): SplitEdge.__init__(self, liaison, options) self.liaison = liaison if options.get('coplanarity'): ridges = True def afterProcessHook(self): if self.ridges: self.liaison.getMesh().createRidgesGroup("ridges") MeshWriter.writeObject3D(self.liaison.getMesh(), "DEBUG" + str(self.cnt), String()) self.cnt += 1 def afterSwapHook(self): if self.ridges: self.liaison.getMesh().createRidgesGroup("ridges") MeshWriter.writeObject3D(self.liaison.getMesh(), "DEBUG" + str(self.cnt), String()) self.cnt += 1 #algo = SplitDebug(liaison, opts) algo = SplitEdge(liaison, opts) algo.compute() if options.coplanarity: liaison.getMesh().createRidgesGroup("ridges") MeshWriter.writeObject3D(liaison.getMesh(), outDir, String())
if options.maxtriangles: opts.put("maxtriangles", str(options.maxtriangles)) class SplitDebug(SplitEdge): cnt = 0 liaison = None ridges = False def __init__(self, liaison, options): SplitEdge.__init__(self, liaison, options) self.liaison = liaison if options.get('coplanarity'): ridges = True def afterProcessHook(self): if self.ridges: self.liaison.getMesh().createRidgesGroup("ridges") MeshWriter.writeObject3D(self.liaison.getMesh(), "DEBUG"+str(self.cnt), String()) self.cnt += 1 def afterSwapHook(self): if self.ridges: self.liaison.getMesh().createRidgesGroup("ridges") MeshWriter.writeObject3D(self.liaison.getMesh(), "DEBUG"+str(self.cnt), String()) self.cnt += 1 #algo = SplitDebug(liaison, opts) algo = SplitEdge(liaison, opts) algo.compute(); if options.coplanarity: liaison.getMesh().createRidgesGroup("ridges") MeshWriter.writeObject3D(liaison.getMesh(), outDir, String())