CN-121120941-B - Model graph synchronization method of three-dimensional modeling graph based on Chili3D
Abstract
The invention discloses a model graphic synchronization method of a three-dimensional modeling graph based on Chili3D, which comprises the following steps of S1, obtaining a geometric modeling graph model to be visualized, S2, constructing an attribute node mapping structure, S3, binding a generated fourth-order transformation matrix to a corresponding graph node, S4, generating a Boolean combined graph construction path, S5, generating a three-dimensional modeling graph structure, distributing a unique node ID for each graph node, recording a component identifier, a graphic element type and a current size parameter field, generating a graph binding mapping table, S6, monitoring graph editing operation, constructing a semantic updating mapping relation, and synchronously updating a graph binding mapping table. And S7, constructing a parameter difference matrix based on an operation transformation algorithm, and synchronously updating SysMLv model component parameters. The method is suitable for an integrated scene of SysMLv modeling environment and Chili3D graphic engine, and has the advantages of high model graphic synchronization precision, strong parameter change controllability and good semantic mapping consistency.
Inventors
- ZHU HUAWEI
- HUANG YAGUANG
- LIU YUSHENG
Assignees
- 杭州华望系统科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20250910
Claims (7)
- 1. The model graph synchronization method based on the three-dimensional modeling graph of Chili3D is characterized by comprising the following steps: s1, acquiring a geometric modeling diagram model to be visualized from a SysMLv modeling platform; s2, introducing an improved JSON-LD semantic analysis method to construct an attribute node mapping structure; The step S2 specifically comprises the following steps: S21, extracting multi-level key value mapping relation, inheritance path, type identifier and semantic context annotation information in attribute fields of a geometric parameter model by adopting an improved JSON-LD semantic analysis method, and constructing an attribute node mapping structure; S22, on the basis of the attribute node mapping structure, according to a semantic rule matching table of a preset primitive type and parameter fields, performing semantic mapping and structure matching operation, and binding the parameter fields obtained by analysis in the attribute node mapping structure with the corresponding preset primitive types to complete primitive type identification; S23, after the primitive type identification is completed, based on a Python mapping engine mechanism integrated in the improved JSON-LD semantic analysis method, automatically extracting corresponding size parameter fields from the attribute node mapping structure; S24, in the size parameter extraction process, if the problems of field naming conflict and semantic overlapping exist, the improved JSON-LD semantic analysis method introduces a conflict detection and fault tolerance mechanism based on field priority and semantic context, wherein when redundant and ambiguous fields occur in the same graphic primitive component, a main field defined in a field priority table is preferentially adopted, and ambiguous field rejection and redirection mapping are executed in combination with the semantic context; S25, the analysis results after semantic standardization, conflict fault tolerance and parameter completion are completed through an improved JSON-LD semantic analysis method are uniformly organized into structural primitive parameter intermediate representation, and the structural primitive parameter intermediate representation is used as an input structure of a subsequent three-dimensional graph expression system generation and graph binding flow; S3, binding the generated fourth-order transformation matrix to a corresponding graph node for the coordinate frame model; S4, analyzing the Boolean combination type for the Boolean operation model to generate a Boolean combination graph construction path; s5, driving a Chili3D graph construction engine by utilizing the structural primitive parameter intermediate representation, generating a three-dimensional modeling graph structure, distributing a unique node ID for each graph node, recording a component identifier, a primitive type and a current size parameter field, and generating a graph binding mapping table; S6, monitoring graphic editing operation, generating a structured change parameter set by means of a graphic parameter change detection algorithm, positioning a corresponding SysMLv model component in a graphic binding mapping table by means of a unique node ID, constructing a semantic update mapping relation, and synchronously updating the graphic binding mapping table; and S7, constructing a parameter difference matrix based on an operation transformation algorithm, and synchronously updating SysMLv model component parameters.
- 2. The model graph synchronization method based on the three-dimensional modeling graph of the Chili3D according to claim 1, wherein the S1 specifically includes: S11, acquiring a geometric modeling diagram model to be visualized from a SysMLv modeling platform, and transmitting the geometric modeling diagram model to a SysMLv geometric model analysis layer for analysis; s12, identifying GeometryView structures contained in the geometric modeling diagram model to be visualized; S13, traversing all modeling components contained in the GeometryView structure, and executing semantic type analysis operation of the modeling components according to type attributes of the modeling components in the SysMLv modeling platform and redefined model library entries; s14, the semantic type analysis operation of the modeling component divides the modeling component into three types, namely a geometric parameter model, a coordinate frame model and a Boolean operation model according to the type attribute and the semantic structure of the modeling component.
- 3. The method for synchronizing model graphics based on a three-dimensional modeling map of a Chili3D according to claim 1, wherein the S3 specifically comprises: s31, in the analyzed coordinate frame model, analyzing three-dimensional space transformation parameters defined in the coordinate frame model, wherein the three-dimensional space transformation parameters comprise a rotation matrix and a translation vector; s32, calling a three-dimensional affine matrix construction algorithm, and performing structural combination on the rotation matrix and the translation vector to generate a fourth-order transformation matrix conforming to the Chili3D engine specification; S33, binding the generated fourth-order transformation matrix to a corresponding graphic node, automatically setting the position coordinates and the space orientation of the graphic node in a three-dimensional scene according to the rotation matrix and the translation vector in the fourth-order transformation matrix when the Chili3D graphic engine renders the graphic node, realizing the space mapping of SysMLv model components in the Chili3D graphic structure, taking the rotation matrix and the translation vector as graphic element space state information, and writing the rotation matrix and the translation vector into the structural graphic element parameter intermediate representation.
- 4. The method for synchronizing model graphics based on a three-dimensional modeling map of a Chili3D according to claim 1, wherein S4 specifically comprises: s41, identifying a Boolean combination type field in the analyzed Boolean operation model, and distinguishing three types of combination, difference set and intersection set according to the Boolean combination type; S42, analyzing all Boolean subcomponent identifiers participating in the Boolean operation model, and determining the combination sequence of the Boolean subcomponents in the geometric modeling graph model; The spatial relationship of the participating components is the position overlapping condition, the nesting relationship and the relative arrangement mode which are presented in the three-dimensional modeling diagram among the Boolean subcomponents before the Boolean operation is executed; S43, embedding the Boolean subcomponent graph into a Boolean graph combination path, executing corresponding Boolean operation, generating a complex primitive structure meeting combination requirements, and mounting the generated Boolean combination graph to a target node of a three-dimensional modeling graph; the Boolean subcomponent graph is a three-dimensional representation of components participating in Boolean arithmetic operations in a graphics engine; the corresponding boolean operation is based on a predefined combination type, union, difference, intersection, geometric level operation performed; S44, taking the Boolean combination type, the Boolean subcomponent combination sequence and the Boolean graphic combination path as semantic structure contents of the combination primitive, and incorporating the semantic structure contents into the structural primitive parameter intermediate representation.
- 5. The method for synchronizing model graphics based on a three-dimensional modeling map of a Chili3D according to claim 1, wherein S5 specifically comprises: S51, driving a graph construction engine deployed on a Chili3D visualization layer based on the structural primitive parameter intermediate representation, and initializing a three-dimensional modeling flow: S52, dynamically generating corresponding graphic nodes according to definition of primitive types and size parameter fields in the intermediate representation of the structured primitive parameters, and setting graphic identifiers and node types of the graphic nodes; S53, when the graphic element is detected to be of a Boolean operation type, analyzing a Boolean combination type field and a sub-component identification list in a structured graphic element parameter, and constructing a Boolean graphic combination path according to a set component combination sequence; S54, uniformly organizing the generated basic primitive nodes and the combined primitive nodes into a Chili3D three-dimensional modeling graph structure to form a three-dimensional graph expression system corresponding to SysMLv model components one by one; And S55, after the graph generation flow of S51-S54 is completed, establishing SysMLv a binding mapping relation between the model component and the Chili3D graph nodes, namely distributing unique node IDs for each Chili3D graph node, and recording the corresponding binding component identifications, the primitive types and the current size parameter fields into a graph binding mapping table.
- 6. The method for synchronizing model graphics based on a three-dimensional modeling map of a Chili3D according to claim 1, wherein S6 specifically comprises: S61, monitoring graphic editing operation of a user on graphic nodes in the three-dimensional modeling graph in a Chili3D interactive interface; s62, for the monitored graph editing operation, calling a graph parameter change detection algorithm deployed in a bidirectional data conversion engine to extract updated parameter values of graph nodes, wherein the graph parameter change detection algorithm comprises a structural difference comparison algorithm and a parameter tree Diff algorithm and is used for comparing numerical differences of graph parameter tree structures before and after change to generate a structural change parameter set; S63, inquiring a graph binding mapping table based on the unique node ID of the graph node with the graph editing operation currently, and positioning SysMLv model component identification information bound with the graph node; s64, constructing a semantic update mapping relation according to the difference between the structured change parameter set and the space component parameter set; s65, writing the constructed semantic update mapping relation into the position of the corresponding model component in the original SysMLv model component, completing the semantic write-back of the graphic editing operation to the model component, and completing the semantic synchronization from the Chili3D graphic structure to the SysMLv model component; And S66, after the semantic write-back is completed, recording the graph node ID, the change field name, the old value and the new value of the graph change event, and updating the graph parameter value of the corresponding item in the graph binding mapping table.
- 7. The method for synchronizing model graphics based on a three-dimensional modeling map of a Chili3D according to claim 1, wherein S7 specifically comprises: s71, after the semantic write-back is completed, an operation transformation algorithm is called, field level comparison is carried out on the updated structural change parameter set of the model component and the parameter set before updating, and the operation transformation algorithm firstly converts the two groups of parameter sets into a nested field structure respectively, wherein each field comprises a field path, a field type and a field value; comparing field values item by item along a field path by utilizing a parameter key value structure traversing mechanism, and judging whether numerical value change, enumeration replacement or semantic modification occurs in each field; Generating a difference record for each field according to the comparison result, and summarizing to form a parameter difference matrix; S72, the parameter difference matrix takes a component mark of a model component as a row index, takes a name of a size parameter field as a column index, each parameter difference matrix element represents a parameter numerical value difference of the size parameter field before and after graphic editing, and the difference measurement adopts an L2 norm; s73, setting a predefined parameter change threshold, traversing a parameter difference matrix, screening out parameter fields with all parameter numerical value difference values larger than or equal to the parameter change threshold, and forming a current increment updating field set; S74, for each size parameter field in the increment updating field set, firstly reading the numerical value difference of the size parameter field in the parameter difference matrix; If the numerical value difference is greater than or equal to a preset parameter change threshold value, accurately positioning the same-name field in SysMLv model components and covering the old value according to the corresponding relation between the node ID and the component identification recorded by the graphic binding mapping table, wherein the field with the difference lower than the threshold value keeps the original value unchanged; s75, after the SysMLv model component parameter updating is completed, synchronously updating the parameter value records of the related components in the graph binding mapping table according to the increment updating result of the round, so that the graph binding mapping table reflects the latest state of the current model component; S76, recording the increment updating process of the round as a structured log item, wherein the log item comprises a component identifier, a graph node ID, a parameter field name, an old value, a new value and a corresponding numerical value difference, and storing the log item into a graph change log.
Description
Model graph synchronization method of three-dimensional modeling graph based on Chili3D Technical Field The invention relates to the technical field of computer aided design and system engineering visualization, in particular to a model graph synchronization method based on a three-dimensional modeling graph of Chili 3D. Background In the current system modeling and visualization development, sysMLv is used as a standardized system modeling language and is widely applied to demand modeling, structure modeling and behavior modeling of a complex system. The method has the characteristics of strict semantics and strong expression capability, and can support the definition of space components, coordinate frames and combination bodies through geometrical information in GeometryView structural expression models. However, in practical engineering application, sysMLv modeling results are efficiently mapped into three-dimensional graphic representations, so that an interactive and editable modeling graphic structure is realized, and a series of technical problems still face. The current visualization tool generally adopts a static modeling flow, derives the geometric structure in SysMLv, and then carries out unidirectional rendering by a graphic engine. The method has two main problems that the existing tool mostly lacks fine granularity resolving capability for semantic structures in SysMLv models, and particularly when processing multi-layer nested attribute fields, coordinate frame transformation information and Boolean operation models, the problems of semantic loss, incomplete primitive construction and the like often occur, so that finally generated graphic nodes cannot accurately reflect the original semantics of modeling components. After the model graphics are rendered, an effective graphic editing feedback mechanism is lacked, and the adjustment made by a user on a graphic interface cannot be synchronously updated into an original model, so that the model is inconsistent with the graphics state, and the consistency maintenance and collaborative modeling efficiency of the system are affected. The current graphic synchronization method also has a disadvantage in the parameter updating process. When the graphic parameters are edited and changed, the traditional method often directly covers all model parameters, lacks a difference judging and screening mechanism for parameter change, is easy to introduce redundancy update and error modification problems, and particularly has more obvious influence in a large-scale complex system. Therefore, a graphic synchronization method capable of realizing high-fidelity mapping, parameter-level synchronization updating and graphic change accurate recording between SysMLv models and three-dimensional graphics is needed to support efficient, accurate and interactive model visualization and semantic bidirectional updating processes. The technical bottleneck is the core problem to be solved by the invention. Disclosure of Invention The invention aims to provide a three-dimensional modeling graph model-graph synchronization method based on SysMLv geometric views and a Chili3D engine, which comprehensively utilizes improved JSON-LD semantic analysis, python mapping engines, three-dimensional affine matrix construction, boolean graph combination paths and operation transformation algorithms, and provides a bidirectional data channel construction flow from a model to a graph re-write model in detail, so that size parameters and space states can be synchronized in real time. The method realizes high-fidelity rendering of complex Boolean geometry, incremental semantic write-back of graphic editing results and automatic detection of graph-mode differences, and has the advantages of high geometric accuracy, strong synchronization instantaneity, high iteration efficiency and low cross-role collaborative cost. According to the embodiment of the invention, the model graph synchronization method based on the Chili3D three-dimensional modeling graph comprises the following steps: s1, acquiring a geometric modeling diagram model to be visualized from a SysMLv modeling platform; s2, introducing an improved JSON-LD semantic analysis method to construct an attribute node mapping structure; S3, binding the generated fourth-order transformation matrix to a corresponding graph node for the coordinate frame model; S4, analyzing the Boolean combination type for the Boolean operation model to generate a Boolean combination graph construction path; s5, driving a Chili3D graph construction engine by utilizing the structural primitive parameter intermediate representation, generating a three-dimensional modeling graph structure, distributing a unique node ID for each graph node, recording a component identifier, a primitive type and a current size parameter field, and generating a graph binding mapping table; S6, monitoring graphic editing operation, generating a structured change parameter set by mean