diff --git a/doc/python_examples/examples_overview.md b/doc/python_examples/examples_overview.md new file mode 100644 index 000000000..78e432943 --- /dev/null +++ b/doc/python_examples/examples_overview.md @@ -0,0 +1,731 @@ +--- +myst: + html_meta: + "description": "Examples for using the ZEISS INSPECT 2025 App Python API" + "keywords": "Metrology, ZEISS INSPECT, Python API, GOM API, Scripting, Add-ons, Apps, Examples" +--- + + +# ZEISS INSPECT App Examples Overview + +## data_interfaces — How to access data of ZEISS INSPECT elements + +
+
+

ReferencePointsAndMeshData — view / +download +

+ + +:Description: + This example demonstrates how to access the reference points in a measurement and the mesh from Python. + +:Example Projects: + [zeiss_part_test_project](#example-projects) + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/python_api_introduction/python_api_introduction.html#element-data-interfaces) + + +
+ +
+ +
+
+

CheckResultsDataArray — view / +download +

+ + +:Description: + This example demonstrates two ways of accessing result data from checks using the element properties and data interfaces. + +:Example Projects: + [zeiss_part_test_project](#example-projects) + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/python_api_introduction/python_api_introduction.html#access-element-properties) + + +
+ +
+ +
+
+

VolumeSectionImageData — view / +download +

+ + +:Description: + This example demonstrates how to access the image data of a volume section. + +:Example Projects: + [volume_test_project](#example-projects) + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/python_api_introduction/python_api_introduction.html#element-data-interfaces) + + +
+ +
+ + +## dialog_widgets — How to use custom dialogs and handle user input events + +
+
+

WidgetVisibility — view / +download +

+ + +:Description: + This example shows how to use a dialog event handler to turn on/off widget visibilities. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/python_api_introduction/user_defined_dialogs.html) + + +
+ +
+ +
+
+

UnitDialogEventHandler — view / +download +

+ + +:Description: + This basic example demonstrates how to use an event handler on a script dialog to set the unit to multiple widgets. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/python_api_introduction/user_defined_dialogs.html#unit-widget) + + +
+ +
+ +
+
+

ExplorerSelectedElementsInDialog — view / +download +

+ + +:Description: + This example shows how to get a list of elements selected in the element explorer and use it in a script dialog. + +:Example Projects: + [zeiss_part_test_project](#example-projects) + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/python_api_introduction/user_defined_dialogs.html#selection-element-widget) + + +
+ +
+ + + + +## misc — Miscellaneous + +
+
+

CSVExample — view / +download +

+ + +:Description: + This example demonstrates how to read and write CSV files (comma separated values) from an App. + +:Example Projects: + [zeiss_part_test_project](#example-projects) + + +
+ +
+ +
+
+

DialogReopenExample — view / +download +

+ + +:Description: + This examples demonstrates, how a dialog can be closed from its own handler, just to be opened again. + +:References: + [HowTo]( https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/python_api_introduction/user_defined_dialogs.html#executing-dialogs) + + +
+ +
+ +
+
+

PointPixelTransformations — view / +download +

+ + +:Description: + This example demonstrates how to find the 2D pixel coordinates of a 3D point coordinate and vice versa. + +:Example Projects: + [zeiss_part_test_measurement](#example-projects) + +:References: + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/python_api.html#gom-api-imaging) + + +
+ +
+ + +## projects — ZEISS INSPECT projects + +
+
+

ExampleProjects — view / +download +

+ + +:Description: + ZEISS INSPECT Example Projects + + +
+ +
+ + +## script_icons — How to set icons for scripts or buttons + +
+
+

ScriptIcon — view / +download +

+ + +:Description: + This example shows how an icon can be set to a script, whereas the icon itself resides in the App as a resource. + + +
+ +
+ + +## script_resources — How to access binary data of your App (resources) + +
+
+

ScriptResources — view / +download +

+ + +:Description: + A simple example showing the usage of script resources. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/python_api_introduction/using_script_resources.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/resource_api.html) + + +
+ +
+ + +## scripted_actuals — Building custom actual elements with Python code + +
+
+

ScriptedActualVolume — view / +download +

+ + +:Description: + This is an example for a scripted actual ‘volume’ element. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#volume) + +:Tags: + ![Static Badge](https://img.shields.io/badge/xray-blue) + +
+ +
+ +
+
+

ScriptedElementProgress — view / +download +

+ + +:Description: + This examples demonstrates how to show progress information to the user while calcualting a scripted element. + + +
+ +
+ +
+
+

ScriptedActualCircle — view / +download +

+ + +:Description: + This is an example for a scripted actual ‘circle’ element. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#circle) + + +
+ +
+ +
+
+

ScriptedActualCone — view / +download +

+ + +:Description: + This is an example for a scripted actual ‘cone’ element. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#cone) + + +
+ +
+ +
+
+

ScriptedActualDistance — view / +download +

+ + +:Description: + This is an example for a scripted actual ‘distance’ element. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#distance) + + +
+ +
+ +
+
+

ScriptedActualSection — view / +download +

+ + +:Description: + This is an example for a scripted actual ‘section’ element. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#section) + + +
+ +
+ +
+
+

ScriptedActualPoint — view / +download +

+ + +:Description: + These are two examples for scripted actual points, which serve as an introduction to the concept of scripted actual elements. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#point) + + +
+ +
+ +
+
+

ScriptedActualVolumeDefects — view / +download +

+ + +:Description: + This is an example for a scripted actual ‘volume defects’ element. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#volume-defects) + +:Tags: + ![Static Badge](https://img.shields.io/badge/xray-blue) + +
+ +
+ +
+
+

ScriptedActualVolumeRegion — view / +download +

+ + +:Description: + This is an example for a scripted actual ‘volume region’ element. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#volume-region) + +:Tags: + ![Static Badge](https://img.shields.io/badge/xray-blue) + +
+ +
+ +
+
+

ScriptedActualCurve — view / +download +

+ + +:Description: + This is an example for a scripted actual ‘curve’ element. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#curve) + + +
+ +
+ +
+
+

ScriptedActualSurface — view / +download +

+ + +:Description: + This is an example for a scripted actual ‘surface’ element. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#surface) + + +
+ +
+ +
+
+

ScriptedActualCylinder — view / +download +

+ + +:Description: + This is an example for a scripted actual ‘cylinder’ element. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#cylinder) + + +
+ +
+ +
+
+

ScriptedActualPointCloud — view / +download +

+ + +:Description: + This is an example for a scripted actual ‘point cloud’ element. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#point-cloud) + + +
+ +
+ +
+
+

ScriptedActualVolumeSection — view / +download +

+ + +:Description: + This is an example for a scripted actual ‘volume section’ element. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#volume-section) + +:Tags: + ![Static Badge](https://img.shields.io/badge/xray-blue) + +
+ +
+ +
+
+

ScriptedActualSurfaceCurve — view / +download +

+ + +:Description: + This is an example for a scripted actual ‘surface curve’ element. + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#surface-curve) + + +
+ +
+ +
+
+

TrimeshDeformMesh — view / +download +

+ + +:Description: + This example demonstrates how to generate a custom surface element using a scripted element. The example script accesses mesh information from an existing mesh in the project and adds a random deformation to each point. + +:Example Projects: + [zeiss_part_test_project](#example-projects) + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_actuals.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#surface) + +:Tags: + ![Static Badge](https://img.shields.io/badge/surface-blue) ![Static Badge](https://img.shields.io/badge/scripted--actual-blue) + +
+ +
+ + +## scripted_checks — Building custom checks with Python code + +
+
+

ScriptedSurfaceCheck — view / +download +

+ + +:Description: + This example demonstrates how to create a scalar surface check by a script. Also, the usage of custom coordinate systems and element preview in scripted checks is shown. + +:Example Projects: + [zeiss_part_test_project](#example-projects) + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_checks.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#scalar-surface) + +:Tags: + ![Static Badge](https://img.shields.io/badge/scripted--check-blue) ![Static Badge](https://img.shields.io/badge/surface-blue) + +
+ +
+ +
+
+

ScriptedScalarCheck — view / +download +

+ + +:Description: + This example shows how to create a scalar check by script. A scalar check is the most basic check, as it assigns a scalar value to an element. Nearly all elements you can find in the software can be checked like this. + +:Example Projects: + [zeiss_part_test_project](#example-projects) + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_checks.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#scalar) + +:Tags: + ![Static Badge](https://img.shields.io/badge/scripted--check-blue) ![Static Badge](https://img.shields.io/badge/scalar-blue) + +
+ +
+ +
+
+

ScriptedCurveCheck — view / +download +

+ + +:Description: + This example demonstrates how to create a scalar curve check by a script. Also, the usage of custom coordinate systems in scripted checks is shown. + +:Example Projects: + [zeiss_part_test_project](#example-projects) + +:References: + [HowTo](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/howtos/scripted_elements/scripted_checks.html) + [API](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/python_api/scripted_elements_api.html#scalar-curve) + +:Tags: + ![Static Badge](https://img.shields.io/badge/scripted--check-blue) ![Static Badge](https://img.shields.io/badge/curve-blue) + +
+ +
+ + +## Example projects + +* zeiss_part_test_project +* zeiss_part_test_measurement +* volume_test_project + +[Download Example Projects App](https://software-store.zeiss.com/products/apps/ExampleProjects) + +## Tag Index + +### ![Static Badge](https://img.shields.io/badge/curve-blue) + +* ScriptedCurveCheck + + +### ![Static Badge](https://img.shields.io/badge/scalar-blue) + +* ScriptedScalarCheck + + +### ![Static Badge](https://img.shields.io/badge/scripted--actual-blue) + +* TrimeshDeformMesh + + +### ![Static Badge](https://img.shields.io/badge/scripted--check-blue) + +* ScriptedCurveCheck +* ScriptedScalarCheck +* ScriptedSurfaceCheck + + +### ![Static Badge](https://img.shields.io/badge/surface-blue) + +* ScriptedSurfaceCheck +* TrimeshDeformMesh + + +### ![Static Badge](https://img.shields.io/badge/xray-blue) + +* ScriptedActualVolume +* ScriptedActualVolumeDefects +* ScriptedActualVolumeRegion +* ScriptedActualVolumeSection + + +## Related + +* [ZEISS IQS GitHub — App Development Documentation](https://zeissiqs.github.io/zeiss-inspect-addon-api/2025/index.html) +* [ZEISS Quality Software Store](https://software-store.zeiss.com) +