[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115495807B - Automatic drawing method and electronic equipment - Google Patents

Automatic drawing method and electronic equipment Download PDF

Info

Publication number
CN115495807B
CN115495807B CN202211175857.8A CN202211175857A CN115495807B CN 115495807 B CN115495807 B CN 115495807B CN 202211175857 A CN202211175857 A CN 202211175857A CN 115495807 B CN115495807 B CN 115495807B
Authority
CN
China
Prior art keywords
cad
script
program
instruction
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211175857.8A
Other languages
Chinese (zh)
Other versions
CN115495807A (en
Inventor
孟召龙
周健
张晓程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Hongji Information Technology Co Ltd
Original Assignee
Shanghai Hongji Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Hongji Information Technology Co Ltd filed Critical Shanghai Hongji Information Technology Co Ltd
Priority to CN202211175857.8A priority Critical patent/CN115495807B/en
Publication of CN115495807A publication Critical patent/CN115495807A/en
Application granted granted Critical
Publication of CN115495807B publication Critical patent/CN115495807B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/12Geometric CAD characterised by design entry means specially adapted for CAD, e.g. graphical user interfaces [GUI] specially adapted for CAD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Computational Mathematics (AREA)
  • Architecture (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides an automatic drawing method and electronic equipment, wherein the method comprises the following steps: after detecting that an operation module in the graphical interface is positioned in an area to be executed, acquiring script information of the operation module; converting script programs corresponding to the script information into CAD instructions; and executing the CAD instruction through the CAD application program to obtain a drawing result. When the operation module in the graphical interface is detected to be positioned in the area to be executed, the corresponding operation of the operation module is triggered, and the complex operation of the CAD instruction can be replaced, so that the code-free graphical interface interactive operation mode is used for avoiding the learning process of the CAD instruction, and the operation convenience of the CAD application program is effectively improved.

Description

Automatic drawing method and electronic equipment
Technical Field
The application relates to the technical field of automatic program instruction control, in particular to an automatic drawing method and electronic equipment.
Background
Computer aided design (Computer AIDED DESIGN, CAD) application, which refers to a software application (e.g., autoCAD) for Computer aided design, the main functions of a CAD application include: two-dimensional drawing, detailed drawing, design document and basic three-dimensional design, CAD has good user interface, and can perform various operations through interactive menu mode.
At present, drawing is performed on a CAD application, and the CAD application can be operated after the CAD application is manually learned, however, in order to achieve a skilled operation of the CAD application, in addition to learning the operation skills of the CAD, a great deal of time is required, and specialized knowledge in terms of learning design and the like is required. Current CAD applications only visualize the drawing results of the operation, still resulting in learning related operational skills that require a significant amount of time.
Disclosure of Invention
An object of an embodiment of the present application is to provide an automatic drawing method and an electronic device, which are used for improving the problem that the CAD application is not convenient enough to operate.
The embodiment of the application provides an automatic drawing method, which comprises the following steps: after detecting that an operation module in the graphical interface is positioned in an area to be executed, acquiring script information of the operation module; converting script programs corresponding to the script information into CAD instructions; and executing the CAD instruction through the CAD application program to obtain a drawing result. In the implementation process of the scheme, when the operation module in the graphical interface is detected to be positioned in the area to be executed, the corresponding operation of the operation module is triggered, and the complex operation of the CAD instruction can be replaced, so that the code-free graphical interface interactive operation mode is used for avoiding the learning process of the CAD instruction, and the operation convenience of the CAD application program is effectively improved.
Optionally, in an embodiment of the present application, before converting a script program corresponding to the script information into a CAD instruction of the computer-aided design software, the method further includes: finding out script programs corresponding to the script information from a program library; judging whether instruction parameters corresponding to the script program are acquired or not; if not, outputting the input reminding information of the instruction parameters. In the implementation process of the scheme, under the condition that the instruction parameters corresponding to the script program are obtained, the input reminding information of the instruction parameters is output, so that the problem that some script programs cannot be executed due to lack of the instruction parameters is avoided, and the robustness of visual drawing through a graphical interface is effectively improved.
Optionally, in an embodiment of the present application, converting a script program corresponding to script information into a CAD instruction of computer-aided design software includes: if the instruction parameters corresponding to the script program are obtained, converting the script program corresponding to the script information and the instruction parameters corresponding to the script program into CAD instructions. In the implementation process of the scheme, the script programs corresponding to the script information and the instruction parameters corresponding to the script programs are converted into CAD instructions under the condition that the instruction parameters corresponding to the script programs are acquired, so that the problem that some script programs cannot be executed when the instruction parameters are absent is avoided, and the robustness of visual drawing through a graphical interface is effectively improved.
Optionally, in an embodiment of the present application, executing the CAD instruction by the CAD application to obtain the drawing result includes: executing a CAD instruction through a CAD application program to obtain a CAD object; and loading the CAD object into the graphical interface to obtain a drawing result. In the implementation process of the scheme, the CAD object obtained by executing the CAD instruction is loaded into the graphical interface, so that the problem that the drawing result is difficult to visually see is avoided, and the drawing result is effectively visualized.
Optionally, in an embodiment of the present application, executing the CAD instructions by the CAD application includes: judging whether a command line window of the CAD application program is opened or not; if yes, executing the CAD instruction in the command line window. In the implementation process of the scheme, the CAD instruction is directly executed in the command line window under the condition that the command line window of the CAD application program is opened, so that the CAD instruction is executed by using the code-free command line window, and the execution efficiency of the CAD is improved.
Optionally, in an embodiment of the present application, after determining whether the command line window of the CAD application is open, the method further includes: and if the command line window of the CAD application program is not opened, opening the command line window, and executing the CAD instruction in the command line window. In the implementation process of the scheme, the command line window is opened by not opening the command line window of the CAD application program, so that the problem that CAD instructions cannot be executed due to the fact that the command line window is not opened is avoided, and the execution efficiency of CAD is effectively improved.
Optionally, in an embodiment of the present application, opening a command line window includes: identifying the position coordinates of the current mouse and a window area corresponding to the command line window; and controlling the current mouse to move from the position coordinates to the window area, and clicking and opening the command line window. In the implementation process of the scheme, the current mouse is identified and controlled to move from the position coordinates to the window area, and the command line window is clicked to be opened, so that the problem that CAD instructions cannot be executed due to the fact that the command line window is not opened is avoided, and the execution efficiency of CAD is effectively improved.
Optionally, in an embodiment of the present application, the method further includes: obtaining a calculation request, wherein the calculation request comprises the following steps: a CAD object mark; and calculating the CAD object according to the CAD object identifier to obtain a calculation result. In the implementation process of the scheme, the CAD object is calculated according to the CAD object identifier, so that the problem that the CAD object in the graphical interface cannot be calculated after the drawing result is obtained is solved, and the robustness of visual drawing through the graphical interface is effectively improved.
Optionally, in an embodiment of the present application, the operation module is a calculation module; obtaining a calculation request, comprising: and after detecting that the computing module is positioned in the area to be executed in the graphical interface, acquiring a computing request corresponding to the computing module. In the implementation process of the scheme, after the fact that the computing module is located in the area to be executed is detected in the graphical interface, the computing request corresponding to the computing module is obtained, so that the problem that the computing request corresponding to the computing module is difficult to obtain is solved, and the function of the visual computing process of the computing module is effectively achieved.
Optionally, in an embodiment of the present application, the calculation result includes: area calculation results, illumination time calculation results, engineering cost calculation results, earthwork calculation results and/or structural mechanics calculation results; calculating the CAD object according to the CAD object identifier, including: carrying out area calculation on the CAD object according to the CAD object identifier to obtain an area calculation result; and/or performing illumination time calculation on the CAD object according to the CAD object identifier to obtain an illumination time calculation result; and/or carrying out engineering cost calculation on the CAD object according to the CAD object identifier to obtain an engineering cost calculation result; and/or carrying out earthwork calculation on the CAD object according to the CAD object identifier to obtain an earthwork calculation result; and/or carrying out structural mechanics calculation on the CAD object according to the CAD object identifier to obtain a structural mechanics calculation result. In the implementation process of the scheme, the area calculation result, the illumination time calculation result, the engineering cost calculation result, the earthwork calculation result and/or the structural mechanics calculation result are obtained, so that the function of visual drawing through a graphical interface is increased, and the robustness of visual drawing through the graphical interface is effectively improved.
The embodiment of the application also provides an automatic drawing method which is applied to the terminal equipment and comprises the following steps: after detecting that an operation module in the graphical interface is positioned in an operation to-be-executed area, acquiring script information of the operation module, and generating a drawing request according to the script information; and sending a drawing request to the server so that the server converts the script program corresponding to the script information into a CAD instruction of the computer aided design software, and executing the CAD instruction through the CAD application program to obtain a drawing result. In the implementation process of the scheme, when the operation module in the graphical interface is detected to be positioned in the area to be executed, the corresponding operation of the operation module is triggered, and complex operation skills of CAD can be replaced, so that the code-free graphical interface interactive operation mode is used for avoiding the learning process of CAD instructions, and the operation convenience of CAD application programs is effectively improved.
The embodiment of the application also provides an automatic drawing method which is applied to the server and comprises the following steps: acquiring a drawing request sent by a terminal device, wherein the drawing request is sent by the terminal device after detecting that an operation module in a graphical interface is positioned in an area to be executed, and the drawing request comprises: script information of the operation module; converting script programs corresponding to the script information into CAD instructions; and executing the CAD instruction through the CAD application program to obtain a drawing result.
The embodiment of the application provides an automatic drawing method, which is applied to terminal equipment and comprises the following steps: after detecting the operation that an operation module in the graphical interface is positioned in an area to be executed, acquiring script information of the operation module; converting script programs corresponding to the script information into CAD instructions; and sending the CAD instruction to the server so that the server executes the CAD instruction through the CAD application program to obtain a drawing result.
The embodiment of the application also provides an automatic drawing method which is applied to the server and comprises the following steps: receiving a CAD instruction of computer aided design software sent by a terminal device, after the terminal device detects that an operation module in a graphical interface is positioned in an area to be executed, acquiring script information of the operation module, and converting a script program corresponding to the script information to obtain the CAD instruction; and executing the CAD instruction through the CAD application program to obtain a drawing result.
The embodiment of the application also provides an automatic drawing device, which comprises: the script information acquisition module is used for acquiring script information of the operation module after detecting that the operation module in the graphical interface is positioned in the area to be executed; the script program conversion module is used for converting the script program corresponding to the script information into a CAD instruction of the computer aided design software; and the drawing result obtaining module is used for executing the CAD instruction through the CAD application program to obtain the drawing result.
Optionally, in an embodiment of the present application, the automatic drawing device further includes: the script program searching module is used for searching a script program corresponding to the script information in the program library; the instruction parameter judging module is used for judging whether instruction parameters corresponding to the script program are acquired or not; and the reminding information output module is used for outputting the input reminding information of the instruction parameters if the instruction parameters corresponding to the script program are not acquired.
Optionally, in an embodiment of the present application, the script program conversion module includes: and the CAD instruction conversion module is used for converting the script program corresponding to the script information and the instruction parameters corresponding to the script program into CAD instructions if the instruction parameters corresponding to the script program are acquired.
Optionally, in an embodiment of the present application, the drawing result obtaining module includes: the CAD object obtaining submodule is used for executing CAD instructions through the CAD application program to obtain a CAD object; and the CAD object loading sub-module is used for loading the CAD object into the graphical interface to obtain a drawing result.
Optionally, in an embodiment of the present application, the CAD object obtaining sub-module includes: the command window judging unit is used for judging whether a command line window of the CAD application program is opened or not; and the CAD instruction execution unit is used for executing the CAD instructions in the command line window if the command line window of the CAD application program is opened.
Optionally, in an embodiment of the present application, the CAD object obtaining sub-module further includes: and the command window opening unit is used for opening the command line window if the command line window of the CAD application program is not opened, and executing the CAD instruction in the command line window.
Optionally, in an embodiment of the present application, the command window opening unit includes: the position area identification subunit is used for identifying the position coordinates of the current mouse and the window area corresponding to the command line window; and the current mouse control subunit is used for controlling the current mouse to move from the position coordinates to the window area and clicking and opening the command line window.
Optionally, in an embodiment of the present application, the automatic drawing device further includes: the computing request acquisition module is used for acquiring a computing request, and the computing request comprises the following components: a CAD object mark; and the calculation result obtaining module is used for calculating the CAD object in the graphical interface according to the CAD object identifier to obtain a calculation result.
Optionally, in an embodiment of the present application, the operation module is a calculation module; a computing request acquisition module comprising: and the calculation request acquisition sub-module is used for acquiring the calculation request corresponding to the calculation module after detecting that the calculation module is positioned in the area to be executed in the graphical interface.
Optionally, in an embodiment of the present application, the calculation result includes: area calculation results, illumination time calculation results, engineering cost calculation results, earthwork calculation results and/or structural mechanics calculation results; the calculation result obtaining module comprises: the object area calculation sub-module is used for calculating the area of the CAD object according to the CAD object mark to obtain an area calculation result; and/or an illumination time calculation sub-module, which is used for calculating the illumination time of the CAD object according to the CAD object identifier to obtain an illumination time calculation result; and/or a construction cost calculation sub-module is used for carrying out construction cost calculation on the CAD object according to the CAD object identifier to obtain a construction cost calculation result; and/or an earthwork calculation operator module, which is used for carrying out earthwork calculation on the CAD object according to the CAD object identifier to obtain an earthwork calculation result; and/or a structural mechanics calculation sub-module is used for carrying out structural mechanics calculation on the CAD object according to the CAD object identifier to obtain a structural mechanics calculation result.
The embodiment of the application also provides an automatic drawing device which is applied to the terminal equipment and comprises: the drawing request generation module is used for acquiring script information of the operation module after detecting the operation of the operation module in the graphical interface in the region to be executed and generating a drawing request according to the script information; and the drawing request sending module is used for sending a drawing request to the server so that the server converts the script program corresponding to the script information into a CAD instruction of the computer aided design software, and the CAD instruction is executed through the CAD application program to obtain a drawing result.
The embodiment of the application also provides an automatic drawing device which is applied to the server and comprises: the drawing request acquisition module is configured to acquire a drawing request sent by the terminal device, where the drawing request is sent by the terminal device after detecting that an operation module in the graphical interface is located in an area to be executed, and the drawing request includes: script information of the operation module; the CAD instruction conversion module is used for converting the script program corresponding to the script information into a CAD instruction of the computer-aided design software; and the CAD instruction execution module is used for executing the CAD instruction through the CAD application program to obtain a drawing result.
The embodiment of the application also provides an automatic drawing device which is applied to the terminal equipment and comprises: the module information acquisition module is used for acquiring script information of the operation module after detecting the operation of the operation module in the graphical interface in the region to be executed; the CAD instruction conversion module is used for converting the script program corresponding to the script information into a CAD instruction of the computer-aided design software; and the CAD instruction sending module is used for sending the CAD instruction to the server so that the server executes the CAD instruction through the CAD application program to obtain a drawing result.
The embodiment of the application also provides an automatic drawing method which is applied to the server and comprises the following steps: the CAD instruction receiving module is used for receiving a CAD instruction of computer-aided design software sent by the terminal equipment, and after the terminal equipment detects the operation of the operation module in the graphical interface in the area to be executed, the CAD instruction obtains script information of the operation module and converts a script program corresponding to the script information to obtain the script program; and the drawing result obtaining module is used for executing the CAD instruction through the CAD application program to obtain the drawing result.
The embodiment of the application also provides electronic equipment, which comprises: a processor and a memory storing machine-readable instructions executable by the processor to perform the method as described above when executed by the processor.
Embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs a method as described above.
Additional features and advantages of embodiments of the application will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of embodiments of the application.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application, and therefore should not be considered as limiting the scope, and other related drawings can be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 is a schematic flow chart of an automatic drawing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a drag operation module on a graphical interface according to an embodiment of the present application;
fig. 3 is a schematic flow chart of interaction between a terminal device and a server through a drawing request according to an embodiment of the present application;
fig. 4 is a schematic flow chart of interaction between a terminal device and a server through CAD instructions according to an embodiment of the present application;
Fig. 5 is a schematic structural diagram of an automatic drawing device according to an embodiment of the present application;
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments, but not all embodiments of the present application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Accordingly, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the claimed embodiments of the application, but is merely representative of selected ones of the embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the embodiments of the application.
It will be appreciated that "first" and "second" in embodiments of the application are used to distinguish similar objects. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
Before describing the automatic drawing method provided by the embodiment of the present application, some concepts related in the embodiment of the present application are described first:
The machine process automation (Robotic Process Automation, RPA) technology can simulate the operation of staff on a computer through a keyboard and a mouse in daily work, and can replace the operation of human to execute a login system, operate software, read and write data, download files, read mails and the like. The automatic robot is used as a virtual labor force of an enterprise, so that staff can be liberated from repeated and low-value work, and energy can be put into high-added-value work, thereby realizing the digital intelligent transformation of the enterprise, reducing the cost and increasing the benefit.
"Low Code" refers to a technology and tool that can be quickly developed with little or no writing of Code and can be quickly deployed and deployed, and a Low Code development platform (LCDP, low-Code Development Platform) provides a higher and easy-to-use visual IDE.
It should be noted that, the automatic drawing method provided in the embodiment of the present application may be executed by an electronic device, where the electronic device refers to a terminal device and/or a server that execute a computer program function, and the terminal device is for example: smart phones, personal computers, tablet computers, personal digital assistants, or mobile internet appliances, etc. A server refers to a device that provides computing services over a network, such as: an x86 server and a non-x 86 server, the non-x 86 server comprising: mainframe, minicomputer, and UNIX servers.
Application scenarios to which the automatic drawing method is applicable are described below, where the application scenarios include, but are not limited to: the automatic drawing method may be used to implement that the RPA robot operates CAD applications in a "No-Code" or "Low-Code" manner, or to enhance the functions of the RPA robot, etc. An RPA robot is a robot that uses software to replace manual tasks in a business process and interacts with the front-end system of a computer like a person, so that the RPA can be seen as a software-type program robot running in a personal PC or server. Although the RPA robot is the same as the traditional physical robot to solve the problems of speed and accuracy in human work, the traditional physical robot is a robot combining software and hardware, and can execute work only by matching software under the support of specific hardware; the RPA robot is in a pure software layer, and can be deployed into any terminal equipment (such as a Personal Computer (PC)) and/or a server to finish CAD drawing operation as long as software corresponding to the automatic drawing method is installed, so that automatic process, labor cost saving and processing efficiency improvement are finally realized.
Please refer to fig. 1, which is a flowchart illustrating an automatic drawing method according to an embodiment of the present application; the embodiment of the application provides an automatic drawing method, which comprises the following steps:
step S110: and after detecting that the operation module in the graphical interface is positioned in the area to be executed, acquiring script information of the operation module.
It will be appreciated that there are a variety of situations in which the operating module described above is located in an area to be executed, including but not limited to: first, drag (or pull) the operation module to the area to be executed; second, the operation module is slid (left or right) so that the operation module is sequentially added to the area to be executed; thirdly, operating the module by double clicking (namely, continuously clicking twice in a short time), and sequentially adding the operating module into the area to be executed; fourth, click the operation module that wants to move first, then move and click the target position in the area to be executed, in order to make the operation module move to the target position in the area to be executed; fifth, clicking the operation module and simultaneously clicking a preset shortcut key to enable the operation module to sequentially join the to-be-executed area.
Please refer to fig. 2, which is a schematic diagram of a drag operation module on a graphical interface according to an embodiment of the present application; graphical interface (GRAPHICAL INTERFACE), which refers to a graphical user interface (GRAPHICAL USER INTERFACE, GUI) that may include a draggable operating module. The graphical interface may include: a library region, a region to be executed (also referred to as an execution library region), and a drawing visualization region. It will be appreciated that the area to be executed and the drawing visualization area may be two separate areas shown in fig. 2, and of course, the two areas may be the same area (i.e. the area to be executed and the drawing visualization area are coincident), or one of the two areas includes the other area, specifically for example: the region to be executed includes a drawing visualization region, or the drawing visualization region includes a region to be executed.
The program library area is used for visualizing the script program in the program library, and the result of the visualization is that the operation module corresponding to the script program is displayed in the program library area. The region to be executed is used to visualize script programs that need to be executed in an execution library, which may be transferred from the library via an application program interface (Application Programming Interface, API). The drawing visualization area is used for visualizing the execution result of the script program in the execution library, namely, the drawing result obtained by final execution.
The library area may include a plurality of operation modules, which may correspond to script programs, where the plurality of operation modules may be set according to specific situations, for example, four types of operation modules, where the four types of operation modules include: drawing operations, modification tools and format management, etc., the drawing operations may include: drawing straight lines, drawing circles (arcs), and drawing polygons, the modification tool may include: deleting CAD objects, mirroring operations, shifting operations, rotating operations and scaling (not shown), etc., the format management includes: layer, color, line, text pattern, etc. It will be appreciated that in a specific implementation, the operation modules may be added or customized according to actual situations, for example, an operation module for performing area calculation, illumination time calculation, or structural mechanics calculation on a CAD object may be added.
The embodiment of step S110 described above is, for example: the user can perform GUI operation in the graphical interface, drag the operation modules such as circle drawing (arc drawing), polygon drawing, straight line drawing, etc. in the program library area of the GUI into the to-be-executed area of the GUI in turn, when the electronic device detects that the operation modules in the graphical interface are located in the to-be-executed area of the GUI, the script information of the operation modules is acquired, where the script information of the operation modules may be script names (all parameters in this case may be controlled by different script names), the script information may also be script names (such as polygon drawing, straight line drawing, etc.) and instruction parameters (such as starting point coordinates and length, etc. parameters required for drawing a straight line), etc., the script information may also be script identifiers (such as A2, A3, A1) and instruction parameters, etc., where a represents the operation modules such as drawing operation, and A2, A3, A1 represent the operation modules for drawing circles (arcs), drawing a polygon, and drawing a straight line, etc.
Step S120: and converting the script program corresponding to the script information into a CAD instruction of the computer aided design software.
Since there are a wide variety of embodiments of step S120, the embodiments of step S120 are described in detail below. The script program can be written in any programming language, such as C, C ++, java, BASIC, javaScript, LISP, shell, perl, ruby, python, etc., and can be written in standardized manner, so that the script program can be completely consistent in various characteristics such as line type, scale and the like, and the situation that different plotters draw inconsistent graphics can be avoided.
Step S130: and executing the CAD instruction through the CAD application program to obtain a drawing result.
The embodiment of step S130 described above is, for example: and reading the CAD instruction by the executable automatic program compiled or interpreted by the preset programming language, inputting the CAD instruction into the CAD application program, and sequentially executing the CAD instruction by the CAD application program to obtain a drawing result.
In the implementation process, when the operation module in the graphical interface is detected to be positioned in the area to be executed, the corresponding operation of the operation module is triggered, and the complex operation of the CAD instruction can be replaced, so that the code-free graphical interface interactive operation mode is used for avoiding the learning process of the CAD instruction, and the operation convenience of the CAD application program is effectively improved.
As an alternative embodiment of the above step S120, before converting the script program into the CAD instruction, the instruction parameters of the CAD instruction may also be acquired, and this embodiment may include:
step S121: and searching a script program corresponding to the script information in a program library.
A Library (Program Library) is a repository for storing script programs corresponding to script information, and is different from the Library area in the GUI, and is a storage space for storing script programs, and for example, a folder in a file system may be used as a Library, or a data table in a database may be used as a Library to store script programs. However, the library area in the GUI is an operable area in the graphical interface, and cannot be used to store the script program, where the library area in the GUI functions to display (i.e. visualize) the script program corresponding operation module in the library. It may be understood that the operation modules displayed on the library area in the GUI may be in one-to-one correspondence with the script programs in the library, or may be configured not to be in one-to-one correspondence with the script programs in the library, for example, only the operation modules corresponding to the script programs configured in the configuration file are displayed, or the like.
Step S122: and judging whether instruction parameters corresponding to the script program are acquired.
The embodiment of step S122 described above is, for example: referring to fig. 2, assuming that the script program is a program corresponding to drawing a straight line (is a script name in script information), the instruction parameters corresponding to the script program that acquires the straight line may be the start point coordinates, the length of the straight line, and the inclination angle, and in some embodiments, the instruction parameters may also be the start point coordinates and the end point coordinates.
Step S123: and if the instruction parameters corresponding to the script program are not acquired, outputting the input reminding information of the instruction parameters.
The embodiment of step S123 described above is, for example: assuming that the script program is a program corresponding to a straight line drawn (is a script name in script information), when instruction parameters corresponding to the script program for drawing a straight line are not acquired, that is, when instruction parameters of the start point coordinates, the straight line length, and the inclination angle are not acquired, nor are instruction parameters of the start point coordinates and the end point coordinates acquired, reminder information for reminding the user to input the instruction parameters may be output. In some embodiments, for very often used script programs, the instruction parameters corresponding to the script programs may be set with default values (which may be modified by the user according to the requirement), and if the user does not modify the default values set in the instruction parameters, the default values may be directly used as specific values of the instruction parameters. In other embodiments, for a script program that is not commonly used (i.e., has a low frequency), all instruction parameters of the script program are not set to default values, or some instruction parameters of the script program are not set to default values (and some instruction parameters are set to default values), if a user inputs only some instruction parameters (i.e., some instruction parameters have no value), the user may be reminded to input other instruction parameters, specifically for example: if the user has entered only the end point coordinates, the user may be prompted to enter the start point coordinates.
As an alternative embodiment of the above step S120, in the process of converting the script program into the CAD instruction, the script program and the instruction parameters may also be converted together, and this embodiment may include:
Step S124: if the instruction parameters corresponding to the script program are obtained, converting the script program corresponding to the script information and the instruction parameters corresponding to the script program into CAD instructions.
The embodiment of step S124 described above is, for example: assuming that the script program is a program corresponding to drawing a straight line (is a script name in script information), if the script program corresponding to drawing a straight line, and the start point coordinate and the end point coordinate of the straight line are simultaneously acquired, the script program corresponding to drawing a straight line, the start point coordinate and the end point coordinate can be converted into CAD instructions for drawing a straight line. Specifically, assuming that the start point coordinates are (0, 0) and the end point coordinates are (9, 9), after the script program corresponding to drawing a straight line acquires the start point coordinates and the end point coordinates, an instruction information sequence may be generated from a straight line drawing instruction (L in CAD), the start point coordinates, and the end point coordinates, where the instruction information sequence may include: program instructions: l, keyboard information: enter, start coordinates: (0, 0), end point coordinates: (9, 9), keyboard information: and (5) an enter.
It can be understood that the scheme not only visualizes the drawing result after the operation is completed, but also visualizes the operation process of the drawing result through the function of the CAD instruction and the instruction parameter displayed on the operation module, so that the operation skill in the operation process can be embodied on the operation module in the area to be executed, thereby effectively reducing the learning cost of the CAD operation process and improving the operation convenience of the CAD application program.
As an alternative embodiment of the step S130, the step of executing the CAD instruction by the CAD application to obtain the drawing result may include:
step S131: and executing the CAD instruction through the CAD application program to obtain the CAD object.
It can be understood that the CAD object may be obtained by triggering execution in real time when each operation module is located in the area to be executed of the GUI, or may be obtained by triggering execution when every preset number of operation modules are located in the area to be executed of the GUI, or may be obtained by triggering execution periodically (for example, every one minute).
Step S132: and loading the CAD object into the graphical interface to obtain a drawing result.
The embodiment of step S132 described above is, for example: after the CAD instructions are executed to obtain the CAD objects, the CAD objects may also be output to a drawing visualization area in the graphical interface to obtain drawing results. Since the drawing result may be loaded by executing CAD objects obtained by a plurality of CAD instructions corresponding to a plurality of sequentially arranged operation modules, when the drawing result is not satisfied by the plotter or the plotter wants to modify the drawing result, the corresponding operation module may be directly modified in the area to be executed of the GUI, or the operation module may be directly dragged out of the area to be executed of the GUI, and then other operation modules may be dragged into the area to be executed of the GUI. Of course, in some embodiments, the plotter may also modify other operation modules by modifying the modification operation module in the tool, specifically for example: modifying instruction parameters and execution order of operation modules, etc., the above-mentioned modification operation module refers to an operation module for modifying other operation modules. Then, the steps S110 to S130 are re-executed, so as to obtain a re-drawn drawing result.
As an alternative embodiment of the above step S131, an embodiment of executing CAD instructions by the CAD application may include:
step S131a: whether a command line window of the CAD application is open is determined.
A Command line window refers to a window interface of a Command line interface (Command-LINE INTERFACE, CLI) in a CAD application for executing CAD instructions.
The embodiment of step S131a described above is, for example: the executable program compiled or interpreted using a preset programming language may be used to determine whether a command line window of the CAD application is open, such as: C. c++, java, BASIC, javaScript, LISP, shell, perl, ruby, python, PHP, and the like.
Step S131b: if the command line window of the CAD application is open, executing the CAD instructions in the command line window.
The embodiment of step S131b described above is, for example: if it is confirmed that the command line window of the CAD application has been opened, CAD instructions may be entered into the command line window for execution, and then the CAD instructions are executed to obtain the CAD object.
As an alternative embodiment of the above step S131, after determining that the command line window is not opened, opening the command line window may further include:
step S131c: and if the command line window of the CAD application program is not opened, opening the command line window, and executing the CAD instruction in the command line window.
As an alternative embodiment of the above step S131c, the process of opening the command line window may include:
Step S131d: and identifying the position coordinates of the current mouse and the window area corresponding to the command line window.
The embodiment of step S131d described above is, for example: the current mouse position coordinates and the window area corresponding to the command line window are identified by using a Computer Vision (CV) program, and a CV program such as an OpenCV image processing program or the like can be used.
Step S131e: and controlling the current mouse to move from the position coordinates to the window area, and clicking and opening the command line window.
The embodiment of step S131e described above is, for example: a control center program compiled or interpreted using a preset programming language, such as: C. c++, java, BASIC, javaScript, LISP, shell, perl, ruby, python, PHP, and the like.
It will be appreciated that the above-described auto-mapping method may be performed by a terminal device and/or a server, including but not limited to the following: in the first case, all steps of the automatic drawing method (e.g., step S110, step S120, and step S130 above) are performed on the terminal device. In the second case, part of the steps of the automatic drawing method are performed on the terminal device, and the other part of the steps are performed on the server, specifically for example: the above step S110 is performed on the terminal device, and steps S120 to S130 are performed on the server; also for example: the above steps S110 to S120 are performed on the terminal device, and step S130 is performed on the server. In a third case, all steps of the automatic drawing method (for example, the above steps S110, S120 and S130) are performed on the server, and when all the steps are performed on the server, the server may install a windows operating system, and then the user may use a personal computer (personal computer, PC) as a client and remotely log on to the server through mstsc commands, and at this time, although the graphical interface of the server is seen and operated by the PC, a response operation of the graphical interface (for example, it is detected that an operation module in the graphical interface is located in an area to be executed) is still performed on the server, not on the client, that is, the client only transmits operation information on the graphical interface to the server, and the server detects a response operation of the graphical interface (for example, it is detected that an operation module in the graphical interface is located in an area to be executed).
As an alternative implementation of the automatic drawing method, in a specific implementation process, various calculations may also be performed on CAD objects in the graphical interface, and this implementation may include:
step S140: obtaining a calculation request, wherein the calculation request comprises the following steps: and (5) identifying the CAD object.
The above-mentioned implementation of step S140 is very various, including but not limited to the following:
A first embodiment, where a user may operate an operation module (for computing) to trigger generation of a computing request, may include:
step S141: and after detecting that the computing module is positioned in the area to be executed in the graphical interface, acquiring a computing request corresponding to the computing module.
The embodiment of step S141 is, for example: the user can operate an operation module (for calculation) on the terminal device, and drag the operation module to the area to be executed of the GUI on the terminal device. When the terminal device detects that the computing module is located in the to-be-executed area in the graphical interface, the computing request generating operation can be automatically triggered according to configuration information, wherein the configuration information can be generating and sending time of the computing request, and three configuration items comprise: the first configuration item represents generating a calculation request corresponding to the operation module in real time, the second configuration item represents generating a calculation request corresponding to the operation module when each storage is performed, and the third configuration item represents generating a calculation request corresponding to the operation module when a drawing button is clicked. If the terminal device detects that the user drags the operation module for calculation to the to-be-executed area of the GUI, a calculation request corresponding to the operation module may be generated (in real time, when each time saving or when clicking the drawing button), where the operation module for calculation includes but is not limited to: and carrying out area calculation, illumination time calculation or structural mechanics calculation and the like on the CAD object.
The embodiment of step S141 described above is, for example: the CAD application and the graphical interface may run on the same electronic device (e.g., a terminal device such as a personal computer or a notebook), and the electronic device may automatically trigger generation of the calculation request after detecting that the calculation module in the graphical interface is located in the area to be executed.
In a second embodiment, an electronic device receives a computing request sent by another device or other server, where the embodiment may include:
step S142: the electronic device receives computing requests sent by other devices or other servers.
The embodiment of step S142 described above is, for example: the electronic device (e.g., server) receives computing requests sent by other devices (e.g., terminal devices such as personal computers or notebooks) or other servers (e.g., proxy servers or load balancing servers, etc.) via hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP) or hypertext transfer security protocol (Hyper Text Transfer Protocol Secure, HTTPs).
Step S150: and calculating the CAD object in the graphical interface according to the CAD object identifier to obtain a calculation result.
There are various ways of calculating the CAD object in the above step S150, and if the CAD object is divided according to a calculation execution device (e.g., a terminal device or a server), the ways of calculating the CAD object include, but are not limited to, the following ways:
In a first embodiment, the calculation is performed at the terminal device, specifically for example: after the terminal equipment generates the calculation request corresponding to the operation module, as a service (server) end can be installed on the terminal equipment to execute the calculation operation corresponding to the calculation request, the terminal equipment can also analyze the CAD object identification from the calculation request and calculate the CAD object according to the CAD object identification to obtain a calculation result.
In a second embodiment, the calculation is performed on a server, specifically for example: after detecting that a user drags an operation module for calculation to an area to be executed of the GUI, the terminal equipment generates a calculation request corresponding to the operation module, and then sends the calculation request corresponding to the operation module to the server. The server directly receives the calculation request sent by the terminal, then the server analyzes the CAD object identification from the calculation request, calculates the CAD object according to the CAD object identification, and obtains a calculation result.
There are various calculation methods of the CAD object in the above step S150, and if the CAD object is divided according to the calculation types, the calculation methods of the CAD object include, but are not limited to, the following:
in a first calculation manner of the CAD object, the calculation result may include: an area calculation result; the area calculation may be performed on the CAD object, and the embodiment may include:
Step S151: and carrying out area calculation on the CAD object according to the CAD object identifier to obtain an area calculation result.
The embodiment of step S151 described above is, for example: in a house type diagram design scene of the building industry, CAD objects corresponding to the house type diagram can be selected, CAD object identifiers corresponding to the house type diagram are obtained, then area calculation is carried out on the house type diagram according to the CAD object identifiers corresponding to the house type diagram, and the obtained area calculation result comprises: building area, room area, and/or shared area, etc.
In a second calculation manner of the CAD object, the calculation result may include: calculating a result of illumination time; the illumination time calculation may be performed on the CAD object, and the embodiment may include:
Step S152: and calculating the illumination time of the CAD object according to the CAD object identifier to obtain an illumination time calculation result.
The embodiment of step S152 is, for example: in a house type diagram design scene of the building industry, when the illumination time of a building is required to be simulated, CAD objects corresponding to the building can be selected, CAD object identifiers corresponding to the building are obtained, then illumination time calculation is carried out according to the CAD object identifiers corresponding to the building, and the obtained illumination time calculation result is the illumination time of the building in winter and/or summer in one day.
In a third calculation manner of the CAD object, the calculation result may include: structural mechanics calculation results; structural mechanics calculations may be performed on CAD objects, and this embodiment may include:
Step S153: and carrying out structural mechanics calculation on the CAD object according to the CAD object identifier to obtain a structural mechanics calculation result.
The embodiment of step S153 described above is, for example: performing structural mechanics calculation on the CAD object according to the CAD object identifier (for example, calculating structural strength and earthquake resistance of the CAD object) to obtain a structural mechanics calculation result, and assuming that the CAD object is a three-dimensional building, the structural mechanics calculation result may include: structural strength and earthquake resistance of three-dimensional buildings, and the like.
In a fourth calculation manner of the CAD object, the calculation result may include: calculating a construction cost; engineering cost calculations may be performed on CAD objects, and this embodiment may include:
Step S154: and calculating the engineering cost of the CAD object according to the CAD object identifier to obtain an engineering cost calculation result.
In a fifth calculation manner of the CAD object, the calculation result may include: calculating a result of the earthwork quantity; the earthwork calculation may be performed on a CAD object, and the embodiment may include:
step S155: and carrying out earthwork calculation on the CAD object according to the CAD object identifier to obtain an earthwork calculation result.
Of course, in particular implementations, other calculations may be performed on the CAD object, including but not limited to: the construction cost, the structural strength, the earthwork quantity (earthwork quantity includes the calculation of the volume of the excavated space and the calculation of the volume of the filled space) and the like are calculated.
The sixth calculation method of the CAD object may be combined with any two or more of the first to third calculation methods, and the calculation result may include: the area calculation result and the illumination time calculation result, or the area calculation result and the structural mechanics calculation result, or the illumination time calculation result and the structural mechanics calculation result, or the like are not listed. That is, the area calculation and the illumination time calculation may be performed on the CAD object, or the area calculation and the structural mechanics calculation may be performed on the CAD object, or the illumination time calculation and the structural mechanics calculation may be performed on the CAD object, or the like, which are not necessarily exemplified.
Please refer to fig. 3, which is a schematic flow chart illustrating interaction between a terminal device and a server through a drawing request according to an embodiment of the present application; the embodiment of the application provides an automatic drawing method executed on terminal equipment, namely an automatic drawing method applied to the terminal equipment, and the implementation mode of the method can comprise the following steps:
step S210: after detecting that an operation module in the graphical interface is positioned in an area to be executed, the terminal equipment acquires script information of the operation module and generates a drawing request according to the script information.
Drawing request, which is a request for drawing sent to a server, may include: script information, the instruction parameters described above, and the like, so that the server obtains drawing results based on the script information and the instruction parameters.
The implementation principle and implementation of this step S210 are similar to those of the step S110, and thus, the implementation principle and implementation thereof will not be described again here, and reference may be made to the description of the step S110 if it is not clear.
Step S220: the terminal equipment sends a drawing request to the server so that the server converts a script program corresponding to the script information into a CAD instruction of the computer aided design software, and the CAD instruction is executed through the CAD application program to obtain a drawing result.
The embodiment of step S220 described above is, for example: the terminal equipment sends a drawing request to the server through an HTTP protocol or an HTTPS protocol so that the server converts a script program corresponding to the script information into a CAD instruction of the computer aided design software, and the CAD instruction is executed through the CAD application program to obtain a drawing result.
The embodiment of the application also provides an automatic drawing method executed on the server, namely an automatic drawing method applied to the server, and the implementation mode of the method can comprise the following steps:
step S230: and the server receives the drawing request sent by the terminal equipment.
It may be understood that, the drawing request is sent by the terminal device after detecting that the operation module in the graphical interface is located in the operation area to be executed, where the drawing request includes: script information of the operation module and the instruction parameters. The server may receive the drawing request sent by the terminal device through HTTP protocol or HTTPs protocol.
Step S240: and the server converts the script program corresponding to the script information into a CAD instruction of the computer aided design software.
Step S250: and the server executes the CAD instruction through the CAD application program to obtain a drawing result.
The implementation principle and implementation of the steps S240 to S250 are similar to those of the steps S120 to S130, and thus, the implementation principle and implementation thereof will not be described herein, and reference may be made to the descriptions of the steps S120 to S130, if not clear.
Please refer to fig. 4, which is a schematic flow chart illustrating interaction between a terminal device and a server through CAD instructions according to an embodiment of the present application; the embodiment of the application provides an automatic drawing method executed at a terminal device, namely an automatic drawing method applied to the terminal device, and the implementation mode of the method can comprise the following steps:
Step S310: after detecting that an operation module in the graphical interface is positioned in an area to be executed, the terminal equipment acquires script information of the operation module.
Step S320: and the terminal equipment converts the script program corresponding to the script information into a CAD instruction of the computer aided design software.
The implementation principle and implementation of the steps S310 to S320 are similar to those of the steps S110 to S120, and thus, the implementation principle and implementation thereof will not be described herein, and reference may be made to the descriptions of the steps S110 to S120, if not clear.
Step S330: and the terminal equipment sends the CAD instruction to the server so that the server executes the CAD instruction through the CAD application program to obtain a drawing result.
The embodiment of step S330 described above is, for example: and the terminal equipment sends the CAD instruction to the server through the TCP protocol or the UDP protocol so that the server executes the CAD instruction through the CAD application program to obtain a drawing result.
The embodiment of the application provides an automatic drawing method executed on a server, namely an automatic drawing method applied to the server, and the implementation mode of the method can comprise the following steps:
Step S340: and the server receives a CAD instruction of the computer aided design software sent by the terminal equipment.
It can be understood that after the terminal device detects that the operation module in the graphical interface is located in the to-be-executed area, the CAD instruction acquires script information of the operation module, and converts a script program corresponding to the script information.
Step S350: and the server executes the CAD instruction through the CAD application program to obtain a drawing result.
The implementation principle and implementation of this step S350 are similar to those of the step S130, and thus, the implementation principle and implementation thereof will not be described again here, and reference may be made to the description of the step S130 if it is not clear.
Please refer to fig. 5, which illustrates a schematic structure of an automatic drawing device according to an embodiment of the present application; the embodiment of the application provides an automatic drawing device 400, which comprises:
The script information obtaining module 410 is configured to obtain script information of an operation module after detecting that the operation module in the graphical interface is located in an area to be executed.
The script program conversion module 420 is configured to convert a script program corresponding to the script information into CAD instructions of the CAD software.
The drawing result obtaining module 430 is configured to obtain a drawing result by executing CAD instructions by the CAD application.
Optionally, in an embodiment of the present application, the automatic drawing device further includes:
And the script program searching module is used for searching the script program corresponding to the script information in the program library.
The instruction parameter judging module is used for judging whether the instruction parameters corresponding to the script program are acquired or not.
And the reminding information output module is used for outputting the input reminding information of the instruction parameters if the instruction parameters corresponding to the script program are not acquired.
Optionally, in an embodiment of the present application, the script program conversion module includes:
And the CAD instruction conversion module is used for converting the script program corresponding to the script information and the instruction parameters corresponding to the script program into CAD instructions if the instruction parameters corresponding to the script program are acquired.
Optionally, in an embodiment of the present application, the drawing result obtaining module includes:
The CAD object obtaining submodule is used for executing CAD instructions through the CAD application program to obtain a CAD object;
and the CAD object loading sub-module is used for loading the CAD object into the graphical interface to obtain a drawing result.
Optionally, in an embodiment of the present application, the CAD object obtaining sub-module includes:
The command window judging unit is used for judging whether a command line window of the CAD application program is opened or not;
and the CAD instruction execution unit is used for executing the CAD instructions in the command line window if the command line window of the CAD application program is opened.
Optionally, in an embodiment of the present application, the CAD object obtaining sub-module further includes:
And the command window opening unit is used for opening the command line window if the command line window of the CAD application program is not opened, and executing the CAD instruction in the command line window.
Optionally, in an embodiment of the present application, the command window opening unit includes:
The position area identification subunit is used for identifying the position coordinates of the current mouse and the window area corresponding to the command line window;
and the current mouse control subunit is used for controlling the current mouse to move from the position coordinates to the window area and clicking and opening the command line window.
Optionally, in an embodiment of the present application, the automatic drawing device further includes:
The computing request acquisition module is used for acquiring a computing request, and the computing request comprises the following components: and (5) identifying the CAD object.
And the calculation result obtaining module is used for calculating the CAD object in the graphical interface according to the CAD object identifier to obtain a calculation result.
Optionally, in an embodiment of the present application, the operation module is a calculation module; a computing request acquisition module comprising:
And the calculation request acquisition sub-module is used for acquiring the calculation request corresponding to the calculation module after detecting that the calculation module is positioned in the area to be executed in the graphical interface.
Optionally, in an embodiment of the present application, the calculation result includes: area calculation results, illumination time calculation results, engineering cost calculation results, earthwork calculation results and/or structural mechanics calculation results; the calculation result obtaining module comprises:
And the object area calculation sub-module is used for calculating the area of the CAD object according to the CAD object identifier to obtain an area calculation result.
And/or an illumination time calculation sub-module, which is used for calculating the illumination time of the CAD object according to the CAD object identifier to obtain an illumination time calculation result.
And/or a construction cost calculation sub-module is used for carrying out construction cost calculation on the CAD object according to the CAD object identifier to obtain a construction cost calculation result;
And/or an earthwork calculation operator module, which is used for carrying out earthwork calculation on the CAD object according to the CAD object identifier to obtain an earthwork calculation result;
And/or a structural mechanics calculation sub-module is used for carrying out structural mechanics calculation on the CAD object according to the CAD object identifier to obtain a structural mechanics calculation result.
The embodiment of the application provides an automatic drawing device, which is applied to terminal equipment and comprises:
and the drawing request generation module is used for acquiring script information of the operation module after detecting the operation of the operation module in the graphical interface in the region to be executed, and generating a drawing request according to the script information.
And the drawing request sending module is used for sending a drawing request to the server so that the server converts the script program corresponding to the script information into a CAD instruction of the computer aided design software, and the CAD instruction is executed through the CAD application program to obtain a drawing result.
The embodiment of the application provides an automatic drawing device, which is applied to a server and comprises:
The drawing request acquisition module is configured to acquire a drawing request sent by the terminal device, where the drawing request is sent by the terminal device after detecting that an operation module in the graphical interface is located in an area to be executed, and the drawing request includes: script information of the operation module.
And the CAD instruction conversion module is used for converting the script program corresponding to the script information into a CAD instruction of the computer-aided design software.
And the CAD instruction execution module is used for executing the CAD instruction through the CAD application program to obtain a drawing result.
The embodiment of the application also provides an automatic drawing device which is applied to the terminal equipment and comprises:
The module information acquisition module is used for acquiring script information of the operation module after detecting the operation of the operation module in the graphical interface in the region to be executed;
The CAD instruction conversion module is used for converting the script program corresponding to the script information into a CAD instruction of the computer-aided design software;
and the CAD instruction sending module is used for sending the CAD instruction to the server so that the server executes the CAD instruction through the CAD application program to obtain a drawing result.
The embodiment of the application also provides an automatic drawing method which is applied to the server and comprises the following steps:
The CAD instruction receiving module is used for receiving a CAD instruction of computer-aided design software sent by the terminal equipment, and after the terminal equipment detects the operation of the operation module in the graphical interface in the area to be executed, the CAD instruction obtains script information of the operation module and converts a script program corresponding to the script information to obtain the script program;
And the drawing result obtaining module is used for executing the CAD instruction through the CAD application program to obtain the drawing result.
It should be understood that the apparatus corresponds to the above-mentioned automatic drawing method embodiment, and is capable of executing the steps involved in the above-mentioned method embodiment, and specific functions of the apparatus may be referred to the above description, and detailed descriptions thereof are omitted herein as appropriate to avoid redundancy. The device includes at least one software functional module that can be stored in memory in the form of software or firmware (firmware) or cured in an Operating System (OS) of the device.
Please refer to fig. 6, which illustrates a schematic structural diagram of an electronic device according to an embodiment of the present application. An electronic device 500 provided in an embodiment of the present application includes: a processor 510 and a memory 520, the memory 520 storing machine-readable instructions executable by the processor 510, which when executed by the processor 510 perform the method as described above.
The embodiment of the present application further provides a computer readable storage medium 530, on which computer readable storage medium 530 a computer program is stored which, when executed by the processor 510, performs a method as above.
The computer-readable storage medium 530 may be implemented by any type or combination of volatile or nonvolatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable programmable Read-Only Memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, EEPROM for short), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
In the embodiments of the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
In addition, the functional modules of the embodiments of the present application may be integrated together to form a single part, or the modules may exist separately, or two or more modules may be integrated to form a single part. Furthermore, in the description herein, reference to the terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the embodiments of the application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The foregoing description is merely an optional implementation of the embodiment of the present application, but the scope of the embodiment of the present application is not limited thereto, and any person skilled in the art may easily think about changes or substitutions within the technical scope of the embodiment of the present application, and the changes or substitutions are covered by the scope of the embodiment of the present application.

Claims (14)

1. An automatic drawing method, comprising:
After detecting that an operation module in a graphical interface is positioned in a program library area and is moved to an area to be executed, acquiring script information of the operation module;
converting script programs corresponding to the script information into CAD instructions;
executing the CAD instruction through a CAD application program to obtain a drawing result;
Wherein the graphical interface comprises: the program library area is used for displaying the operation module corresponding to the script program in the program library, and the drawing visualization area is used for visualizing the drawing result; before the script program corresponding to the script information is converted into the CAD instruction, the method further comprises the following steps: finding out script programs corresponding to the script information from the program library; judging whether instruction parameters corresponding to the script program are acquired or not; if not, outputting the input reminding information of the instruction parameters.
2. The method of claim 1, wherein converting the script program corresponding to the script information into computer-aided design software CAD instructions comprises:
and if the instruction parameters corresponding to the script program are acquired, converting the script program corresponding to the script information and the instruction parameters corresponding to the script program into the CAD instruction.
3. The method of claim 1, wherein the executing the CAD instructions by the CAD application to obtain drawing results comprises:
executing the CAD instruction through a CAD application program to obtain a CAD object;
And loading the CAD object into the graphical interface to obtain the drawing result.
4. The method of claim 3, wherein the executing the CAD instructions by the CAD application comprises:
Judging whether a command line window of the CAD application program is opened or not;
if yes, executing the CAD instruction in the command line window.
5. The method of claim 4, further comprising, after said determining whether a command line window of the CAD application is open:
and if the command line window of the CAD application program is not opened, opening the command line window, and executing the CAD instruction in the command line window.
6. The method of claim 5, wherein said opening the command line window comprises:
Identifying the position coordinates of the current mouse and a window area corresponding to the command line window;
And controlling the current mouse to move from the position coordinates to the window area, and clicking and opening the command line window.
7. The method as recited in claim 1, further comprising:
Obtaining a calculation request, wherein the calculation request comprises the following steps: a CAD object mark;
And calculating the CAD object in the graphical interface according to the CAD object identifier to obtain a calculation result.
8. The method of claim 7, wherein the operational module is a computing module; the obtaining a calculation request includes:
And after detecting that the computing module is positioned in the area to be executed in the graphical interface, acquiring a computing request corresponding to the computing module.
9. The method of claim 7, wherein the calculating comprises: area calculation results, illumination time calculation results, engineering cost calculation results, earthwork calculation results and/or structural mechanics calculation results; the calculating the CAD object according to the CAD object identifier includes:
carrying out area calculation on the CAD object according to the CAD object identifier to obtain the area calculation result;
and/or performing illumination time calculation on the CAD object according to the CAD object identifier to obtain an illumination time calculation result;
And/or carrying out engineering cost calculation on the CAD object according to the CAD object identifier to obtain an engineering cost calculation result;
And/or performing earthwork calculation on the CAD object according to the CAD object identifier to obtain an earthwork calculation result;
and/or carrying out structural mechanics calculation on the CAD object according to the CAD object identifier to obtain the structural mechanics calculation result.
10. An automatic drawing method, characterized by being applied to a terminal device, comprising:
After detecting that an operation module in a graphical interface is positioned in a program library area and is moved to an area to be executed, acquiring script information of the operation module, and generating a drawing request according to the script information;
sending the drawing request to a server so that the server converts a script program corresponding to the script information into a CAD instruction, and executing the CAD instruction through a CAD application program to obtain a drawing result;
Wherein the graphical interface comprises: the program library area is used for displaying the operation module corresponding to the script program in the program library, and the drawing visualization area is used for visualizing the drawing result; before the script program corresponding to the script information is converted into the CAD instruction, the method further comprises the following steps: finding out script programs corresponding to the script information from the program library; judging whether instruction parameters corresponding to the script program are acquired or not; if not, outputting the input reminding information of the instruction parameters.
11. An automatic drawing method, applied to a server, comprising:
Acquiring a drawing request sent by a terminal device, wherein the drawing request is sent by the terminal device after detecting that an operation module in a graphical interface is positioned in a program library area and is moved to an area to be executed, and the drawing request comprises: script information of the operation module;
converting script programs corresponding to the script information into CAD instructions;
executing the CAD instruction through a CAD application program to obtain a drawing result;
Wherein the graphical interface comprises: the program library area is used for displaying the operation module corresponding to the script program in the program library, and the drawing visualization area is used for visualizing the drawing result; before the script program corresponding to the script information is converted into the CAD instruction, the method further comprises the following steps: finding out script programs corresponding to the script information from the program library; judging whether instruction parameters corresponding to the script program are acquired or not; if not, outputting the input reminding information of the instruction parameters.
12. An automatic drawing method, characterized by being applied to a terminal device, comprising:
After detecting that an operation module in a graphical interface is positioned in a program library area and is moved to an operation to be executed area, acquiring script information of the operation module;
converting script programs corresponding to the script information into CAD instructions;
Sending the CAD instruction to a server so that the server executes the CAD instruction through a CAD application program to obtain a drawing result;
Wherein the graphical interface comprises: the program library area is used for displaying the operation module corresponding to the script program in the program library, and the drawing visualization area is used for visualizing the drawing result; before the script program corresponding to the script information is converted into the CAD instruction, the method further comprises the following steps: finding out script programs corresponding to the script information from the program library; judging whether instruction parameters corresponding to the script program are acquired or not; if not, outputting the input reminding information of the instruction parameters.
13. An automatic drawing method, applied to a server, comprising:
receiving a CAD instruction of computer aided design software sent by terminal equipment, wherein the CAD instruction obtains script information of an operation module in a graphical interface after the terminal equipment detects that the operation module is positioned in a program library area and is moved to an area to be executed, and converts a script program corresponding to the script information into the CAD instruction of the computer aided design software;
executing the CAD instruction through a CAD application program to obtain a drawing result;
Wherein the graphical interface comprises: the program library area is used for displaying the operation module corresponding to the script program in the program library, and the drawing visualization area is used for visualizing the drawing result; before the script program corresponding to the script information is converted into the CAD instruction, the method further comprises the following steps: finding out script programs corresponding to the script information from the program library; judging whether instruction parameters corresponding to the script program are acquired or not; if not, outputting the input reminding information of the instruction parameters.
14. An electronic device, comprising: a processor and a memory storing machine-readable instructions executable by the processor to perform the method of any one of claims 1 to 13 when executed by the processor.
CN202211175857.8A 2022-09-26 2022-09-26 Automatic drawing method and electronic equipment Active CN115495807B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211175857.8A CN115495807B (en) 2022-09-26 2022-09-26 Automatic drawing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211175857.8A CN115495807B (en) 2022-09-26 2022-09-26 Automatic drawing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN115495807A CN115495807A (en) 2022-12-20
CN115495807B true CN115495807B (en) 2024-05-10

Family

ID=84472367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211175857.8A Active CN115495807B (en) 2022-09-26 2022-09-26 Automatic drawing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN115495807B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6587746B1 (en) * 1996-12-04 2003-07-01 D'souza Melanius Process and apparatus for facilitating automatic production of drawing using a CAD system
JP2004062541A (en) * 2002-07-29 2004-02-26 Ntt Power & Building Facilities Inc Server of remote control system of database information, and remote control method of database information
CN105843734A (en) * 2016-03-18 2016-08-10 厦门美图移动科技有限公司 Automatic test method and device and computing device
CN106055825A (en) * 2016-06-12 2016-10-26 文小发 Modeling realization method and system based on CAD
CN110286901A (en) * 2019-07-04 2019-09-27 广州广燃设计有限公司 A kind of scenario generation method based on CAD, system and storage medium
CN110381349A (en) * 2019-06-11 2019-10-25 深圳市金锐显数码科技有限公司 A kind of method and terminal based on small routine control smart machine
US10762249B1 (en) * 2017-06-21 2020-09-01 Stone Boutique Technologies, LLC System for design visualization using actual product images
CN113504908A (en) * 2021-07-19 2021-10-15 中国建设银行股份有限公司 Business code generation method and device, electronic equipment and computer readable medium
CN114564195A (en) * 2022-02-17 2022-05-31 山东华云三维科技有限公司 Secondary development method of cloud CAD platform based on B/S architecture
CN114816401A (en) * 2022-04-13 2022-07-29 上海弘玑信息技术有限公司 Interface element positioning method, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11126759B2 (en) * 2017-06-16 2021-09-21 Dassault Systemes Solidworks Corporation Adding constraints between components of a computer-aided design (CAD) model

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6587746B1 (en) * 1996-12-04 2003-07-01 D'souza Melanius Process and apparatus for facilitating automatic production of drawing using a CAD system
JP2004062541A (en) * 2002-07-29 2004-02-26 Ntt Power & Building Facilities Inc Server of remote control system of database information, and remote control method of database information
CN105843734A (en) * 2016-03-18 2016-08-10 厦门美图移动科技有限公司 Automatic test method and device and computing device
CN106055825A (en) * 2016-06-12 2016-10-26 文小发 Modeling realization method and system based on CAD
US10762249B1 (en) * 2017-06-21 2020-09-01 Stone Boutique Technologies, LLC System for design visualization using actual product images
CN110381349A (en) * 2019-06-11 2019-10-25 深圳市金锐显数码科技有限公司 A kind of method and terminal based on small routine control smart machine
CN110286901A (en) * 2019-07-04 2019-09-27 广州广燃设计有限公司 A kind of scenario generation method based on CAD, system and storage medium
CN113504908A (en) * 2021-07-19 2021-10-15 中国建设银行股份有限公司 Business code generation method and device, electronic equipment and computer readable medium
CN114564195A (en) * 2022-02-17 2022-05-31 山东华云三维科技有限公司 Secondary development method of cloud CAD platform based on B/S architecture
CN114816401A (en) * 2022-04-13 2022-07-29 上海弘玑信息技术有限公司 Interface element positioning method, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115495807A (en) 2022-12-20

Similar Documents

Publication Publication Date Title
Son et al. Automated schedule updates using as-built data and a 4D building information model
WO2019144681A1 (en) Automated testing method and apparatus, storage medium and electronic device
US20240193318A1 (en) Computer System and Method for Managing Coordination Issues in Construction Projects
JP2020515963A (en) Autonomous generation design synthesis system using data from design tools and knowledge from digital twin graph
WO2017152703A1 (en) Three-dimensional tag implementation method and device
Rawles et al. AndroidWorld: A dynamic benchmarking environment for autonomous agents
US11256996B2 (en) Method for recommending next user input using pattern analysis of user input
US11900515B2 (en) Automatic area detection
EP3696745A1 (en) Intelligent workflow advisor for part design, simulation and manufacture
CN110413161B (en) Component configuration method and device and electronic equipment
JP2011081778A (en) Method and device for display-independent computerized guidance
Nan Easy3D: a lightweight, easy-to-use, and efficient C++ library for processing and rendering 3D data
US20210073095A1 (en) Automatic Control Identification
US7475350B2 (en) Method and system to layout topology objects
US8698807B2 (en) Intuitively connecting graphical shapes
CN115495807B (en) Automatic drawing method and electronic equipment
US20060242606A1 (en) Graphical roadmap view and framework for activity tracking and execution
US11915370B2 (en) Method and system for 3D modeling based on irregular-shaped sketch
CN115455510A (en) Automatic drawing method, electronic equipment and storage medium
JP2020166473A (en) Trained model generation device and program and trained model generation system
EP3693888A2 (en) Using transformations to verify computer vision quality
US20170344918A1 (en) Facilitating and reporting the proper completion of workflows
US11954307B2 (en) Visual selector for application activities
CN111061465B (en) Reverse mapping method, system, electronic equipment and storage medium for robot programming
US11822773B2 (en) Systems and methods for generating and utilizing an interactive causal loop diagram using a causal loop designer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant