Hole mates detection
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"?>
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
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
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.
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 ?
Maybe... bug
But it is not a problem because you just ignore mates that > 10 easily by a loop