Preprint
Essay

This version is not peer-reviewed.

Research on a Product Family Morphological Constraint Generation Framework Based on Homologous Gene Theory and Shape Grammar

Submitted:

29 October 2026

Posted:

30 October 2026

You are already at the latest version

Abstract
To address the insufficient core feature inheritance, weak control of morphological variation, and limited quantitative evaluation in product-family form design, this study proposes a constraint-based generative framework that integrates homologous gene theory and shape grammar. Using handheld lithium-ion drills, homologous product genes are extracted from structural, functional, and visual features and classified into rigid conservation and flexible variation layers based on their effects on functional stability and brand recognition. The rigid layer constrains the topology and functional layout of the core components to preserve the operational logic and family identity. The flexible layer governs local morphological elements and supports differentiated derivation through shape grammar rules. Based on this framework, a shape grammar rule library for lithium-ion drills is established, and two-dimensional line-drawing schemes are generated. A model combining sequence similarity, topological conservation, functional relevance, and visual morphological similarity was constructed, and visual similarity was calculated using multi-algorithm fusion. The results showed that the homology index ranged from approximately 0.84 to 0.88, indicating that the generated schemes maintained high visual and homologous similarity to the original scheme. Overall, the proposed method enables morphological innovation while preserving core product-family genes, thus providing an evaluable approach to product-family styling design.
Keywords: 
;  ;  ;  

0. Introduction

With the continuous development of computer and information technologies, product design is increasingly evolving toward intelligence and human-centeredness. The increasing complexity of product structures has introduced new challenges in product iteration and renewal. Although artificial intelligence technologies have become increasingly mature and demonstrated strong generative capabilities in the design field, AI-enabled design practices are mainly reflected in the generation and expansion of innovative design alternatives. In contrast, product gene theory and shape grammar still possess distinctive theoretical value and methodological advantages, and design methods based on product genes and shape grammar can not only effectively maintain the stylistic features and morphological rules of product families but also provide strong traceability and controllability. These characteristics contribute to improving the systematicity, standardization, and interpretability of the product design process. Against the background of increasing technological homogenization, achieving continuous innovation while maintaining the inheritance of product styles has become an important issue for enterprises seeking to enhance product recognition and market competitiveness. Integrating recognizable product DNA into the design and development process can strengthen brand image and ensure the continuity of product family lineages, while also providing effective support for improving the comprehensive competitiveness of enterprises. In recent years, research on product genes has mainly developed along two directions: first, studies on the construction of product gene concepts and models; and second, studies on product gene extraction, recombination, and expression technologies (Hao et al., 2017). Li et al. proposed a product-gene-driven conceptual design method and improved the traditional function–behavior–structure model by introducing an attribute module, thereby developing the FBAS model (Li et al., 2020). Zhu et al. proposed a product-gene-based reverse assembly technology for molds in which product genes are used for reverse solving during the mold design stage, thereby ensuring the overall assembly quality of molds without mold modification (Zhu et al., 2013). Yixiong et al. investigated assembly scheme generation based on a gene model and verified the effectiveness of the proposed method (Yixiong et al., 2013). In a review, Sun Lun explained that product genes can be represented by constructing a complex network model of product forms in which product morphological genes serve as network nodes, and relationships among genes serve as connecting edges (Sun, 2019). Classical studies in the field of shape grammar were mainly conducted by Stiny, Knight, and others from the 1970s to the 2010s(Topaloglu, 2023). Shape grammar is a well-known formalism in generative design that is based on the recursive application of rules. Representative theoretical studies include Shape Grammars and the Generative Specification of Painting and Sculpture by Stiny and Gips in 1971; Palladian grammar by Stiny and Mitchell in 1978; Mughul Gardens grammar by Knight in 1990; and color grammar formalism by Knight in 1989 (Hong, 2021; Stiny & Gips, 1971). More recent studies, such as those by MacLachlan and Jowers, explored the application of shape grammar in multimaterial surface design based on the theoretical frameworks of Stiny in 1992 and Knight in 1990 (MacLachlan & Jowers, 2016). Tingting et al. compared the generative patterns of shape grammar and diffusion models. Their results showed that the patterns generated by shape grammar performed significantly better in terms of cultural meaning, whereas those generated by diffusion models exhibited a significantly higher level of innovation (Xiong & Wang, 2025).
To address these gaps, this study introduces the theoretical connotation of homologous genes from biology and constructs a research perspective of homologous product genes, aiming to reveal the inheritance, correlation, and evolutionary patterns of product family members in terms of morphological sequences, structural relationships, and functional attributes. The main innovations of this study are threefold. (1) Theoretical innovation: homologous product genes (HPGs) are defined as composite design features that simultaneously satisfy sequence similarity, structural conservation, and functional association, together with a formal identification criterion, thereby characterizing family inheritance at the morphological, structural, and functional levels rather than by appearance alone. (2) Methodological innovation: a rigid–flexible dual-layer constraint mechanism is established and realized through shape grammar, in which the rigid conservation layer locks the topology and functional layout of core components, while the flexible variation layer governs non-core elements through scaling, addition/deletion, substitution, mirroring, and fine-tuning operators, decoupling feature inheritance from morphological innovation at the operator level. (3) Evaluative innovation: a four-dimensional Homology Index (HI) model is proposed, integrating sequence similarity, topological conservation, functional relevance, and visual morphological similarity fused from SSIM, IoU, Tolerant IoU, Chamfer, ORB, Hu Moments, and Projection; its validity is supported by expert agreement (MAE ≈ 0.0241), weight-perturbation robustness testing (5,000 ± 20% perturbations), and stable results (HI ≈ 0.84–0.88, with topological conservation and functional relevance both reaching 1.0000).

