How to use "find-isomorphisms" command?

Winson

Looking around for some CAD
Hello,
I want to test the Tcl command "find-isomorphisms", but I don't know how to input the right parameters <varShape>.
Whether the pre-operation is required to obtain <varShape>?
Looking forward to reply! Thanks!
 

Quaoar

Administrator
Staff member
Hello @Winson and welcome to the forum.

Select faces, right-click, then "set as variable" will give you a pattern to match.

I would be grateful to hear about your thoughts on this algorithm, if you happen to have any.
 

Attachments

  • isomorphisms.gif
    isomorphisms.gif
    4.8 MB · Views: 6

Winson

Looking around for some CAD
After "set as variable", how to save the model data for reuse?
I used "Part->Save to->BREP" or "select variable -> right-click ->Save to BREP", but it didn't work, the model's shape is empty.
 

Quaoar

Administrator
Staff member
Might it be that after loading a BREP file you have the visibility checkbox for a part turned off?
 

Attachments

  • save-pattern.gif
    save-pattern.gif
    3.5 MB · Views: 4

Winson

Looking around for some CAD
Hello, Quaoar,
I've been learning the code for "asiAlgo_Isomorphism" recently.
The code "Eigen::MatrixXd M_next = MM" in the "asiAlgo_Isomorphism::recurse" function, it seems to make no sense, why copy MM to M_next?
After "this->recure()" completed in the for loop, Why reset the "M_next" modifications done on the matrix M, instead of MM?
 

Quaoar

Administrator
Staff member
@Winson you're asking hard questions that would require quite some hours of debugging to remember what this all was about :)

Code:
Eigen::MatrixXd M_next = MM;

This is clearly to make a copy of the matrix to modify it in the loop below. You may want to read Sec. 2.2 in our paper to get some more insight on what's going on, but this should be Ullman's algorithm for graph matching. You will find some references in the paper (including this very useful web-page).

Also, any modification to the code can be verified with unit tests implemented in asiTest executable. You can introduce your modifications in the code and check if the tests are passing or not.

Some more notes can be found here: https://quaoar.su/blog/page/subgraph-isomorphism-for-feature-recognition (use translator).
 
Top