A testing method and apparatus for a geometry modeling engine based on scalable parameters

By deploying test scripts in the geometric modeling engine and using the command interface layer to convert and pass in adaptation parameters, the problem of low testing efficiency in the geometric modeling engine is solved, and the writing of test instructions is simplified, while the versatility and scalability of test scripts are improved.

CN120276981BActive Publication Date: 2026-01-30粤港澳大湾区(广东)国创中心
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510270619.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2026-01-30
Estimated Expiration
2045-03-07

AI Technical Summary

Technical Problem

Existing geometric modeling engines suffer from low testing efficiency, lack of ease of use, and insufficient scalability, resulting in high testing difficulty and complex programming processes.

Method used

By deploying test scripts in the geometric modeling engine and utilizing the command interface layer to provide parameter passing entry points, model parameters adapted to the geometric modeling engine can be converted and passed in, supporting variable parameter passing, simplifying the test instruction writing process, and improving the versatility and scalability of test scripts.

Benefits of technology

It reduces the testing difficulty of the geometric modeling engine, simplifies the test instruction writing process, improves the universality and scalability of test scripts, and ensures the verification and testing effect of modeling operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276981B_ABST
    Figure CN120276981B_ABST
Patent Text Reader

Abstract

This invention provides a method and apparatus for testing a geometric modeling engine based on scalable parameters, relating to the field of software testing technology. The method includes: responding to a command input operation to a command interface layer, determining a modeling test command corresponding to the command input operation, wherein the modeling test command is a command in the form of a first programming language, and the modeling test command includes at least a geometric modeling operation and a first model parameter corresponding to the geometric modeling operation; converting the first model parameter into a second model parameter adapted to the geometric modeling engine through the command interface layer, and transmitting the second model parameter to the geometric modeling engine through a parameter passing entry, wherein the second model parameter is a parameter in the form of a second programming language; executing the geometric modeling operation according to the second model parameter, and, in response to the completion of the geometric modeling operation, presenting the execution result corresponding to the geometric modeling operation in the control interface, thereby improving testing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of software testing, in particular to a geometric modeling engine testing method based on extensible parameters, a geometric modeling engine testing device based on extensible parameters, an electronic device and a computer readable storage medium. BACKGROUND

[0002] In CAD (Autodesk Computer Aided Design, AutoCAD software) industrial software, the geometric modeling engine is the core part of the software, responsible for processing all geometric calculations and data management. Among them, the testing of the function and performance of the geometric modeling engine is crucial, which can effectively ensure the accuracy and efficiency of the software in processing complex geometric problems. However, in the process of testing the geometric modeling engine, there are problems of low testing efficiency, lack of ease of use, poor scalability and insufficient flexibility. SUMMARY

[0003] The embodiments of the present application provide a geometric modeling engine testing method and device based on extensible parameters to solve or partially solve the problems of low testing efficiency, lack of ease of use, poor scalability and insufficient flexibility in the process of testing the geometric modeling engine.

[0004] The embodiments of the present application disclose a geometric modeling engine testing method based on extensible parameters, applied to a geometric modeling engine, and a test script is deployed in the geometric modeling engine; wherein the test script at least includes a command interface layer, the command interface layer provides a parameter passing entrance for the geometric modeling engine, and the method comprises:

[0005] In response to a command input operation for the command interface layer, a modeling test command corresponding to the command input operation is determined, the modeling test command is a command in a first programming language form, and the modeling test command at least includes a geometric modeling operation and a first model parameter corresponding to the geometric modeling operation;

[0006] The first model parameter is converted into a second model parameter suitable for the geometric modeling engine through the command interface layer, and the second model parameter is passed into the geometric modeling engine through the parameter passing entrance, and the second model parameter is a parameter in a second programming language form;

[0007] The geometric modeling operation is performed according to the second model parameter, and in response to the completion of the geometric modeling operation, an execution result corresponding to the geometric modeling operation is presented in the control interface.

[0008] In some possible implementation manners, the command interface layer encapsulates a plurality of command classes, the command classes are classes encapsulated by using a second programming language, the command interface layer comprises operation entrances corresponding to the command classes, the operation entrances are displayed in a control interface of the test script, and the conversion of the first model parameters into the second model parameters suitable for the geometric modeling engine by using the command interface layer comprises the following steps:

[0009] Determining a target operation entrance corresponding to the command input operation;

[0010] Selecting a target command class matched with the target operation entrance from the command classes, the target command class comprising at least a target member variable and a target member function;

[0011] Converting the first model parameters into the second model parameters suitable for the geometric modeling engine according to the target member variable and the target member function.

[0012] In some possible implementation manners, the test script comprises a general base class, the general base class is used at least for activating the command classes, logging off the command classes and recording execution processes of the command classes; and the command classes inherit the general base class, and the command classes comprise at least member variables and member functions.

[0013] In some possible implementation manners, the member variables comprise at least one of a currently active geometric object and model parameters required for executing a modeling test command;

[0014] The member functions comprise at least one of a constructor, a destructor, a geometric operation instruction parameter setting function and a calling function.

[0015] In some possible implementation manners, the conversion of the first model parameters into the second model parameters suitable for the geometric modeling engine according to the target member variable and the target member function comprises the following steps:

[0016] Activating the target command class by using the general base class, and converting the first model parameters into the second model parameters suitable for the geometric modeling engine according to the target member variable and the target member function in the target command class.

[0017] In some possible implementation manners, before the geometric modeling operation is executed according to the second model parameters, the method further comprises the following steps:

[0018] If at least one parameter exception exists in the second model parameters, outputting exception feedback information and exception correction information for the second model parameters;

[0019] If the second model parameter is detected to have the parameter abnormality, the second model parameter is transmitted into the geometric modeling engine.

[0020] In some possible implementation manners, if the second model parameter is detected to have at least one parameter abnormality, abnormal feedback information and abnormal correction information for the second model parameter are output.

[0021] The target parameter quantity and the target parameter type corresponding to the second model parameter are acquired.

[0022] If the second model parameter fails to match the geometric modeling operation, parameter error information and parameter correction information for the second model parameter are output.

