Hole mates detection

Beta
Beta New Altair Community Member
edited October 2020 in Community Q&A

hi,

 

I am trying to write a hole mates detection tool.

 

Below is the main code I used

 hm_holedetectioninit *createmark elems 1 'displayed' hm_holedetectionsetentities elems 1 hm_holedetectionsetholeparams hole_shape=31 hm_holedetectionfindholes 1 hm_holedetectionfindmates max_distance=10 hm_holedetectiongetmatedetails 1

As you can see, I used option 'max_distance' to limit the maximum distance between holes in a mate to be found. The code run without any issue. 

 

The problem is the returned result includes hole mates with the distance > 10. Even when I tried to translate the mesh to make the distance much greater, the program still returned that hole mate.

<?xml version="1.0" encoding="UTF-8"?>image.thumb.png.cbf16ed619eaaa3b85d4fbcdb5c88031.png

The left hole mate has distance=40, the right one has distance=10. Both are identified as hole mates with option max_distance=10

 

Am I doing anything wrong code??. Appreciate your help!

Answers

  • tinh
    tinh Altair Community Member
    edited December 2018

    Maybe... bug

    But it is not a problem because you just ignore mates that > 10 easily by a loop

  • Beta
    Beta New Altair Community Member
    edited December 2018

    hi Tinh,

     

    That's easy if hole mates contain only two holes. In my case, the number of hole in each mate may vary up to 4. The returned information of hole mates only contains the max distance of the mates. 

     

    Still true that the task still can be done by getting the center of holes information, but that means too many things in a loop. besides, the number of mates may be up to 100.

     

     So I am trying to find the best solution for this

  • tinh
    tinh Altair Community Member
    edited December 2018

    Did you ask altair?

    Or did you try other parameters?

    I am not sure which paramaters can affect this result.

     

  • Beta
    Beta New Altair Community Member
    edited January 2019

    hi Tinh,

     

    I tried several parameters but none of them affect the distance during the hole detection.

     

     

    I used another method by adding some mathematical algorithm, but it is a relative solution. I think there must be some issue with the command. I will ask Altair about this

     

  • tinh
    tinh Altair Community Member
    edited January 2019

    Hope they responses you soon, let us know until that.

     

    But I think while waiting for them, it is worth to eliminate the bug by additional codes. I have to detect holes by free edges of 2d and features of 3d mesh from hm9, it is not so complicated.

    hm_holedetection just appeared in v14, not supprise if it is not perfect.

  • brahmadev
    brahmadev Altair Community Member
    edited February 2019

    Hope they responses you soon, let us know until that.

     

    But I think while waiting for them, it is worth to eliminate the bug by additional codes. I have to detect holes by free edges of 2d and features of 3d mesh from hm9, it is not so complicated.

    hm_holedetection just appeared in v14, not supprise if it is not perfect.

    Hey tinh !

    can you share your script for finding the holes in hm9 ?