delete_3d :all_at_top complete create_workplane :new complete ;; create cylinder 2dCopilot :circle_mode :real_geometry 0,0 50 extrude :sel_part "/body1" :keep_profile :no :direction :+W :type :DISTANCE_TYPE :distance 40 complete ;; create block 2dCopilot :rectangle_mode :real_geometry -30,-30 30,30 extrude :sel_part "/body2" :keep_profile :no :direction :+W :type :DISTANCE_TYPE :distance 20 complete ;; rotate block and subtract from cylinder X times (setq rot-angle 1) ; in degree (setq rot-steps 90) (setq a-name (format nil "subtools_~a" (random 65535))) ;(setq rot-angle 5 rot-steps 18) create_assembly :owner "/" :name a-name complete (trace create_multiple_pa_radial subtract_3d) (setq a-name (format nil "/~a" a-name)) (create_multiple_pa_radial :share :source "/body2" :owner a-name :count rot-steps :axis :z :angle_increment rot-angle );complete (subtract_3d :blanks "/body1" :tools :in_assembly a-name :keep_tool :no );complete (untrace create_multiple_pa_radial subtract_3d) (delete_3d a-name) ;; another idea: ;; a) unite all shares within the assembly to ONE subpart ;; b) do the subtract_3d with just that ONE subpart