[0023] If the target parameter quantity of the second model parameter does not conform to the parameter quantity required by the geometric modeling operation, parameter quantity abnormality information and correct quantity information for the second model parameter are output.

[0024] If the target parameter type of the second model parameter does not conform to the parameter type required by the geometric modeling operation, parameter type abnormality information and correct type information for the second model parameter are output.

[0025] The embodiment of the application further discloses a geometric modeling engine testing device based on an extensible parameter, applied to a geometric modeling engine, and a testing script is deployed in the geometric modeling engine; wherein the testing script at least includes a command interface layer, the command interface layer provides a parameter input port for the geometric modeling engine, and the device includes:

[0026] A command determination module is configured to determine a modeling test command corresponding to a command input operation in response to the command input operation on the command interface layer, the modeling test command being a command in a first programming language, and the modeling test command at least including a geometric modeling operation and a first model parameter corresponding to the geometric modeling operation.

[0027] A parameter processing module is configured to convert the first model parameter into a second model parameter suitable for the geometric modeling engine through the command interface layer, and transmit the second model parameter into the geometric modeling engine through the parameter input port, the second model parameter being a parameter in a second programming language.

[0028] An execution module is configured to execute the geometric modeling operation according to the second model parameter, and present an execution result corresponding to the geometric modeling operation in the control interface in response to the completion of the execution of the geometric modeling operation.

[0029] In some possible implementation manners, the command interface layer encapsulates a plurality of command classes, the command classes are classes encapsulated by using a second programming language, the command interface layer comprises operation entrances corresponding to the command classes, the operation entrances are displayed in a control interface of the test script, and the parameter processing module is specifically configured to:

[0030] determine a target operation entrance corresponding to the command input operation;

[0031] select a target command class matched with the target operation entrance from the command classes, the target command class comprising at least a target member variable and a target member function;

[0032] convert the first model parameter into a second model parameter adapted to the geometric modeling engine according to the target member variable and the target member function.

[0033] In some possible implementation manners, the test script comprises a general base class, the general base class is used at least for activating the command classes, logging off the command classes, and recording execution processes of the command classes; and the command classes inherit the general base class, and the command classes comprise at least member variables and member functions.

[0034] In some possible implementation manners, the member variables comprise at least one of a currently active geometric object and a model parameter required for executing a modeling test command.

[0035] The member functions comprise at least one of a constructor, a destructor, a geometric operation instruction parameter setting function, and a calling function.

[0036] In some possible implementation manners, the parameter processing module is specifically configured to:

[0037] activate the target command class through the general base class, and convert the first model parameter into the second model parameter adapted to the geometric modeling engine according to the target member variable and the target member function in the target command class.

[0038] In some possible implementation manners, the apparatus further comprises:

[0039] a detection module configured to output abnormal feedback information and abnormal correction information for the second model parameter if it is detected that the second model parameter has at least one parameter abnormality.

[0040] a transmission module configured to transmit the second model parameter into the geometric modeling engine if it is not detected that the second model parameter has the parameter abnormality.

[0041] In some possible implementation manners, the detection module is specifically configured to:

[0042] acquire a target parameter quantity and a target parameter type corresponding to the second model parameter;

[0043] if the second model parameter fails to match the geometric modeling operation, output parameter error information and parameter correction information for the second model parameter;

[0044] if the target parameter quantity of the second model parameter does not conform to the parameter quantity required by the geometric modeling operation, output parameter quantity abnormal information and correct quantity information for the second model parameter;

[0045] if the target parameter type of the second model parameter does not conform to the parameter type required by the geometric modeling operation, output parameter type abnormal information and correct type information for the second model parameter.

[0046] The embodiment of the application further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus.

[0047] The memory is used for storing a computer program.

[0048] The processor is used for executing the program stored on the memory, and realizes the method as described in the embodiment of the application.

[0049] The embodiment of the application further discloses a computer readable storage medium, which stores instructions, and when executed by one or more processors, causes the processor to execute the method as described in the embodiment of the application.

[0050] The embodiment of the application has the following advantages:

[0051] In the embodiment of the present application, when the user tests the related geometric modeling function of the geometric modeling engine, the corresponding test script can be deployed in the geometric modeling engine, the test script can include a command interface layer, the command interface layer provides a parameter passing entrance for the geometric modeling engine, then the modeling test command corresponding to the command input operation can be determined in response to the command input operation of the command interface layer, the modeling test command is a command in the form of a first programming language, the modeling test command at least includes a geometric modeling operation and a first model parameter corresponding to the geometric modeling operation, and the first model parameter is converted into a second model parameter suitable for the geometric modeling engine through the command interface layer, and the second model parameter is passed into the geometric modeling engine through the parameter passing entrance, the second model parameter is a parameter in the form of a second programming language, then the geometric modeling operation is performed according to the second model parameter, and the execution result corresponding to the geometric modeling operation is presented in the control interface in response to the completion of the geometric modeling operation, so that in the process of testing the geometric modeling engine, the test difficulty of the geometric modeling engine is reduced by developing the corresponding test script, and the verification and testing of the geometric modeling operation can be realized by passing in multiple test parameters through the modeling test command, and the parameter passing of variable parameters is supported based on the parameter passing entrance, the writing process of the geometric modeling engine test instruction is simplified, and the universality and expandability of the test script are improved. BRIEF DESCRIPTION OF DRAWINGS

[0052] Figure 1 is a step flow chart of a geometric modeling engine test method based on an expandable parameter provided in the embodiment of the present application;

[0053] Figure 2 is a flowchart of an application scenario provided in the embodiment of the present application;

[0054] Figure 3 is a structure diagram of a test script provided in the embodiment of the present application;

[0055] Figure 4 is a structure block diagram of a geometric modeling engine test device based on an expandable parameter provided in the embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the above-mentioned objects, features and advantages of the present application more apparent and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0057] As an example, in the process of testing the geometry modeling engine, a corresponding test case needs to be designed to test the geometry modeling engine, and in the process of involving the test case, the tester may have certain difficulty in implementing due to the relatively complex programming language syntax, and the tester needs to spend a lot of time and effort to familiarize the syntax and characteristics of the programming language, thereby increasing the time cost of test case writing and reducing the test efficiency of the geometry modeling engine; and when a new test interface is added, the corresponding test instruction set needs to be extended, which requires the developer to constantly learn new instructions, and when facing certain specific test scenarios, the existing test case may also need to be manually adjusted, which not only limits the scalability of the test framework, but also lacks necessary friendliness.

