A Revit-based method for automatic identification, positioning, and drawing of irregular linear structures.
By creating a cross-section library of irregular linear components and filtering models using the Revit API, the system automatically identifies and generates drawings of irregular linear components, solving the problem that BIM software cannot efficiently identify irregular structures and achieving efficient and accurate drawing generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-24
- Publication Date
- 2026-03-13
AI Technical Summary
Existing BIM software cannot efficiently identify and automatically annotate irregular linear structures in construction drawings, resulting in missing parts of the drawings, and traditional CAD drawing is inefficient.
Create a library of sections for irregular linear components, and use the Revit API to filter irregular linear models, obtain geometric surface information, automatically identify and generate drawings, including dimensions of sections and plans.
It enables automatic identification and accurate labeling of irregular linear components, improving the efficiency and accuracy of construction drawing generation and avoiding the inefficiency and omissions of manual drawing.
Smart Images

Figure CN115510550B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for automatic identification, positioning, and drawing of irregular linear structures based on Revit. Background Technology
[0002] With the increasing variety of building structural forms, irregular linear structures frequently appear during actual construction, such as irregular spline boundaries, grooves with various cross-sections, irregular beams, and beams of various forms with variable cross-sections. In traditional construction drawings, in addition to marking the dimensions of their projected surfaces and the elevations of each line, detailed drawings of their nodes and annotations of their sections are also required; the complex and cumbersome spline plan and section drawings are prone to omissions and other errors.
[0003] Currently, the most widely used BIM software in the BIM field is no different from CAD in terms of positioning and labeling of irregular structures. It requires manual cutting and labeling of each component, which is not efficient in generating drawings.
[0004] In addition, although the BIM drawing software that has been modified can automatically annotate conventional components, it cannot identify irregular components, or the identification of each type of cross section requires separate modification. However, the irregular structures in engineering projects vary from project to project. If irregular components cannot be automatically identified, the automatically generated drawings will inevitably have omissions of irregular components. Summary of the Invention
[0005] The purpose of this invention is to provide a method for automatic identification, positioning and drawing of irregular linear structures based on Revit.
[0006] To address the above problems, this invention provides a method for automatic identification, location, and drawing of irregular linear structures based on Revit, comprising:
[0007] Step 1: Create a cross-section library for irregular linear components, the cross-section library including: cross-section type or shape and cross-section parameters;
[0008] Step 2: Write the mapping rules of the section library into the family type of the irregular linear family in the Revit model, and add family parameters for the irregular linear family;
[0009] Step 3: Use the API to filter out irregular linear models in Revit that are stretched based on a reference line;
[0010] Step 4: Obtain the geometric surface information of the irregular linear model, including: model cross-sectional information and top surface information;
[0011] Step 5: Automatically identify the geometric parameters of all faces of the irregular linear model to complete family identification, i.e., section mapping, and obtain the corresponding completed model section geometric information;
[0012] Step 6: Based on the geometric information of the completed model cross-section, generate drawings and automatically annotate them.
[0013] Furthermore, in the above method, step 4: Obtain the geometric surface information of the irregular linear model, including: model cross-sectional information and top surface information, including:
[0014] Step 4.1: Obtain the baseline of the irregular linear component using the Location attribute of the linear component;
[0015] Step 4.2: Based on the baseline, automatically obtain the cross-sectional information of the linear model;
[0016] Step 4.3: Based on the baseline, automatically obtain the top surface information of the linear model.
[0017] Furthermore, in the above method, step 4.2: based on the baseline, automatically obtain the linear model cross-sectional information, including:
[0018] The surfaces in the 3D geometry of the linear model that intersect with the model baseline are identified as linear model sections, and the information of the linear model sections is automatically obtained based on these sections.
[0019] Furthermore, in the above method, step 4.3: automatically acquiring the top surface information of the linear model based on the baseline, including:
[0020] Obtain a face that is parallel to the baseline and whose normal direction to the outside of the model intersects the direction (0,0,1) to form an acute angle; if the obtained face is projected vertically onto the horizontal plane to form a new shape, then the obtained face is determined to be the top face of the linear model.
[0021] Information about the top surface of a linear model is obtained from the top surface of the linear model.
[0022] Furthermore, in the above method, step 5: automatically identify the geometric parameter information of all surfaces of the irregular linear model to complete family identification, i.e., section mapping, and obtain the corresponding completed model section geometric information, including:
[0023] Step 5.1: Automatically acquire the geometric surface information of the irregular linear model and input it into the section library;
[0024] Step 5.2: Match the family parameters that control the cross-sectional shape in the family type to the corresponding cross-sectional parameters in the cross-sectional library to obtain the corresponding completed model cross-sectional geometric information.
[0025] Furthermore, in the above method, step 6: Based on the corresponding completed model cross-sectional geometry information, generate drawings and automatically annotate them, including:
[0026] Step 6.1: Based on the geometric information of the completed model section, generate a cross-sectional view and automatically label the cross-sectional dimensions.
[0027] Furthermore, in the above method, step 6.1: Based on the geometric information of the corresponding completed model section, generate a cross-sectional view and automatically annotate the section dimensions, including:
[0028] Based on the automatically obtained geometric information of the linear model section, the Revit API for drawing detail lines is called to draw detail lines. The section edge information is passed in to draw the section of the model. Based on the completed geometric information of the model section, the dimension information in the family parameters is called, and the section is automatically dimensioned with one click using a Foreach loop.
[0029] Furthermore, in the above method, step 6: Based on the corresponding completed model cross-sectional geometry information, generate drawings and automatically annotate them, including:
[0030] Step 6.2: Based on the geometric information of the completed model section, generate a plan view and automatically label the dimensions of the projection surface and its positioning relationship with the axis.
[0031] Furthermore, in the above method, step 6.2: based on the geometric information of the corresponding completed model cross-section, generate a plan view and automatically annotate the dimensions of the projection plane and its positioning relationship with the axis, including:
[0032] Create a floor plan view based on the floor elevations in the Revit model, and use the corresponding completed top surface geometry information of the model to label the positions of the edges of the model's projection plane; call the Revit API to create the distance from the projection plane edge to the axis.
[0033] Compared to existing technologies, this invention creates a cross-section library for irregular linear components; writes the mapping rules of the cross-section library into the family type of irregular linear families in the Revit model, adding family parameters to the irregular linear families; filters out irregular linear models in the Revit model that are stretched based on a reference line; obtains the geometric surface information of the irregular linear models; automatically identifies the geometric parameter information of all faces of the irregular linear models to complete family identification, i.e., cross-section mapping, and obtains the corresponding completed model cross-section geometric information; and generates drawings and automatically annotates them based on the corresponding completed model cross-section geometric information. This invention can automatically identify irregular linear models in BIM models, read their geometric information, and generate dimension annotations for their sectional and plan views, as well as annotations related to the grid lines. Compared to existing BIM-based drawing products that cannot identify irregular components, resulting in missing drawings, this invention allows software to identify irregular linear components with arbitrary cross-sections. Compared to manually drawing drawings using CAD, this invention automatically generates their sectional and plan views, ensuring the accuracy of the drawings and effectively improving the efficiency of staff. Attached Figure Description
[0034] Figure 1 This is a flowchart of a Revit-based method for automatic identification, positioning, and drawing of irregular linear structures according to an embodiment of the present invention;
[0035] Figure 2 This is a schematic diagram of the software interface of the pop-up window implementation of the automatic identification device for irregular linear families according to an embodiment of the present invention. Detailed Implementation
[0036] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0037] like Figure 1 and 2 As shown, this invention provides a method for automatic identification, location, and drawing of irregular linear structures based on Revit, including:
[0038] Step 1: Create a cross-section library for irregular linear components. The cross-section library includes: cross-section type or shape and cross-section parameters. Construct an irregular linear cross-section library, determining the textual description format of the cross-section information: [Type = Cross-section type; a1 = xxx; a3 = xxx; a4 = xxx; a2 = xxx...]. The specific format meanings are: [Type =] specifies the type or shape of the cross-section, and the cross-section parameters [a1 =], [a2 =], [a3 =], and [a4 =] respectively represent the parameters needed to mathematically describe a shape. According to the creation rules, define the type or shape of each cross-section in the cross-section library.
[0039] Step 2: Write the mapping rules from the section library into the family type of the irregular linear family in the Revit model, and add family parameters for the irregular linear family. Based on the mapping rules of the section library, add type annotations such as [b=], [b1=], [tw1=], [h=], [h1=], etc., to confirm the family parameters for each edge. After the "=" sign, write the parameter name that controls the edge length, arc length, etc. of the section within the family.
[0040] Step 3: Filter BIM linear models. Using the API, filter out irregular linear models in Revit that are stretched based on a single reference line. Examples include structural frame models (beams, supports), wall models, and custom-built "line-based metric conventional models." These models are always parallel to their baseline. The selection is based on whether the Element.Location value is of type LocationCurve; if it is, it is a linear model.
[0041] Step 4: Obtain the geometric surface information of the irregular linear model, including: model cross-sectional information and top surface information. This specifically includes the following steps:
[0042] Step 4.1: Obtain the baseline of the irregular linear component through the Location property of the linear component.
[0043] Step 4.2: Based on the baseline, automatically acquire the linear model section information. The faces in the 3D geometry of the linear model that intersect the model baseline (in Revit, this intersection is generally where the baseline is perpendicular to the section) are the linear model sections. Using the GeometryElement value of the model Element provided by the Revit API, which records the model's 3D geometric information, including: face and edges that make up the face; acquire all faces that intersect with the baseline LocationCurve, thus obtaining the model section geometric information.
[0044] Step 4.3: Based on the baseline, automatically acquire the top surface information of the linear model. Acquire the surface that is parallel to the baseline LocationCurve, and whose normal direction facing outwards intersects the direction (0,0,1) to form an acute angle; if the acquired surface is projected vertically onto the horizontal plane to form a new shape, then the acquired surface is determined to be the top surface of the linear model.
[0045] Using the GeometryElement value of the model element provided by the Revit API, which records the three-dimensional geometric information of the model, including: face and the edges that make up the face; the normal of the face provided by Revit is oriented outwards from the model. If the normal of the face is perpendicular to the direction of the baseline LocationCurve and forms an acute angle with the (0,0,1) direction, then the face is determined to be the top face. After obtaining all the top faces, the geometric information of the top face of the model is obtained.
[0046] Step 5: Automatically identify the geometric parameters of all faces of the irregular linear model to complete family identification, i.e., section mapping, and obtain the corresponding completed model section geometry information. Match the selected linear models to the built-in section library, and match the parameters controlling the section shape in the irregular linear model family type to the specified description parameters of the section shape in the device's section library. Specifically, this includes the following steps:
[0047] Step 5.1: Automatically acquire the geometric surface information of the irregular linear model and input it into the cross-section library.
[0048] Here, cross sections can be generated based on the geometric surface information of the irregular linear model, and default parameters a1, a2, a3, a4, etc. for each side of the cross section can be automatically generated, thereby inputting the model information into the cross section library.
[0049] Step 5.2: Select a section type from the section library and match it with the family parameters of the corresponding irregular linear family. Map the family parameters controlling the section shape in the family type to the corresponding section parameters in the section library to obtain the geometric information of the completed model section.
[0050] For example, the default parameters a1, a2, a3, a4, etc. in the section library match the parameters b, b1, tw1, h, h1, etc. in the family type annotation, so that the Revit family type parameters match the parameters in the section library, thus completing family identification, i.e., section mapping.
[0051] Step 6: Based on the completed model section geometry, generate drawings and automatically annotate them. Generate the model's section by inputting the section edge information. Dimension the model section according to the identified geometric parameters from the section library. Use the linear dimensioning interface provided by the BIM software to generate positioning annotations from the component to the axis in the Revit software drawing. Then use a Foreach loop for one-click automatic dimensioning. Specifically, this includes the following steps:
[0052] Step 6.1: Based on the completed model section geometry, generate a sectional view and automatically annotate the section dimensions. Using the automatically obtained linear model section geometry, call the Revit API to draw detail lines (Document.Create.NewDetailCurve), passing in the section edge information to draw the model's section. Based on the completed model section geometry, call the dimension information from the family parameters and use a Foreach loop to automatically annotate the section with one click.
[0053] Step 6.2: Based on the geometric information of the completed model section, generate a plan view and automatically label the dimensions of the projection surface and its positioning relationship with the axis.
[0054] Here, a floor plan view can be created based on the floor levels in the Revit model. Using the corresponding completed top surface geometry of the model, the positions of the edges of the model's projection plane can be labeled. The Revit API is then used to create the distance from the projection plane edge to the axis line, thus completing the labeling of the positioning relationship with the axis line. One-click automatic dimensioning is then performed using a Foreach loop. Furthermore...
[0055] In summary, this invention can automatically identify irregular linear models in BIM models, read their geometric information, and generate dimensional annotations for their cross-sectional and plan views, as well as annotations related to the grid lines. Compared to existing BIM-based drawing products that cannot identify irregular components, leading to incomplete drawings, this invention enables the software to identify irregular linear components with arbitrary cross-sections. Furthermore, compared to manually drawing drawings using CAD, this invention automatically generates cross-sectional and plan views, ensuring the accuracy of the drawings and effectively improving worker efficiency.
[0056] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0057] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0058] Obviously, those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Therefore, if these modifications and variations fall within the scope of the claims of the invention and their equivalents, the invention is also intended to include these modifications and variations.
Claims
1. A method for automatic identification, positioning, and drawing of irregular linear structures based on Revit, characterized in that, include: Step 1: Create a cross-section library for irregular linear components, the cross-section library including: cross-section type or shape and cross-section parameters; Step 2: Write the mapping rules of the section library into the family type of the irregular linear family in the Revit model, and add family parameters for the irregular linear family; Step 3: Use the API to filter out irregular linear models in Revit that are stretched based on a reference line; Step 4: Obtain the geometric surface information of the irregular linear model, including: model cross-sectional information and top surface information; Step 5: Automatically identify the geometric parameters of all faces of the irregular linear model to complete family identification, i.e., section mapping, and obtain the corresponding completed model section geometric information; Step 6: Based on the geometric information of the completed model cross-section, generate drawings and automatically annotate them; Step 4: Obtain the geometric surface information of the irregular linear model, including: model cross-sectional information and top surface information, including: Step 4.1: Obtain the baseline of the irregular linear component using the Location attribute of the linear component; Step 4.2: Based on the baseline, automatically obtain the cross-sectional information of the linear model; Step 4.3: Based on the baseline, automatically acquire the top surface information of the linear model; Step 4.2: Based on the baseline, automatically obtain the linear model cross-sectional information, including: The surfaces in the 3D geometry of the linear model that intersect with the model baseline are identified as linear model sections, and the information of the linear model sections is automatically obtained based on these sections.
2. The method for automatic identification, positioning, and drawing of irregular linear structures based on Revit as described in claim 1, characterized in that, Step 4.3: Based on the baseline, automatically obtain the top surface information of the linear model, including: Obtain a face that is parallel to the baseline and whose normal direction to the outside of the model intersects the direction (0,0,1) to form an acute angle; if the obtained face is projected vertically onto the horizontal plane to form a new shape, then the obtained face is determined to be the top face of the linear model. Information about the top surface of a linear model is obtained from the top surface of the linear model.
3. The method for automatic identification, positioning, and drawing of irregular linear structures based on Revit as described in claim 1, characterized in that, Step 5: Automatically identify the geometric parameters of all faces of the irregular linear model to complete family identification, i.e., section mapping, and obtain the corresponding completed model section geometric information, including: Step 5.1: Automatically acquire the geometric surface information of the irregular linear model and input it into the section library; Step 5.2: Match the family parameters that control the cross-sectional shape in the family type to the corresponding cross-sectional parameters in the cross-sectional library to obtain the corresponding completed model cross-sectional geometric information.
4. The method for automatic identification, positioning, and drawing of irregular linear structures based on Revit as described in claim 1, characterized in that, Step 6: Based on the completed model cross-sectional geometry, generate drawings and automatically annotate them, including: Step 6.1: Based on the geometric information of the completed model section, generate a cross-sectional view and automatically label the cross-sectional dimensions.
5. The method for automatic identification, positioning, and drawing of irregular linear structures based on Revit as described in claim 1, characterized in that, Step 6.1: Based on the completed model cross-sectional geometry, generate a sectional view and automatically annotate the cross-sectional dimensions, including: Based on the automatically obtained geometric information of the linear model section, the Revit API for drawing detail lines is called to draw detail lines. The section edge information is passed in to draw the section of the model. Based on the completed geometric information of the model section, the dimension information in the family parameters is called, and the section is automatically dimensioned with one click using a Foreach loop.
6. The method for automatic identification, positioning, and drawing of irregular linear structures based on Revit as described in claim 1, characterized in that, Step 6: Based on the completed model cross-sectional geometry, generate drawings and automatically annotate them, including: Step 6.2: Based on the geometric information of the completed model section, generate a plan view and automatically label the dimensions of the projection surface and its positioning relationship with the axis.
7. The method for automatic identification, positioning, and drawing of irregular linear structures based on Revit as described in claim 1, characterized in that, Step 6.2: Based on the completed model cross-sectional geometry, generate a plan view and automatically annotate the dimensions of the projected planes and their positioning relationship with the axes, including: Create a floor plan view based on the floor elevations in the Revit model, and use the corresponding completed top surface geometry information of the model to label the positions of the edges of the model's projection plane; call the Revit API to create the distance from the projection plane edge to the axis.
Citation Information
Patent Citations
Parametric modeling method of special-shaped components based on Revit secondary development
CN109408912A