1. Theory of Homologous Product Genes

1.1. Definition of Homologous Product Genes

Biological genes are DNA segments that carry hereditary information. Product gene theory is a theoretical approach that transfers the core ideas of biological genetics to the fields of product development and design innovation. Building on the existing concept of product genes, this study further introduces the biological concept of homologous genes and constructs a theory of homologous product genes to characterize the inheritance and correlations among product-family members in terms of morphological features, structural relationships, and functional attributes. The necessity of introducing the concept of homologous genes lies in the fact that, although existing product gene theory has systematically explained the conceptual boundaries, coding methods, and variation mechanisms of product genes, it has not yet sufficiently addressed the associative relationships, hierarchical differences, and variation constraints among product genes. Specifically, previous studies have mainly answered questions such as “what product genes are” and “how product genes can be extracted, encoded, and recombined” (Wang et al., 2022). However, a clear theoretical framework has not yet been established to explain whether inheritance, coupling, and constraint relationships exist among different gene units, genes that remain relatively stable during product evolution, or genes that may undergo substantial adaptive variation.
Consequently, the application of product gene methods in design practices is often focused on the extraction and recombination of explicit morphological features. These tend to remain superficial, such as the replacement of styling elements, local proportional adjustments, or changes in decorative features. Consequently, it is difficult to effectively reveal the structural logic, functional mechanisms, and genealogical relationships underlying the morphological continuity and intergenerational evolution of product families.
Homologous genes are a class of genes that originate from a common ancestral gene and are formed during evolution through vertical transmission, gene duplication, or species divergence. These genes are characterized by sequence similarity, structural conservation, and functional associations. According to their evolutionary origin, homologous genes can generally be classified into orthologous and paralogous genes. Orthologous genes are homologous genes found in different species, whereas paralogous genes are homologous genes within the same species (Lifschitz et al., 2022). Homologous genes are derived from a common ancestor that has diverged during evolution. This concept is based on evolutionary relationships and emphasizes the phylogenetic relatedness among genes, rather than merely their sequence similarity (Fernández et al., 2020).
Homologous product genes are not single geometric features but rather composite design features formed by sequence similarity, structural conservation, and functional association. Sequence similarity is reflected primarily in the repeated occurrence of product contours, local components, and morphological elements within a product family. Structural conservation is manifested in the stable continuity of topological relationships, assembly positions, and proportional relationships among key components. Functional association is reflected in the correspondence between morphological features and user operations, functional realization, and brand recognition.
Homologous genes are generally characterized by three fundamental features: sequence similarity, structural conservation, and functional association. By transferring these features to product gene theory, the concept of homologous product genes (HPGs) can be proposed and defined.
Homologous product genes refer to product genes that originate from a common “design ancestor” within the same product family or brand lineage, carry core hereditary design information, and exhibit sequence similarity, structural conservation, and functional association in terms of morphological sequences, structural relationships, and functional attributes. They not only determine the morphological similarity and stylistic continuity among product family members but also allow adaptive variation within certain constraints, thereby supporting iterative product renewal and continuous evolution.
Specifically, the sequence similarity of product genes refers to a high degree of consistency or similarity among product family members in the order of arrangement, constituent fragments, and combinational logic of morphological gene units, structural modules, and styling elements. Structural conservation refers to the relative stability of the morphological skeleton, key structural modules, and spatial topological relationships that undertake core functions during brand differentiation and intergenerational evolution; differences are mainly reflected in non-core appearance details, decorative forms, or local features. Functional association refers to the fact that, even when product genes derived from the same prototype undergo variations in morphological and structural details during product iterations and brand differentiation, their core service functions, operating mechanisms, and overall functional attributes remain highly related and unified without undergoing essential changes.
In summary, mathematical relationships for homologous product genes can be formulated according to their identification requirements. Assuming that the morphological genes P1 and P2 are homologous, the following conditions should be satisfied:
                                 P 1 ∩ P 2 ≥ 1 F P 1 = F P 2 Topo P 1 = Topo P 2                                 (1-1)
In this expression,|P1 ∩ P2| ≥ 1denotes sequence similarity, indicating that the two products share at least one homologous gene. F(P1) = F(P2) represents a functional association, indicating that the functions of these two genes remain unchanged. Topo(P1) = Topo(P2) indicates topological conservation, suggesting that the topological structures of the two genes remain consistent. Therefore, when the morphological genes P1and P2satisfy sequence similarity, functional consistency, and topological conservation, they can be identified as homologous product genes.

1.2. Construction of the Dual-Layer Constraint Mechanism