[0058] To this end, in the present application, when a user tests the related geometry modeling function of the geometry modeling engine, a corresponding test script can be deployed in the geometry modeling engine. The test script can include a command interface layer that provides a parameter passing entrance for the geometry modeling engine. In response to a command input operation for the command interface layer, a modeling test command corresponding to the command input operation can be determined. The modeling test command is a command in a first programming language form. The modeling test command includes at least a geometry modeling operation and a first model parameter corresponding to the geometry modeling operation. The first model parameter is converted into a second model parameter suitable for the geometry modeling engine through the command interface layer, and the second model parameter is passed into the geometry modeling engine through the parameter passing entrance. The second model parameter is a parameter in a second programming language form. Then, the geometry modeling operation is performed according to the second model parameter. In response to the completion of the geometry modeling operation, an execution result corresponding to the geometry modeling operation is presented in a control interface. Thus, in the process of testing the geometry modeling engine, the development of a corresponding test script reduces the testing difficulty of the geometry modeling engine. At the same time, the passing-in of multiple test parameters through the modeling test command can achieve the verification and testing of the geometry modeling operation, and the passing-in of variable parameters based on the parameter passing entrance simplifies the writing process of the geometry modeling engine test instruction and improves the universality and scalability of the test script.

[0059] Referring to Figure 1 , a step flowchart of a geometry modeling engine test method based on an expandable parameter provided in an embodiment of the present application is shown, applied to a geometry modeling engine, and a test script is deployed in the geometry modeling engine; wherein the test script includes at least a command interface layer that provides a parameter passing entrance for the geometry modeling engine, and can include the following steps:

[0060] In step 101, in response to a command input operation for the command interface layer, a modeling test command corresponding to the command input operation is determined, the modeling test command being a command in a first programming language, the modeling test command at least including a geometric modeling operation and a first model parameter corresponding to the geometric modeling operation.

[0061] For the geometric modeling engine, it can be a software library or tool for creating, editing and analyzing geometric models (such as cuboids, cylinders, spheres, etc.), for example, it can be used for the creation and editing of geometric bodies, Boolean operations (such as union, difference and intersection, etc.), transformation of geometric bodies (such as translation, rotation, scaling, etc.), and attribute calculation of geometric bodies (such as volume, surface area, etc.).

[0062] In order to ensure that the geometric modeling engine can accurately and efficiently process complex geometric elements and functions, before formal geometric modeling, the user can first test the related geometric modeling functions in the geometric modeling engine to verify whether the geometric modeling functions of the geometric modeling engine can work as expected, so as to find defects and errors in the modeling functions, and ensure the accuracy of the model objects constructed in the modeling process and the reliability of the functions.

[0063] In the embodiments of the present application, in order to test and verify the functions and performance of the geometric modeling engine, a corresponding test script can be constructed, and the functions and performance of the geometric modeling engine can be tested and verified based on the test script, to ensure the correctness and stability of the geometric modeling engine when performing geometric operations.

[0064] In the embodiments of the present application, in order to test and verify the functions and performance of the geometric modeling engine, a corresponding test script can be constructed, and the functions and performance of the geometric modeling engine can be tested and verified based on the test script, to ensure the correctness and stability of the geometric modeling engine when performing geometric operations.

[0065] It should be noted that for the test script, it can be a script developed based on the Python programming language, and in the development process, specific structures in the script can also be combined with the C++ programming language to write, so that the development of the test script is based on the Python programming language, and the characteristics of the Python programming language syntax are fully utilized. Simple and efficient, quickly write and execute test scripts, greatly reduce the difficulty of testing the geometry modeling engine, and combine the C++ programming language to write specific interfaces, effectively improve the universality and compatibility of the test script. Alternatively, during testing, the tester sets the corresponding test parameters by inputting the test instructions in the form of Python, which can call the underlying C++ interface to operate the geometric model, thereby testing the geometry modeling engine.

[0066] For example, the main test logic of the test script can be written using Python, and specific geometric modeling and geometric constraint commands can be encapsulated into corresponding command classes using C++ coding language, so as to implement the corresponding geometric modeling and geometric constraint commands based on the encapsulated command classes, which is not limited by the present application.

[0067] In some possible implementation manners, for the test script, a general command call of RunCommand can be encapsulated based on the interface provided by the Python C API, so that the underlying C++ interface implementation can be called, thereby achieving the testing and verification of the function and performance of the geometry modeling engine, and ensuring the correctness and stability of the geometric operation. In a specific implementation, the test script can include a basic interface (i.e., a control interface, used to provide an input entry for a user to edit an instruction, display an execution interface corresponding to a modeling test command, etc.), a project dependent library (such as Python.dll, Command.dll, etc.), and an API interface layer of the geometry modeling engine, etc. The project dependent library and the API interface layer can constitute a command interface layer of the test script. Through mutual cooperation between the control interface and the command interface layer, the test parameters for testing the geometry modeling engine can be determined, and the interface of the geometry modeling engine is called to pass the parameters, so as to import the corresponding test parameters into the geometry modeling engine for testing.

[0068] In some examples, since the test script can be developed for the script based on the interface provided by the Python C API, a general command call named RunCommand can be built in the C++ interface layer, which accepts variable parameter types. Among them, for variable parameter types, it can accept parameters of different lengths or different types, for example, RunCommand("box", length, width, height), which receives the modeling instruction "box" and three numerical values, representing the generation of a cuboid of specified length, width, and height at the origin; RunCommand("box", Point1, length, width, height), in addition to receiving "box" and three numerical values, an additional point parameter is received, representing the generation of a cuboid of specified length, width, and height at the specified point position as an input parameter, the main purpose is to receive the parameter value and its quantity provided by the user.

