In this paper a new method of automatic design for the layout and sizing of the ejector pins of the plastic injection mold, based on the discrete geometry of the plastic part, is presented. The proposed algorithm consists of a first phase of geometric analysis in which a node mesh corresponding to the surfaces to be molded by the lower mold cavity is generated. Then the variations of the difference in thickness of the part for each pair of mesh nodes are evaluated, locating areas with varying thicknesses and resembling this geometric value at discrete nodes that are stored in arrays. Two sub-algorithms of discrete geometric recognition enable the location of the nodes which can be points of expulsion. Ejection points will correspond to those nodes which have a maximum in the parameter regarding concentration of nodes near walls, ribs, protrusions, etc. The dimensioning of the ejector pins is performed by an optimization algorithm with three objective functions, ensuring that the system of forces in the ejection of the part will be balanced. This new method improves on the methods used so far as it does not require heuristic methods to achieve the result and does not use the method of identifying features for the geometric recognition of the surface of the plastic part, avoiding the problems of dependency from the modeler and analysis of complex features. It takes the part in discrete format as input data, analyzing in this way the geometry externally, obtaining the advantage of the possibility of implementing the algorithm in any CAD modeler. The proposed algorithm is applicable to any geometry because it works regardless of the CAD system in which the piece has been designed. Finally, the system provides as a result the layout with the location and the diameter of the ejectors on the part while ensuring a suitable distribution of balance of ejection forces. The solution of the algorithm is shown superimposed on the part as a map of ejection. The results of the algorithm can be exported and stored for use in other applications and parametric injection mold CAD systems. A node mesh corresponding to the surfaces to be molded by the lower cavity is analyzed.The algorithm locates zones with varying thicknesses resembling this value at discrete nodes.A geometric recognition method places the ejection points close to rigid workpiece areas.Ejectors are dimensioned with optimization algorithms ensuring that the forces are balanced.Ejector design is performed on any system no other solid internal information is required.