A computer-implemented method for segmenting a discrete 3D model representing a mechanical part, the method comprising: - obtaining the discrete 3D model; and - applying a hierarchical segmentation to the discrete 3D model, the hierarchical segmentation comprising: ∘ a first segmentation which comprises identifying, among elements of the discrete 3D model, first segments each corresponding to a primitive exhibiting at least one slippable motion; then ∘ a second segmentation which comprises identifying, among non-identified elements of the discrete 3D model, second segments each corresponding to a surface produced by a CAD feature; and then ∘ a third segmentation which comprises identifying, among non-identified elements of the discrete 3D model, third segments each corresponding to a free-form surface of the discrete 3D model, wherein the method comprises obtaining a predetermined set of CAD features, and in the second segmentation: - the identifying comprises exploring and merging neighboring non-identified elements of the discrete 3D model according to an increasing distance order that is based on one or more respective feature distances quantifying shape similarity between a pair of CAD feature geometric surface portions; - discarding each surface represented by a cluster of elements resulting from the merging and for which each fitting of a CAD feature to the surface results in a fitting error larger than a predefined fitting threshold, wherein the one or more feature distances consist in one feature distance penalizing mean curvature discrepancy between surfaces and/or penalizing irregularity of merged surfaces, wherein the one feature distance is of the type: d N 1 N 2 = k max ̄ N 1 − k max ̄ N 2 2 ∗ d shape factor N 1 N 2 if mean k max ̄ N 1 k max ̄ N 2 2 < ε k max ̄ N 1 − k max ̄ N 2 2 mean k max ̄ N 1 2 k max ̄ N 2 2 ∗ d shape factor N 1 N 2 else where N 1 and N 2 represent neighboring surfaces, k ̄ max j represents a mean maximal curvature of N j, and where: d shape factor N 1 N 2 = 1 + max i ∈ 1 2 P N 1 ∪ N 2 A N 1 ∪ N 2 − P Ni A N i R + min A N i αA N i ̄ 1 2, where P N represents the perimeter of N, A N the area of N,... R + a clamping to R +, N l a node ∈ { N 1, N 2} which is not N i, and α a hyper-parameter defining a reduced impact of a small surface, ε being a parameter. - obtaining the discrete 3D model; and - applying a hierarchical segmentation to the discrete 3D model, the hierarchical segmentation comprising: ∘ a first segmentation which comprises identifying, among elements of the discrete 3D model, first segments each corresponding to a primitive exhibiting at least one slippable motion; then ∘ a second segmentation which comprises identifying, among non-identified elements of the discrete 3D model, second segments each corresponding to a surface produced by a CAD feature; and then ∘ a third segmentation which comprises identifying, among non-identified elements of the discrete 3D model, third segments each corresponding to a free-form surface of the discrete 3D model, ∘ a first segmentation which comprises identifying, among elements of the discrete 3D model, first segments each corresponding to a primitive exhibiting at least one slippable motion; then ∘ a second segmentation which comprises identifying, among non-identified elements of the discrete 3D model, second segments each corresponding to a surface produced by a CAD feature; and then ∘ a third segmentation which comprises identifying, among non-identified elements of the discrete 3D model, third segments each corresponding to a free-form surface of the discrete 3D model, wherein the method comprises obtaining a predetermined set of CAD features, and in the second segmentation: - the identifying comprises exploring and merging neighboring non-identified elements of the discrete 3D model according to an increasing distance order that is based on one or more respective feature distances quantifying shape similarity between a pair of CAD feature geometric surface portions; - discarding each surface represented by a cluster of elements resulting from the merging and for which each fitting of a CAD feature to the surface results in a fitting error larger than a predefined fitting threshold, - the identifying comprises exploring and merging neighboring non-identified elements of the discrete 3D model according to an increasing distance order that is based on one or more respective feature distances quantifying shape similarity between a pair of CAD feature geometric surface portions; - discarding each surface represented by a cluster of elements resulting from the merging and for which each fitting of a CAD feature to the surface results in a fitting error larger than a predefined fitting threshold, wherein the one or more feature distances consist in one feature distance penalizing mean curvature discrepancy between surfaces and/or penalizing irregularity of merged surfaces, wherein the one feature distance is of the type: d N 1 N 2 = k max ̄ N 1 − k max ̄ N 2 2 ∗ d shape factor N 1 N 2 if mean k max ̄ N 1 k max ̄ N 2 2 < ε k max ̄ N 1 − k max ̄ N 2 2 mean k max ̄ N 1 2 k max ̄ N 2 2 ∗ d shape factor N 1 N 2 else where N 1 and N 2 represent neighboring surfaces, k ̄ max j represents a mean maximal curvature of N j, and where: d shape factor N 1 N 2 = 1 + max i ∈ 1 2 P N 1 ∪ N 2 A N 1 ∪ N 2 − P Ni A N i R + min A N i αA N i ̄ 1 2, where P N represents the perimeter of N, A N the area of N,... R + a clamping to R +, N l a node ∈ { N 1, N 2} which is not N i, and α a hyper-parameter defining a reduced impact of a small surface, ε being a parameter.