[0069] In the test script, a public base class CmdBase of the command class can also be defined, in which the virtual function mechanism is applied to define the common operations of subsequent command classes, such as command activation, command logout, and execution process recording. At the same time, a specific geometric modeling and geometric constraint command is encapsulated into a corresponding command class using C++ code, which needs to inherit the defined CmdBase public base class in order to implement the virtual methods in the public base class, and encapsulates a core function of the geometric modeling engine in it, such as creating geometric entities, editing geometric shapes, and querying geometric data. Among them, the member variables contained in this command class mainly include the current acting geometric object, the required parameters of the current command, etc., and the member functions mainly consist of construction, destruction, geometric operation instruction parameter setting, and calling interface method, in which the encapsulated kernel API interface needs to be called.

[0070] Through the above process, the development of the test script can be realized. In the process of testing the geometric modeling engine through the test script, the test personnel can input the corresponding modeling test command in the test script, the test script editor reads the modeling test command (i.e. RunCommand instruction), sets the corresponding input parameters, and then calls the underlying kernel API interface to operate the geometric model, so as to realize the function test of the geometric modeling engine.

[0071] In the process of testing the geometry modeling engine, the tester can input corresponding command input operations based on the test script. The test script determines corresponding modeling test commands based on the command input operations. The modeling test commands can be commands in the form of a first programming language. The modeling test commands at least include geometry modeling operations and corresponding first model parameters of the geometry modeling operations. The geometry modeling operations are used to indicate what modeling operations the geometry modeling engine performs, such as creating a geometry object, editing a geometry object, etc. The first model parameters can be parameters in the form of the first programming language. Optionally, the first programming language can be Python. The tester can input test commands in the form of Python. The test script converts the test commands in the form of Python into test commands in the form of C++. The geometry modeling engine performs corresponding geometry modeling operations according to the parameters in the form of C++ to implement the test of the geometry modeling engine.

[0072] In step 102, the first model parameters are converted into second model parameters suitable for the geometry modeling engine through the command interface layer. The second model parameters are transmitted into the geometry modeling engine through the parameter transmission entrance. The second model parameters are parameters in the form of a second programming language.

[0073] When the tester inputs corresponding geometry modeling operations in the control interface provided by the test script, the test script can determine modeling test commands corresponding to the geometry modeling operations. Then, the first model parameters in the modeling test commands are converted into second model parameters suitable for the geometry modeling engine through the command interface layer. The second model parameters are transmitted into the geometry modeling engine through the parameter transmission entrance. The geometry modeling engine performs corresponding geometry modeling operations according to the second model parameters. The second model parameters are parameters in the form of a second programming language. Optionally, the second programming language can be C++.

[0074] It should be noted that for the test user, inputting test commands based on the Python programming language can effectively reduce the test difficulty. For the geometry modeling engine, the underlying code runs based on the C++ programming language. Therefore, in the process of testing, the test parameters in the form of Python need to be converted into test parameters in the form of C++ to be executed in the geometry modeling engine.

[0075] In some possible implementation manners, as the development process of the test script above, a plurality of command classes encapsulated by the second programming language can be encapsulated in the command interface layer, the command interface layer includes operation entrances corresponding to the command classes, and the operation entrances are displayed in the control interface of the test script. The parameter conversion process can include: first, determining a target operation entrance corresponding to a command input operation; then, selecting a target command class matching the target operation entrance from the command classes, the target command class at least including a target member variable and a target member function; and then, converting the first model parameter into the second model parameter suitable for the geometric modeling engine according to the target member variable and the target member function.

[0076] In the test script, a general base class is included, and the general base class is used at least for activating the command class, logging out the command class, calling the command interface layer, and recording the execution process of the command class. The command class inherits the general base class, and the command class at least includes a member variable and a member function. In addition, the member variable at least includes one of a currently active geometric object and a model parameter required for executing a modeling test command. The member function at least includes one of a constructor, a destructor, a geometric operation instruction parameter setting function, and a calling function.

[0077] In a specific implementation, the target command class can be activated through the general base class first, and then the first model parameter is converted into the second model parameter suitable for the geometric modeling engine according to the target member variable and the target member function in the target command class. For example, the command class is used to define different geometric operations, including but not limited to creating a cuboid, a sphere, offsetting, rotating, intersecting, merging, rounding, chamfering, and combining. Correspondingly, the operation entrances corresponding to different command classes can be displayed in the control interface of the test script. In the test process, it is assumed that the test personnel selects "create a cuboid" and sets the corresponding model parameters. The test script can determine the corresponding RunCommand command ("box", length, width, height), then activate the corresponding target command class (the command class for creating a cuboid) through the public base class, and convert the length, width, height, and other model parameters into model parameters suitable for the geometric modeling engine according to the target member variable and the target member function included in the target command class, such as converting the parameters in the Python form into the parameters in the C++ form, so as to subsequently pass the parameters in the C++ form to the geometric modeling engine through the API interface of the geometric modeling engine to perform function testing. Therefore, in the test process, the variable parameter passing can be supported when the RunCommand interface is called, the writing process of the geometric modeling engine test instruction can be effectively simplified, and the universality and the expandability are effectively improved.

[0078] In step 103, the geometric modeling operation is performed according to the second model parameter, and in response to the completion of the geometric modeling operation, an execution result corresponding to the geometric modeling operation is presented in the control interface.

[0079] When the test script converts the model parameter into the second model parameter suitable for the geometric modeling engine, the second model parameter can be passed into the geometric modeling engine through a parameter passing entrance provided by the command interface layer, so that the geometric modeling engine performs a corresponding geometric modeling operation according to the second model parameter. Then, according to the execution result corresponding to the geometric modeling operation performed by the geometric modeling engine, it is determined whether the geometric modeling engine can perform the corresponding geometric modeling operation as expected. Thus, in the process of testing the geometric modeling engine, the testing difficulty of the geometric modeling engine is reduced by developing a corresponding test script, and the verification and testing of the geometric modeling operation can be realized by passing in multiple test parameters through the modeling test command. In addition, the parameter passing entrance supports variable parameters, which simplifies the writing process of the geometric modeling engine test instruction and improves the universality and scalability of the test script.

