Semantic normalized representation and conversion method and device of heterogeneous cad assembly constraints
Patent Information
- Application Number
- CN202611257096.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-19
- Publication Date
- 2026-10-23
AI Technical Summary
[0005]针对现有异构装配约束语义不统一、参数表示各异、约束图碎片化且难以自动生成标准语义关系的问题,本申请提供一种异构CAD装配约束的语义归一化表示与转换方法及装置,能够将各类原始装配约束映射为有限的基元约束集并分解复合约束,将参数归一化为标准单位与单位方向向量,依据全局身份映射合并各局部约束图为全局约束图并消除冗余、标记冲突、检测循环依赖,根据归一化后的基元约束生成符合标准产品数据模式的资源描述框架统一表示,改善多源装配数据的语义一致性、参数保真度与约束图完整性
[0017]由上述技术方案可知,本申请提供一种异构CAD装配约束的语义归一化表示与转换方法及装置,通过约束类型映射规则库将异构原始约束归约为有限基元约束并分解复合约束,通过参数与方向向量归一化保留原始约束的量值与几何取向,通过全局身份映射与约束边聚合合并局部约束图为无冗余、可追溯的全局约束图并识别冲突与循环依赖,通过标准谓词生成符合标准产品数据模式的资源描述框架三元组,并将冲突约束与约束循环依赖回流触发相关原始约束的重新提取与重新归一化形成闭环。
Smart Images

