Jump to content

how to edit mesh with python


---
 Share

Recommended Posts

Hi, 

as far as I know we have no "single vertex/triangle" modification commands. The only thing you can "do" is to write an own e.g. STL export in python and during exporting you could modify these vertices, but that's a rather difficult approach. Or you export your mesh, execute the modification of this mesh in a different "program" and last but not least export it from this program and import it back into our software.

Could I ask which kind of application you like to realize?

Regards,

Bernd

 

Link to comment
Share on other sites

Hi Bernd, it has been years I think!

So I have two applications in mind.  For context, I work pretty much exclusively with injection molded plastic parts. We scan samples and check various tolerances, GD&T, all the dimensional specifications, etc.  Usually automotive plastic.

 

First application:  Every once in a while we would like to CNC machine into the injection mold steel some compensation for a critical shape.  As an example, think of a flat mating surface that needs to be extra flat, and we would like to compensate for the warp and shrink of the plastic by carefully modifying the mold surface.  In such a case, one would like to have available a kind of 3d "inverse" of the surface comparison on CAD that GOM Inspect provides.  Each point of the CAD mesh would be moved proportionally opposite of the deviation provided by the color plot.  This inverted comparison can then be exported and used as a reference to modify the 3d CAD geometry that the CNC CAM software utilizes to machine the mold steel.

 

Second application:  On a touch probe CMM, sometimes you will see someone apply tape to a part feature in an effort to simulate a corrective adjustment.  Likewise, I'm often asked to simulate various "what ifs" by modifying the scan mesh and running the modified mesh back through GOM Inspect.  As an example, think of something like a post or hole.  One may need to move the post to correct a specification that is out of tolerance.  However, there are often other dimensions that rely on the location of the post.  It's not always obvious if the strategy for solving one issue will create other problems for other dimensions.  People would like to test out a possible correction virtually by shifting or offsetting features on the part scan, before attempting them in real life.

Link to comment
Share on other sites

Hi,

I'd like to refer you to this documentation:
https://zeissiqs.github.io/gom-software-python-api/2022/python_examples/scripted_actuals/trimesh_deform_mesh.html

In this example a mesh is edited/modified with python and the result is passed back to the software.

Best regards,
Jascha

Link to comment
Share on other sites

 Share

×
×
  • Create New...