[0080] In some possible implementation manners, before the second model parameter is passed into the geometric modeling engine for functional testing, the second model parameter can be first subjected to error detection to determine whether the second model parameter is a correct and executable model parameter. Specifically, before the geometric modeling operation is performed according to the second model parameter, it can be detected whether the second model parameter has parameter abnormalities. If it is detected that the second model parameter has at least one parameter abnormality, abnormal feedback information and abnormal correction information corresponding to the second model parameter are output. If it is detected that the second model parameter does not have the parameter abnormality, the second model parameter is passed into the geometric modeling engine.

[0081] In the test script, an enumeration can be defined for possible parameter exceptions, and the elements of the enumeration include at least parameter normal, parameter quantity inconsistency, and parameter type error. The parameter quantity inconsistency indicates that the number of parameters required by the executed geometric modeling operation is inconsistent with the number of actual model parameters passed in, and the parameter type error indicates that the parameter type required by the executed geometric modeling operation is inconsistent with the parameter type of the actual model parameter passed in. In a specific implementation, the target parameter quantity and the target parameter type corresponding to the second model parameter can be obtained first, and then the model parameter is detected according to the target parameter quantity and the target parameter type. If the second model parameter fails to match the geometric modeling operation, the parameter error information and the parameter correction information for the second model parameter are output. If the target parameter quantity of the second model parameter does not meet the parameter quantity required by the geometric modeling operation, the parameter quantity exception information and the correct quantity information for the second model parameter are output. If the target parameter type of the second model parameter does not meet the parameter type required by the geometric modeling operation, the parameter type exception information and the correct type information for the second model parameter are output. In this way, in the case where an exception is detected, the corresponding parameter exception information and parameter correction information are output, so that the user can efficiently and intuitively perceive the corresponding exception, and it is beneficial to find potential risks in parameter analysis.

[0082] For example, a cuboid RunCommand(“box”, Length, Width, Height) is created, “box” represents a modeling operation, and Length, Width, and Height represent the length, width, and height, respectively. If the calling parameter is correct, the parameter is normal. However, if the function is called as RunCommand(“box”, Length, Width, Height, Value5), one numerical parameter is additionally passed in, the parameter length is inconsistent with the expectation, an error can be checked in the command class, and an error of parameter quantity inconsistency is returned. For another example, RunCommand(“box”, Point, Length, Width, Height) is to create a cuboid with a length of Length, a width of Width, and a height of Height at the Point. If the calling parameter is correct, the parameter is normal. However, if the passed-in parameter is RunCommand(“box”, Vector, Length, Width, Height), the parameter of Vector should originally be a point parameter, and now is a vector parameter, which is inconsistent with the expected parameter type, and the function returns an error of parameter type.

[0083] After the error detection of the parameters is completed, if the second model parameters are correct, the corresponding second model parameters can be transmitted into the geometric modeling engine, the geometric modeling engine can perform a geometric modeling operation according to the second model parameters, and in response to the completion of the geometric modeling operation, an execution result corresponding to the geometric modeling operation is presented in the control interface, so that in the process of testing the geometric modeling engine, the testing difficulty of the geometric modeling engine is reduced by developing a corresponding test script, and the verification and testing of the geometric modeling operation can be realized by transmitting a plurality of test parameters through the modeling test command, and the parameter transmission of the variable parameters is supported based on the parameter transmission entrance, the writing process of the geometric modeling engine test instruction is simplified, and the universality and expandability of the test script are improved.

[0084] It should be noted that the embodiments of the present application include but are not limited to the above examples, and it can be understood that those skilled in the art can also set according to actual needs under the guidance of the idea of the embodiments of the present application, and the present application does not limit this.

[0085] In the embodiments of the present application, when a user tests the related geometric modeling function of the geometric modeling engine, a corresponding test script can be deployed in the geometric modeling engine, the test script can include a command interface layer, the command interface layer provides a parameter transmission entrance for the geometric modeling engine, in response to a command input operation for the command interface layer, a modeling test command corresponding to the command input operation is determined, the modeling test command is a command in a first programming language, the modeling test command at least includes a geometric modeling operation and a first model parameter corresponding to the geometric modeling operation, the first model parameter is converted into a second model parameter suitable for the geometric modeling engine through the command interface layer, and the second model parameter is transmitted into the geometric modeling engine through the parameter transmission entrance, the second model parameter is a parameter in a second programming language, then the geometric modeling operation is performed according to the second model parameter, and in response to the completion of the geometric modeling operation, an execution result corresponding to the geometric modeling operation is presented in the control interface, so that in the process of testing the geometric modeling engine, the testing difficulty of the geometric modeling engine is reduced by developing a corresponding test script, and the verification and testing of the geometric modeling operation can be realized by transmitting a plurality of test parameters through the modeling test command, and the parameter transmission of the variable parameters is supported based on the parameter transmission entrance, the writing process of the geometric modeling engine test instruction is simplified, and the universality and expandability of the test script are improved.

[0086] In order for those skilled in the art to better understand the technical solutions in the embodiments of the present application, the following will be exemplarily described by corresponding examples:

[0087] In the following examples, the corresponding meanings of the technical features involved are as follows:

[0088] The Chinese meaning of Var is: variable name

[0089] Func means function name in Chinese

[0090] Array means array type in Chinese

[0091] InParam means input parameter in Chinese

[0092] OutParam means output parameter in Chinese

[0093] Res means instruction execution result in Chinese

[0094] Geom_Command means geometric operation instruction in Chinese

[0095] As an example, referring to Figure 2 , a flowchart of an application scenario provided in an embodiment of the present application is shown, and for the use flow of a test script, it can include: RunCommand command calling-modeling command matching-modeling parameter parsing-geometric engine interface calling-execution result range, etc.

[0096] Specifically, a command interface layer capable of calling an API in a geometric modeling engine is designed in a test script, and the main function of the command interface layer is to encapsulate and abstract the operation of a related geometric modeling engine, so as to be capable of being called in a RunCommand command class manner.

