CN-122019357-A - CAD kernel automatic test system and method based on real ship model calculation example
Abstract
The invention discloses a CAD kernel automation test system based on real ship model calculation, which comprises a portal application layer, a test service layer, a CAD function layer, a kernel interface layer and a data layer, wherein the portal application layer is used for providing a user interaction interface, integrating functions of user management, test task management, CAD geometric kernel library management, calculation example visualization, test example starting, test report generation and system log record, the test service layer is used for a test scheduling middle stage, and the CAD function layer is used for integrating complex curved surface modeling, structure entity creation, outfitting entity creation and geometric figure calculation modules. According to the invention, by constructing a real ship engineering calculation library, an automatic test scheduling engine and a multidimensional comparison analysis module, the efficient and accurate verification of the CAD kernel is realized.
Inventors
- MA YANJUN
- SHI SHAOGANG
- CAO WEINING
- ZHANG RUI
- HE WENXIN
- HOU HAOTIAN
- ZHENG BINHUA
- YU YANG
Assignees
- 沪东中华造船(集团)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251209
Claims (16)
- 1. The CAD kernel automatic test system based on real ship model calculation is characterized by comprising a portal application layer, a test service layer, a CAD functional layer, a kernel interface layer and a data layer; The portal application layer is used for providing a user interaction interface, integrating functions of user management, test task management, CAD geometric kernel library management, example visualization, test example starting, test report generation and system log record, supporting users to submit CAD geometric kernel libraries conforming to a standardized interface on line, selecting preset real ship model examples to start automatic test, and comparing and analyzing test results through a visual interface; The test service layer is used for testing the dispatching center, receiving a user test instruction, analyzing and executing an automatic test script related to a model example, dispatching a lower CAD functional module to complete model reconstruction, and carrying out multidimensional comparison analysis on a test result and reference example data; The CAD functional layer is used for integrating complex curved surface modeling, structural entity creation, outfitting entity creation and geometric figure calculation modules, and responding to the call of the test service layer to execute model reconstruction operation; the kernel interface layer is used for packaging eight-core CAD operation interfaces of geometric calculation, topology calculation, curved surface modeling, curve modeling, geometric data operation, import and export, body modeling and Boolean operation, and provides standardized calling service for upper-layer functions; The data layer is used for storing real ship model calculation examples, CAD kernel libraries, test task records, ship design standards and reference calculation example result data and supporting version management and consistency verification of the calculation example model data.
- 2. The CAD kernel automation test system based on the real ship model calculation example is characterized in that a user management module of the portal application layer supports role-based authority control, comprises an administrator role and a tester role, achieves encryption storage and access audit of user information, supports creation, editing and deletion operations of a test task, task parameters comprise calculation example IDs, kernel inventory storage paths and test parameters, provides a standardized interface verification function, automatically verifies compatibility of uploading kernel libraries and dependency libraries, integrates a lightweight display engine, supports online preview and interaction of a neutral format model, supports one-key triggering of the test task, automatically distributes computing resources and generates an isolated test environment, automatically generates a structured test report, supports PDF and HTML format output, and comprehensively records user operation, test execution details and system exception information.
- 3. The CAD kernel automation test system based on real ship model calculation example according to claim 1, wherein the test service layer comprises a test instruction analysis sub-module, an automation script scheduling sub-module, a test resource allocation sub-module, a multi-dimensional comparison analysis sub-module and a test result output sub-module; the test instruction analysis submodule adopts XML or JSON format to analyze test task parameters; the automatic script scheduling sub-module integrates a Python script engine and supports dynamic loading and execution of the test script; the test resource allocation submodule dynamically allocates test resources based on a Docker container technology and generates an independent test environment for each test task; The multi-dimensional comparison analysis submodule realizes comprehensive analysis of area deviation, volume deviation and sampling point deviation; And the test result output sub-module is used for storing the comparison result in a structured mode and generating test result data in a unified format.
- 4. The CAD kernel automation test system based on real ship model calculation examples is characterized in that a complex curved surface modeling module of a CAD functional layer is used for realizing high-precision reconstruction of a ship body curved surface based on an NURBS algorithm, a structural entity creation module is used for integrating a B-Rep entity modeling algorithm and generating a structural model with open holes and end cutting characteristics by combining Boolean operation, an outfitting entity creation module is used for driving B-Rep entity to be generated in batches based on a standard component library and supporting interference conditions of an outfitting piece and a ship body structure, and a geometric figure calculation module is used for providing profile generation, interference check and compartment calculation functions and calling a geometric kernel algorithm to realize design verification.
- 5. The CAD kernel automated test system based on real ship model calculation of claim 1, wherein the interface of the kernel interface layer geometric calculations provides functions of curve affine transformation, curve offset, curve curvature and curve extension; the interface of the topology calculation provides the functions of body segmentation, surface segmentation and surface area volume calculation; the interface of the curved surface modeling provides functions of stretching, sweeping, filling and NURBS curved surface construction with multiple sections; The curve modeling interface comprises curve chamfering, curve rounding and three-dimensional circular spline interpolation; the geometric data interface comprises node insertion, node removal and curve center of gravity acquisition; The import and export interface provides the functions of IGES file reading and writing, STEP file reading and writing and STL file guiding; The body modeling interface provides the construction functions of a cuboid, a cone, a cylinder and a B-Rep entity of a deck; the Boolean operation interface provides Boolean operation of a union set, a difference set and an intersection set, and optimizes an operation algorithm of a complex model.
- 6. The CAD kernel automation test system based on real ship model calculation of claim 1, wherein the real ship model calculation of the data layer stores real ship engineering data based test calculation, each calculation comprising an automation test script, input data, reference model data and neutral format model files; The CAD kernel library stores a user uploading geometry kernel file, a kernel name, a kernel library version and developer metadata; The test task record library stores configuration parameters, execution states and result data of the test task, wherein the task record comprises task ID, creation time, execution time and result states; the ship design standard library stores professional design standards such as ship structures, outfitting and the like; and the reference example result library provides reference model data constructed based on the verified authoritative CAD kernel, and the test service layer calls and compares and analyzes the reference model data.
- 7. The CAD kernel automation test system based on real ship model examples according to claim 6, wherein the real ship model examples are constructed based on real ship engineering data, the real ship model examples comprise an automation test script, example input data, reference model data and a neutral format model file, and the example types comprise complex curved surface modeling examples, structural entity modeling examples, outfitting entity modeling examples and geometric figure calculation examples.
- 8. The CAD kernel automation test system based on real ship model calculation examples according to claim 7, wherein the complex curved surface modeling calculation examples comprise NURBS curved surface reconstruction calculation examples of a ship bow, a stern, a midship and a full hull, and the automatic reconstruction is realized by reading the linear data of the ship body and calling a curved surface modeling algorithm of a geometric kernel; The structural solid modeling calculation examples comprise parameterized modeling calculation examples of a hull plate frame, a deck, segments and a total segment, and a structural model with open pores and end cutting characteristics is generated by combining Boolean operation based on hull definition data and invoking a B-Rep solid modeling or curved surface modeling algorithm; The outfitting entity modeling example covers pipe, electric, air pipe, inner outfitting system and outer outfitting system parts, an outfitting system model is automatically generated by reading outfitting standard data and calling a B-Rep entity modeling algorithm, and interference inspection between the outfitting system and a ship structure is supported; The geometric figure calculation example comprises ship profile generation, interference check and ship cabin division calculation, and the automatic verification of design drawing generation, model interference check and cabin division is realized by calling intersection of geometric kernels, boolean operation and volume calculation algorithm.
- 9. The CAD kernel automation test system based on real ship model calculation example of claim 1, wherein the test service layer dynamically allocates computing resources and generates isolated test examples when executing test tasks, so that the parallel execution of the multiple tasks is not interfered with each other, and after the test is completed, the volume difference between the test model and the reference model is calculated, the area difference is calculated by triangular surface patch, the distance deviation is calculated by point cloud sampling, and a quantitative comparison analysis result is generated.
- 10. A CAD kernel automation test method based on a real ship model calculation example, which adopts the CAD kernel automation test system based on a real ship model calculation example as set forth in any one of claims 1 to 9, and is characterized in that the method specifically comprises the following steps: s1, a user logs in through portal registration, uploads a standardized and packaged CAD geometric kernel library and configures metadata; s2, a user creates a test task, selects a real ship model calculation example type, and executes automatic test example generation; S3, the test service layer analyzes the test instruction, schedules an automatic script corresponding to the calculation example, starts the three-dimensional CAD client and calls the kernel interface to complete model reconstruction; s4, collecting model data generated by testing, and carrying out volume, area and point cloud deviation analysis with a reference example to generate a quantitative comparison result; S5, automatically generating a test report by the portal application layer based on the comparison result, and supporting the user to view the visual model and the test conclusion on line; s6, the user optimizes the geometric kernel according to the test feedback, and iteratively executes the test flow until the precision requirement is met.
- 11. The automatic CAD kernel testing method based on real ship model calculation example according to claim 10, wherein the user registration in S1 provides user name, password and mailbox information, the uploaded kernel library accords with standardized interface specifications, and the metadata comprises information of kernel name, version number and kernel developer.
- 12. The CAD kernel automation test method based on the real ship model calculation example is characterized in that in S2, a user creates a test task through a Web interface, task parameters comprise calculation example ID, kernel inventory path and test parameters, and the system automatically matches the real ship model calculation example according to the task parameters to generate an isolated test example for resource allocation and environment initialization.
- 13. The CAD kernel automation test method based on real ship model calculation examples is characterized in that a test service layer in S3 adopts a parser to parse instruction files in XML/JSON format, extracts calculation example IDs, kernel names and test parameters, loads corresponding automation test scripts according to the calculation example IDs, dynamically executes the test scripts through a script engine, starts a three-dimensional CAD client to call a kernel interface to complete model reconstruction, wherein a NURBS curved surface modeling algorithm is called by a complex curved surface modeling calculation example to directly reconstruct a ship body curved surface, a parameterized structural model is generated by combining a structural entity model calculation example with a B-Rep body modeling and Boolean operation, a outfitting entity model calculation example drives the B-Rep entity to be generated in batches based on a standard component library, and a geometric figure calculation example realizes a design verification function through intersection, sectioning and Boolean operation.
- 14. The CAD kernel automatic test method based on the real ship model calculation example is characterized in that S4 model data acquisition comprises geometric data, topological data and attribute data, area deviation is calculated through triangular surface tiling or surface area division, point cloud deviation analysis adopts uniform sampling to calculate distance, quantitative comparison results comprise deviation values, standard deviations and maximum deviation statistical indexes, and the quantitative comparison results are automatically compared with preset tolerance to judge test results.
- 15. The automatic CAD kernel testing method based on real ship model calculation according to claim 10, wherein the test report generating module reads the comparison result to generate a structured report in PDF and HTML formats in S5.
- 16. The CAD kernel automatic test method based on the real ship model calculation example is characterized in that the test feedback in the S6 provides detailed deviation analysis, a user uploads a new version after optimizing the geometric kernel, the system supports version management and historical test data comparison, and the iterative test flow is automatically executed until all the test calculation examples meet the accuracy index required by the ship design standard.
Description
CAD kernel automatic test system and method based on real ship model calculation example Technical Field The invention belongs to the technical field of ship digitization, and particularly relates to a CAD (computer aided design) kernel automatic test system and method based on a real ship model calculation example. Background The system adopts a three-dimensional graphic platform, has functional modules of overall design, structural design, piping design, air pipe design, electric design, external outfitting design, internal outfitting design and the like, can realize the integrated design of the ship, forms a ship three-dimensional Digital model, and provides complete data information for the whole flow of ship design, manufacture and management. The stability and accuracy of the geometric kernel of the three-dimensional CAD system of the ship are critical to the design quality of the ship. Minor errors in the geometric kernels may lead to design defects, production rework, and even significant loss. At present, the test of CAD geometric kernels mainly faces the following problems: 1) The test cases are insufficient in coverage, that is, the traditional test mostly adopts a simple geometric model or a test case with a manual structure, and the complexity of the real ship design is difficult to reflect. The ship design involves a large number of complex curved surfaces (such as hull lines), structural entities (such as grillages, segments) and outfitting systems, the geometric characteristics (such as curvature continuity, topological integrity) of these models are extremely demanding on the kernel algorithm, but the existing test methods lack standardized test examples for real ship models. 2) The test automation degree is low, the kernel test is dependent on manual execution of test scripts, the result is visually compared, the efficiency is low, and errors are easy to occur. Especially for the CAD kernel of the ship, the whole process from the three-dimensional modeling of the ship to the design drawing is required to be covered, and the manual test is difficult to realize multi-task parallel and rapid iteration. 3) The prior test results are dependent on manual judgment, and objective quantitative indexes (such as volume difference, area difference and point cloud deviation) are lacked to evaluate the kernel accuracy. The design of the ship needs to meet strict design requirements, but the existing test method is difficult to realize automatic comparison analysis with reference data. Disclosure of Invention The invention aims to overcome the defects in the prior art and provide a CAD kernel automatic test system and method based on real ship model calculation, and the method realizes the efficient and accurate verification of the CAD kernel by constructing a real ship engineering calculation library, an automatic test scheduling engine and a multidimensional comparison analysis module. In order to achieve the above object, the present invention provides the following technical solutions: The CAD kernel automatic test system based on real ship model calculation example includes portal application layer, test service layer, CAD function layer, kernel interface layer and data layer; The portal application layer is used for providing a user interaction interface, integrating functions of user management, test task management, CAD geometric kernel library management, example visualization, test example starting, test report generation and system log record, supporting users to submit CAD geometric kernel libraries conforming to a standardized interface on line, selecting preset real ship model examples to start automatic test, and comparing and analyzing test results through a visual interface; The test service layer is used for testing the dispatching center, receiving a user test instruction, analyzing and executing an automatic test script related to a model example, dispatching a lower CAD functional module to complete model reconstruction, and carrying out multidimensional comparison analysis on a test result and reference example data; The CAD functional layer is used for integrating complex curved surface modeling, structural entity creation, outfitting entity creation and geometric figure calculation modules, and responding to the call of the test service layer to execute model reconstruction operation; the kernel interface layer is used for packaging eight-core CAD operation interfaces of geometric calculation, topology calculation, curved surface modeling, curve modeling, geometric data operation, import and export, body modeling and Boolean operation, and provides standardized calling service for upper-layer functions; The data layer is used for storing real ship model calculation examples, CAD kernel libraries, test task records, ship design standards and reference calculation example result data and supporting version management and consistency verification of the calculation example model data