Figure CN122964950A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of three-dimensional product data technology, specifically to a semantic normalization representation and conversion method and apparatus for heterogeneous CAD assembly constraints. Background Technology
[0002] In the design of complex assemblies, different computer-aided design (CAD) software employs their own unique types and expressions of assembly constraints. Taking mainstream modeling software as an example, CATIA uses constraints such as fit, offset, and angle; NX uses constraints such as pairing, alignment, and centering; and Creo uses constraints such as matching, alignment, and insertion. When it is necessary to merge sub-assemblies from different software or to convert multi-source assembly data into a unified standard product data model, semantically similar constraints are expressed differently in different software. Even within the same software, multiple constraints may express the same geometric relationship. The lack of a unified semantic standard often leads to the loss of semantic information during cross-software migration.
[0003] The storage structure and units of existing constraint parameters are inconsistent; distance, angle, offset direction, and tolerance zone are represented differently, making direct conversion prone to loss of accuracy and even errors. Each assembly tree is independent, and constraint relationships are only reflected locally. Merging multiple sub-assemblies may result in redundant constraints, circular dependencies, and conflicting constraint chains, lacking a unified detection and resolution mechanism. Existing cross-software conversions mostly rely on one-to-one custom plugins; each new software or constraint type requires rewriting the conversion logic, making rules difficult to reuse and extend, and maintenance costs rise rapidly with the number of software types.
[0004] Standard product data models provide a resource description framework reference for semantic assembly constraints. However, existing conversion methods cannot automatically generate semantic relationships that conform to this model. There is a lack of automatically derived mapping channels between geometric and semantic relationships, and the normalized constraints are difficult to directly support assembly feasibility reasoning and kinematic simulation. Therefore, a semantic normalization method is needed to map various original constraints to a finite element constraint set, retain original parameters, and generate a unified representation of the resource description framework that conforms to the standard product data model, supporting the fusion and reasoning of multi-source assembly data. Summary of the Invention
[0005] To address the issues of inconsistent semantics, varying parameter representations, fragmented constraint diagrams, and difficulty in automatically generating standard semantic relationships in existing heterogeneous assembly constraints, this application provides a method and apparatus for semantic normalization representation and conversion of heterogeneous CAD assembly constraints. This method maps various original assembly constraints to a finite set of primitive constraints and decomposes composite constraints. It normalizes parameters to standard units and unit direction vectors, merges local constraint diagrams into a global constraint diagram based on global identity mapping, eliminates redundancy, marks conflicts, and detects cyclic dependencies, and generates a unified representation of a resource description framework conforming to standard product data patterns based on the normalized primitive constraints. This improves the semantic consistency, parameter fidelity, and constraint diagram integrity of multi-source assembly data.
[0006] To solve at least one of the above problems, this application provides the following technical solution: Firstly, this application provides a semantic normalization representation and transformation method for heterogeneous CAD assembly constraints, comprising: extracting original assembly constraints from the assembly model of a heterogeneous computer-aided design system; identifying the type, involved parts and geometric features, and constraint parameters of the original assembly constraints; constructing a local constraint graph carrying the original type and parameters with parts as nodes and constraints as edges; mapping each original assembly constraint to at least one primitive constraint in a preset primitive constraint set according to a predefined constraint mapping rule library; decomposing the composite constraints into multiple primitive constraints; normalizing the parameters of the primitive constraints to standard units of millimeters and radians; normalizing the direction vectors to unit vectors and unifying them to the assembly root coordinate system; merging the local constraint graphs into a global constraint graph according to global identity mapping; eliminating redundant constraints, marking conflicting constraints, and detecting constraint cyclic dependencies; generating resource description framework triples conforming to the standard product data pattern based on the normalized primitive constraints; expressing the normalized assembly constraint relationships using standard predicates; triggering the re-extraction and re-normalization of the relevant original assembly constraints by backflowing the conflicting constraints and the constraint cyclic dependencies, and updating the global constraint graph.
[0007] Furthermore, it also includes: reading the assembly model according to the application programming interface of the heterogeneous computer-aided design system, extracting the constraint type, involved parts and subassemblies, geometric features and constraint parameters for each original assembly constraint, wherein the geometric features include surfaces, edges, axes and points, and the constraint parameters include offset values, angle values, direction vectors and tolerance zones; registering the combination of the constraint type and the geometric features as constraint identifiers, and constructing a local constraint graph with parts as nodes and constraints as edges, recording the original constraint type, constraint parameters and source identifiers for each edge, and registering and extracting anomaly identifiers for original assembly constraints that fail to be read and transferring them to the manual verification queue.
[0008] Furthermore, it also includes: loading a configurable constraint mapping rule library, each mapping rule containing the source computer-aided design software name, source constraint type and source feature type combination, and target primitive constraint type and parameter mapping expression, the primitive constraint set covering plane fitting, plane alignment, axis alignment, point coincidence, distance, angle and cylinder coaxiality; replacing each original assembly constraint with the corresponding primitive constraint according to the mapping rule, decomposing the inserted constraints into cylinder coaxial primitive constraints and plane fitting primitive constraints, and passing the original constraint parameters and geometric feature references to the decomposed primitive constraints.
[0009] Furthermore, it also includes: extracting the numerical parameters of the primitive constraints, converting the distance parameters to millimeters and the angle parameters to radians according to a preset unit conversion rule, and attaching the tolerance zone of the original constraints to the corresponding primitive constraints; normalizing the direction vector in the numerical parameters to a unit vector, and converting each primitive constraint from the local coordinate system to the assembly root coordinate system according to the coordinate transformation relationship, thereby generating primitive constraints carrying standard unit parameters and unit direction vectors.
[0010] Furthermore, it also includes: traversing the component nodes of each local constraint graph, matching the same physical part across the graph based on the hash value of the component number and the instance path, generating a globally unique identifier for each physical part and establishing a global identity mapping from the local identifier to the globally unique identifier; replacing the source node and target node of each constraint edge with a globally unique identifier based on the global identity mapping, deduplicating equivalent constraints and superimposing complementary constraints on candidate edges pointing to the same pair of global nodes, marking constraints of the same type but with conflicting parameters as conflict constraints, deleting redundant distance constraints and angle constraints between the two when there is a fully positioned planar fitting constraint in the same pair of components, and verifying the global constraint graph to identify constraint cycle dependencies based on topological sorting.
[0011] Furthermore, it also includes: generating resource description framework triples based on the normalized primitive constraints, using the globally unique identifiers of the two components as the subject and object respectively, selecting the corresponding standard predicates from the standard product data pattern to express the assembly constraint relationship according to the primitive constraint type; organizing the numerical values, units, and direction vectors of the primitive constraints into individual constraint parameters and associating them with the corresponding resource description framework triples; and attaching the geometric features of the involved components to the corresponding resource description framework triples according to availability.
[0012] Furthermore, it also includes: collecting the conflicting constraints and the cyclic dependencies of constraints to form a set to be reviewed; locating the relevant original assembly constraints and their respective local constraint graphs based on the set to be reviewed; re-extracting and re-normalizing the relevant original assembly constraints based on the set to be reviewed; returning the re-normalized primitive constraints to the global constraint graph and re-performing constraint edge aggregation and conflict marking; and outputting the global constraint graph after the conflicting constraints and the cyclic dependencies of constraints are cleared.
[0013] Secondly, this application provides a semantic normalization representation and conversion device for heterogeneous CAD assembly constraints, comprising: a constraint extraction module, used to extract original assembly constraints from the assembly model of a heterogeneous computer-aided design system and identify the type, involved parts and geometric features, and constraint parameters of the original assembly constraints, and construct a local constraint graph carrying the original type and parameters with parts as nodes and constraints as edges; a mapping reduction module, used to map each original assembly constraint to at least one primitive constraint in a preset primitive constraint set according to a predefined constraint mapping rule library, and decompose the composite constraints therein into multiple primitive constraints; and a parameter normalization module, used to normalize the primitive constraints. The parameters are normalized to standard units of millimeters and radians, the direction vector is normalized to a unit vector and unified to the assembly root coordinate system, and the tolerance band of the original constraints is attached to the corresponding primitive constraints; the graph fusion module is used to merge the local constraint graphs into a global constraint graph based on the global identity mapping, eliminate redundant constraints, mark conflicting constraints, and detect constraint cycle dependencies according to topological sorting; the semantic generation module is used to generate resource description framework triples that conform to the standard product data pattern based on the normalized primitive constraints and express assembly constraint relationships using standard predicates, and trigger the re-extraction and re-normalization of the relevant original assembly constraints by backflowing the conflicting constraints and the constraint cycle dependencies.
[0014] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints.
[0015] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints.
[0016] Fifthly, this application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints.
[0017] As can be seen from the above technical solution, this application provides a semantic normalization representation and conversion method and apparatus for heterogeneous CAD assembly constraints. It reduces heterogeneous original constraints to finite primitive constraints and decomposes composite constraints through a constraint type mapping rule base. It preserves the magnitude and geometric orientation of the original constraints through parameter and direction vector normalization. It merges local constraint graphs into a non-redundant and traceable global constraint graph through global identity mapping and constraint edge aggregation, and identifies conflicts and circular dependencies. It generates resource description framework triples that conform to the standard product data pattern through standard predicates, and triggers the re-extraction and re-normalization of related original constraints to form a closed loop by backflowing conflict constraints and constraint circular dependencies. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0019] Figure 1 This is a three-step flowchart illustrating the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints in the embodiments of this application. Figure 2 This is a schematic diagram of the system architecture and device structure of the assembly constraint normalization engine in the embodiments of this application; Figure 3 This is a schematic diagram of the constraint type mapping and composite constraint decomposition process in the embodiments of this application; Figure 4 This is a schematic diagram illustrating the process of fusing local constraint graphs into a global constraint graph and detecting redundant conflicts and circular dependencies in the embodiments of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.
[0021] In view of the problems of inconsistent semantics, inconsistent parameter units, fragmented local constraint diagrams and inability to automatically generate standard semantic relationships in existing multi-source assembly constraints, this application provides a semantic normalization representation and conversion method for heterogeneous CAD assembly constraints. Through constraint type mapping, composite constraint decomposition, parameter normalization and constraint diagram fusion, the heterogeneous original assembly constraints are semantically normalized and converted into a unified representation of a resource description framework that conforms to the standard product data model.
[0022] This application provides an embodiment of a semantic normalization representation and conversion method for heterogeneous CAD assembly constraints, see [link to embodiment]. Figure 1 The method specifically includes the following: Step S101: Extract the original assembly constraints from the assembly model of the heterogeneous computer-aided design system, identify the type of the original assembly constraints, the parts and geometric features involved, and the constraint parameters, and construct a local constraint graph carrying the original type and parameters with the parts as nodes and the constraints as edges.
[0023] In this embodiment, the method runs on an assembly constraint normalization engine, see [link to documentation]. Figure 1 The engine performs semantic normalization on heterogeneous original assembly constraints in the order of constraint extraction, mapping reduction, parameter normalization, graph fusion, and semantic generation. The local constraint graph is organized with components as nodes and constraints as edges. Nodes record the global identifier and instance path of the components, and edges record the original constraint type, constraint parameters, and source identifier.
[0024] In one feasible implementation, constraint extraction is performed by a multi-computer-aided design adapter, see [link to relevant documentation]. Figure 2 The adapter reads the assembly model based on the target software's application programming interface (API). If no API is available, it reads the parsed intermediate assembly structure and extracts the original constraints on the assembly tree, along with the attached parts and sub-assemblies.
[0025] For each original constraint, the extracted content includes the constraint type, the involved parts and subassemblies, geometric features, and constraint parameters. Geometric features are categorized into four types: faces, edges, axes, and points. Constraint parameters are categorized into offset values, angle values, direction vectors, and tolerance zones. The parameters are recorded exactly according to the units and coordinate system given by the original software, and will be normalized in step S102.
[0026] Based on this, a local constraint graph is constructed. Component instances are used as nodes, and original constraints are used as edges. Edge attributes are attached with constraint type codes, parameter sets, and source software identifiers. The source identifiers are used for tracing and backflow verification of subsequent conflict constraints. Constraints within the same subassembly are first entered into the graph, while constraints across subassemblies are processed after node fusion during the graph fusion stage.
[0027] Optionally, for original constraints that fail to be read, an exception identifier is extracted and transferred to the manual verification queue. The exception item records the software name, constraint number and reason for failure. After the verification result is written back, it re-enters the extraction process to avoid incomplete constraints from entering the mapping reduction and polluting the normalization result.
[0028] The local constraint graph is organized with component instance identifiers as the primary key. The graph's node table, edge table, and source identifier are written together into the constraint cache for step S102 to read at the mapping and reduction entry point according to the source software and constraint type.
[0029] Step S102: Map each original assembly constraint to at least one primitive constraint in the preset primitive constraint set according to the predefined constraint mapping rule library, decompose the composite constraints into multiple primitive constraints, normalize the parameters of the primitive constraints to standard units of millimeters and radians, normalize the direction vectors to unit vectors and unify them to the assembly root coordinate system, merge the local constraint graphs into a global constraint graph according to the global identity mapping, eliminate redundant constraints, mark conflicting constraints and detect constraint cycle dependencies.
[0030] The local constraint graph output in step S101 is read into the mapping and reduction stage, see [link / reference]. Figure 3 The mapping reduction first loads the constraint mapping rule base. The rule base uses the source software name, source constraint type, and source feature combination as the search key. Once a match is found, it provides the target primitive constraint type and parameter mapping expression.
[0031] In one specific implementation, the primitive constraint set includes seven categories: planar fit, planar alignment, axis alignment, point coincidence, distance, angle, and coaxiality with cylinder, covering common positional and orientation relationships in assembly. The rule base uses a configurable structured text organization; rule entries are added when new software or constraint types are added, and the core processing flow does not need to be rewritten.
[0032] Based on this, a mapping and decomposition are performed on each original constraint; see [link to documentation]. Figure 3 Single-element constraints are directly replaced according to the rules. Composite constraints are decomposed into multiple element constraints according to their geometric meaning. Insertion constraints are decomposed into cylindrical coaxial element constraints and planar fitting element constraints. The decomposed element constraints inherit the parameters and geometric feature references of the original constraints.
[0033] Parameter normalization unifies the units and coordinates of the numerical parameters of the primitive constraints. Angular parameters are converted from degrees to radians; the conversion relationship is denoted as... ,in This is the original angle value. The value is the normalized radian value; the distance and offset parameters are converted to millimeters, and the tolerance zone is converted along with the parameters and added to the corresponding primitive constraints.
[0034] Direction vector normalization ensures that the direction is a unit vector, denoted as . ,in The original direction vector, For its modulus length, This is the normalized unit vector; then, according to the coordinate transformation relationship, the constraints of each primitive are changed from the local coordinate system to the assembly root coordinate system, eliminating directional ambiguity caused by the difference in coordinate systems.
[0035] Optionally, direction vectors with a modulus close to zero are registered as degenerate vectors and a preset axial fallback is used. Parameters that overflow are registered as dimensional anomalies and transferred to manual verification to prevent abnormal parameters from entering graph fusion.
[0036] The graph fusion process merges the local constraint graphs into a global constraint graph. (See [link to relevant documentation]) Figure 4 The system traverses the component nodes of each local graph, matches the same physical part across graphs based on the component number and instance path hash value, generates a globally unique identifier for each physical part, and establishes a global identity mapping from local identifiers to globally unique identifiers.
[0037] Based on this, global remapping and aggregation are performed on the constraint edges. Among the candidate edges pointing to the same pair of global nodes, those with equivalent types and parameters are deduplicated, those with complementary types are superimposed and stored, and those with the same type but conflicting parameters are marked as conflict constraints and temporarily stored; when there are fully localized planar fitting constraints, redundant distance constraints and angle constraints are deleted; the global constraint graph is verified according to the topological sort, and when there are directed cycles, they are marked as constraint cycle dependencies. The global constraint graph uses a globally unique identifier as the primary key for step S103 to read.
[0038] Step S103: Generate resource description framework triples that conform to the standard product data pattern based on the normalized primitive constraints, express the normalized assembly constraint relationship using standard predicates, and trigger the re-extraction and re-normalization of the relevant original assembly constraints by re-intervening the conflict constraints and the constraint cyclic dependency backflow, and update the global constraint graph.
[0039] The global constraint graph output in step S102 is read into the semantic generation stage, see [link / reference]. Figure 1 Semantic generation converts each normalized primitive constraint into a resource description framework triple, using the globally unique identifiers of the two components as the subject and object, respectively, and selecting standard predicates to express the constraint relationship based on the primitive constraint type.
[0040] In one feasible implementation, the standard predicates are derived from the standard product data model, with primitive constraints such as planar fit, axis alignment, distance, and angle each corresponding to its own standard predicate. Taking planar fit as an example, the triple is expressed as a subject-verb-object structure of the first part, the planar fit predicate, and the second part.
[0041] Based on this, constraint parameter individuals are organized. The numerical value, unit, and direction vector of the primitive constraint are organized into constraint parameter individuals and associated with the corresponding triples. Distance constraints are accompanied by numerical values and millimeter units, angle constraints are accompanied by radian values, and tolerance zones and unit direction vectors are attached as attributes of the parameter individuals.
[0042] Based on availability, the geometric features of the involved components are referenced and attached to the corresponding triples. Geometric features such as faces, edges, axes and points are associated with their global identifiers. When features are unavailable, only the component-level associations are retained, ensuring that triples can still be serialized in scenarios where features are missing.
[0043] Conflicting constraints and circular dependencies trigger closed-loop reflow; see [link / reference]. Figure 4 The system collects conflict constraints and constraint circular dependencies marked in the graph fusion phase to form a set to be reviewed. Based on the source identifier in the set to be reviewed, the relevant original assembly constraints and their respective local constraint graphs are located.
[0044] Based on this, the relevant original constraints are re-extracted and re-normalized. The primitive constraints obtained by re-normalization are fed back into the global constraint graph and constraint edge aggregation and conflict marking are re-executed. After clearing conflict constraints and constraint circular dependencies, the global constraint graph and resource description framework triples are output. The review items that have not been cleared, along with the traceability information, are submitted for manual processing.
[0045] As can be seen from the above description, the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints provided in this application embodiment can reduce heterogeneous original constraints to finite primitive constraints and decompose composite constraints through a constraint mapping rule base, unify magnitude and geometric orientation through parameter and direction vector normalization, merge local constraint graphs into a non-redundant global constraint graph through global identity mapping and constraint edge aggregation, identify conflicts and circular dependencies, and generate semantic assembly constraints of a resource description framework that conforms to the standard product data pattern through standard predicates.
[0046] In one embodiment of the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints in this application, see [link to relevant documentation]. Figure 2 It can also specifically include the following: Step S201: Read the assembly model according to the application programming interface of the heterogeneous computer-aided design system, and extract the constraint type, involved parts and sub-assemblies, geometric features and constraint parameters for each original assembly constraint. The geometric features include surfaces, edges, axes and points, and the constraint parameters include offset values, angle values, direction vectors and tolerance zones. Step S202: Register the combination of the constraint type and the geometric feature as a constraint identifier, and construct a local constraint graph with the component as the node and the constraint as the edge. Record the original constraint type, constraint parameters and source identifier for each edge. Read the original assembly constraint that failed, register the abnormal identifier and transfer it to the manual verification queue.
[0047] The constraint extraction described in step S101 is performed by a multi-computer-aided design adapter, see [link to relevant documentation]. Figure 2 The adapter reads the assembly model based on the target software's application programming interface (API). If no API is available, it reads the parsed intermediate assembly structure and extracts the constraint type, involved parts and subassemblies, geometric features, and constraint parameters for each original constraint.
[0048] The geometric features are classified into four categories: surfaces, edges, axes, and points. The constraint parameters are classified into offset values, angle values, direction vectors, and tolerance zones. The parameters are recorded exactly according to the units and coordinate system given by the source software, and the source software name and constraint number are registered for subsequent traceability.
[0049] The combination of the constraint type and the geometric feature is registered as a constraint identifier. The constraint identifier is generated by concatenating the type code and the feature code. When there is a duplicate, an instance number is added to disambiguate it. When there is a missing constraint, the source software name and the constraint number are used as a fallback.
[0050] Based on this, a local constraint graph is constructed using components as nodes and constraints as edges. (See [link]) Figure 2 Nodes record the global identifier and instance path of components, while edges record the original constraint type, constraint parameters, and source identifier. Constraints within the same subassembly are entered into the drawing first, while constraints across subassemblies are delayed until the drawing fusion process.
[0051] Optionally, the original constraint that failed is read, the exception identifier is extracted and transferred to the manual verification queue. The exception item records the software name, constraint number and failure reason. After the verification result is written back, the extraction process is restarted.
[0052] The local constraint diagram is organized with component instance identifiers as the primary key. The node table, edge table, and source identifier are written into the constraint cache, which is then read by step S301 at the mapping and reduction entry point according to the source software and constraint type.
[0053] In one embodiment of the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints in this application, see [link to relevant documentation]. Figure 3 It can also specifically include the following: Step S301: Load the configurable constraint mapping rule library. Each mapping rule includes the source computer-aided design software name, source constraint type and source feature type combination, and target primitive constraint type and parameter mapping expression. The primitive constraint set covers plane fitting, plane alignment, axis alignment, point coincidence, distance, angle and cylinder coaxiality. Step S302: Replace each original assembly constraint with the corresponding primitive constraint according to the mapping rule, decompose the insertion constraint into cylindrical coaxial primitive constraint and planar fitting primitive constraint, and pass the original constraint parameters and geometric feature references to each primitive constraint obtained by decomposition.
[0054] After the local constraint diagram in step S201 is ready, perform constraint type mapping and composite constraint decomposition, see [link to relevant documentation]. Figure 3 Load the constraint mapping rule base. The rule base uses the source software name, source constraint type, and source feature combination as the search key. After a match is found, it provides the target primitive constraint type and parameter mapping expression.
[0055] The primitive constraint set includes seven categories: plane fitting, plane alignment, axis alignment, point coincidence, distance, angle, and coaxiality with cylinder. The rule base adopts a configurable structured text organization. Each rule records the search key, target primitive constraint, and parameter mapping expression. When adding new software or constraint types, rule entries can be added. The core processing flow does not need to be rewritten.
[0056] In one specific implementation, CATIA fit constraints are superimposed with two planar feature maps to form planar fit primitive constraints, Creo alignment constraints are superimposed with two axis feature maps to form axis alignment primitive constraints, and NX pairing constraints are superimposed with two round edge feature maps to form a combination of point coincidence primitive constraints and planar fit primitive constraints. The parameter mapping expression specifies the conversion relationship from source parameters to target parameters.
[0057] Based on this, a mapping is performed on each original constraint. Single-element constraints are directly replaced with corresponding primitive constraints according to the rules. After replacement, the parameters and geometric feature references of the original constraints are retained. The mapping results register the correspondence between the source constraint identifier and the target primitive constraint identifier for backflow review and traceability.
[0058] The composite constraint is decomposed according to its geometric meaning, see [link / reference]. Figure 3 Insertion constraints are decomposed into coaxial cylindrical element constraints and planar fitting element constraints. The decomposed element constraints inherit the offset, angle, and tolerance parameters of the original constraints, as well as the geometric feature references of faces, edges, axes, and points.
[0059] Optionally, original constraints that are not matched in the mapping rule base are registered as unmapped and transferred to the rule completion process. The completed rule entries are then merged into the rule base and remapped to avoid missing original constraints.
[0060] The primitive constraints obtained from mapping and decomposition are written to the primitive constraint cache with the constraint identifier as the primary key. Each primitive constraint records the target type, inherited parameters and source identifier, which are read by step S401 at the parameter normalization entry.
[0061] In one embodiment of the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints in this application, see [link to relevant documentation]. Figure 2 It can also specifically include the following: Step S401: Extract the numerical parameters of the primitive constraints, convert the distance parameters to millimeters and the angle parameters to radians according to the preset unit conversion rules, and attach the tolerance zone of the original constraints to the corresponding primitive constraints. Step S402: Normalize the direction vector in the numerical parameters to a unit vector, and convert each primitive constraint from the local coordinate system to the assembly root coordinate system according to the coordinate transformation relationship, thereby generating primitive constraints carrying standard unit parameters and unit direction vectors.
[0062] After the primitive constraints in step S301 are ready, parameter normalization and direction vector standardization are performed. See [link to relevant documentation]. Figure 2 Extract the numerical parameters of the primitive constraints, and convert the distance parameters to millimeters and the angle parameters to radians according to the preset unit conversion rules.
[0063] In one specific implementation, angle conversion is denoted as... ,in This is the original angle value. The value is the normalized radian value; the distance and offset parameters are converted according to the conversion factor between the source unit and the millimeter, and the tolerance zone of the original constraint is converted along with the parameters and added to the corresponding basic constraint.
[0064] The direction vector in the numerical parameters is normalized to a unit vector, denoted as . ,in The original direction vector, For its modulus length, This is the normalized unit vector.
[0065] Based on this, according to the coordinate transformation relationship, the constraints of each basic element are transformed from the local coordinate system to the assembly root coordinate system. See [link / reference] Figure 2 Coordinate unification eliminates directional ambiguity caused by differences in the local coordinate systems of various components, ensuring that the same geometric relationship has a consistent directional expression in the global constraint diagram.
[0066] Optionally, direction vectors with a modulus close to zero are registered as degenerate vectors and given a preset axial fallback. Parameters with overflow or missing units are registered as dimensional anomalies and transferred to manual verification. The verification results are rewritten and normalized.
[0067] The generated primitive constraints carrying standard unit parameters and unit direction vectors are written to the normalized cache with the constraint identifier as the primary key, so that step S501 can read them by component pair at the graph fusion entry point.
[0068] In one embodiment of the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints in this application, see [link to relevant documentation]. Figure 4 It can also specifically include the following: Step S501: Traverse the component nodes of each local constraint diagram, match the same physical part across the diagram according to the hash value of the component number and the instance path, generate a globally unique identifier for each physical part and establish a global identity mapping from the local identifier to the globally unique identifier. Step S502: Replace the source node and target node of each constraint edge with a globally unique identifier according to the global identity mapping. Remove duplicate equivalent constraints and superimpose complementary constraints for candidate edges pointing to the same pair of global nodes. Mark the same type of constraints with conflicting parameters as conflict constraints. When there is a plane fitting constraint for complete positioning of the same pair of parts, delete the redundant distance constraints and angle constraints between them. Verify the constraint cycle dependency of the global constraint graph according to the topology sort.
[0069] After the normalized primitive constraints in step S401 are ready, perform constraint graph fusion and global identity mapping, see [link to relevant documentation]. Figure 4 The system traverses the component nodes of each local constraint diagram and matches the same physical part across the diagram based on the hash value of the component number and the instance path.
[0070] Generate a globally unique identifier for each physical part and establish a global identity mapping from local identifiers to globally unique identifiers to ensure that the same part corresponds to only one global node in different sub-assemblies. The global identity mapping is organized with the local identifier as the primary key and the globally unique identifier as the value.
[0071] Accordingly, the source and target nodes of each constraint edge are replaced with globally unique identifiers, see [link to relevant documentation]. Figure 4 Candidate edges pointing to the same pair of global nodes are aggregated. Candidate edges with equivalent type and parameters are deduplicated. Candidate edges with complementary type are superimposed and stored as coexistence constraints. Candidate edges of the same type but with conflicting parameters are marked as conflict constraints and temporarily stored while retaining their respective source identifiers.
[0072] The redundancy elimination method removes redundant distance and angle constraints between two parts when there are fully positioned planar bonding constraints. For multiple parallel planar bondings, only the first one is retained, and the deleted constraints are registered with a redundancy flag for traceability.
[0073] Verify the global constraint graph based on topological sorting to detect constraint cycles. Sort the nodes according to the direction of constraint dependency. Strongly connected components that cannot be sorted completely correspond to constraint chains with directed cycles. Mark them as constraint cycles and output the sequence of nodes on the cycle.
[0074] Optionally, conflict constraints and circular dependencies are not directly overwritten or deleted, but are temporarily stored for review in step S701. The global constraint graph carries multi-source traceability tags and is written to the global graph storage with a globally unique identifier as the primary key.
[0075] The merged global constraint graph has no redundant nodes and complete edge information, which can be read by step S601 at the semantic generation entry point according to the globally unique identifier. The conflict constraint set and the constraint circular dependency list can be read by step S701.
[0076] In one embodiment of the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints in this application, see [link to relevant documentation]. Figure 2 It can also specifically include the following: Step S601: Generate resource description framework triples based on the normalized primitive constraints, using the globally unique identifiers of the two components as the subject and object respectively, and select the corresponding standard predicates from the standard product data model to express the assembly constraint relationship according to the primitive constraint type; Step S602: Organize the numerical values, units, and direction vectors of the primitive constraints into individual constraint parameters and associate them with the corresponding resource description framework triples. Based on availability, attach the geometric feature references of the involved components to the corresponding resource description framework triples.
[0077] After the global constraint graph in step S501 is ready, the resource description framework triple generation is performed. See [link to relevant documentation]. Figure 2 Triples are generated based on each normalized primitive constraint, with the globally unique identifiers of the two components serving as the subject and object, respectively. The corresponding standard predicates are selected from the standard product data model according to the primitive constraint type.
[0078] In one feasible implementation, plane bonding, plane alignment, axis alignment, point coincidence, distance, angle and cylinder coaxial primitive constraints correspond to their respective standard predicates. Taking plane bonding as an example, the triple is expressed as a subject-verb-object structure of the first part, the plane bonding predicate and the second part.
[0079] Accordingly, the numerical value, unit, and direction vector of the primitive constraint are organized into constraint parameter individuals and associated with the corresponding triplet. The parameter individuals of the distance constraint record the distance value and millimeter unit, and the parameter individuals of the angle constraint record the radian value. The tolerance zone and unit direction vector are attached as parameter individual attributes.
[0080] Based on availability, reference the geometric features of the components involved to the corresponding triples, see [link to relevant documentation]. Figure 2 Geometric features such as faces, edges, axes, and points are associated with triples through their global identifiers. When geometric features are unavailable, only component-level associations are retained, ensuring that triples can still be serialized in scenarios where features are missing.
[0081] Optionally, for predicates with no matching primitive constraints, a predicate missing identifier is registered and a general assembly constraint predicate is used as a fallback. At the same time, predicates to be expanded are recorded for reference in the expansion of standard product data patterns.
[0082] The generated resource description framework triples are organized with the globally unique identifier of the subject component as the primary key and written into the semantic storage, which can be directly used for downstream reading of assembly feasibility reasoning and kinematic simulation.
[0083] In one embodiment of the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints in this application, see [link to relevant documentation]. Figure 4It can also specifically include the following: Step S701: Collect the conflicting constraints and the cyclic dependencies of the constraints to form a set to be reviewed, and locate the relevant original assembly constraints and their respective local constraint graphs based on the set to be reviewed; Step S702: Based on the set to be reviewed, the relevant original assembly constraints are re-extracted and re-normalized. The re-normalized primitive constraints are flowed back to the global constraint graph and constraint edge aggregation and conflict marking are re-executed. After the conflict constraints and the circular dependencies of the constraints are cleared, the global constraint graph is output.
[0084] After the triples in step S601 are ready, perform a backflow check for conflicts and circular dependencies. See [link / reference] Figure 4 The system collects conflict constraints and constraint cycle dependencies marked in the graph fusion stage of step S501 to form a set to be reviewed. The set to be reviewed uses the conflict or cycle identifier as the primary key and records the global nodes and source identifiers involved.
[0085] Based on this, the relevant original assembly constraints and their corresponding local constraint diagrams are located according to the source identifiers in the set to be reviewed. The source identifiers are registered during extraction in step S201 and include the source software name and constraint number.
[0086] The relevant original constraints that have been located are re-extracted and re-normalized. The original constraints are then read by the adapter in step S101 and re-normalized back to step S401 to recalculate the unit and direction vector of the primitive constraints.
[0087] The renormalized primitive constraints are fed back to the global constraint graph. See [link / reference] Figure 4 Then, the constraint edge aggregation and conflict marking in step S501 are re-executed. After review, the candidate edges that are still equivalent are deduplicated, and the conflict constraints with consistent parameters are unmarked.
[0088] Optionally, conflict constraints or circular dependencies that cannot be resolved by re-extraction and re-normalization, along with the node sequences on the ring and multi-source traceability tags, are submitted for manual processing, and the results of the manual processing are written back to the set awaiting review.
[0089] After the conflict constraints and the circular dependencies of the constraints are cleared, a global constraint graph and a resource description framework triple are output, forming a closed loop of extraction, mapping, normalization, fusion, generation and backflow verification. The output results are read by downstream assembly reasoning with a globally unique identifier as the primary key.
[0090] To implement all or part of the method, this application provides an embodiment of an apparatus for implementing the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints, see [link to embodiment]. Figure 2 The device specifically includes the following components: The constraint extraction module is used to extract the original assembly constraints from the assembly model of the heterogeneous computer-aided design system and identify the type of the original assembly constraints, the parts and geometric features involved, and the constraint parameters. It constructs a local constraint graph carrying the original type and parameters with the parts as nodes and the constraints as edges. The mapping and reduction module is used to map each original assembly constraint to at least one primitive constraint in a preset primitive constraint set according to a predefined constraint mapping rule library, and to decompose the composite constraints therein into multiple primitive constraints. The parameter normalization module is used to normalize the parameters of the primitive constraints to standard units of millimeters and radians, normalize the direction vector to a unit vector and unify it to the assembly root coordinate system, and add the tolerance zone of the original constraints to the corresponding primitive constraints. The graph fusion module is used to merge local constraint graphs into a global constraint graph based on the global identity mapping, eliminate redundant constraints, mark conflicting constraints, and detect constraint cycle dependencies based on topological sorting. The semantic generation module is used to generate resource description framework triples that conform to the standard product data pattern based on the normalized primitive constraints and to express assembly constraint relationships using standard predicates. The conflict constraints and the circular dependency of the constraints trigger the re-extraction and re-normalization of the relevant original assembly constraints.
[0091] The constraint extraction module reads the assembly model based on the application programming interface of the heterogeneous computer-aided design system or the parsed intermediate assembly structure. For each original assembly constraint, it extracts the constraint type, involved parts and subassemblies, geometric features, and constraint parameters. Geometric features are distinguished as faces, edges, axes, and points; constraint parameters are distinguished as offset values, angle values, direction vectors, and tolerance zones. A local constraint graph carrying the original type, parameters, and source identifier is constructed using parts as nodes and constraints as edges. The mapping and reduction module loads a configurable constraint mapping rule library. Based on the source software name, source constraint type, and source feature combination, it maps each original constraint to a corresponding primitive constraint in the set of planar fit, planar alignment, axis alignment, point coincidence, distance, angle, and coaxial cylindrical primitive constraints. Inserted constraints are decomposed into coaxial cylindrical primitive constraints and planar fit primitive constraints.
[0092] The parameter normalization module extracts the numerical parameters of the primitive constraints, converts distances to millimeters and angles to radians, normalizes direction vectors to unit vectors, and unifies them to the assembly root coordinate system according to coordinate transformation relationships. It also adds the tolerance bands of the original constraints to the corresponding primitive constraints. The graph fusion module traverses the component nodes of each local constraint graph, matches the same physical part across graphs based on the hash value of the component number and instance path, generates a globally unique identifier, and establishes a global identity mapping. It replaces constraint edge nodes based on the global identity mapping and removes duplicate equivalent constraints, superimposes complementary constraints, and marks conflicting constraints for candidate edges pointing to the same pair of global nodes. When a fully positioned planar fit constraint exists, it deletes redundant distance and angle constraints and detects constraint cyclic dependencies based on topological sorting.
[0093] The semantic generation module generates resource description framework triples based on the normalized primitive constraints. Using the globally unique identifiers of two components as the subject and object, it selects standard predicates from the standard product data pattern to express assembly constraint relationships according to the primitive constraint type. The module organizes the numerical values, units, and direction vectors of the primitive constraints into individual constraint parameters and associates them with the corresponding triples. Geometric feature references of the involved components are added based on availability. The semantic generation module further collects conflicting constraints and constraint circular dependencies marked by the graph fusion module to form a set to be reviewed. Based on the source identifier, it locates the relevant original assembly constraints and triggers the re-extraction and re-normalization of these constraints. The re-normalized primitive constraints are then fed back to the global constraint graph, and constraint edge aggregation and conflict marking are re-executed. After the conflicting constraints and constraint circular dependencies are cleared, the global constraint graph and resource description framework triples are output.
[0094] As can be seen from the above description, the semantic normalization representation and conversion device for heterogeneous CAD assembly constraints provided in this application embodiment can perform semantic normalization on heterogeneous original assembly constraints and generate a unified representation of resource description framework that conforms to the standard product data pattern through the coordinated operation of five modules: constraint extraction, mapping reduction, parameter normalization, graph fusion and semantic generation.
[0095] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described method.
[0096] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0097] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method.
[0098] In this embodiment, the original assembly constraints of the heterogeneous computer-aided design system are reduced to finite element constraints and decomposed into composite constraints through a constraint mapping rule base. The original values and geometric orientations are preserved through parameter conversion and direction vector normalization. The component nodes are fused across graphs through global identity mapping and constraint edges are aggregated to eliminate redundancy, mark conflicting constraints, and detect constraint cycle dependencies. A resource description framework triplet conforming to the standard product data pattern is generated through standard predicates. Conflicting constraints and constraint cycle dependencies are backflowed to trigger the re-extraction and re-normalization of the relevant original assembly constraints and update the global constraint graph to form a closed loop.
[0099] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A semantic normalization representation and conversion method for heterogeneous CAD assembly constraints, characterized in that, The method includes: The original assembly constraints are extracted from the assembly model of the heterogeneous computer-aided design system. The type of the original assembly constraints, the components and geometric features involved, and the constraint parameters are identified. A local constraint graph carrying the original type and parameters is constructed with the components as nodes and the constraints as edges. According to the predefined constraint mapping rule base, each original assembly constraint is mapped to at least one primitive constraint in the preset primitive constraint set, and the composite constraints are decomposed into multiple primitive constraints. The parameters of the primitive constraints are normalized to the standard units of millimeters and radians, and the direction vectors are normalized to unit vectors and then unified to the assembly root coordinate system. Based on the global identity mapping, the local constraint graphs are merged into a global constraint graph, redundant constraints are eliminated, conflicting constraints are marked, and constraint cycle dependencies are detected. Based on the normalized primitive constraints, a resource description framework triplet conforming to the standard product data pattern is generated. The normalized assembly constraint relationship is expressed using standard predicates. The conflicting constraints and the cyclic dependency of the constraints trigger the re-extraction and re-normalization of the relevant original assembly constraints and update the global constraint graph.
2. The semantic normalization representation and conversion method for heterogeneous CAD assembly constraints according to claim 1, characterized in that, The process involves extracting original assembly constraints from the assembly model of a heterogeneous computer-aided design system, identifying the type of the original assembly constraints, the involved components and geometric features, and the constraint parameters, and constructing a local constraint graph carrying the original type and parameters using components as nodes and constraints as edges. The assembly model is read according to the application programming interface of the heterogeneous computer-aided design system. For each original assembly constraint, the constraint type, the involved parts and subassemblies, geometric features and constraint parameters are extracted. The geometric features include surfaces, edges, axes and points, and the constraint parameters include offset values, angle values, direction vectors and tolerance zones. The combination of the constraint type and the geometric feature is registered as a constraint identifier. A local constraint graph is constructed with components as nodes and constraints as edges. Each edge records the original constraint type, constraint parameters and source identifier. The original assembly constraint that fails to be read is registered, the anomaly identifier is extracted and transferred to the manual verification queue.
3. The semantic normalization representation and conversion method for heterogeneous CAD assembly constraints according to claim 1, characterized in that, The process of mapping each original assembly constraint to at least one primitive constraint from a preset primitive constraint set according to a predefined constraint mapping rule base, and decomposing the composite constraints therein into multiple primitive constraints, includes: Load a configurable constraint mapping rule library. Each mapping rule contains the source computer-aided design software name, source constraint type and source feature type combination, and target primitive constraint type and parameter mapping expression. The primitive constraint set covers plane fitting, plane alignment, axis alignment, point coincidence, distance, angle and cylinder coaxiality. According to the mapping rules, each original assembly constraint is replaced with the corresponding primitive constraint. The insertion constraints are decomposed into cylindrical coaxial primitive constraints and planar fitting primitive constraints. The original constraint parameters and geometric feature references are passed to the decomposed primitive constraints.
4. The semantic normalization representation and conversion method for heterogeneous CAD assembly constraints according to claim 1, characterized in that, The process of normalizing the parameters of the primitive constraints to standard units of millimeters and radians, and normalizing the direction vector to a unit vector and unifying them to the assembly root coordinate system includes: Extract the numerical parameters of the primitive constraints, convert the distance parameters to millimeters and the angle parameters to radians according to the preset unit conversion rules, and attach the tolerance zone of the original constraints to the corresponding primitive constraints. The direction vector in the numerical parameters is normalized to a unit vector. Based on the coordinate transformation relationship, each primitive constraint is transformed from the local coordinate system to the assembly root coordinate system, generating primitive constraints carrying standard unit parameters and unit direction vectors.
5. The semantic normalization representation and conversion method for heterogeneous CAD assembly constraints according to claim 1, characterized in that, The process of merging local constraint graphs into a global constraint graph based on global identity mapping, eliminating redundant constraints, marking conflicting constraints, and detecting constraint circular dependencies includes: Traverse the component nodes of each local constraint graph, match the same physical part across graphs based on the hash value of the component number and instance path, generate a globally unique identifier for each physical part and establish a global identity mapping from local identifier to globally unique identifier. Based on the global identity mapping, the source node and target node of each constraint edge are replaced with a globally unique identifier. For candidate edges pointing to the same pair of global nodes, duplicate equivalent constraints are removed, complementary constraints are superimposed, and constraints of the same type but with conflicting parameters are marked as conflict constraints. When there is a plane fitting constraint for complete positioning of the same pair of parts, redundant distance constraints and angle constraints between them are deleted. The global constraint graph is verified according to the topology sort to identify constraint cycle dependencies.
6. The semantic normalization representation and conversion method for heterogeneous CAD assembly constraints according to claim 1, characterized in that, The process of generating resource description framework triples conforming to the standard product data pattern based on normalized primitive constraints, and expressing normalized assembly constraint relationships using standard predicates, includes: Based on the normalized primitive constraints, a resource description framework triplet is generated. The globally unique identifiers of the two components are used as the subject and object, respectively. According to the primitive constraint type, the corresponding standard predicates are selected from the standard product data model to express the assembly constraint relationship. The numerical values, units, and direction vectors of the primitive constraints are organized into individual constraint parameters and associated with the corresponding resource description framework triples. Based on availability, the geometric features of the involved components are referenced and attached to the corresponding resource description framework triples.
7. The semantic normalization representation and conversion method for heterogeneous CAD assembly constraints according to claim 1, characterized in that, The step of triggering the re-extraction and re-normalization of the relevant original assembly constraints and updating the global constraint graph by backflowing the conflict constraints and the circular dependencies of the constraints includes: Collect the conflicting constraints and the cyclic dependencies of the constraints to form a set to be reviewed, and locate the relevant original assembly constraints and their respective local constraint graphs based on the set to be reviewed; Based on the set to be reviewed, the relevant original assembly constraints are re-extracted and re-normalized. The re-normalized primitive constraints are then fed back to the global constraint graph, and constraint edge aggregation and conflict marking are re-executed. The global constraint graph is output after the conflict constraints and the circular dependencies of the constraints are cleared.
8. A semantic normalization representation and conversion device for heterogeneous CAD assembly constraints, characterized in that, The device includes: The constraint extraction module is used to extract the original assembly constraints from the assembly model of the heterogeneous computer-aided design system and identify the type of the original assembly constraints, the parts and geometric features involved, and the constraint parameters. It constructs a local constraint graph carrying the original type and parameters with the parts as nodes and the constraints as edges. The mapping and reduction module is used to map each original assembly constraint to at least one primitive constraint in a preset primitive constraint set according to a predefined constraint mapping rule library, and to decompose the composite constraints therein into multiple primitive constraints. The parameter normalization module is used to normalize the parameters of the primitive constraints to standard units of millimeters and radians, normalize the direction vector to a unit vector and unify it to the assembly root coordinate system, and add the tolerance zone of the original constraints to the corresponding primitive constraints. The graph fusion module is used to merge local constraint graphs into a global constraint graph based on the global identity mapping, eliminate redundant constraints, mark conflicting constraints, and detect constraint cycle dependencies based on topological sorting. The semantic generation module is used to generate resource description framework triples that conform to the standard product data pattern based on the normalized primitive constraints and to express assembly constraint relationships using standard predicates. The conflict constraints and the circular dependency of the constraints trigger the re-extraction and re-normalization of the relevant original assembly constraints.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the semantic normalization representation and conversion method for heterogeneous CAD assembly constraints as described in any one of claims 1 to 7.