Can one use Cleanup graph with script in CityEngine to repair street?
Thanks alot.
Yes. There is a cleanup graph command in Python:
Python Scripting Command Reference: CE.cleanupGraph - CleanupGraphSettings
@example:
# Settings class used to control parameters for cleanupGraph operation
cleanupSettings = CleanupGraphSettings()
cleanupSettings.setIntersectSegments(True)
cleanupSettings.setMergeNodes(True)
cleanupSettings.setMergingDist(10)
cleanupSettings.setSnapNodesToSegments(True)
cleanupSettings.setSnappingDist(10)
cleanupSettings.setResolveConflictShapes(True)
graphlayer = ce.getObjectsFrom(ce.scene, ce.isGraphLayer)
ce.cleanupGraph(graphlayer, cleanupSettings)
It works the same way as in the GUI.