Jump to content

Determining polygonization state of mesh via scripting?


Recommended Posts


I am looking for an updated way to determine whether a mesh has been fully polygonized via python scripting. Several of my scripts use this as a failsafe feature to prevent a script from creating comparisons or other measurements on a raw data series or preliminary mesh. Back in ATOS V8, I would simply check the length of the "object family, mesh" explorer element and if the length was zero, indicating no mesh present, select and polygonize all scan data before proceeding with creating comparisons and exports. However the new preliminary mesh feature is creating a bit of a wrinkle in that logic as the explorer category includes preliminary meshes, and proceeds to analyze and export with the low resolution data. Is there an attribute in the mesh object or some other item i can access via python that will indicate whether a mesh is in the preliminary state, or has been fully polygonized (to "less details" for example)? The only solution I have found so far is to query the comment attribute and search it for the phrase "Low resolution" as shown in the code snippet below, but it seems like there should be a cleaner way to access the current state of the mesh.

if 'Low resolution' in gom.app.project.parts['Part'].actual.comment:
	print('preliminary mesh')


Michael Henson

Link to comment
Share on other sites


  • Create New...