Dear Jack Davis,
you can derive the length of a selected fiber with the following code:
To do this, select a fiber with GAD Object Selection and then run the script. This script gives good results for straight fibers - as in your structure. For curved fibers, you must sum the lengths of all fiber segments.
Additionally, you can extend the code to perform further analysis. Please refer to the User Guide for further information on advanced scripting in GeoDict https://geodict-userguide.math2market.de/2025/automation_pythonscripting.html
Best regards,
Lilli
you can derive the length of a selected fiber with the following code:
Code Select
Header = {'Release':'2025'}
from math import dist
gad_id = gd.getSelectedGADObjects()
gad_parameters = gd.getGADObject(gad_id
[o], Header['Release'])
gad_point1 = gad_parameters['Point1']
gad_point2 = gad_parameters['Point2']
gad_length = dist(gad_point1,gad_point2)*100
gd.msgBox(f'The length of the selected gad object is {gad_length}mm.') To do this, select a fiber with GAD Object Selection and then run the script. This script gives good results for straight fibers - as in your structure. For curved fibers, you must sum the lengths of all fiber segments.
Additionally, you can extend the code to perform further analysis. Please refer to the User Guide for further information on advanced scripting in GeoDict https://geodict-userguide.math2market.de/2025/automation_pythonscripting.html
Best regards,
Lilli