[0097] In a specific implementation, a general base class named CmdBase can be constructed in a test script, the base class integrates the interface of a basic command execution flow, and covers basic functions such as activation, logout, intermediate layer interface calling, and command execution process logging. Based on the base class, a command class for performing diversified operations is further defined, including but not limited to operations such as creating a cuboid, a sphere, offsetting, rotating, intersection, union, rounding, chamfering, and combining. Such a class needs to inherit from the CmdBase base class, and the flow method in the base class is rewritten in the derived class. Then, the result of encapsulating and abstracting the operation of a related geometric modeling engine designed in the foregoing process and the current series of command classes are packaged into a dynamic library Command.dll. Meanwhile, Python.dll can be introduced, a Python extension module is written using the C API of Python, the module can convert Python instructions into C++ interface calling. A RunCommand generalization command is implemented in the Python extension module, the command can receive a Python instruction input by a user, and convert it into a corresponding C++ interface calling. For example, a user can input a simple RunCommand instruction for creating a cuboid according to a predetermined format requirement, and when the instruction is executed, the corresponding result can be seen.

[0098] For the RunCommand command, the command calling format is still essentially a function call, and the corresponding C++ implementation is called through the user input geometric operation instruction in the form of Python. Therefore, the present application redefines the InParam data type in the RunCommand command, mainly including:

[0099] ① string: Type_String;

[0100] ② integer: Type_Int;

[0101] ③ floating point: Type_Double;

[0102] ④ vector: Type_Vevtor(Type_Doubled1, Type_Doubled2, Type_Doubled3);

[0103] ⑤ coordinate point: Type_Point(Type_Double x1, Type_Double y1, Type_Double z1).

[0104] Optionally, the redefinition is to extend it so that it is more suitable for testing the geometric modeling engine. First, redefine the existing types: for example, redefine the string class as Type_String, which can redefine the behavior of the string, such as directly concatenating Type_String with Type_Point. Second, define data structures that do not exist in Python, which can customize more data structures suitable for testing the geometric modeling engine, such as Type_BoundBox, which represents the model bounding box.

[0105] Regarding the RunCommand command, it still needs to follow the syntax of the Python script language, and there is no need to write the data type of the variable when defining it, such as example code I, which defines a variable Var_1 and directly assigns it a value of 10, and Python will interpret it as an integer by default. As shown in example code II, Array_1 is an array variable, and for this type of variable, the data type or value of the variable can be directly defined in the square brackets and then assigned to the corresponding array variable.

[0106] Example Code I: Var_1 = 10

[0107] Example Code II: Array_1 = [0, 1, 2, 3]

[0108] Note: It should be noted that there is no need to add a semicolon at the end of each line of code

[0109] Based on the above process related to the declaration, and because the application of RunCommand is essentially a function call, it needs to be passed in parameters, as an example of code III for RunCommand generalization command parameters are as follows:

[0110] RunCommand command is equivalent to the function name Func in C++.

[0111] The first parameter Geom_Command_1 is a geometric operation instruction of Type_String type, representing the user's desired geometric operation, which can be importing model files, creating entities, geometric transformation, complex topology, etc.

[0112] The second parameter Res is usually the receiving object of the current operation instruction execution result (it needs to be noted that there may be corresponding special cases, such as the second parameter of the model import command is the model full name, and the third parameter is the import model receiving object), that is, the return value, which can be understood by the user as the variable on the left side of the assignment operator, and it is also of Type_String type. In addition, it needs to be noted that this is also a different point between RunCommand command call and general function call, and the return value of the general function is usually outside the function call statement, while the execution result of the RunCommand command is inside the call statement.

[0113] The third parameter InParam_1 will have multiple cases, which can be a numerical type or a geometric object, and needs to be analyzed according to the instruction type, for example, when creating a cuboid object, InParam_1 is an integer type, representing the length of the cuboid to be created. However, when performing intersection on two geometric entities, InParam_1 is one of the entity object names. The parameters InParam2... are similar to the third parameter, and will not be described in more detail here.

[0114] Example code III: RunCommand(Geom_Command_1, Res, InParam_1, InParam_2,...)

[0115] Based on the above parameter description, it is verified that the RunCommand command in the present application supports multiple parameter passing, and the parameter type and parameter number of the specific geometric operation instruction Geom_Command may be different in different scenarios.

[0116] Meanwhile, an error checking feedback mechanism is provided in the RunCommand command calling process. First, an enumeration is defined according to possible error scenarios, and specific enumeration elements include normal parameters, inconsistent parameter quantity, and parameter type error. In the C++ interface layer, error checking is performed on the input parameters in each command class. First, the number of input parameters is checked. If the number of input parameters does not meet the requirements of the geometric operation instruction, an error is called, and an inconsistent parameter quantity error is returned. Then, the input parameters are checked one by one. In this step, the type of the parameter is checked to see whether it meets the expected type. For example, an integer type is expected, but a string type is actually transmitted. A vector type is expected, but a coordinate point type is actually transmitted, and the like. If the above conditions are met, a parameter type error is returned, and the correct data type is returned for the current parameter.

[0117] After the error checking is completed, the corresponding intermediate layer interface can be called to return the corresponding execution result, so that the test and verification of the related geometric kernel are realized.

[0118] In summary, the test method of the extensible and variable parameter geometric modeling engine provided in the embodiment simplifies the test case writing process and improves the efficiency of geometric kernel test and verification by reusing the RunCommand command and making normative requirements on the geometric operation command format and input parameters, thereby providing the possibility for subsequent automatic case writing.

[0119] Correspondingly, referring to Figure 3 , a structure diagram of a test script provided in the embodiment of the application is shown. Specifically, for the UI interface layer, a command editing module that can be manually operated by a user can be included in the test script. The module provides basic functions, such as clearing a command, loading the last command, and executing a command.

