2 Boolean geometry intersection of solids.
7 from __future__ import absolute_import
8 #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module.
11 from fabmetheus_utilities.geometry.geometry_utilities import evaluate
12 from fabmetheus_utilities.geometry.solids import difference
13 from fabmetheus_utilities.geometry.solids import group
16 __author__ = 'Enrique Perez (perez_enrique@yahoo.com)'
17 __credits__ = 'Nophead <http://hydraraptor.blogspot.com/>\nArt of Illusion <http://www.artofillusion.org/>'
18 __date__ = '$Date: 2008/21/04 $'
19 __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
22 def convertElementNode(elementNode, geometryOutput):
23 "Convert the xml element to an intersection xml element."
24 group.convertContainerElementNode(elementNode, geometryOutput, Intersection())
26 def getNewDerivation(elementNode):
28 return evaluate.EmptyObject(elementNode)
30 def processElementNode(elementNode):
31 "Process the xml element."
32 evaluate.processArchivable(Intersection, elementNode)
35 class Intersection(difference.Difference):
36 "An intersection object."
37 def getLoopsFromObjectLoopsList(self, importRadius, visibleObjectLoopsList):
38 "Get loops from visible object loops list."
39 return self.getIntersection(importRadius, visibleObjectLoopsList)