Dimension stone reserves contains intact rock and discontinuity network. The intersection between discontinuities forms rock blocks with various geometry. Determination of rock blocks geometry is required in order to economical evaluation of stone reserves. Beside, extraction of stone blocks are preform by cutting planes, and the optimization of cutting pattern leads to increasing quarrying efficiency and decreasing production of waste in quarries. This procedure result less environmental damages and more economical beneficiations. In this thesis, according to quarrying operational specifications, a numerical algorithm is selected and developed among various algorithms for in situ block identification. The advantages of the algorithms developed are the capability of modeling discontinuities with finite persistence and of taking the geometry of the block into consideration. The optimization approach is also developed to increase quarry productivity and to investigate quarrying direction at a large scale, while at a small scale, it is used for checking the distance between the cutting planes. According to the algorithms developed, 3D-QuarryOptimizer is programmed in the MATLAB environment to determine the geometry of the blocks and to optimize extraction based on the quality classification of the blocks formed. This methodology was applied in Bonyad Dehbid marble and Shafagh Natanz granite quarries. Research in the granite quarry showed that the program is a practical tool to determine the geometry of in situ blocks and the quality classification of blocks. The marble quarry was studied for the optimization phase. The large-scale optimization shows a maximum difference of 17% in the yield among several quarrying directions. At a small scale, an increase of 120% in quarry yield was achieved with the optimal interval between the cutting planes.