Question

Example usage of PythonCaller FMEFactoryPipeline

  • 19 May 2021
  • 1 reply
  • 14 views

Hoping someone could provide me with a comlplete example of how to use fmeobjects.FMEFactoryPipeline() in a PythonCaller

 

Specifically I would like to take points as in input and use the SurfaceModelFactory with the undocumented parameter MAXIMUM_EDGE_CALC_LENGTH

to hopefully produce a mesh with trimmed edges.

 

 

 


1 reply

Unless I have made an error it appears that MAXIMUM_EDGE_CALC_LENGTH is not implemented as the below snippet removes 0 faces.

str_factory = """FACTORY_DEF * SurfaceModelFactory \
FACTORY_NAME SurfaceModelFactoryTest \
INPUT POINTS FEATURE_TYPE * \
TOLERANCE 0.0 \
MAXIMUM_EDGE_CALC_LENGTH 1.0 \
INTERPOLATION_TYPE AUTO \
OUTPUT TIN_SURFACE FEATURE_TYPE tin_surface
"""
 
pipeline = fmeobjects.FMEFactoryPipeline('TestFactory')
pipeline.addFactory(str_factory)
pipeline.processFeature(feature)
pipeline.allDone()
new_feature = pipeline.getOutputFeature()
 
print(f'Faces removed: {new_feature.getGeometry().numParts() - feature.getGeometry().numParts()}')

 

Reply