Example #1
0
def processTargetByFunctions(geometryFunction, pathFunction, target):
	'Process the target by the manipulationFunction.'
	if target.xmlObject == None:
		return
	if len(target.xmlObject.getPaths()) > 0:
		lineation.processTargetByFunction(pathFunction, target)
		return
	geometryOutput = getGeometryOutputByFunction(geometryFunction, target)
	lineation.removeChildrenFromElementObject(target)
	xmlProcessor = target.getXMLProcessor()
	xmlProcessor.convertXMLElement(geometryOutput, target)
Example #2
0
def processTargetByFunctionPair(geometryFunction, pathFunction, target):
	'Process the target by the manipulationFunction.'
	if target.xmlObject == None:
		print('Warning, there is no object in processTargetByFunctions in solid for:')
		print(target)
		return
	if len(target.xmlObject.getPaths()) > 0:
		lineation.processTargetByFunction(pathFunction, target)
		return
	geometryOutput = getGeometryOutputByFunction(target, geometryFunction)
	lineation.removeChildNodesFromElementObject(target)
	target.getXMLProcessor().convertElementNode(target, geometryOutput)