A high-precision modeling method for complex keels based on Grasshopper
By constructing a three-dimensional surface model of the keel center line on the Grasshopper platform and offset to obtain the edge line model, the problem of low precision in complex keel modeling is solved, and high-precision and efficient keel modeling is achieved.
Patent Information
- Application Number
- CN202510139031.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-02-08
AI Technical Summary
The prior art has poor accuracy when facing complex keel modeling, especially in the part with large curvature of the keel, there is a large deviation between the keel edge line and the center line, which is difficult to meet the needs of high-precision modeling.
A complex keel high-precision modeling method based on Grasshopper is used to construct a three-dimensional curved surface model where the center line of the keel is located, and the edge line model of each keel is obtained based on the model offset, and finally a three-dimensional solid model of the keel is constructed.
It effectively improves the modeling accuracy of complex keels, avoids the introduction of fitting errors in the greater part of the keel curvature, simplifies the modeling process and improves efficiency.
Smart Images

Figure CN119577930B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of keel modeling, and in particular to a high-precision modeling method for a complex keel based on Grasshopper. Background Art
[0002] With the increasing maturity of BIM (Building Information Modeling) technology, this technology has been widely used in many fields. At present, software that can model keels in engineering, such as RVT, Tekla and other software, can only use straight lines, combined lines and fixed-angle arcs to model keels, and cannot analyze and model multiple surfaces or curves. Such software has the problem of not being able to quickly and accurately model keels in the form of curves of arbitrary curvatures or multiple curves.
[0003] The software Rhino solves this problem very well. Due to the built-in surface and polysurface characteristics of the Rhino software, combined with the built-in Grasshopper plug-in, it can more easily solve the problem of difficult modeling of special-shaped roofs and curtain wall keels. It can also handle the technical difficulties of complex surface engineering modeling better and more efficiently through battery programming.
[0004] However, the existing modeling methods of curved keels are all achieved through the concept of point sampling and stretching. When faced with complex keel modeling problems, the existing modeling methods have poor accuracy. In the part with larger keel curvature, there is often a large deviation between the keel edge line and the keel center line. At this time, if the modeling accuracy needs to be improved, it is necessary to increase the number of sampling segments. However, on the one hand, an excessively dense number of sampling segments will lead to a decrease in modeling efficiency. On the other hand, since the number of segments cannot be increased indefinitely, the fitting accuracy of the larger part of the keel curvature is still difficult to meet the needs of high-precision modeling. Summary of the invention
[0005] The present invention aims to provide a high-precision modeling method for complex keels based on Grasshopper to solve the technical problems described in the background technology.
[0006] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0007] A high-precision modeling method for complex keels based on Grasshopper includes the following steps:
[0008] Step S1, constructing a three-dimensional surface model of the surface where the keel centerline is located;
[0009] Step S2, constructing a three-dimensional distribution model of the keel centerline on the three-dimensional curved surface model described in step S1;
[0010] Step S3, obtaining a three-dimensional distribution model of each edge of each keel according to the three-dimensional distribution model of the keel centerline described in step S2, and obtaining a three-dimensional solid model of each keel according to the three-dimensional distribution model of each edge of each keel.
[0011] Preferably, the three-dimensional surface model of the surface where the keel center line is located in step S1 is obtained by offsetting the three-dimensional model of the building roof surface or the three-dimensional model of the building curtain wall surface.
[0012] Preferably, the step S2 specifically includes:
[0013] Step S21, arranging keel lines in a plane according to the keel design plan to form a two-dimensional distribution diagram of the keel center line;
[0014] Step S22, projecting the two-dimensional distribution map of the keel described in step S21 onto the three-dimensional surface model described in step S1 to obtain a three-dimensional distribution model of the keel centerline.
[0015] Preferably, the step S3 specifically includes:
[0016] Step S31, extracting a three-dimensional line model of a keel center line in the three-dimensional distribution model of the keel center line described in step S2 and constructing a plane where the extracted three-dimensional line model of the keel center line is located;
[0017] Step S32, selecting an edge as an offset target, and offsetting the keel centerline three-dimensional line model extracted in step S41 along the constructed plane to the projection position of the selected edge on the plane to obtain a projection line model of the selected edge;
[0018] Step S33, offsetting the projection line model of the selected edge in step S32 along the normal direction of the plane to the position of the selected edge to obtain a three-dimensional line model of the selected edge;
[0019] Step S34, repeating the operations from step S32 to step S33 until the three-dimensional line molds of all edges of the extracted three-dimensional line mold of the keel center line are obtained;
[0020] Step S35, generating a three-dimensional solid model of the keel corresponding to the three-dimensional line model of the keel centerline extracted in step S41 according to the three-dimensional line models of all edges obtained in step S34;
[0021] Step S36, repeating the operations from step S31 to step S35 until the three-dimensional solid models of all keels are obtained.
[0022] Preferably, in steps S32 to S34, each edge at the outer skin position and each edge at the inner skin position of each keel is obtained by offsetting in batches.
[0023] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention adopts the curve parameter offset method to obtain the edge line mold of the keel, and further constructs a three-dimensional solid model of the keel through the edge line mold of the keel. Compared with the existing modeling method of point taking, lofting and stretching, since all points along the entire keel center line are offset as target points, there is no point taking process, which avoids the introduction of fitting errors in a larger part of the keel curvature, and effectively improves the modeling accuracy of complex keels. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The above and / or other aspects and advantages of the present invention will become clearer and easier to understand through the detailed description made in conjunction with the following drawings, which are only exemplary and do not limit the present invention, wherein:
[0025] Figure 1 A schematic diagram of a keel model and a keel centerline established by a point-taking and lofting stretching method in the background technology section of the present invention;
[0026] Figure 2 A schematic diagram of a keel model and a keel centerline established by the high-precision modeling method according to the present invention;
[0027] Figure 3 Schematic diagram of the three-dimensional distribution model of the keel centerline constructed in Example 1 of the present invention;
[0028] Figure 4 Schematic diagram of the rectangular cross-section keel model constructed in Example 1 of the present invention. DETAILED DESCRIPTION
[0029] Hereinafter, an embodiment of a high-precision modeling method for complex keels based on Grasshopper of the present invention will be described with reference to the accompanying drawings. The embodiments described herein are specific embodiments of the present invention, which are used to illustrate the concept of the present invention. They are all explanatory and exemplary and should not be interpreted as limiting the embodiments of the present invention and the scope of the present invention. In addition to the embodiments described herein, those skilled in the art can also adopt other obvious technical solutions based on the contents disclosed in the claims and the specification of the present application, including technical solutions that adopt any obvious replacements and modifications to the embodiments described herein.
[0030] In the description of the present invention, it should be noted that the terms "front", "rear", "left", "right", "top", "bottom", "up", "down", "inside", "outside", "horizontal", "vertical", "upright", "oblique", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc., are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0031] The drawings of this specification are schematic diagrams, which assist in explaining the concept of the present invention and schematically show the shapes of various parts and their mutual relationships. Please note that in order to clearly show the structures of various components of the embodiments of the present invention, the drawings are not drawn according to the same scale. The same reference numerals are used to represent the same parts.
[0032] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The embodiments are only used to explain the present invention and are not used to limit the scope of the present invention. Figure 1-4 , the preferred embodiments of the present invention are further described in detail:
[0033] like Figure 1-4 As shown, a preferred method for high-precision modeling of complex keels based on Grasshopper of the present invention comprises the following steps:
[0034] Step S1, constructing a three-dimensional surface model of the surface where the keel centerline is located;
[0035] Step S2, constructing a three-dimensional distribution model of the keel centerline on the three-dimensional curved surface model described in step S1;
[0036] Step S3, obtaining a three-dimensional distribution model of each edge of each keel according to the three-dimensional distribution model of the keel centerline described in step S2, and obtaining a three-dimensional solid model of each keel according to the three-dimensional distribution model of each edge of each keel.
[0037] The three-dimensional surface model in step S1 can be constructed by directly modeling the design data, or by transforming an existing model. Since the surface where the center line of the keel is located is consistent with the building skin model at the attachment position, only the position is offset to a certain extent. Therefore, in order to reduce the workload of modeling, in some preferred embodiments, the specific steps of step S1 include:
[0038] Step S11, importing the BIM three-dimensional model of the building roof surface or the BIM three-dimensional model of the building curtain wall surface in the Rhino software;
[0039] Step S12, offset the BIM three-dimensional model of the building roof surface or the BIM three-dimensional model of the building curtain wall surface toward the inner side of the curved surface by half the keel height along the curvature direction of the curved surface to obtain a three-dimensional curved surface model of the curved surface where the keel centerline is located.
[0040] Similarly, the keel centerline three-dimensional distribution model in step S2 can be constructed by directly modeling the obtained design data. However, considering the difficulty and low efficiency of complex curve modeling, in some preferred embodiments, step S2 specifically includes:
[0041] Step S21, arranging keel lines in a plane according to the keel design plan to form a two-dimensional distribution diagram of the keel center line;
[0042] Step S22, first, align the two-dimensional distribution map of the keel centerline described in step S21 with the three-dimensional surface model described in step S1 in the projection direction (the projection direction is the bending direction of the keel), and then project the two-dimensional distribution map of the keel described in step S21 onto the three-dimensional surface model described in step S1 to obtain the three-dimensional distribution model of the keel centerline.
[0043] In the traditional modeling method, the two-dimensional distribution map of the keel center line is generally projected directly onto the BIM three-dimensional model of the building roof surface or the BIM three-dimensional model of the building curtain wall surface, and then the keel center lines projected onto the BIM three-dimensional model of the building roof surface or the BIM three-dimensional model of the building curtain wall surface are offset into place one by one. The present invention adopts the idea of directly offsetting the BIM three-dimensional model of the building roof surface or the BIM three-dimensional model of the building curtain wall surface as a whole to obtain a three-dimensional surface model of the surface where the keel center line is located and then projecting it, which makes the whole process simpler, reduces the difficulty of the entire battery programming, and enhances readability.
[0044] In step S3, the center line of the keel can be offset to the edge position of the keel along the offset path by simply calculating the offset path. However, in order to reduce the difficulty of offset, in some preferred embodiments, step S3 specifically includes:
[0045] Step S31, extracting a three-dimensional line model of a keel center line in the three-dimensional distribution model of the keel center line described in step S2 and constructing a plane where the extracted three-dimensional line model of the keel center line is located;
[0046] Step S32, selecting an edge as an offset target, and offsetting the keel centerline three-dimensional line model extracted in step S41 along the constructed plane to the projection position of the selected edge on the plane to obtain a projection line model of the selected edge;
[0047] Step S33, offsetting the projection line model of the selected edge in step S32 along the normal direction of the plane to the position of the selected edge to obtain a three-dimensional line model of the selected edge;
[0048] Step S34, repeating the operations from step S32 to step S33 until the three-dimensional line molds of all edges of the extracted three-dimensional line mold of the keel center line are obtained;
[0049] Step S35, generating a three-dimensional solid model of the keel corresponding to the three-dimensional line model of the keel centerline extracted in step S41 according to the three-dimensional line models of all edges obtained in step S34;
[0050] Step S36, repeating the operations from step S31 to step S35 until the three-dimensional solid models of all keels are obtained.
[0051] In order to reduce the difficulty of battery programming, the edges of the outer skin position and the edges of the inner skin position of each keel in steps S32 to S34 are obtained by batch offset, and there is no intersection between the two during the offset construction process (that is, they are constructed by different battery groups). In this way, the battery responsible for completing the offset operation of each edge at the inner skin position can make uniform and adaptive modifications to the offset distance based on copying the battery responsible for completing the offset operation of each edge at the outer skin position, without the need to recalculate the offset distance.
[0052] Example 1
[0053] First, two Bezier curves are used to generate a curved surface A as a three-dimensional surface model of the surface where the center line of the keel is located by stretching, and a 100×5mm square purlin keel is constructed based on the three-dimensional surface model. This embodiment includes the following steps:
[0054] Step 1: Arrange the keel lines of the roof or curtain wall in the required direction and at the required spacing according to the layout requirements, and project them onto surface A (surface A is the surface where the keel center line is located by default, and the projection direction is the bending direction of the keel). Figure 3 As shown;
[0055] Step 2: Import the keel centerline three-dimensional distribution model generated on the curved surface A in step 1 into the battery pack;
[0056] Step three, extract a three-dimensional line model of a keel center line in the three-dimensional distribution model of the keel center line described in step two (referred to as curve B here for the convenience of subsequent expression) and construct a plane where the extracted three-dimensional line model of the keel center line is located (referred to as plane P here), wherein the extracted three-dimensional line model (curve B) is preferably a curve on a plane. Due to the operation of step one, the curves obtained by projecting a straight line onto any curved surface are all on a plane. Therefore, the three-dimensional line models (curve B) extracted in this step all meet the requirements. In fact, for irregular curves, the irregular curves (here, the irregular curves refer to lines that are not on a plane) can be segmented and similar operations can be performed to ensure that each segmented part is on a plane, and then the above steps are repeated. However, the end position will have local deviations due to fitting;
[0057] Step 4: Translate the extracted curve B on plane P. Considering the example here of a square purlin keel of 100×5mm, the offset distance is set to 50mm (the purlin height is 100mm), and two offset line curves B1 and B2 can be obtained;
[0058] Step 5: offset plane P along its normal vector direction and in the opposite direction by 50 mm (the purlin width is 100 mm), and obtain two planes P1 and P2 with a spacing of 100 mm;
[0059] Step 6: Pull the two offset lines (curve B1 and curve B2) back to two planes (plane P1 and plane P2) respectively (pull back is defined as the projection of the curve relative to the plane direction, and the projection angle is consistent with the normal vector of the plane). Four pull back curves on the two planes can be obtained respectively, and the four pull back curves are connected in sequence to obtain the outer skin model of the keel;
[0060] Step 7: According to the operations described in Step 4 to Step 6, the thickness of the keel (5 mm in this example) is subtracted from the offset parameter to obtain the endothelial model of the keel;
[0061] Step 8: Combine the outer skin model and the inner skin model to obtain the required keel entity model. Figure 4 As shown;
[0062] Step nine, repeat the operations from step three to step eight until the three-dimensional solid models of all keels are obtained.
[0063] Since the present invention adopts the modeling concept of overall curve offset, there is no need to perform segmented sampling and point selection operations, which will not affect the original curvature of the curve, and there will be no fitting errors in the modeling accuracy. Moreover, the present invention has a simple principle and can adjust parameters according to the required cross-section. Since there is no lofting operation, there is no need to draw the keel cross-section. However, it should be noted that the present invention has good adaptability and modeling accuracy for keels with polygonal cross-sections (such as rectangular keels, square keels, I-shaped keels, C-shaped keels), etc., but for keels with irregular curves in the cross-section, the modeling accuracy will still be reduced due to path fitting.
[0064] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A high-precision modeling method for complex keels based on Grasshopper, characterized in that: The steps include: Step S1, constructing a three-dimensional surface model of the surface where the keel centerline is located; The three-dimensional surface model of the surface where the keel center line is located in step S1 is obtained by offsetting the three-dimensional model of the building roof surface or the three-dimensional model of the building curtain wall surface; Step S2, constructing a three-dimensional distribution model of the keel centerline on the three-dimensional curved surface model described in step S1; Step S3, obtaining a three-dimensional distribution model of each edge of each keel according to the three-dimensional distribution model of the keel centerline described in step S2, and obtaining a three-dimensional solid model of each keel according to the three-dimensional distribution model of each edge of each keel; The step S3 specifically includes: Step S31, extracting a three-dimensional line model of a keel center line in the three-dimensional distribution model of the keel center line described in step S2 and constructing a plane where the extracted three-dimensional line model of the keel center line is located; Step S32, selecting an edge as an offset target, and offsetting the keel centerline three-dimensional line model extracted in step S31 along the constructed plane to the projection position of the selected edge on the plane to obtain a projection line model of the selected edge; Step S33, offsetting the projection line model of the selected edge in step S32 along the normal direction of the plane to the position of the selected edge to obtain a three-dimensional line model of the selected edge; Step S34, repeating the operations from step S32 to step S33 until the three-dimensional line molds of all edges of the extracted three-dimensional line mold of the keel center line are obtained; Step S35, generating a three-dimensional solid model of the keel corresponding to the three-dimensional line model of the keel centerline extracted in step S31 according to the three-dimensional line models of all edges obtained in step S34; Step S36, repeating the operations of step S31 to step S35 until a three-dimensional solid model of all keels is obtained; In steps S32 to S34, each edge at the outer skin position and each edge at the inner skin position of each keel is obtained by offsetting in batches.
2. The high-precision modeling method for complex keels based on Grasshopper according to claim 1, characterized in that: The step S2 specifically includes: Step S21, arranging keel lines in a plane according to the keel design plan to form a two-dimensional distribution diagram of the keel center line; Step S22, projecting the two-dimensional distribution map of the keel described in step S21 onto the three-dimensional surface model described in step S1 to obtain a three-dimensional distribution model of the keel centerline.
Citation Information
Patent Citations
Architectural modeling roof modeling method based on Grasshopper
CN115828404A