[0120] For the command interface layer, the system adopts an object-oriented design principle. Each geometric operation (geometric operations include modeling operations supported by the geometric modeling engine, such as creating a basic body (a cuboid, a cylinder, etc.), geometric transformation (translation, rotation, scaling, etc.), feature modeling (such as stretching, sweeping, chamfering, etc.), and the like) is encapsulated into an independent command class. These command classes follow a unified interface design, ensuring high cohesion and low coupling between classes. Each class implements standardized and templated activation, deregistration, and other public interfaces. At the same time, each command class also includes related methods for setting its own attributes (its own attributes include a command execution cancellation flag, a failure flag, and the like, and related methods include a command rollback method, a re-execution method, and the like). These methods allow users to adjust the parameters of geometric operations according to specific requirements, thereby providing high flexibility and customization.

[0121] In addition, in order to improve the scalability and compatibility of the test script, the command interface layer further comprises a geometry modeling engine API layer, through which a unified calling entrance is provided, and the underlying API interface call of the geometry kernel is encapsulated, so that not only the universality of the software is improved, but also the convenience for future possible technical upgrade and kernel replacement is provided, and the scalability and compatibility of the test script are ensured.

[0122] To sum up, in the present example, in the design of the UI interface layer and the command interface layer, through the designed modular structure and interface, the flexibility, maintainability and scalability of the test script are ensured, powerful geometry operation capability is provided for the user, and a good extension foundation is laid for the iterability of the test script.

[0123] It should be noted that, for the method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the embodiments of the present application are not limited by the action sequence described, because according to the embodiments of the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily the necessary of the embodiments of the present application.

[0124] Referring to Figure 4 , a structure block diagram of a geometry modeling engine test device based on an extensible parameter provided in an embodiment of the present application is shown, which is applied to a geometry modeling engine, and a test script is deployed in the geometry modeling engine; wherein the test script at least comprises a command interface layer, the command interface layer provides a parameter passing entrance for the geometry modeling engine, and can specifically comprise the following modules:

[0125] The command determination module 401 is configured to determine a modeling test command corresponding to the command input operation in response to the command input operation for the command interface layer, the modeling test command being a command in a first programming language, and the modeling test command at least comprising a geometry modeling operation and a first model parameter corresponding to the geometry modeling operation;

[0126] The parameter carding module 402 is configured to convert the first model parameter into a second model parameter adapted to the geometry modeling engine through the command interface layer, and pass the second model parameter into the geometry modeling engine through the parameter passing entrance, the second model parameter being a parameter in a second programming language;

[0127] The execution module 403 is configured to perform the geometric modeling operation according to the second model parameter, and present an execution result corresponding to the geometric modeling operation in the control interface in response to completion of the geometric modeling operation.

[0128] In some possible implementation manners, the command interface layer encapsulates a plurality of command classes, the command classes are classes encapsulated by using a second programming language, the command interface layer includes operation entrances corresponding to the command classes, and the operation entrances are displayed in the control interface of the test script.

[0129] The parameter analysis module 402 is configured to determine a target operation entrance corresponding to the command input operation.

[0130] The parameter analysis module 402 is configured to select a target command class matching the target operation entrance from the command classes, the target command class including at least a target member variable and a target member function.

[0131] The parameter analysis module 402 is configured to convert the first model parameter into a second model parameter adapted to the geometric modeling engine according to the target member variable and the target member function.

[0132] In some possible implementation manners, the test script includes a general base class, the general base class is used at least to activate the command class, log off the command class, and record an execution process of the command class, the command class inherits the general base class, and the command class includes at least a member variable and a member function.

[0133] In some possible implementation manners, the member variable includes at least one of a currently active geometric object and a model parameter required for executing a modeling test command.

[0134] The member function includes at least one of a constructor, a destructor, a geometric operation instruction parameter setting function, and a calling function.

[0135] In some possible implementation manners, the parameter analysis module 402 is specifically configured to:

[0136] The parameter analysis module 402 is configured to activate the target command class through the general base class, and convert the first model parameter into a second model parameter adapted to the geometric modeling engine according to the target member variable and the target member function in the target command class.

[0137] In some possible implementation manners, the apparatus further includes:

[0138] The detection module is configured to output abnormal feedback information and abnormal correction information for the second model parameter if it is detected that the second model parameter has at least one parameter abnormality.

[0139] a passing module configured to pass the second model parameter to the geometric modeling engine if the parameter abnormality of the second model parameter is not detected.

[0140] In some possible implementation manners, the detection module is specifically configured to:

[0141] obtain a target parameter quantity and a target parameter type corresponding to the second model parameter;

[0142] if the second model parameter fails to match the geometric modeling operation, output parameter error information and parameter correction information for the second model parameter;

[0143] if the target parameter quantity of the second model parameter does not conform to a parameter quantity required by the geometric modeling operation, output parameter quantity abnormality information and correct quantity information for the second model parameter;

[0144] if the target parameter type of the second model parameter does not conform to a parameter type required by the geometric modeling operation, output parameter type abnormality information and correct type information for the second model parameter.

[0145] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts refer to the part of the method embodiment.

[0146] In addition, the embodiment of the present application further provides an electronic device, which comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program is executed by the processor to implement each process of the above-mentioned geometric modeling engine test method based on extensible parameters, and the same technical effects can be achieved, and thus the details are not described herein again.

[0147] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, wherein the computer program is executed by the processor to implement each process of the above-mentioned geometric modeling engine test method based on extensible parameters, and the same technical effects can be achieved, and thus the details are not described herein again. The computer readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0148] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.

[0149] Those skilled in the art will appreciate that embodiments of the present application can be provided as methods, apparatus, or computer program products. Accordingly, embodiments of the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, EEPROMs, Flash, and eMMC, among others) embodying computer program instructions.

[0150] Embodiments of the present application are described herein with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing device, or other programmable data processing terminal devices to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal devices, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0151] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing terminal device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0152] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device to cause a series of operational steps to be performed on the computer or other programmable terminal device to produce a computer-implemented process such that the instructions which execute on the computer or other programmable terminal device provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.

[0153] While preferred embodiments of the present application have been described, those skilled in the art will appreciate that other alterations and modifications are possible. Therefore, the appended claims are intended to cover all such alterations and modifications that come within the scope of the present application.

