Method for continuous sectioning of three-dimensional entities in CAD and layerwise export of volumes

By using the AutoLISP plugin in AutoCAD to perform three-dimensional solid elevation layer sectioning, the problem of time-consuming and error-prone manual sectioning in pumped storage power station design was solved, enabling fast and accurate volume data export and improving design efficiency and accuracy.

CN122433141APending Publication Date: 2026-07-21CHINA ENERGY ENG GRP GUANGXI ELECTRIC POWER DESIGN INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610482353.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-13
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In the design of pumped storage power stations, the existing method of manually cutting cross sections and exporting volume data is time-consuming and prone to errors, and cannot efficiently and accurately complete the drawing of reservoir bottom leveling, slag yard volume and filling volume.

Method used

The AutoLISP plugin is used to perform elevation layering of AutoCAD 3D solids, and the layered volume data is quickly calculated and exported using the starting section elevation and section step parameters.

Benefits of technology

It enables rapid and accurate continuous sectioning of 3D solids and layered volume export within AutoCAD, improving the work efficiency of designers and the accuracy of drawing volume curves.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122433141A_ABST
    Figure CN122433141A_ABST
Patent Text Reader

Abstract

The present application discloses a method for continuously cutting three-dimensional entity and exporting volume in CAD, which is used to solve the problems in the calculation of volume curve drawing in the design of pumped storage power station. The method uses AutoLISP plug-in to cut and export volume data of AutoCAD three-dimensional entity according to elevation. The method mainly uses AutoCAD built-in Autolisp / Vlisp language to edit a plug-in, which has the function of quickly calculating and exporting layered volume according to the input start cutting elevation and cutting step parameters. The present application provides a simple, efficient, accurate and reliable method for the calculation of volume curve drawing in the design of pumped storage power station. The present application has been used in the preliminary design of several pumped storage power stations, and the technical effect is good.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of hydropower engineering technology, and in particular to a method for continuously cutting three-dimensional solids in CAD and exporting volume in layers. Background Technology

[0002] With the rise of pumped storage power station construction in China, major design institutes have all joined this wave. In the early design phase of pumped storage power stations, numerous scheme comparisons and feasibility studies are required, such as dam site selection, dam type selection, dam alignment, and water level selection. These all involve design aspects such as slag heap volume curves, excavation volume curves, and filling volume curves. Currently, in the design of pumped storage power stations in China, tasks such as "drawing the reservoir bottom flatness curve," "drawing the slag heap volume curve," "drawing the filling curve," and "drawing the excavation curve" are mostly done manually by cutting cross-sections and reading information from each section. The typical steps are: ① cutting the structure cross-section; ② reading the area data of each cross-section; ③ copying the area data and inputting it into an Excel spreadsheet; ④ using the obtained data to draw the volume curve using the Excel spreadsheet. This method is time-consuming and error-prone, consuming a significant amount of time and energy from designers. Therefore, the ability to continuously cut and quickly derive the volume layer by layer has become an urgent problem to be solved in the design of such projects. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a simple, efficient, accurate and reliable method for continuously sectioning three-dimensional solids in CAD and deriving volume in layers.

[0004] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0005] A method for continuously sectioning 3D solids in CAD and exporting volume in layers, using the AutoLISP plugin to section AutoCAD 3D solids in layers according to elevation and export volume data.

[0006] The AutoLISP plugin has the ability to quickly calculate and export layered volumes for AutoCAD 3D solids based on the input starting section elevation and section step parameters.

[0007] The above method includes the following steps: loading the plugin, running the plugin command, selecting the 3D entity, inputting the starting section elevation, inputting the section step length, and selecting the directory to save the exported file.

[0008] Before selecting a 3D entity, you must first convert the 3D entity to a front view and read its lowest elevation, ensuring that the input starting section elevation is greater than its lowest elevation.

[0009] The above methods are applied in the design of pumped storage power stations.

[0010] The design of a pumped storage power station includes "drawing the reservoir bottom leveling curve", "drawing the slag yard volume curve", "drawing the filling curve", and "drawing the excavation curve".

[0011] To address the problems in calculating and plotting volume curves during the design of pumped storage power stations, the inventors have developed a method for continuously sectioning 3D solids within CAD and exporting volumes layer by layer. This method utilizes an AutoLISP plugin to section AutoCAD 3D solids layer by layer according to elevation and export volume data. The method primarily employs a plugin edited using the AutoLISP / VLISP language built into AutoCAD, which has the function of quickly calculating and exporting layered volumes for AutoCAD 3D solids based on input initial section elevation and section step parameters. This invention has the following beneficial effects:

[0012] (1) Use the plugin according to the established steps. The plugin can continuously cut three-dimensional solids and quickly export volumes in layers in AutoCAD according to the changes in the starting cutting elevation and cutting step length parameters input by the designer, which can effectively improve the efficiency of the designer in drawing volume curves.

[0013] (2) By using the plug-in to call the built-in AutoCAD commands, it can continuously cut and quickly export the volume in layers, and the exported data results are accurate and reliable.

[0014] Therefore, this invention provides a simple, efficient, accurate, and reliable approach for calculating and plotting volume curves related to the design of pumped storage power stations. This invention has already been adopted in the preliminary design phases of several pumped storage power stations, with good technical results. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the command structure of the AutoLISP plugin in this invention.

[0016] Figure 2 This is a flowchart of the method for continuously sectioning a three-dimensional solid and exporting its volume in layers within a CAD system, according to the present invention.

[0017] Figure 3 This is one of the screenshots of an operational example of the present invention.

[0018] Figure 4 This is the second screenshot of an operational example of the present invention.

[0019] Figure 5 This is the third screenshot of an operational example of the present invention.

[0020] Figure 6 This is the fourth screenshot of an operational example of the present invention.

[0021] Figure 7 This is the fifth screenshot of an operational example of the present invention.

[0022] Figure 8 This is the sixth screenshot of an operational example of the present invention.

[0023] Figure 9 This is the seventh screenshot of an operational example of the present invention.

[0024] Figure 10 This is the eighth screenshot of an operational example of the present invention. Detailed Implementation

[0025] I. Creating an AutoLISP Plugin

[0026] To achieve the objectives of this invention, a plugin was first developed using the AutoCAD built-in Autolisp / Vlisp language. This plugin was required to quickly calculate and export the layered volume of AutoCAD 3D solids based on input starting section elevation and section step length parameters. Accordingly, the main structure of the plugin code is as follows: Figure 1 As shown, the command structure mainly includes function definition, error handling, environment settings, parameter retrieval, file operations, loop segmentation calculation, data output, and environment restoration. The command code and explanation are as follows:

[0027] Step S1: First, you need to "define functions, set error settings, and configure the environment," the code for which is:

[0028] (defun c:lxpq()

[0029] (defun *error* (msg)

[0030] (princ msg)

[0031] (close fwrite)

[0032] (princ))

[0033] (setq cmd (getvar "cmdecho"))

[0034] (setvar "cmdecho" 0)

[0035] (command "undo" "be"))

[0036] S1 Explanation: This step is for initialization settings.

[0037] Define the main command c:lxpq

[0038] Define an error handling function: if the program encounters an error, it will close any open files and output the error message.

[0039] Turn off command line echo (set cmdecho to 0) for a cleaner interface.

[0040] Enabling "undo" records the starting point, allowing users to easily undo the entire operation in one step.

[0041] Step S2: Next, "parameter acquisition and file operation" need to be performed, the code of which is:

[0042] (setq objbox(vlax-ename->vla-object(car (entsel"\nSelect 3D solid:"))))

[0043] (setq z_0 (getreal"\nPlease enter the initial cross-section elevation z value:"))

[0044] (setq z_cur z_0)

[0045] (setq z_1 (getreal"\nz value step size) <1> :"))

[0046] (if (not z_1)

[0047] (setq z_1 1))

[0048] (setq address (getfiled "Please select the path to export the file:" "E:\\work\\autolisp\\" "xls" 1))

[0049] (setq loop t)

[0050] (if (null address)(exit))

[0051] (setq fwrite (open address "w"))

[0052] (princ "Elevation (m)" fwrite)(princ "\tVolume (m3)" fwrite)

[0053] (princ "\n" fwrite)

[0054] S2 Explanation: This step involves obtaining parameters and creating the output file.

[0055] The user is prompted to select a 3D solid (such as an extruded cube, cylinder, etc.) in the drawing.

[0056] Input the initial section elevation (z-value). The initial section elevation (z-value) must be greater than the elevation of the lowest point of the target 3D entity to ensure that the created section plane intersects with the target 3D entity.

[0057] Enter the elevation step (default 1 meter) to determine the interval at which to cut.

[0058] A file save dialog box will pop up, allowing the user to specify the export path (the default directory is E:\work\autolisp\), and the file extension will be .xls.

[0059] Open the file for writing, and write the table header in the first line: Elevation (m) and Volume (m3).

[0060] Step S3: Then, "loop sectioning calculation and output" needs to be performed, the code of which is:

[0061] (while loop

[0062] (setq objsep (vla-SliceSolid objbox (vlax-3D-point 0 0 z_cur) (vlax-3D-point 0 1 z_cur) (vlax-3D-point 1 0 z_cur) :vlax-true))

[0063] (setq vol (if objsep (vlax-get-property objsep 'Volume) (vlax-get-property objbox 'Volume)) )

[0065] (princ z_cur fwrite)(princ "\t" fwrite)

[0066] (princ (rtos vol 2 4) fwrite)

[0067] (princ "\n" fwrite)

[0068] (if (null objsep) (setq loop nil))

[0069] (setq z_cur (+ z_cur z_1)) )

[0071] (close fwrite)

[0072] (alert "Export complete!")

[0073] (princ "\nDone!")

[0074] S3 Explanation: This step involves iterative sectioning calculations and data output.

[0075] Starting from the initial elevation, increase the step size by one at a time, and repeat the following operations:

[0076] Construct a cutting plane using the current elevation value z_cur (three points define the plane: (0,0,z), (0,1,z), (1,0,z)), and use the SliceSolid method to cut the 3D solid.

[0077] If the sectioning is successful, obtain the volume of the new entity created after the sectioning; if the sectioning fails (indicating that the entity has exceeded its range), obtain the volume of the original entity (meaning that the last recorded volume was the complete entity volume).

[0078] Write the current elevation and volume to a file, separated by tabs.

[0079] If the cutting fails, the loop ends.

[0080] After the loop finishes and the file is closed, a "Export complete" message will appear.

[0081] Step S4: Finally, the "Restore Environment" function is defined by the following code:

[0082] (command "undo" "e")

[0083] (setvar "cmdecho" cmd)

[0084] (princ)

[0085] S4 Explanation: This step is for restoring the environment.

[0086] Close the "undo" recording segment.

[0087] Restore the original command line echo settings

[0088] Quietly exit the program

[0089] II. Methods for continuously sectioning 3D solids and exporting volume in layers within CAD

[0090] like Figure 2 As shown, the method of the present invention includes the following steps: loading the plugin, running the plugin command, selecting the three-dimensional entity, inputting the starting section elevation, inputting the section step length, and selecting the directory to save the exported file.

[0091] All of the above operations are performed directly within AutoCAD. Before selecting a 3D entity, you must first convert the 3D entity to the front view and read its lowest elevation to ensure that the input starting section elevation is greater than its lowest elevation.

[0092] III. Operation Examples

[0093] like Figures 3 to 10 As shown,

[0094] Figure 3 To load the plugin, after starting CAD, enter the "APPLOAD" command in CAD to load the window; click on the Startup group content, add the plugin for this method, and then close the window; after restarting CAD, the plugin for this method will be loaded automatically.

[0095] When using this invention, you should first switch the three-dimensional entity to the front view and query its lowest point elevation value. For example, in this case, the elevation range of the three-dimensional entity is 0~30m, so the initial elevation value z must be greater than "0" to ensure that the cutting plane intersects with the three-dimensional entity.

[0096] Figures 4 to 8 This describes the specific usage of the plugin. Follow the instructions... Figure 3 After executing the load command, restart CAD. First, follow... Figure 4 Enter "LXPQ" to run the command; then follow the steps below. Figure 5 Select the target 3D entity to obtain the sectioned object; then follow... Figure 6 Input the initial section elevation value to create an initial surface that intersects with the target 3D entity; then follow... Figure 7 Input the sectioning step size to determine the cyclic sectioning to be performed at specified intervals; finally, according to... Figure 8 As shown, select the file save path and output the results.

[0097] Figures 9 to 10 For saving and outputting steps. For example... Figure 9 After selecting the output file save path and confirming, the export process is complete. The output result is as follows: Figure 10 .

Claims

1. A method for continuously sectioning a three-dimensional solid and exporting its volume layer by layer in CAD, characterized in that: Use the AutoLISP plugin to section AutoCAD 3D solids by elevation and export volume data.

2. The method according to claim 1, characterized in that: The AutoLISP plugin has the function of quickly calculating and exporting the layered volume for AutoCAD 3D solids based on the input starting section elevation and section step length parameters.

3. The method according to claim 1, characterized in that... Includes the following steps: Load the plugin, run the plugin command, select the 3D entity, enter the starting section elevation, enter the section step length, and select the directory to save the exported file.

4. The method according to claim 1, characterized in that: Before selecting a 3D entity, it must first be converted to a front view and its lowest elevation must be read to ensure that the input starting section elevation is greater than its lowest elevation.

5. The application of the method described in claim 1 in the design of pumped storage power stations.

6. The application according to claim 5, characterized in that: The design of the pumped storage power station includes "drawing the reservoir bottom leveling curve", "drawing the slag yard volume curve", "drawing the filling curve", and "drawing the excavation curve".