Script for select only Mergeable edges

 From:  Michael Gibson
7914.2 In reply to 7914.1 
Hi Marco, I'm not sure that there is a good way for a script to do that currently.

The way the merge command works internally is that it actually processes things at a vertex level, a vertex is part of the topological structure of a brep but currently the brep vertices (the topological brep vertex structure, not the control points of a spline or surface which is a different type of vertex) are not exposed to be accessible by script.

The criteria for determining whether 2 edges are mergeable is if they share a removable vertex, and a removable vertex is defined by this process:

- Must be a vertex with exactly 2 edges coming off of it.

- If either of the 2 edges is closed the vertex is not removable.

- Both edges must be either seam edges or non-seam edges, not a mix.

- The end tangents of the edge curves must be colinear (G1 continuity).

- The vertex must not be at a singularity such as the pole of a sphere.


Currently several of these steps that you would need to know are not exposed in the script interface for scripts to access so I don't think there is any way to make an accurate "mergeable edge detector" in script right now, more stuff would need to be added to the script interface to be able to do that.

- Michael