🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Hole mates detection

User: "Beta"
New Altair Community Member
Updated by Beta

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!

Find more posts tagged with

Sort by:
1 - 6 of 61
    User: "tinh"
    Altair Community Member
    Updated by tinh

    Maybe... bug

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

    User: "Beta"
    New Altair Community Member
    OP
    Updated by Beta

    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

    User: "tinh"
    Altair Community Member
    Updated by tinh

    Did you ask altair?

    Or did you try other parameters?

    I am not sure which paramaters can affect this result.

     

    User: "Beta"
    New Altair Community Member
    OP
    Updated by Beta

    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

     

    User: "tinh"
    Altair Community Member
    Updated by tinh

    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.

    User: "brahmadev"
    Altair Community Member
    Updated by brahmadev

    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 ?