[0154] Finally, it is to be understood that the phraseology or terminology such as "first" and "second" etc. used herein is merely intended to differentiate one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between such entities or operations. Moreover, the terms "comprising", "including", or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the recited element.

[0155] The above describes in detail the method and device for testing the geometry modeling engine based on the extensible parameters provided by the present application. The principles and implementation manners of the present application are described by using specific examples. The above description of the examples is only used to help understand the method of the present application and its core idea. Meanwhile, for the person skilled in the art, the specific implementation manners and application ranges can be changed according to the idea of the present application. In summary, the content of the present description should not be understood as a limitation of the present application.

Claims

1. A method for testing a geometric modeling engine based on extensible parameters, the method comprising: The application is applied to a geometry modeling engine, a test script is deployed in the geometry modeling engine, and a control interface corresponding to the test script is displayed in an interactive interface of the geometry modeling engine; wherein the test script at least includes a command interface layer, the command interface layer provides a parameter passing entrance for the geometry modeling engine, and the method comprises: In response to a command input operation for the command interface layer, a modeling test command corresponding to the command input operation is determined, the modeling test command is a command in a first programming language form, and the modeling test command at least includes a geometry modeling operation and a first model parameter corresponding to the geometry modeling operation; The first model parameter is converted into a second model parameter suitable for the geometry modeling engine through the command interface layer, and the second model parameter is passed into the geometry modeling engine through the parameter passing entrance, and the second model parameter is a parameter in a second programming language form; The geometry modeling operation is executed according to the second model parameter, and in response to the completion of the geometry modeling operation, an execution result corresponding to the geometry modeling operation is presented in the control interface; Wherein, the command interface layer encapsulates a plurality of command classes, the command class is a class encapsulated by using a second programming language, the command interface layer contains an operation entrance corresponding to each command class, the operation entrance is displayed in the control interface of the test script, and the first model parameter is converted into a second model parameter suitable for the geometry modeling engine through the command interface layer, comprising: Determine the target operation entrance corresponding to the command input operation; Select a target command class matching the target operation entrance from the command class, the target command class at least includes a target member variable and a target member function; According to the target member variable and the target member function, the first model parameter is converted into a second model parameter suitable for the geometry modeling engine; Wherein, the test script includes a general base class, the general base class is used at least to activate the command class, log off the command class and record the execution process of the command class; wherein the command class inherits the general base class, and the command class at least includes a member variable and a member function.

2. The method of claim 1, wherein, The member variable at least includes one of a currently acting geometric object and a model parameter required for executing a modeling test command; The member function at least includes one of a constructor, a destructor, a geometry operation instruction parameter setting function and a calling function.

3. The method of claim 2, wherein, According to the target member variable and the target member function, the first model parameter is converted into a second model parameter suitable for the geometry modeling engine; The target command class is activated through the general base class, and the first model parameter is converted into a second model parameter suitable for the geometry modeling engine according to the target member variable and the target member function in the target command class.

4. The method according to claim 1 or 2, characterized in that, Before the geometry modeling operation is executed according to the second model parameter, the method further comprises: If it is detected that the second model parameter has at least one parameter abnormality, abnormal feedback information and abnormal correction information for the second model parameter are outputted; If the second model parameter does not have the parameter abnormality, the second model parameter is transmitted into the geometric modeling engine.

5. The method of claim 4, wherein, If it is detected that the second model parameter has at least one parameter abnormality, abnormal feedback information and abnormal correction information for the second model parameter are outputted, including: The target parameter quantity and the target parameter type corresponding to the second model parameter are acquired; If the second model parameter fails to match the geometric modeling operation, parameter error information and parameter correction information for the second model parameter are outputted; If the target parameter quantity of the second model parameter does not conform to the parameter quantity required by the geometric modeling operation, parameter quantity abnormality information and correct quantity information for the second model parameter are outputted; If the target parameter type of the second model parameter does not conform to the parameter type required by the geometric modeling operation, parameter type abnormality information and correct type information for the second model parameter are outputted.

6. A scalable parameter based geometry modeling engine testing apparatus, characterized in that, The application is applied to a geometric modeling engine, a test script is deployed in the geometric modeling engine, and a control interface corresponding to the test script is displayed in an interactive interface of the geometric modeling engine; wherein the test script at least includes a command interface layer, the command interface layer provides a parameter transmission entrance for the geometric modeling engine, and the device includes: A command determination module is configured to determine a modeling test command corresponding to a command input operation in response to the command input operation on the command interface layer, the modeling test command is a command in a first programming language, and the modeling test command at least includes a geometric modeling operation and a first model parameter corresponding to the geometric modeling operation; A parameter processing module is configured to convert the first model parameter into a second model parameter suitable for the geometric modeling engine through the command interface layer, and transmit the second model parameter into the geometric modeling engine through the parameter transmission entrance, the second model parameter is a parameter in a second programming language; An execution module is configured to execute the geometric modeling operation according to the second model parameter, and present an execution result corresponding to the geometric modeling operation in the control interface in response to the completion of the geometric modeling operation; The command interface layer encapsulates a plurality of command classes, the command classes are classes encapsulated by using the second programming language, the command interface layer includes operation entrances corresponding to the command classes, the operation entrances are displayed in the control interface of the test script, and the parameter processing module is specifically configured to: Determine a target operation entrance corresponding to the command input operation; Select a target command class matched with the target operation entrance from the command classes, the target command class at least includes a target member variable and a target member function; Convert the first model parameter into the second model parameter suitable for the geometric modeling engine according to the target member variable and the target member function; and The test script comprises a general base class, which is used for at least activating the command class, logging off the command class and recording an execution process of the command class; the command class inherits the general base class and comprises at least member variables and member functions.

7. An electronic device, comprising: The device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus. The memory is used for storing a computer program. The processor is used for executing the program stored on the memory, and the method in any one of claims 1-5 is realized. 8.A computer readable storage medium having stored thereon instructions which, when executed by one or more processors, cause the processors to perform the method of any one of claims 1-5.

Citation Information

Patent Citations

  • Cloud-based universal parameterized model analysis method and design system

    CN111324965A

  • Multi-dimensional multi-field system hybrid modeling method

    CN116187032A