Reverse modeling method and device, computer device and storage medium
Patent Information
- Application Number
- CN202311675270.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-07
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-12-07
AI Technical Summary
[0006]有鉴于此,本发明提供了一种逆向建模方法、装置、计算机设备及存储介质,以解决现有的逆向建模插件无法对异形构件建模,人工逆向建模耗时长的问题
[0006]In view of this, the present invention provides a reverse modeling method, apparatus, computer equipment and storage medium to solve the problems that existing reverse modeling plugins cannot model irregular components and that manual reverse modeling is time-consuming.
Smart Images

Figure CN117934702B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of modeling technology, and more specifically to reverse modeling methods, apparatus, computer equipment, and storage media. Background Technology
[0002] 3D laser scanning technology is a high-precision building surveying technique. It uses a laser scanner to scan a building, acquiring point cloud data of its surface. This point cloud data is then processed and reconstructed to generate a 3D model. This technology can quickly and accurately obtain information about a building's geometry, structure, and details, providing crucial data support for building design, construction, and maintenance.
[0003] Building Information Modeling (BIM) is a building information management technology based on digital modeling. It integrates various information about a building (including geometry, structure, equipment, materials, etc.) into a unified model, enabling full lifecycle management of the building. BIM technology can provide efficient and accurate information support at all stages of a building's design, construction, operation, and maintenance, helping project managers and participants to collaborate and make better decisions.
[0004] The combination of 3D laser scanning technology and BIM technology enables high-precision digital modeling of buildings, providing more accurate and efficient data support for building design, construction, and maintenance. Specifically, 3D laser scanning technology can quickly acquire the geometric shape and structural information of a building, while BIM technology can integrate this information into a comprehensive model and add more information, such as equipment, materials, and construction schedules, enabling full lifecycle management of the building. Simultaneously, BIM technology can also import point cloud data acquired through 3D laser scanning into the model, allowing for more detailed modeling and analysis of the building, thus improving the design and construction quality.
[0005] The real-world point cloud data acquired by 3D laser scanning needs to be reverse-engineered in BIM modeling software before it can be used for design, operation, and maintenance. Existing reverse-engineering plugins can quickly model walls, columns, steel structures, and water pipes. Their principle is to use feature fitting for parametric modeling. For example, for walls, determining the wall's location, thickness, elevation, and other parameters allows for the creation of a wall model. However, for irregularly shaped components such as curved or arc-shaped surfaces, it's impossible to obtain uniform parameters, making this method unsuitable for reverse-engineering. Furthermore, manual reverse-engineering is time-consuming, inefficient, and hinders the application of 3D scanning technology in the construction industry. Summary of the Invention
[0006] In view of this, the present invention provides a reverse modeling method, apparatus, computer equipment and storage medium to solve the problems that existing reverse modeling plugins cannot model irregular components and that manual reverse modeling is time-consuming.
[0007] In a first aspect, the present invention provides a reverse modeling method, the method comprising:
[0008] Obtain the target object's 3D point cloud model;
[0009] The target 3D point cloud model is sliced to obtain the contour point cloud of the target object at different heights in the normal direction, wherein the normal direction is any dimensional direction predefined by the target object;
[0010] Linear fitting is performed on the contour point cloud at each height to obtain the contour line at each height;
[0011] Reverse modeling is performed based on the contour lines of all heights to obtain the solid model of the target object.
[0012] The reverse modeling method provided in this embodiment obtains the contour point cloud of the target object at different heights in the normal direction by slicing the target 3D point cloud model. Linear fitting is performed on the contour point cloud at each height to obtain the contour line at each height. Reverse modeling is performed based on the contour lines at all heights, realizing automated reverse modeling of all target objects. Compared with manual reverse modeling, the reverse modeling method provided in this embodiment is faster and more efficient.
[0013] In one optional implementation, the step of slicing the target 3D point cloud model to obtain the contour point cloud of the target object at different heights in the normal direction includes:
[0014] Determine the tangent plane of the target 3D point cloud model, wherein the tangent plane is perpendicular to the normal direction;
[0015] The target 3D point cloud model is sliced based on the tangent plane to obtain the contour point cloud of the target object at different heights in the normal direction.
[0016] In one optional implementation, the step of linearly fitting the contour point cloud at each height to obtain the contour line at each height includes:
[0017] Using the middle surface of the contour point cloud at each height as the reference surface, the contour point cloud at each height is divided into an upper layer point cloud and a lower layer point cloud.
[0018] Using the shortest Euclidean distance as the search target, the upper and lower point clouds at each height are paired one by one, and the paired upper and lower point clouds are connected by straight lines.
[0019] Obtain the set of intersection points between the line at each height and the reference plane;
[0020] Connect the intersection points in the intersection point set for each height to obtain the outline of each height.
[0021] In one optional implementation, determining the tangent plane of the target 3D point cloud model includes:
[0022] The thickness of the contour point cloud is determined based on the point cloud density, and the thickness is the thickness in the normal direction.
[0023] The number of tangent planes of the target 3D point cloud model is determined based on the thickness of the contour point cloud;
[0024] The step of slicing the target 3D point cloud model based on the tangent plane to obtain the contour point cloud of the target object at different heights in the normal direction includes:
[0025] Based on the thickness of the contour point cloud and the number of tangent planes, the target 3D point cloud model is sliced to obtain the contour point cloud of the target object at different heights in the normal direction.
[0026] In one optional implementation, connecting the intersection points in the intersection point set for each height to obtain the outline of each height includes:
[0027] Based on the intersection coordinates, determine the first and second intersection points in the intersection point set for each height, wherein the first intersection point is the intersection point with the largest X-coordinate in the intersection point set for each height, and the second intersection point is the intersection point with the smallest X-coordinate in the intersection point set for each height.
[0028] By connecting the first intersection point and the second intersection point with a straight line, the set of intersection points at each height is divided into a first intersection point set and a second intersection point set;
[0029] Based on the intersection coordinates, sort the intersection points in the first and second intersection sets to obtain the third and fourth intersection sets;
[0030] The third and fourth intersection point sets are merged to obtain the outline point set of each height in sequence;
[0031] By arranging the intersection points of the point set according to the outline order of each height, and connecting the intersection points in the order of the intersection points, the outline of each height is obtained.
[0032] In one optional implementation, the normal direction of the target object is determined by the following steps:
[0033] Obtain the core dimension of the target object and determine that the core dimension is the normal direction, wherein the core dimension is the longest dimension in the target object.
[0034] In one optional implementation, acquiring the target 3D point cloud model of the target object includes:
[0035] A 3D point cloud model of the target object is obtained using 3D laser scanning technology;
[0036] The three-dimensional point cloud model is preprocessed to obtain the target three-dimensional point cloud model.
[0037] Secondly, the present invention provides a reverse modeling apparatus, the apparatus comprising:
[0038] The target 3D point cloud model acquisition module is used to acquire the target 3D point cloud model of the target object;
[0039] The contour point cloud acquisition module is used to slice the target 3D point cloud model to obtain the contour point cloud of the target object at different heights in the normal direction, wherein the normal direction is any dimensional direction predefined by the target object.
[0040] The contour line acquisition module is used to perform linear fitting on the contour point cloud at each height to obtain the contour line at each height.
[0041] The solid model acquisition module is used to perform reverse modeling based on the contour lines of all heights to obtain the solid model of the target object.
[0042] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the reverse modeling method of the first aspect or any corresponding embodiment described above.
[0043] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the reverse modeling method of the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0044] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0045] Figure 1 This is a flowchart illustrating the reverse modeling method according to an embodiment of the present invention;
[0046] Figure 2 This is a flowchart illustrating another reverse modeling method according to an embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram of the cutting plane according to an embodiment of the present invention;
[0048] Figure 4 (a) is a schematic diagram of the connection between the first intersection point and the second intersection point according to an embodiment of the present invention;
[0049] Figure 4 (b) is a schematic diagram of the sorting of the first intersection set and the second intersection set according to an embodiment of the present invention;
[0050] Figure 4 (c) is a schematic diagram of the generation of contour lines according to an embodiment of the present invention;
[0051] Figure 5 (a) is a schematic diagram of the fitted contour line of a safety helmet according to an embodiment of the present invention;
[0052] Figure 5 (b) is a schematic diagram of the reverse modeling effect of a safety helmet according to an embodiment of the present invention;
[0053] Figure 6 (a) is a schematic diagram of a three-dimensional point cloud model of an eccentric reducer according to an embodiment of the present invention;
[0054] Figure 6 (b) is a schematic diagram of the reverse modeling effect of the welded eccentric reducer according to an embodiment of the present invention;
[0055] Figure 7 This is a structural block diagram of a reverse modeling apparatus according to an embodiment of the present invention;
[0056] Figure 8 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0058] The combination of 3D laser scanning technology and BIM technology enables high-precision digital modeling of buildings, providing more accurate and efficient data support for building design, construction, and maintenance. Specifically, 3D laser scanning technology can quickly acquire the geometric shape and structural information of a building, while BIM technology can integrate this information into a comprehensive model and add more information, such as equipment, materials, and construction schedules, enabling full lifecycle management of the building. Simultaneously, BIM technology can also import point cloud data acquired through 3D laser scanning into the model, allowing for more detailed modeling and analysis of the building, thus improving the design and construction quality.
[0059] The real-world point cloud data acquired by 3D laser scanning needs to be reverse-engineered in BIM modeling software before it can be used for design, operation, and maintenance. Existing reverse-engineering plugins can quickly model walls, columns, steel structures, and water pipes. Their principle is to use feature fitting for parametric modeling. For example, for walls, determining the wall's location, thickness, elevation, and other parameters allows for the creation of a wall model. However, for irregularly shaped components such as curved or arc-shaped surfaces, it's impossible to obtain uniform parameters, making this method unsuitable for reverse-engineering. Furthermore, manual reverse-engineering is time-consuming, inefficient, and hinders the application of 3D scanning technology in the construction industry.
[0060] This invention provides a reverse modeling method that obtains contour point clouds of the target object at different heights along the normal direction by slicing the target 3D point cloud model. Linear fitting is performed on the contour point cloud at each height to obtain the contour line at each height. Reverse modeling is then performed based on the contour lines at all heights, achieving the effect of automatically reversing all target 3D point cloud models.
[0061] According to an embodiment of the present invention, a reverse modeling method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0062] This embodiment provides a reverse modeling method that can be used in the aforementioned mobile terminals, such as central processing units and servers. Figure 1 This is a flowchart of the reverse modeling method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0063] Step S101: Obtain the target 3D point cloud model of the target object.
[0064] In this embodiment, a three-dimensional point cloud model of the target object is obtained through three-dimensional laser scanning technology.
[0065] The target object can be a building such as a wall, main body, steel plate, or water pipe, or it can be a building with irregularly shaped components such as curved or arc surfaces.
[0066] It should be noted that this embodiment uses the Dynamo visual programming platform to reverse engineer the target 3D point cloud model of the target object. The Dynamo visual programming platform reads the target 3D point cloud model obtained by 3D laser scanning technology, and imports the target 3D point cloud model using the Data.ImportExcel command.
[0067] In one optional implementation, the Dynamo visual programming platform uses the List.Slice command to thin and sparsify the target 3D point cloud model. This step simplifies the display of the target 3D point cloud model and speeds up the process.
[0068] Step S102: Slice the target 3D point cloud model to obtain the contour point cloud of the target object at different heights in the normal direction.
[0069] The normal direction is any dimensional direction predefined by the target object.
[0070] After obtaining the target 3D point cloud model, the Dynamo visualization programming platform slices the target 3D point cloud model to obtain the contour point cloud of the target object at different heights in the normal direction.
[0071] It is understandable that the target 3D point cloud model is sliced along the normal direction to obtain contour point clouds at different heights.
[0072] Step S103: Perform linear fitting on the contour point cloud at each height to obtain the contour line at each height.
[0073] Specifically, after obtaining the contour point cloud of the target object at different heights along the normal direction, the contour point cloud at different heights is transformed from discrete points into contour lines.
[0074] It should be noted that when performing linear fitting on the contour point cloud at each height, the idea of least squares method needs to be used to fill in points and gaps in the contour point cloud at each height.
[0075] Step S104: Perform reverse modeling based on the contour lines of all heights to obtain the solid model of the target object.
[0076] Specifically, after obtaining the outline of each height, the Dynamo visual programming platform performs reverse modeling based on the outlines of all heights to obtain the solid model of the target object, i.e., the BIM model of the target object.
[0077] The reverse modeling method provided in this embodiment obtains the contour point cloud of the target object at different heights in the normal direction by slicing the target 3D point cloud model. Linear fitting is performed on the contour point cloud at each height to obtain the contour line at each height. Reverse modeling is performed based on the contour lines at all heights, realizing automated reverse modeling of all target objects. Compared with manual reverse modeling, the reverse modeling method provided in this embodiment is faster and more efficient.
[0078] This embodiment provides a reverse modeling method that can be used in the aforementioned mobile terminals, such as central processing units and servers. Figure 2 This is a flowchart of the reverse modeling method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0079] Step S201: Obtain the target 3D point cloud model of the target object.
[0080] Specifically, step S201 includes:
[0081] Step S2011: Obtain a three-dimensional point cloud model of the target object using three-dimensional laser scanning technology.
[0082] In this process, a laser scanner is used to scan the target object and obtain a three-dimensional point cloud model of the target object's surface.
[0083] Step S2012: Preprocess the 3D point cloud model to obtain the target 3D point cloud model.
[0084] Preprocessing includes registration, classification, segmentation, denoising, downsampling, and exporting of the 3D point cloud model.
[0085] It should be noted that the preprocessing of the 3D point cloud model is to obtain a more accurate 3D point cloud model of the target object, and thus obtain a more accurate solid model.
[0086] After preprocessing the 3D point cloud model of the target object, the 3D point cloud model of the target object is obtained.
[0087] It should be further noted that in this embodiment, the 3D point cloud model is preprocessed using professional point cloud processing software and exported in ASCII cloud format. This format can display the point cloud spatial information of the target 3D point cloud model in an Excel document format.
[0088] Step S202: Slice the target 3D point cloud model to obtain the contour point cloud of the target object at different heights in the normal direction.
[0089] Specifically, step S202 includes:
[0090] Step S2021: Determine the tangent plane of the target 3D point cloud model.
[0091] The tangent plane is perpendicular to the normal direction.
[0092] Understandably, in order to slice the target 3D point cloud model, it is necessary to first determine the tangent plane of the target 3D point cloud model.
[0093] For example, such as Figure 3 As shown, EI, E, and Er are schematic diagrams of the tangent plane, the normal direction is the Z-axis direction, the XOY coordinate system is selected by the user in the point cloud processing software, P1, P2, and P3 are the intersection points of the tangent plane and the target 3D point cloud model, and D is the thickness of the contour point cloud.
[0094] It should be noted that the length and width of the cutting plane can be the maximum values of the horizontal and vertical coordinates of the point cloud in the target 3D point cloud model. This allows the establishment of the minimum envelope box of the contour point cloud, and the point cloud within the envelope box can then be processed.
[0095] Step S2022: Slice the target 3D point cloud model based on the tangent plane to obtain the contour point cloud of the target object at different heights in the normal direction.
[0096] After determining the tangent plane of the target 3D point cloud model, the target 3D point cloud model is sliced using the tangent plane to obtain the contour point cloud of the target object at different heights in the normal direction.
[0097] In some optional implementations, step S2021 above includes:
[0098] Step a1: Determine the thickness of the contour point cloud based on the point cloud density.
[0099] Wherein, the thickness is the thickness in the normal direction.
[0100] To prevent errors in linear fitting caused by the lack of local information in the point cloud on the cutting plane, this embodiment introduces a slice threshold, i.e., slices with thickness.
[0101] Point cloud density is a feature quantity that reflects the average minimum unit distance between points in a point cloud. It can be estimated by obtaining neighboring points using the KDTree algorithm. This process is implemented by a self-built Python Script node source program.
[0102] After obtaining the point cloud density, the point cloud density is determined as the thickness of the contour point cloud.
[0103] Step a2: Determine the number of tangent planes of the target 3D point cloud model based on the thickness of the contour point cloud.
[0104] Understandably, once the thickness of the contour point cloud is obtained, the height of the target 3D point cloud model is known, and the number of tangent planes of the target 3D point cloud model can be determined.
[0105] In some optional implementations, step S2022 above includes:
[0106] Step b1: Slice the target 3D point cloud model based on the thickness of the contour point cloud and the number of cutting planes to obtain the contour point cloud of the target object at different heights in the normal direction.
[0107] In this process, after obtaining the thickness and number of tangent planes of the contour point cloud, the target 3D point cloud model is sliced in the normal direction based on the thickness and tangent plane data to obtain the contour point cloud of the target object at different heights in the normal direction.
[0108] Step S203: Perform linear fitting on the contour point cloud at each height to obtain the contour line at each height.
[0109] Specifically, step S203 includes:
[0110] Step S2031: Using the middle surface of the contour point cloud at each height as the reference surface, divide the contour point cloud at each height into an upper layer point cloud and a lower layer point cloud.
[0111] The middle surface of the contour point cloud refers to the slice surface corresponding to half the thickness of the contour point cloud.
[0112] Based on the reference plane of the contour point cloud at each height, the contour point cloud at each height is divided into upper-layer point cloud and lower-layer point cloud. It can be understood that, in the normal direction, the point cloud above the reference plane is the upper-layer point cloud, and the point cloud below the reference plane is the lower-layer point cloud.
[0113] Step S2032: Using the shortest Euclidean distance as the search target, pair the upper and lower point clouds at each height one by one, and connect the paired upper and lower point clouds with straight lines.
[0114] After dividing the contour point cloud at each height into upper and lower point clouds, the upper and lower point clouds are paired one by one with the shortest Euclidean distance as the search target. The paired upper and lower point clouds are connected by straight lines. It can be understood that connecting the paired upper and lower point clouds by straight lines will pass through the reference plane of the contour point cloud at each height.
[0115] Step S2033: Obtain the set of intersection points between each height line and the reference plane.
[0116] After connecting the paired upper and lower point clouds at each height with straight lines, obtain the set of intersection points between the straight lines at each height and the reference plane.
[0117] Step S2034: Connect the intersection points in the intersection point set of each height to obtain the outline of each height.
[0118] After obtaining the set of intersection points for each height, connecting the intersection points in the set of intersection points for each height yields the outline of each height.
[0119] It should be noted that the linear fitting of the contour point cloud has many overlapping points, which can easily lead to the risk of inter-surface intersection and cause runtime errors. The contour line is then split and fitted twice using the Curve.PointAtParameter node to obtain a normalized closed curve, which is then re-imported into the Solid.ByLoft node for solid model generation.
[0120] In some optional implementations, step S2034 above includes:
[0121] Step c1: Determine the first and second intersection points in each height intersection set based on the intersection point coordinates.
[0122] It should be noted that in this embodiment, when preprocessing the 3D point cloud model using professional point cloud processing software, the 3D point cloud model will be placed in a user-selected coordinate system. The Z-axis of this coordinate system represents the normal direction of the target object.
[0123] After obtaining each set of height intersection points, the first and second intersection points in each set of height intersection points are determined based on the coordinates of the intersection points in the set. The first intersection point is the intersection point with the largest X-coordinate in each set of height intersection points, and the second intersection point is the intersection point with the smallest X-coordinate in each set of height intersection points. The X-coordinate is the horizontal coordinate.
[0124] Step c2: Connect the first intersection point and the second intersection point with a straight line to divide each set of height intersection points into a first intersection point set and a second intersection point set.
[0125] After determining the first and second intersection points in each set of height intersection points, a straight line is used to connect the first and second intersection points in each set of height intersection points. Using this straight line as the dividing line, each set of height intersection points is divided into a first intersection point set and a second intersection point set.
[0126] For example, such as Figure 4 As shown in (a), A is the first intersection point in a set of intersection points at a certain height, and B is the second intersection point in a set of intersection points at a certain height. By connecting A and B with a straight line, the set of intersection points is divided into two regions.
[0127] It should be noted that, based on the magnitude of the ordinate of the intersection points in the intersection set, the first intersection set is designated as the set of points above the line, and the second intersection set is designated as the set of points below the line.
[0128] Step c3: Sort the intersection points in the first and second intersection point sets based on the intersection point coordinates to obtain the third and fourth intersection point sets.
[0129] Specifically, the intersection points in the first and second intersection point sets are sorted according to their x-coordinates from largest to smallest. The sorted intersection point sets are the third and fourth intersection point sets. The third intersection point set is the intersection point set after sorting the first intersection point set, and the fourth intersection point set is the intersection point set after sorting the second intersection point set.
[0130] For example, such as Figure 4 As shown in (b), the intersection points in the first intersection point set and the intersection points in the second intersection point set are sorted according to their X coordinates.
[0131] Step c4: Merge the third and fourth intersection point sets to obtain the outline point set of each height in sequence.
[0132] Specifically, after obtaining the third and fourth intersection point sets for each height, the intersection point order in the third intersection point set is merged with the intersection point order in the fourth intersection point set in reverse order to obtain the outline line arrangement point set for each height.
[0133] Step c5: Arrange the intersection points of the point set according to the outline order of each height and connect the intersection points to obtain the outline of each height.
[0134] After obtaining the outline of each height and arranging the point set in order, connect the intersection points of each height according to the order of the intersection points in the point set to obtain the outline of each height.
[0135] For example, such as Figure 4 As shown in (c), the intersection points are connected in the order of the third intersection point set and the reverse order of the fourth intersection point set to obtain the contour line.
[0136] Step S204: Perform reverse modeling based on the contour lines of all heights to obtain the solid model of the target object.
[0137] Please see details Figure 1 Step S104 of the illustrated embodiment will not be described again here.
[0138] For example, such as Figure 5 As shown in (a), this is a schematic diagram of the contour lines obtained by linear fitting of the safety helmet using the reverse modeling method of this embodiment. Reverse modeling is performed based on the contour lines of all heights of the safety helmet to obtain the following... Figure 5 The solid model of the safety helmet shown in (b) is shown.
[0139] Another example is, such as Figure 6 As shown in (a), this is a schematic diagram of the three-dimensional point cloud model of the welded eccentric reducer. After modeling using the reverse modeling method of this embodiment, the following is obtained: Figure 6 The solid model of the welded eccentric reducer shown in (b) is shown.
[0140] As can be seen, the reverse modeling method in this embodiment realizes the automated reverse modeling of all target 3D point cloud models.
[0141] The reverse modeling method provided in this embodiment obtains the contour point cloud of the target object at different heights in the normal direction by slicing the target 3D point cloud model. Linear fitting is performed on the contour point cloud at each height to obtain the contour line at each height. Reverse modeling is performed based on the contour lines at all heights, realizing automated reverse modeling of all target objects. Compared with manual reverse modeling, the reverse modeling method provided in this embodiment is faster and more efficient.
[0142] In some alternative implementations, the normal direction of the target object is determined by the following steps:
[0143] Step d1: Obtain the core dimension of the target object and determine the core dimension as the normal direction.
[0144] Among them, the core dimension is the longest dimension in the target object.
[0145] It should be noted that if one of the three dimensions of a target object is significantly longer than the other two, it is called the core dimension of the target object, and the core dimension is the normal direction.
[0146] In an optional implementation, the method further includes:
[0147] Import the solid model of the target object into the Revit family library.
[0148] The solid model created by reverse modeling the target 3D point cloud model does not have surface material information. To accurately reflect the information of the target 3D point cloud model, materials and related performance attributes can be assigned to the model. Users can edit these in Revit and make secondary modifications and improvements.
[0149] Revit is the most commonly used software for creating BIM models.
[0150] This embodiment also provides a reverse modeling apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0151] This embodiment provides a reverse modeling device, such as... Figure 7As shown, it includes:
[0152] The target 3D point cloud model acquisition module 701 is used to acquire the target 3D point cloud model of the target object.
[0153] The contour point cloud acquisition module 702 is used to slice the target 3D point cloud model to obtain the contour point cloud of the target object at different heights in the normal direction. The normal direction is any dimensional direction predefined by the target object.
[0154] The contour acquisition module 703 is used to perform linear fitting on the contour point cloud at each height to obtain the contour line at each height.
[0155] The solid model acquisition module 704 is used to perform reverse modeling based on the contour lines of all heights to obtain the solid model of the target object.
[0156] In some alternative implementations, the contour point cloud acquisition module 702 includes:
[0157] The tangent plane determination unit is used to determine the tangent plane of the target 3D point cloud model. The tangent plane is perpendicular to the normal direction.
[0158] The first contour point cloud acquisition subunit is used to slice the target 3D point cloud model based on the tangent plane to obtain the contour point cloud of the target object at different heights in the normal direction.
[0159] In some alternative implementations, the contour acquisition module 703 includes:
[0160] The contour point cloud partitioning unit is used to divide the contour point cloud at each height into an upper layer point cloud and a lower layer point cloud, with the middle surface of the contour point cloud at each height as the reference surface.
[0161] The point cloud pairing unit is used to find the point cloud with the shortest Euclidean distance and pair the upper and lower point clouds at each height one by one, and connect the paired upper and lower point clouds with straight lines.
[0162] The intersection point set acquisition unit is used to acquire the intersection point set of each height line and the reference plane.
[0163] The contour line acquisition sub-unit is used to connect the intersection points in the intersection point set of each height to obtain the contour line of each height.
[0164] In some optional implementations, the tangent plane determination unit includes:
[0165] The contour point cloud thickness determination unit is used to determine the thickness of the contour point cloud based on the point cloud density. The thickness is the thickness in the normal direction.
[0166] The number of cutting planes determination unit is used to determine the number of cutting planes of the target 3D point cloud model based on the thickness of the contour point cloud.
[0167] In some alternative implementations, the contour point cloud acquisition module 702 includes:
[0168] The second contour point cloud acquisition subunit is used to slice the target 3D point cloud model based on the thickness of the contour point cloud and the number of tangent planes to obtain the contour point cloud of the target object at different heights in the normal direction.
[0169] In some optional implementations, the contour acquisition subunit includes:
[0170] The intersection point determination unit is used to determine the first and second intersection points in each height intersection point set based on the intersection point coordinates. The first intersection point is the intersection point with the largest X-coordinate in each height intersection point set, and the second intersection point is the intersection point with the smallest X-coordinate in each height intersection point set.
[0171] The first intersection point connection unit is used to connect the first intersection point and the second intersection point with a straight line, dividing the intersection points in each height intersection point set into the first intersection point set and the second intersection point set.
[0172] The intersection sorting unit is used to sort the intersections of the first and second intersection sets based on their coordinates to obtain the third and fourth intersection sets.
[0173] The intersection merging unit is used to merge the third and fourth intersection point sets to obtain the outline point set of each height.
[0174] The second intersection connection unit is used to connect the intersection points in the point set according to the outline order of each height to obtain the outline of each height.
[0175] In some alternative implementations, the apparatus includes:
[0176] The normal direction determination module is used to obtain the core dimension of the target object and determine the core dimension as the normal direction. The core dimension is the longest dimension in the target object.
[0177] In some optional implementations, the target 3D point cloud model acquisition module 701 includes:
[0178] The 3D point cloud model acquisition unit is used to acquire the 3D point cloud model of the target object through 3D laser scanning technology.
[0179] The target 3D point cloud model acquisition sub-unit is used to preprocess the 3D point cloud model to obtain the target 3D point cloud model.
[0180] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0181] In this embodiment, the reverse modeling device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0182] This invention also provides a computer device having the above-described features. Figure 7 The reverse modeling device shown.
[0183] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 8 As shown, the computer device includes one or more processors 801, memory 802, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 8 Take the 801 processor as an example.
[0184] Processor 801 may be a central processing unit, a network processor, or a combination thereof. Processor 801 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0185] The memory 802 stores instructions executable by at least one processor 801 to cause at least one processor 801 to perform the method shown in the above embodiments.
[0186] The memory 802 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 802 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 802 may optionally include memory remotely located relative to the processor 801, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0187] The memory 802 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 802 may also include a combination of the above types of memory.
[0188] The computer device also includes a communication interface 803 for communicating with other devices or communication networks.
[0189] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0190] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A reverse modeling method, characterized in that, The method includes: Obtain the target object's 3D point cloud model; The target 3D point cloud model is sliced to obtain the contour point cloud of the target object at different heights in the normal direction, wherein the normal direction is any dimensional direction predefined by the target object; Linear fitting is performed on the contour point cloud at each height to obtain the contour line at each height; Reverse modeling is performed based on the contour lines of all heights to obtain the solid model of the target object; The step of linearly fitting the contour point cloud at each height to obtain the contour line at each height includes: Using the middle surface of the contour point cloud at each height as the reference surface, the contour point cloud at each height is divided into an upper layer point cloud and a lower layer point cloud. Using the shortest Euclidean distance as the search target, the upper and lower point clouds at each height are paired one by one, and the paired upper and lower point clouds are connected by straight lines. Obtain the set of intersection points between the line at each height and the reference plane; Connect the intersection points in the intersection point set for each height to obtain the outline of each height.
2. The method according to claim 1, characterized in that, The step of slicing the target 3D point cloud model to obtain the contour point cloud of the target object at different heights in the normal direction includes: Determine the tangent plane of the target 3D point cloud model, wherein the tangent plane is perpendicular to the normal direction; The target 3D point cloud model is sliced based on the tangent plane to obtain the contour point cloud of the target object at different heights in the normal direction.
3. The method according to claim 2, characterized in that, Determining the tangent plane of the target 3D point cloud model includes: The thickness of the contour point cloud is determined based on the point cloud density, and the thickness is the thickness in the normal direction. The number of tangent planes of the target 3D point cloud model is determined based on the thickness of the contour point cloud; The step of slicing the target 3D point cloud model based on the tangent plane to obtain the contour point cloud of the target object at different heights in the normal direction includes: Based on the thickness of the contour point cloud and the number of tangent planes, the target 3D point cloud model is sliced to obtain the contour point cloud of the target object at different heights in the normal direction.
4. The method according to claim 1, characterized in that, The step of connecting the intersection points in the intersection point set for each height to obtain the contour line for each height includes: Based on the intersection coordinates, determine the first and second intersection points in the intersection point set for each height, wherein the first intersection point is the intersection point with the largest X-coordinate in the intersection point set for each height, and the second intersection point is the intersection point with the smallest X-coordinate in the intersection point set for each height. By connecting the first intersection point and the second intersection point with a straight line, the set of intersection points at each height is divided into a first intersection point set and a second intersection point set; Based on the intersection coordinates, sort the intersection points in the first and second intersection sets to obtain the third and fourth intersection sets; The third and fourth intersection point sets are merged to obtain the outline point set of each height in sequence; By arranging the intersection points of the point set according to the outline order of each height, and connecting the intersection points in the order of the intersection points, the outline of each height is obtained.
5. The method according to claim 1, characterized in that, The normal direction of the target object is determined by the following steps: Obtain the core dimension of the target object and determine that the core dimension is the normal direction, wherein the core dimension is the longest dimension in the target object.
6. The method according to claim 1, characterized in that, The acquisition of the target 3D point cloud model of the target object includes: A 3D point cloud model of the target object is obtained using 3D laser scanning technology; The three-dimensional point cloud model is preprocessed to obtain the target three-dimensional point cloud model.
7. A reverse modeling apparatus, characterized in that, The device includes: The target 3D point cloud model acquisition module is used to acquire the target 3D point cloud model of the target object; The contour point cloud acquisition module is used to slice the target 3D point cloud model to obtain the contour point cloud of the target object at different heights in the normal direction, wherein the normal direction is any dimensional direction predefined by the target object. The contour line acquisition module is used to perform linear fitting on the contour point cloud at each height to obtain the contour line at each height. The solid model acquisition module is used to perform reverse modeling based on the contour lines of all heights to obtain the solid model of the target object; The contour line acquisition module includes: The contour point cloud division unit is used to divide the contour point cloud at each height into an upper layer point cloud and a lower layer point cloud, with the middle surface of the contour point cloud at each height as the reference surface. The point cloud pairing unit is used to find the point cloud with the shortest Euclidean distance and pair the upper and lower point clouds at each height one by one, and connect the paired upper and lower point clouds with straight lines. The intersection point set acquisition unit is used to acquire the intersection point set of each height line and the reference plane; The contour line acquisition sub-unit is used to connect the intersection points in the intersection point set of each height to obtain the contour line of each height.
8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the reverse modeling method of any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the reverse modeling method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Urban three-dimensional automatic modeling method based on laser radar point cloud data
CN113487730A
Method and system for automatically generating tunnel structure finite element model based on three-dimensional point cloud
CN114861500A