-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Part of the feature edge #1429
Comments
Hello, we have manual edge selector tool. Finding this edge automaticaly may be challenging and require some geometry specific code, I don't think it can be done in common case. UndirectedEdgeBitSet creaseEdges = mesh.findCreaseEdges( 15.0f/180.0f * PI_F ); // 15 deg like on your screen
UndirectedEdgeBitSet resEdges = creaseEdges;
for ( auto ue : creaseEdges )
{
if ( !doesMeetCriteria( mesh, creaseEdges, ue ) )
resEdges.set( ue, false );
} In your case it can be bool doesMeetCriteria( const Mesh& m, const UndirectedEdgeBitSet& creases , UndirectedEdgeId ue )
{
auto lengthSq = mesh.lengthSq( ue );
for ( auto e : orgRing( mesh.topology, EdgeId( ue ) ) ) // check length of nearby creases (around one of the edge vertices)
{
if ( !creases.test( e.undirected() ) )
continue;
if ( mesh.lengthSq( e.undirected() ) >= lengthSq )
return false;
}
for ( auto e : orgRing( mesh.topology, EdgeId( ue ).sym() ) ) // check length of nearby creases (around another one of the edge vertices)
{
if ( !creases.test( e.undirected() ) )
continue;
if ( mesh.lengthSq( e.undirected() ) >= lengthSq )
return false;
}
return true;
} This code sample select first all creases edges like on your screen, than it removes all creases with neighbour creases that are longer then them. ( it have not tested this code, it may require fixes, but the idea is to make good criteria based on your specific data ) |
Thanks a lot.That's a good way to mention it, I'll try it again |
I found that there is a global search for feature edges in the software.But if I want to find a local segment of a line.What should I do better?
For example, the cyan edge has two tangent lines at both ends.
How should I find out the local characteristic edge out
The text was updated successfully, but these errors were encountered: