Hello,
As mentionned in the title, I'm looking help or idea ( @kukelyk , @rafael.sansao ? ) to improve the macro I'm using to transform automaticaly a STEP geometry into tool and holder in PMILL.
The joined file OK.mp4 demonstrate the use of these macro associated with MachiningCloud.
It works fine , but when the profil of the tool or the holder includes a hole the macro failed. ( Video Ko.mp4)
Any Idea will be welcome.
Solved! Go to Solution.
Solved by 5axes. Go to Solution.
Solved by rafael.sansao. Go to Solution.
You need to delete the small segments of the pattern -> points.
Add this code after 'CURVEEDITOR FINISH ACCEPT':
EDIT PATTERN $NPattern SPLIT EDIT PATTERN $NPattern DESELECT ALL IF $Powermill.Units == 'metric' { EDIT PATTERN $NPattern SELECT LENGTH LT '.01' } ELSE { EDIT PATTERN $NPattern SELECT LENGTH LT '.0004' } DELETE PATTERN $NPattern SELECTED EDIT PATTERN $NPattern SELECT ALL EDIT PATTERN $NPattern MERGE EDIT PATTERN $NPattern DESELECT ALL
Let me know if it worked.
Rafael Sansão
Thanks a lot @rafael.sansao for this suggestion. But small segment are not the origin of this problem.
It's really when we have a closed profile that the shank creation failed :
I have tested something like :
EDIT PATTERN $NPattern CURVEEDITOR START CURVEEDITOR SELECT CLOSED CURVEEDITOR MODE SEGMENT_BREAK CURVEEDITOR BREAK_SEG "3" CURVEEDITOR MODE DEFAULT CURVEEDITOR DELETE SELECTED CURVEEDITOR FINISH ACCEPT YES
To remove one third of the profile .. But unfortunatly sometimes the macro doesn't remove the right segment. So I'm looking for a smart solution to obtain from a closed profile an open one, like in the following example:
Closed profile is not the problem. Check this in the attached project.
I have set the tolerance manually to achieve the expected result (it will not work well in a macro ).
Can you close the holes using Capping Surfaces before using SPUN_PROFILE (by macro)? The result will be what you want.
Rafael Sansão
Using Capping Surfaces looks like a good solution.. Not so easy to implement but I will try on that way.
Not so easy finally .. But step by step this macro is working better, on the good way.
Thanks for the Idea @rafael.sansao
Thanks a lot @kukelyk for your answer ... Not sure to fully understand your solution
I have improved my solution and I think I'm closed to the final goal. I'm using 2 new macros to manage holder assemblies : (Final.mp4)
I'm still looking for a solution to supress automaticaly the useless part of the cone on a complex Holder ( Last operations in the joined video) . An imagined solution was to detect the elements with the largest diameter and supress the upward element , but unfortunately in some cases this solution does not work (holding part bigger than conical part of the holder)
The macro must be run with an argument that is a model name.
So, you have 2 options:
Can't find what you're looking for? Ask the community or share your knowledge.