Based on homologous gene theory, this study classified the product genes of electric drills into rigid and flexible variation layers. The rigid conservation layer consists of core homologous genes, including the main body framework of the electric drill, topological relationship between the drill head and handle, relative assembly position of the trigger, basic structure and functional modules of the battery pack, and brand logo. These genes directly determine the basic usage mode, functional logic, and family identity of a product. Therefore, disruptive transformations are not allowed during shape grammar derivation; only minor adjustments are permitted within the threshold ranges required by ergonomics and structural assembly. The flexible variation layer mainly includes non-core morphological genes, such as handle curvature, drill-head chamfers, ventilation-hole forms, anti-slip textures, and local decorative lines. These genes do not affect the main topological structure or core functional relationships of the product. Therefore, iterative derivation of the product family can be achieved through shape grammar rules such as scaling, addition and deletion, replacement, mirroring, fine adjustment, and texture recombination. The homology-driven constraint generation mechanism for product-family forms comprises two layers of constraints. The rigid conservation layer ensures morphological consistency and brand identity within the product family, whereas the flexible variation layer supports innovation and adaptability in the product-family evolution.
Table 1. Constraint mechanism.
Table 1. Constraint mechanism.
Layer Gene Type Specific Genes Mathematical Variable Constrained Expression Grammar Rules
rigid conservation layer Topological Relation Genes Arrangement Sequence of the Machine Head, Body, Grip, Battery Gtopo,Atopo,
S seq R P
Gtopo(P')Gtopo(P0)
S seq R ( P ' ) = S seq R (P0)
None
rigid conservation layer Energy Module Genes The battery pack is located at the bottom of the grip pbat, p hd bottom p hd bottom − p bat ≤ ε bat None
flexible variation layer Handle Genes Grip Curvature, Body Surface, and Grip Texture Φgrip Φ grip min ≤ Φ grip ≤ Φ grip max Curvature Adjustment and Scaling
flexible variation layer Detail Genes Chamfers and Transition Lines Φdetail Φ detail min ≤ Φ detail ≤ Φ detail max Contour Adjustment
flexible variation layer Functional Decorative Genes Air Inlet and Air Outlet Φfunc−dec Φ func − dec min ≤ Φ func − dec ≤ Φ func − dec max Add, Delete, and Copy

1.3. Computational Model Definition

The Homology Index (HI) is a comprehensive metric used to quantify the degree of homology between two product schemes within the same product family or brand lineage. It reflects not only the similarity of exterior line drawings, but also the inheritance of core structures, topological relationships, functional layouts, and brand identification features. Specifically, the HI consists of four parameters: sequence similarity, topological conservation, functional association, and visual morphological similarity, as shown in Table 2.
Thus, the Homology Index (HI) can be formulated as follows:
                                         HI = 0.25 S seq + 0.25 S topo + 0.25 S func + 0.25 S vis                                         (1-2)
Sequence similarity Sseq is used to evaluate whether the ordering of gene units in the two schemes was consistent. The product must first be decomposed into sequences of gene units. For product P, if P consists of n ordered gene units G, then:
                                         S seq P = G 1 , G 2 , G 3 , … G n                                         (1-3)
The sequence similarity of the two product schemes Pi and Pj can be defined as follows:
                                         S seq P i , P j = 2 LCS P i , P j S seq P i + S seq P j                                         (1-4)
This formula shows that sequence similarity is calculated as twice the number of common gene units shared by Pi and Pi, divided by the sum of the total number of gene units in Pi and Pj.
To compute the topological conservation score, Stopo,the electric drill is modeled as a graph structure in which each node represents a component. Let V denote the set of components and E denote the set of intercomponent connections.
V={drill head,main body,trigger,left and right levers,handle,battery pack},
E={(drill head,main body),(main body,handle),(left and right levers,main body),(trigger,handle)}.
The Jaccard similarity coefficient was used to quantify topological conservation. The topological conservation score Stopo was calculated as the cardinality of the intersection of the edge sets of the original and new schemes divided by the cardinality of their union:
                                         S topo = E i ∩ E j E i ∪ E j                                         (1-5)
where Ei and Ej represent the edge sets of the original and the new schemes, respectively. A higher value of Stopo indicates a higher degree of preservation of the original topological relationships.
The functional association score Sfunc is calculated in the same manner using the Jaccard similarity coefficient. First, a functional set is constructed as follows:
Func(P)={drilling operation,gripping support,rotation direction control,trigger control,Battery-powered,Heat Dissipation and Ventilation}
                                         S func = Func P i ∩ Func P j Func P i ∪ Func P j                                         (1-6)

2. Controlled Generation Framework Based on Shape Grammar

2.1. Shape Grammar Theory

Shape grammar is a formal theoretical framework for analyzing and generating complex geometric forms. It consists of three core elements: “vocabulary,” “rules,” and “derivation” (Kunkhet, 2015). The theory was first proposed by George Stiny and James Gips in 1972, with the aim of providing an interdisciplinary method for form design (Knight, 2015). Its basic principle is as follows: a set of basic shape elements is first defined; then, through a set of shape transformation rules and according to specific grammatical logic, shape replacement and combination are recursively performed from an initial shape, ultimately generating new complex forms (Zamenopoulos, 2012).
The core mechanism of shape grammar is to regard shapes as symbolic sequences composed of a series of basic elements and transformation rules and to create complex shape structures through a combination of these rules. Shape grammar rules are generally divided into two categories: generative rules, used to create new shapes, and modificative rules, used to adjust existing shapes. Common transformation rules include substitution, addition and deletion, scaling, mirroring, rotation, duplication, and coordinate fine-tuning.
Based on the inheritance, variation, recombination, addition, and deletion characteristics of homologous product genes, we constructed a standardized shape grammar rule library tailored for lithium-ion drill products. Driven by the core homologous gene units of electric drills, the rule library constrains the logic of form generation through fixed grammatical operators, enabling the batch generation of multiple compliant drill forms, including household, lightweight, industrial heavy-duty, and trendy-minimalist variants. It also ensures the consistency of the product’s functional topology and the continuity of brand family characteristics.

2.2. Generation Workflow

Figure 1. Core framework.
Figure 1. Core framework.
Preprints 241146 g001

3. Case Study: Morphological Derivation of a Handheld Cordless Drill

3.1. Morphological Genetic Analysis of the DeWalt Handheld Drill

This study used DeWalt handheld cordless drills as a research case and collected multiple drill product samples from the brand. Based on the theory of homologous genes, the core design genes of the drill were extracted in terms of morphological contours, grip structures, functional layouts, and brand characteristics. By comparing the patterns of inheritance, replication, and differentiation of these genes among different samples, this study explored the family-oriented design characteristics of DeWalt drill product genes and completed a systematic analysis of homologous product genes.
Figure 2. Samples of DeWalt Handheld Cordless Drills.
Figure 2. Samples of DeWalt Handheld Cordless Drills.
Preprints 241146 g002
Figure 2. Design gene map of DeWalt handheld drills.
Figure 2. Design gene map of DeWalt handheld drills.
Preprints 241146 g003
Based on the identification formula for homologous product genes and the double-layer constraint mechanism, the genes of electric drills were classified and encoded. Consequently, rigid conserved genes and flexible variable genes of the homologous product genes were obtained, as shown in Table 3 and Table 4. According to the coding rules for product genes, a product is represented as P in the product design DNA structure. When P consists of m morphological genes Pi, it can be expressed as
                                    P = { P i }   i = 1 , 2 , … ,                                    (3-1)
As shown in Figure 4, an electric drill was used to extract the homologous genes. Based on this, constraints were formulated, and both the gene library and shape grammar library were constructed.

3.2. Construction of the Shape Grammar Rule Library

A grammar rule library for rigid conservative layer genes was constructed based on a constraint mechanism and shape grammar. As shown in Table 3, the rigid conservative layer genes represent homologous genes that cannot undergo disruptive modifications. Only minor adjustments are permitted within the threshold range, satisfying the ergonomic and structural assembly requirements.
Based on the constraint mechanism and shape grammar, a grammar rule library for the flexible mutation layer genes was constructed. As shown in Table 4, the homologous genes in this layer were mainly associated with surface decoration and allowed relatively large-scale modifications.

3.3. Generation of Contour Line Drawing Design Schemes

Based on the established shape-grammar rule library, handheld drill design schemes were generated and presented as contour line drawings.
Table 5. Two-dimensional line drawings.
Table 5. Two-dimensional line drawings.
Preprints 241146 i003

4. Experimental Validation and Analysis of the Algorithm

4.1. Experimental Design and Image Preprocessing

The generated design schemes were sequentially numbered, and a contour line drawing of the original blueprint is shown in Scheme 1.
Table 6. Line-drawing sequence table.
Table 6. Line-drawing sequence table.
Preprints 241146 i004

4.2. Algorithm Implementation

As listed in Table 7, each algorithm has its advantages and disadvantages. Therefore, in this study, a multi-algorithm approach was adopted to conduct similarity comparison experiments. First, a mask algorithm was used to preprocess the images and obtain binary images that contained only red lines. Subsequently, the white regions of the images were cropped, and the images were resized to a uniform scale. An algorithm was subsequently applied to standardize the thickness of the red lines and generate skeleton images, thereby reducing the influence of line-width differences on the experimental results. The similarity of the images was then calculated using the Tolerant IoU and Chamfer distance. Finally, the binary and skeletal images were separately registered and aligned using the ECC algorithm. Seven similarity metrics were calculated, and the final score was obtained using a weighted computation.
The weight values are assigned according to their importance, as shown in Table 8. SSIM evaluates the visual perceptual similarity and structural similarity between the original image and the processed image (Saxena & Kumar,2025). For contour images, the comparison mainly focuses on the overall structure, and the SSIM algorithm has a relatively high reference value; therefore, its weight is set to 0.20. In line drawing similarity calculation, the IoU algorithm is widely used in object detection to measure the degree of overlap between two regions (Yu et al., 2022). However, for contour images, if line displacement occurs, the accuracy of IoU will decrease significantly. Therefore, the weight of the IoU algorithm is set to 0.12. The Tolerant IoU algorithm allows line displacement and is more consistent with practical judgment than the IoU algorithm; thus, its weight is set to 0.22. In image matching, the Chamfer algorithm takes a template image P and a target image M. For each foreground point in P, the corresponding value of that point on the distance transform image of M is obtained, and the average value of all points is then calculated. The smaller this value is, the better the contour of P matches that of M (Schweighofer, 2025). Similar to the Tolerant IoU algorithm, it addresses the problem of slight line misalignment, so its weight is set to 0.18. The ORB algorithm is a feature point extraction and description algorithm with better real-time performance (Zhao et al., 2022). It can be used to compare local features, such as corners, endpoints, intersections, and local structures, thereby supplementing the judgment of local details. However, for contour images, ORB is not sufficiently stable because contour images may contain too few key points, and when the lines are too thin, the feature points are not obvious. Therefore, its weight is set to 0.10. The Hu Moments algorithm is based on the theory of algebraic invariants, and the extracted image features are invariant to translation, rotation, scaling, and mirroring (Despodov et al., 2024). It can assist in similarity evaluation, so its weight is set to 0.08. The core idea of the Projection algorithm is to project a two-dimensional image along a specific direction to obtain a one-dimensional array, and then analyze the one-dimensional array (Ashwin & Sastry, 2002). It serves as an auxiliary indicator, so its weight is set to 0.10.
In the algorithmic implementation, the combined weight assigned to the SSIM, Tolerant IoU, and Chamfer distance was 0.60, indicating that these three metrics collectively contributed 60% of the final similarity score. This weighting design reflects their primary role in evaluating the core structural consistency of line drawings and the spatial distance relationships between the corresponding lines.

4.3. Results of Data Calculation

Table 9. Similarity calculations.
Table 9. Similarity calculations.
Number image1 Image2 Image3 Image4 Image5
Image1 1.0000
Image2 0.7669 1.0000
Image3 0.7416 0.7839 1.0000
Image4 0.7634 0.8007 0.8804 1.0000
Image5 0.7759 0.9531 0.7736 0.8219 1.0000
Since Image 1 represents the original scheme, and the other four schemes are designed based on Image 1 as the prototype, the similarity score can be interpreted as the inheritance degree. Accordingly, the mutation degree can be calculated based on the inheritance degree. The inheritance index is obtained according to the HI formula.
Table 10. Sequence similarity, topological conservation, functional association, and visual similarity.
Table 10. Sequence similarity, topological conservation, functional association, and visual similarity.
Number image1 Image2 Image3 Image4 Image5
Sseq 1.0000 0.7407 0.6667 0.5926 0.6786
Stopo 1.0000 1.0000 1.0000 1.0000 1.0000
Sfunc 1.0000 1.0000 1.0000 1.0000 1.0000
Svis 1.0000 0.7669 0.7416 0.7634 0.7759
Table 11. Inheritance degree, mutation degree, and homology index.
Table 11. Inheritance degree, mutation degree, and homology index.
Number Inheritance degree Mutation degree HI
1 1.0000 0.0000 1.0000
2 0.7669 0.2331 0.8769
3 0.7416 0.2584 0.8521
4 0.7634 0.2366 0.8390
5 0.7759 0.2295 0.8636

4.4. Data Validation

To verify the consistency between the results of the visual similarity algorithm and human perceptual judgment, experts in relevant fields were invited to conduct pairwise similarity evaluations of the five product schemes. The expert scoring results are listed in Table 12. The expert evaluations primarily focused on aspects such as the overall contour, structural proportions, local morphological features, visual layout, and styling characteristics of each scheme. The rationality and effectiveness of the proposed visual similarity evaluation method can be examined by comparing the expert scores with the algorithmic calculation results.
The expert evaluation results indicated that the visual similarity obtained through multi-algorithm fusion was generally highly consistent with the human visual judgment. The mean absolute error was approximately 0.0241, suggesting that the algorithm can effectively reflect the overall visual similarity relationships among the line-drawing schemes.
To examine the sensitivity of the comprehensive visual similarity model to changes in the indicator weights and the stability of its calculation results, we employed a random perturbation method to validate the robustness of the weights of each indicator. To maintain weight normalization, each weight was randomly perturbed to within 20% of its original value. A total of 5,000 repeated calculations were performed. The sensitivity of the model to weight changes was evaluated by comparing the mean similarity, standard deviation, and 95% interval width before and after perturbation. The experimental results are listed in Table 13.
In the robustness experiment, the number of perturbations for this algorithm was 5000 random weight perturbations, with each weight being perturbed within ±20%. The data in Table 13 show that the mean of the perturbations was almost identical to that of the original data, indicating that the originally set weights did not cause a significant bias. Even with 20% random perturbations of the weights, the final average similarity remained close to the original results. The standard deviation was approximately 0.009, which is a relatively small fluctuation. This indicates that during the 5000 weight perturbations, the similarity score for each image generally changed only slightly around the original score, and the model output was relatively stable. The 95% confidence interval width is between 0.034 and 0.035. The weight perturbation results suggest that, under the current sample and the established evaluation system, the overall visual similarity demonstrates good numerical stability against ±20% weight changes.

4.5. Results Analysis

According to the similarity calculation results in Table 10, the visual morphological similarities between the original scheme, image1, and the four derivative schemes were 0.7669, 0.7416, 0.7634, and 0.7759. Overall, these values remained relatively high, indicating that the electric drill schemes generated based on shape grammar effectively inherited the main morphological features of the original sample in terms of the overall contour, core structure, and visual layout. More evident variations were produced in local forms or decorative features; however, these variations did not deviate from the basic morphological framework of the original product family.
As shown in Table 10, the topological conservativeness and functional relevance of the five schemes were all 1.0000, indicating that each derivative scheme fully preserved the core structural connections and basic functional logic of the electric drill product. Specifically, the topological relationships between key components, such as the drill head, body, handle, trigger, and battery pack, remained intact, and core functions, such as drilling, gripping, triggering, power supply, and heat dissipation, were not missing. This demonstrates that the rigid conservation layer in the dual-layer constraint mechanism plays an effective constraining role during the shape grammar derivation process, thereby preventing structural imbalances or functional failures in the product form generation. In addition, sequence similarity varies among the different schemes. This result indicates that although all schemes maintain the basic functional topology of the electric drill product, they differ to varying degrees in the arrangement of morphological gene units, combination of local elements, and organization of appearance details.
According to the calculation results in Table 11, the homology indices of the generated schemes remain generally high, concentrated at approximately 0.85. Although the four derivative schemes underwent different degrees of morphological adjustment in the flexible variation-layer genes, such as local contours, detailed decorations, heat-dissipation hole forms, and handle curvature, their overall homology indices did not show a significant decline. This indicates that a strong homological relationship was maintained between the generated and original schemes. In terms of HI composition, this index comprehensively considers four aspects: sequence similarity, topological conservation, functional relevance, and visual morphological similarity. Therefore, the homology indices of the generated schemes remaining around 0.85 indicate that these schemes not only have high visual similarity to the original scheme in terms of line drawings, but also maintain strong consistency in core structural relationships and functional layouts. In particular, the topological conservativeness and functional relevance of each scheme remain at 1.0000, indicating that the connection relationships among key components, such as the drill head, body, handle, battery pack, and trigger, were not disrupted, and the basic functions, such as drilling, gripping, triggering, and power supply, were fully preserved.
In summary, the experimental results demonstrate that the proposed method of “homologous gene constraint–shape grammar generation–multi-algorithm similarity validation” can achieve differentiated scheme generation while maintaining the consistency of the product family. On the one hand, the rigid conservation layer ensures the stable inheritance of the product’s core structure, functional relationships, and brand-identification features. On the other hand, the flexible variation layer enables morphological differences among schemes through the replacement, addition, deletion, and fine-tuning of elements such as chamfers, heat dissipation holes, anti-slip textures, and local contour lines. These results verify the feasibility and effectiveness of the proposed method for morphological generation of electric tool product families.

5. Discussion

5.1. The Constraint Effect of Homologous Gene Logic in Shape Grammar

In response to the problems of weak core feature inheritance, limited control over form variation, and difficult quantitative evaluation, this study introduced the homologous gene theory and shape grammar. Using a DeWalt handheld lithium-ion electric drill as an example, we built a framework for the constrained generation and evaluation of product family forms. This process included homologous gene extraction, a dual-layer constraint mechanism, shape grammar rules, 2D line-drawing generation, and computational evaluation, resulting in a complete workflow from gene identification to controlled variation and quantitative assessment.
First, this study proposes a homologous gene perspective for product-family form design. This brings the biological concept of homologous genes into product design and explains inheritance and variation in three ways: sequence similarity of morphological gene units, topological conservation of core components, and functional relevance. Compared with methods based only on appearance similarity, this approach reflects homologous relationships at the morphological, structural, and functional levels and provides an interpretable basis for identifying, expressing, and inheriting core product-family features.
Second, a dual-layer constraint mechanism is built with a rigid conservation layer and a flexible variation layer. The rigid layer controls the sequence, connections, and functional layout of core parts, such as the drill head, body, handle, battery pack, and trigger, ensuring basic operation, structural stability, and family identity. The flexible layer focuses on non-core elements such as handle curvature, chamfers, ventilation holes, anti-slip textures, and decorative lines and uses shape grammar rules such as addition, deletion, replacement, scaling, mirroring, and fine-tuning to create variation. This mechanism separates feature inheritance from morphological innovation, helping avoid both structural damage and loss of brand identity.
Third, this study proposes a product-from HI model and a corresponding quantitative evaluation method. The model includes four indicators: sequence similarity, topological conservation, functional relevance, and visual morphological similarity.
The experimental results show that the topological conservativeness and functional relevance remain at 1.0000 for all derivative schemes, indicating that the key connections and functional logic of parts such as the drill head, body, handle, battery pack, and trigger are fully preserved. This indicates that the rigid conservation layer can effectively protect core homologous genes and ensure that shape grammar transformations do not change the basic usage mode or structural relationships of the product.
At the same time, the visual morphological similarity remained above 0.74, showing that the generated schemes maintained strong family recognition in line drawings. This implies that homologous genes do not limit innovation. Instead, they define the structural boundaries of product family design. By controlling core morphological and functional relationships, homologous genes provide a controllable space for the flexible variation layer, allowing products to show differentiation while maintaining family features.

5.2. Comprehensive Evaluation Significance of the Model

The HI model developed in this study evaluates four dimensions: sequence similarity, topological conservation, functional association, and visual similarity. Unlike methods based only on image similarity, this method provides a more comprehensive assessment of the homology among product-family schemes. Sequence similarity examines the order and combination of morphological genes reflecting design inheritance. Topological conservation examines the connections among key components to ensure structural continuity. Functional association verifies whether a product’s basic functions are preserved, avoiding cases in which visual similarity conflicts with functional logic. Visual similarity uses image algorithms to quantify the similarity of appearance line drawings and provides objective support for product family identification.
The experimental results showed that topological conservativeness and functional relevance remained at 1.0000 for all schemes, whereas sequence similarity and visual morphological similarity varied to some extent. This indicates that the generated schemes preserve the core structure and functions while allowing changes in gene arrangement and visual expression, meeting the design principle of “core consistency and local differentiation.”
Overall, the HI model can evaluate whether schemes belong to the same product family and can support scheme selection. When brand recognition and series consistency are prioritized, schemes with higher HI values can be selected. When innovation and market differentiation are more important, schemes with moderate HI values and greater variations may be preferred.

5.3. Research Limitations

Although the product-family morphological constraint generation method based on homologous gene theory and shape grammar has achieved some results, it has some limitations.
First, the morphological gene extraction was subjective. This study classifies electric drill genes from structural, functional, and visual aspects and sets a rigid conservative layer and a flexible variation layer. However, the selection of gene units, layer assignment, and constraint strength still depend largely on the experience of the designer. Future studies could use eye tracking, user recognition tests, or machine learning to improve the objectivity and automation.
Second, the visual similarity evaluation is mainly based on contour line drawings. While these can reflect product outlines and structural relationships, they cannot fully express the 3D volume, surface transitions, material texture, or grip comfort. Future research should extend this evaluation to 3D models and combine it with ergonomic analyses and user perception experiments.
Currently, the proposed constraints are primarily validated through contour drawings, topological relationships, and morphological indicators. A systematic validation method based on 3D parametric models has not yet been developed. Future work could use parametric modeling to convert key genes—such as body proportions, grip curvature, grip angle, battery-pack position, front-housing size, and vent layout—into adjustable parameters. Through parameter perturbation, sensitivity analysis, and multi-objective optimization, the effects of these changes on the topological conservativeness, functional relevance, ergonomic performance, and visual similarity can be studied. In addition, 3D assembly analysis, grip experiments, and prototype testing can further verify the effectiveness and engineering value of the generated rules.

6. Conclusion

This study explored how to balance consistency and differentiation in the design of electric tool product families. The homologous gene theory and shape grammar were used to build a framework for generating product forms under gene constraints. Taking handheld lithium-ion drills as an example, this study identified key homologous genes based on structure, function, and appearance, and divided them into rigid and flexible variation layers. Based on these rules, a morphology generation method was developed to derive multiple drill designs.
The results showed that the rigid conservative layer maintained a stable main structure and functional logic, including parts such as the front housing, main body, handle, battery pack, and trigger. The flexible variation layer allows for changes in details such as contours, chamfers, vents, anti-slip textures, and decorative lines. Together, these two layers help avoid excessive similarity and variation.
For evaluation, this study proposes an HI model based on sequence similarity, topological conservativeness, functional relevance, and visual similarity. Visual similarity was measured by combining the SSIM, IoU, Tolerant IoU, Chamfer, ORB, Hu Moments, and Projection. The results show that the generated schemes maintain a high visual similarity to the original design, whereas the topological conservativeness and functional relevance both reach 1.0000.
In summary, this method supports the generation, selection, and evaluation of electric tool product family designs. It also provides a method for extracting key design genes and assessing family consistency. Future work could include more product types, 3D models, ergonomic factors, user studies, and intelligent optimization methods.

Funding

Yunnan Province Graduate High-Quality Course Construction Project (No. 109920250017); Kunming University of Science and Technology Academic Excellence Cultivation Project (No. JPEC2024008).

Acknowledgments

We would like to thank Editage (www.editage.cn) for English language editing.

Disclosure of interest

No potential conflict of interest was reported by the author(s).

CRediT author statement

Li Gang:Concept brainstorming, formal analysis, manuscript review. Lu Yuan:Concept brainstorming, first draft writing, and reviewing and editing the manuscript. Guo Jiyong:Funding, manuscript review, and editing Guo Lin:manuscript review, and editing.

Declaration of generative AI use

In the paper writing process, artificial intelligence was used to polish the first draft of the Chinese-language manuscript and perform translation work. Editage was subsequently employed for the final proofreading and language refinement of the paper.

References

  1. Ashwin, T. V.; Sastry, P. S. A font and size-independent OCR system for printed Kannada documents using support vector machines. Sadhana 2002, 27(1), 35–58. [Google Scholar] [CrossRef]
  2. Despodov, B.; Stojanov, D.; Martinovska Bande, C. Evaluating handwritten character recognition with Hu moments and K-nearest neighbors algorithm. TEM J. 2024, 13(3), 1813–1824. [Google Scholar] [CrossRef]
  3. Fernández, R.; Gabaldon, T.; Dessimoz, C. Orthology: Definitions, prediction, and impact on species phylogeny inference. Phylogenetics Genom. Era 2020, 2(4), 1–2.4:14. [Google Scholar]
  4. Hao, Y.; Zhang, S.; Shen, C. The research of the design of 3D information gene model oriented to machine vision 2nd International Conference on Electrical, Automation and Mechanical Engineering (EAME 2017); Atlantis press, 2017; pp. 334–337. [Google Scholar] [CrossRef]
  5. Hong, T. C. K. Shape machine shape embedding and rewriting in visual design; Georgia Institute of Technology, 2021. [Google Scholar]
  6. Topaloglu, A. A Critical Inquiry on Design Cognition and Generative Systems. In LearnXDesign 2023; Design Research Society, 2023. [Google Scholar] [CrossRef]
  7. Knight, T. Shapes and other things. Nexus Netw. J. 2015, 17(3), 963–980. [Google Scholar] [CrossRef]
  8. Kunkhet, A. Harmonised shape grammar in design practice; Staffordshire University, 2015. [Google Scholar]
  9. Li, P.; Ren, Y.; Yan, Y.; Wang, G. Conceptual design method driven by product genes. Proc. Inst. Mech. Eng. Part B 2020, 234(3), 463–478. [Google Scholar] [CrossRef]
  10. Lifschitz, S.; Haeusler, E. H.; Catanho, M.; Miranda, A. B.; Armas, E. M.; Heine, A.; Moreira, S. G. M. P.; Tristão, C. Bio-strings: A relational database data-type for dealing with large biosequences. Biotech 2022, 11(3), 31. [Google Scholar] [CrossRef]
  11. MacLachlan, L.; Jowers, I. Exploration of multi-material surfaces as weighted shapes. Graph. Model. 2016, 83, 28–36. [Google Scholar] [CrossRef]
  12. Saxena, A.; Kumar, S. A novel approach for optimizing RMSE, MSE, PSNR, and SSIM in image processing. Zenodo 2025. [Google Scholar] [CrossRef]
  13. Schweighofer, D. Cable manipulation by a mobile robot; Technische Universität Wien, 2025. [Google Scholar]
  14. Stiny, G.; Gips, J. Shape grammars and the generative specification of painting and sculpture. IFIP congress (2), 1971; Vol. 2, pp. 125–135. [Google Scholar]
  15. Sun, L. The summary of product gene network theory. IOP Conf. Ser. Mater. Sci. Eng. 2019, 573(1), 012031. [Google Scholar] [CrossRef]
  16. Wang, H.; Zhang, P.; Zhang, Z.; Zhang, Y.; Wang, Y. Product innovation design process model based on functional genes extraction and construction. Appl. Sci. 2022, 12(24), 12990. [Google Scholar] [CrossRef]
  17. Xiong, T.; Wang, N. Exploring dual pathways for traditional pattern innovation: Shape grammar and diffusion models. npj Herit. Sci. 2025, 13(1), 639. [Google Scholar] [CrossRef]
  18. Yixiong, F.; Yicong, G.; Zeyu, M.; Jianrong, T. Assembly model and design thinking: A study of assembly scheme based on gene model. Assem. Autom. 2013, 33(3), 272–281. [Google Scholar] [CrossRef]
  19. Yu, Y.; Jiang, H.; Zhang, X.; Chen, Y. Identifying irregular potatoes using Hausdorff distance and intersection over union. Sensors 2022, 22(15), 5740. [Google Scholar] [CrossRef]
  20. Zamenopoulos, T. A complexity theory of design intentionality. Artif. Intell. Eng. Des. Anal. Manuf. 2012, 26(1), 63–83. [Google Scholar] [CrossRef]
  21. Zhao, L.; Yang, J.; Zhang, Y.; Huang, J. Research on feature matching of an improved orb algorithm. In 2022 IEEE 6th Information Technology and Mechatronics Engineering Conference (ITOEC); IEEE, March 2022; Vol. 6, pp. 765–769. [Google Scholar] [CrossRef]
  22. Zhu, H. M.; Zhang, Y. B.; Zhu, M. Z. Research on the reverse mold assembly technology based on product gene. Appl. Mech. Mater. 2013, 475–476, 1463–1467. [Google Scholar] [CrossRef]
Figure 3. Original image and line drawing.
Figure 3. Original image and line drawing.
Preprints 241146 g004
Table 2. Parameter descriptions.
Table 2. Parameter descriptions.
parameters mathematical formulation corresponding content weight
sequence similarity Sseq Sequential ordering of form-building factors 0.25
topological conservation Stopo connection relationships among the drill chuck, motor housing, handle, battery pack, switch and other components. 0.25
functional association Sfunc Preservation of functional associations among the landing gear, drill, power supply, and trigger components 0.25
visual morphological similarity Svis Results of image-based methods such as SSIM, IoU, Tolerant IoU, and Chamfer distance 0.25
Table 3. Grammar rule library for the rigid conservation layer.
Table 3. Grammar rule library for the rigid conservation layer.
Preprints 241146 i001
Table 4. Grammar rule library for the flexible variation layer.
Table 4. Grammar rule library for the flexible variation layer.
Preprints 241146 i002
Table 7. Algorithm selection and comparative analysis.
Table 7. Algorithm selection and comparative analysis.
Algorithm Main function Advantages Disadvantage
SSIM Compare the overall structure Conforms to visual perception Still sensitive to local shifts
IoU Compare pixel-level overlap Simple and intuitive Sensitive to misalignment
Tolerant IoU Pixel overlap with slight misalignment Suitable for line art Highly sensitive to the radius parameter
Chamfer Compare line distances Stable against slight shifts Still unstable under large misalignment
ORB Compare local features Able to capture local structure Unstable when there are too few keypoints in the line drawing
Hu Moments Compare overall contours Not affected by translation, rotation, or scaling Focuses only on the largest contour, with weak detail
Projection Compare overall layout Effective for global distribution Loss of two-dimensional spatial details
ECC Image alignment Reduces the effects of displacement and rotation Returns the original image if registration fails
Table 8. Algorithm weights.
Table 8. Algorithm weights.
Algorithm Weight Significance
SSIM 0.20 Calculate the overall similarity of image contrast and local structure
IoU 0.12 Calculate the pixel-level precise overlap of the foreground area
Tolerant IoU 0.22 Calculate the degree of regional overlap when there are slight positional or boundary deviations.
Chamfer 0.18 Calculate the geometric distance between the contours or lines of two images
ORB 0.10 Calculate the matching degree between local keypoints and their feature descriptors.
Hu Moments 0.08 Calculate the overall contour similarity with translation, scaling, and rotation invariance.
Projection 0.10 Calculate the similarity of the distribution of foreground pixels in the horizontal and vertical directions
Table 12. Expert similarity scores.
Table 12. Expert similarity scores.
Number image1 Image2 Image3 Image4 Image5
Image1 1.0000
Image2 0.7778 1.0000
Image3 0.7143 0.7778 1.0000
Image4 0.7460 0.7937 0.8095 1.0000
Image5 0.7143 0.9206 0.7778 0.8254 1.0000
Table 13. ±20% weight perturbation.
Table 13. ±20% weight perturbation.
Number Raw Data Mean Perturbation Standard Deviation 95% Interval Width
Image2 0.7669 0.7669 0.0089 0.0350
Image3 0.7416 0.7416 0.0090 0.0350
Image4 0.7634 0.7634 0.0087 0.0340
Image5 0.7759 0.7758 0.0087 0.0339
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.