


技术领域technical field
本发明涉及工程造价领域,特别涉及一种图纸分割方法、电子设备以及存储介质。The invention relates to the field of engineering cost, in particular to a drawing dividing method, an electronic device and a storage medium.
背景技术Background technique
工程造价就是指工程的建设价格,是指完成一个工程的建设所预期或实际所需的全部费用总和,也可认为是工程的建设成本,即为建设一项工程预期支付或实际支付的全部固定资产投资费用。The project cost refers to the construction price of the project, which refers to the sum of all the expected or actually required costs to complete the construction of a project. Asset investment costs.
在工程造价的计算过程中,设计人员设计出一座工程,一般是通过CAD设计出二维图纸,造价预算人员通过这个二维图纸,由三维预算软件算出工程量。现有的三维预算软件,都只能计算自己软件的模型,故而造价预算人员需要通过翻模工具以将二维图纸转换为软件需要的建筑模型。In the process of project cost calculation, designers design a project, usually through CAD design of two-dimensional drawings, cost budget personnel through the two-dimensional drawings, the three-dimensional budget software calculates the amount of work. The existing 3D budgeting software can only calculate the model of its own software, so the cost budgeter needs to convert the 2D drawing into the architectural model required by the software through the mold turning tool.
在进行翻模时,我们首先需要将一个完整的工程图纸分割出来,再分别对其构件进行分类整合,才能将一个完整的建筑工程图纸翻模出来。可见,图纸分割是翻模过程中不可或缺的重要步骤。然而,市面上现有的传统翻模软件需要用户手动去将图纸一张纸的分割出来,整个过程极其繁琐,效率不高。When converting the mold, we first need to divide a complete engineering drawing, and then classify and integrate its components separately, so as to convert a complete architectural engineering drawing. It can be seen that drawing segmentation is an indispensable and important step in the process of overturning. However, the existing traditional mold-turning software on the market requires the user to manually divide the drawing into a sheet of paper, and the whole process is extremely cumbersome and inefficient.
发明内容SUMMARY OF THE INVENTION
本发明所要解决的技术问题是:提供一种图纸分割方法、电子设备以及存储介质,能够自动完成对图纸的分割。The technical problem to be solved by the present invention is to provide a method for dividing drawings, an electronic device and a storage medium, which can automatically complete the dividing of drawings.
为了解决上述技术问题,本发明采用的技术方案为:In order to solve the above-mentioned technical problems, the technical scheme adopted in the present invention is:
一种图纸分割方法,包括步骤:A method for dividing drawings, comprising the steps of:
S1、识别二维图纸中的轴符;S1. Identify the axis symbols in the two-dimensional drawings;
S2、根据所述轴符确定每张图的坐标范围。S2. Determine the coordinate range of each graph according to the axis symbol.
为了解决上述技术问题,本发明采用的另一种技术方案为:In order to solve the above-mentioned technical problems, another technical scheme adopted by the present invention is:
一种电子设备,包括存储器、处理器以及存储在所述存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述一种图纸分割方法的步骤。An electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the steps of the above method for dividing a drawing when the processor executes the computer program.
为了解决上述技术问题,本发明采用的又一种技术方案为:In order to solve the above-mentioned technical problems, another technical scheme adopted by the present invention is:
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述一种图纸分割方法的步骤。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of the above-mentioned method for dividing a drawing.
本发明的有益效果在于:一种图纸分割方法、电子设备以及存储介质,通过识别二维图纸中的轴符,根据轴符来确定每张图的坐标范围,从而实现了图纸的自动分割;由于轴符相对其他线条来说,特征明显,辨识度高,故而在图纸分割的过程中识别效率和准确度较高;同时,轴符处于每张图的边沿位置,借此来界定每张图的坐标范围,简单有效,使得分割效率较高以准确度较高;另外,轴符也可以用来判断轴线和标注线,通过轴线来判断建筑构件,以后续的翻模提供了便利。The beneficial effects of the present invention are: a drawing dividing method, electronic equipment and storage medium, by identifying the axis symbols in the two-dimensional drawings, and determining the coordinate range of each drawing according to the axis symbols, thereby realizing the automatic segmentation of drawings; Compared with other lines, the axis symbol has obvious characteristics and high recognition degree, so the recognition efficiency and accuracy are high in the process of drawing segmentation; at the same time, the axis symbol is located at the edge of each picture, thereby defining the The coordinate range is simple and effective, so that the segmentation efficiency is high and the accuracy is high; in addition, the axis symbol can also be used to judge the axis and the marking line, and the building components can be judged by the axis, which provides convenience for subsequent mold turning.
附图说明Description of drawings
图1为本发明实施例的一种图纸分割方法的流程示意图;1 is a schematic flowchart of a method for dividing a drawing according to an embodiment of the present invention;
图2为本发明实施例涉及的二维图纸的平面示意图;2 is a schematic plan view of a two-dimensional drawing involved in an embodiment of the present invention;
图3为本发明实施例的一种电子设备的结构示意图。FIG. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
标号说明:Label description:
1、一种电子设备;2、处理器;3、存储器;4、轴符;5、轴线;6、标注线;7、轴符指引线;8、图名。1. An electronic device; 2. Processor; 3. Memory; 4. Axial symbol; 5. Axial line; 6. Marking line; 7. Axial symbol guiding line; 8. Figure name.
具体实施方式Detailed ways
为详细说明本发明的技术内容、所实现目的及效果,以下结合实施方式并配合附图予以说明。In order to describe in detail the technical content, achieved objects and effects of the present invention, the following descriptions are given with reference to the embodiments and the accompanying drawings.
本发明最关键的构思在于:通过识别二维图纸中的轴符,根据轴符来确定每张图的坐标范围。The key idea of the present invention is: by identifying the axis symbols in the two-dimensional drawings, the coordinate range of each drawing is determined according to the axis symbols.
请参照图1至图2,一种图纸分割方法,包括步骤:Please refer to Fig. 1 to Fig. 2, a method for dividing a drawing, including the steps:
S1、识别二维图纸中的轴符;S1. Identify the axis symbols in the two-dimensional drawings;
S2、根据所述轴符确定每张图的坐标范围。S2. Determine the coordinate range of each graph according to the axis symbol.
其中,建筑图纸上的轴线指主要墙柱及梁架等重要构件位置基线,在横向上的距离叫“开间”,纵向距离叫“进深”,图纸上以左下角为起点坐标。用来表示轴线的符号简称为轴网。Among them, the axis on the architectural drawing refers to the position baseline of important components such as main wall columns and beam frames. The distance in the horizontal direction is called "bay", and the distance in the longitudinal direction is called "depth". On the drawings, the lower left corner is the starting point coordinate. The symbol used to represent an axis is simply called a grid.
从上述描述可知,本发明的有益效果在于:通过识别二维图纸中的轴符,根据轴符来确定每张图的坐标范围,从而实现了图纸的自动分割;由于轴符相对其他线条来说,特征明显,辨识度高,故而在图纸分割的过程中识别效率和准确度较高;同时,轴符处于每张图的边沿位置,借此来界定每张图的坐标范围,简单有效,使得分割效率较高以准确度较高;另外,轴符也可以用来判断轴线和标注线,通过轴线来判断建筑构件,以后续的翻模提供了便利。It can be seen from the above description that the beneficial effects of the present invention are: by identifying the axis symbols in the two-dimensional drawings, the coordinate range of each drawing is determined according to the axis symbols, thereby realizing the automatic division of the drawings; since the axis symbols are relatively different from other lines , the features are obvious and the recognition degree is high, so the recognition efficiency and accuracy are high in the process of dividing the drawing; at the same time, the axis symbol is located at the edge of each drawing, thereby defining the coordinate range of each drawing, which is simple and effective, making The segmentation efficiency is high and the accuracy is high; in addition, the axis symbol can also be used to judge the axis and the marking line, and the building components are judged by the axis, which provides convenience for subsequent mold turning.
进一步地,所述步骤S1具体为:识别二维图纸中所有的圆形,判断所述圆形内是否存在英文字符或阿拉伯字符,若存在,则将包含英文字符或阿拉伯字符的圆形确定为轴符。Further, the step S1 is specifically: identifying all the circles in the two-dimensional drawing, judging whether there are English characters or Arabic characters in the circles, and if so, determining the circles containing English characters or Arabic characters as axis symbol.
其中,轴符的主要组成包括圆形和编号。当轴符用来表示横向平面定位走线时,即为横向轴符,横向轴符的内部包括1、2、3…等阿拉伯字符,当轴符用来表示纵向平面定位走线时,即为纵向轴符,纵向轴符的内部包括A、B、C…等大写英文字符。Among them, the main components of the axis symbol include circles and numbers. When the axis symbol is used to represent the horizontal plane positioning line, it is the horizontal axis symbol, and the interior of the horizontal axis symbol includes Arabic characters such as 1, 2, 3, etc. When the axis symbol is used to indicate the vertical plane positioning line, it is the horizontal axis symbol. Vertical axis symbol. The interior of the vertical axis symbol includes uppercase English characters such as A, B, C, etc.
从上述描述可知,通过圆形和编号来判断轴符,能够快速且有效的确定所有的轴符。It can be seen from the above description that all the axis symbols can be determined quickly and effectively by judging the axis symbols by the circle and the number.
进一步地,所述步骤S2具体为:Further, the step S2 is specifically:
S21、根据所述轴符识别出所有的轴线,若根据所述轴符未识别出轴线,则执行步骤S22;S21, identify all the axes according to the axis symbol, if the axis is not identified according to the axis symbol, then execute step S22;
S22、根据所述轴符识别出所有的标注线,根据所述标注线生成轴线;S22, identifying all marking lines according to the axis symbols, and generating an axis according to the marking lines;
S23、将具有相交关系的轴线组成一个轴网,确定每一个轴网的坐标范围;S23. Assemble the axes with the intersecting relationship into a grid, and determine the coordinate range of each grid;
S24、将每一个轴网的坐标范围向外扩大第一数值,以得到每张图的坐标范围,所述第一数值为[500毫米,3000毫米]中的任一数值。S24. Expand the coordinate range of each grid to a first value to obtain the coordinate range of each image, where the first value is any value in [500 mm, 3000 mm].
其中,在建筑工程的二维图纸中,轴线主要起到定位的作用。对于结构图来说,基本上的图纸都存在轴线;对于建筑图,基本上的图纸都不存在轴线。Among them, in the two-dimensional drawings of construction projects, the axis mainly plays the role of positioning. For structural drawings, basic drawings have axes; for architectural drawings, basic drawings do not have axes.
从上述描述可知,在确定轴符后,为了进一步识别建筑构件以及更加清楚的界定每张图的坐标范围,需要识别出图中的轴线,对于有轴线的图来说,通过轴符来识别轴线即可,而对于没有轴线的图来说,上述技术方案通过标注线来生成轴线,从而有利于后续的构件识别以及更加清楚的界定每张图的坐标范围。It can be seen from the above description that after determining the axis symbol, in order to further identify the building components and define the coordinate range of each drawing more clearly, it is necessary to identify the axis in the drawing. For the drawing with axis, the axis is identified by the axis symbol. That is, for a drawing without an axis, the above-mentioned technical solution generates an axis by labeling a line, which facilitates subsequent component identification and more clearly defines the coordinate range of each drawing.
进一步地,所述步骤S21中根据所述轴符识别出所有的轴线具体为:Further, in the step S21, identifying all the axes according to the axis symbols is specifically:
S211、每一个轴符均以自身为圆心,以(0,1000毫米]中的任一数值为半径,得到指引线筛选范围,将与所述指引线筛选范围相交的所有线段放入待确认指引线集合;S211. Each axis symbol takes itself as the center of the circle, and uses any value in (0,1000 mm] as the radius to obtain the guide line screening range, and put all the line segments that intersect with the guide line screening range into the guide line to be confirmed. line collection;
S212、从所述待确认指引线集合中选出一条线段为第一线段,判断所述第一线段是否是唯一一条和对应的第一轴符相交的线段,若是,则所述第一线段为第一轴符指引线,否则继续从待确认指引线集合中选出一条线段进行判断,直到得到第一轴符指引线;S212. Select a line segment from the set of to-be-confirmed guide lines as the first line segment, and determine whether the first line segment is the only line segment that intersects with the corresponding first axis symbol, and if so, the first line segment The line segment is the first axis symbol guide line, otherwise, continue to select a line segment from the set of to-be-confirmed guide lines for judgment until the first axis symbol guide line is obtained;
S213、从所述待确认指引线集合中,将与所述第一轴符指引线处于同一图层且至少与处于同一图层的任一线段平行的所有线段标记为轴符指引线;S213, from the to-be-confirmed guideline set, mark all line segments that are on the same layer as the first axis symbol guideline and at least parallel to any line segment on the same layer as the axis symbol guideline;
S214、对所述待确认指引线集合中与所述第一轴符指引线不处于同一图层或与所述待确认指引线集合的所有线段均不平行的其他线段依次执行步骤S212及步骤S213,直到所述待确认指引线集合的所有线段均判断完毕,得到轴符指引线集合;S214. Step S212 and Step S213 are sequentially performed on other line segments in the to-be-confirmed guide-line set that are not in the same layer as the first axis symbol guide-line or are not parallel to all line segments of the to-be-confirmed guideline set , until all line segments of the to-be-confirmed guideline set are judged, and the axis symbol guideline set is obtained;
S215、将与所述轴符指引线集合中任一轴符指引线共线的线段标记为轴线。S215. Mark a line segment that is collinear with any axis symbol leading line in the axis symbol leading line set as an axis line.
其中,轴符指引线是轴符用来表示轴线而所延伸的线,在正常情况下,轴符与轴符指引线直接连接,但也存在两者之间不直接连接的情况。Among them, the axis symbol guide line is the line extended by the axis symbol to represent the axis. Under normal circumstances, the axis symbol and the axis symbol leading line are directly connected, but there are also cases where the two are not directly connected.
从上述描述可知,轴符需要扩大一定的范围来筛选出轴符指引线,以避免遗漏;对其中的一条相交线段进行判断,判断条件为图层加结构,可以保证其属于轴符指引线;通过对其中一条相交线段进行判断,再通过同一图层和平行关系直接确定其他线段,从而能够提高识别效率;而和被标记为轴符指引线不处于同一图层或与所有线段均不平行的其他相交线段则进行判断,从而避免遗漏。It can be seen from the above description that the axis symbol needs to expand a certain range to filter out the axis symbol guide line to avoid omission; to judge one of the intersecting line segments, the judgment condition is layer plus structure, which can ensure that it belongs to the axis symbol guide line; By judging one of the intersecting line segments, and then directly determining the other line segments through the same layer and parallel relationship, the recognition efficiency can be improved; Other intersecting line segments are judged to avoid omission.
进一步地,所述步骤S22具体为:Further, the step S22 is specifically:
S221、每一个轴符均以自身为圆心,以(0,1000毫米]中的任一数值为半径,得到标注线筛选范围,将与所述标注线筛选范围相交且在线段方向的垂直两侧上具有阿拉伯字符的所有线段标记为标注线,得到标注线集合,并记录标注线与轴符的对应关系;S221. Each axis symbol takes itself as the center of the circle, and takes any value in (0,1000 mm] as the radius to obtain the label line screening range, which will intersect with the label line screening range and on both vertical sides of the line segment direction. All line segments with Arabic characters on it are marked as callout lines, a set of callout lines is obtained, and the correspondence between callout lines and axis symbols is recorded;
S222、从每一个轴符所对应的标注线中找出长度最长的第一标注线,从所有的第一标注线中找出长度最长的第二标注线,将所述第一标注线相同的轴符进行串联连接,得到同排轴符线;S222: Find the longest first marking line from the marking lines corresponding to each axis symbol, find the second marking line with the longest length from all the first marking lines, and assign the first marking line The same axis symbols are connected in series to obtain the same row of axis symbols;
S223、将第一标注线上与对应轴符垂直的点作为起始点,向着与对应轴符所在的同排轴符线的方向相垂直且远离对应轴符的方向延伸出辅助线段,所述辅助线段在遇到从其他第一标注线上延伸的其他辅助线段时终止,且所述辅助线段的长度小于等于第二标注线。S223, using a point on the first label line that is perpendicular to the corresponding axis symbol as a starting point, and extending an auxiliary line segment in a direction perpendicular to the direction of the axis symbol line in the same row where the corresponding axis symbol is located and away from the corresponding axis symbol. The line segment is terminated when it encounters other auxiliary line segments extending from other first callout lines, and the length of the auxiliary line segments is less than or equal to the second callout line.
其中,对应轴符是指从步骤S221就记录的标注线和轴符的对应关系,即对于每一个第一标注线来说,对应轴符可能是多个,多个对应轴符都需要延伸辅助线段。同时长度最长的第一标注线为同排轴符线上处于首尾两端的轴符进行连接,即同排轴符线上的所有轴符都需要沿着与第一标注线垂直且远离自己的方向延伸出辅助线段,此时,辅助线段就是从每一个轴符上延伸出的线段,即为轴线。The corresponding axis symbol refers to the corresponding relationship between the label line and axis symbol recorded from step S221, that is, for each first label line, there may be multiple corresponding axis symbols, and multiple corresponding axis symbols require extension assistance. line segment. At the same time, the longest first label line is connected to the axis symbols at the beginning and end of the axis symbol line in the same row, that is, all axis symbols on the axis symbol line in the same row need to be perpendicular to the first label line and away from themselves. The auxiliary line segment is extended in the direction. At this time, the auxiliary line segment is the line segment extending from each axis symbol, which is the axis.
从上述描述可知,通过标注线来确定轴线,通过长度最长的标注线来保证所有的轴符均可延伸出与自己相对应的轴线,从而在无轴线的图上也可以借由标注线来生成轴线,以形成轴网;限制辅助线段的长度,以避免辅助线段延伸至其他图中。It can be seen from the above description that the axis is determined by the label line, and the label line with the longest length is used to ensure that all the axis symbols can extend the axis corresponding to itself, so that on the graph without the axis, the label line can also be used. Generate grid lines to form grids; limit the length of guide segments to prevent them from extending into other figures.
进一步地,所述步骤S24具体为:Further, the step S24 is specifically:
每一个所述轴网的最大横坐标增加第一数值以得到上限横坐标,每一个所述轴网的最小横坐标减去第一数值以得到下限横坐标,每一个所述轴网的最大纵坐标增加第一数值以得到上限纵坐标;每一个所述轴网的最小纵坐标减去第一数值以得到下限纵坐标,每张图的坐标范围包括相对应轴网的上限横坐标、下限横坐标、上限纵坐标以及下限纵坐标。The maximum abscissa of each of the grids is increased by a first value to obtain the upper limit abscissa, the minimum abscissa of each of the grids is subtracted by the first value to obtain the lower limit abscissa, and the maximum vertical axis of each of the grids The coordinates are increased by the first value to obtain the upper limit ordinate; the minimum ordinate of each said grid is subtracted from the first value to obtain the lower limit ordinate, and the coordinate range of each picture includes the upper limit abscissa and the lower limit of the corresponding grid. Coordinate, upper limit ordinate, and lower limit ordinate.
从上述描述可知,通过轴网扩大一定范围来界定图的坐标范围,以保证分割出的每张图的完整性。It can be seen from the above description that the coordinate range of the graph is defined by expanding a certain range of the grid, so as to ensure the integrity of each divided graph.
进一步地,所述步骤S2之后还包括:Further, after the step S2, it also includes:
S3、在每张图的坐标范围内筛选出所有文字,判断所述文字的下方是否设置有一至两条线且是否包含预设类型名称,将设置有一至两条线且包含预设类型名称的文字标记为图名,并记录每张图的坐标范围与图名的对应关系。S3. Screen out all characters within the coordinate range of each picture, and determine whether there are one to two lines below the characters and whether they contain a preset type name, and set one to two lines and include a preset type name. The text is marked as the image name, and the correspondence between the coordinate range of each image and the image name is recorded.
其中,预设类型名称比如楼层信息以及建筑构件信息等等。Among them, the preset type names such as floor information and building component information and so on.
从上述描述可知,通过预设类型名称和一至两条线这两个特征来判断出,记录每张图的坐标范围与图名的对应关系,以便于后续的建模。It can be seen from the above description that the preset type name and one to two lines are used to determine the corresponding relationship between the coordinate range of each image and the image name, so as to facilitate subsequent modeling.
进一步地,所述步骤S3之后还包括:Further, after the step S3, it also includes:
S4、从所述图名中提取楼层信息,将每张图的坐标范围、图名、楼层信息以及包括轴符的构件类型导入到树控件和XML中进行存贮和显示。S4. Extract floor information from the map name, and import the coordinate range, map name, floor information and component types including axis symbols of each map into a tree control and XML for storage and display.
从上述描述可知,本发明的图纸分割是指软件上确定了每张图的坐标范围以及对应的信息,即将一整张二维图纸在软件上分割成独立的图,而这些图又通过图名、楼层信息以及轴符等信息进行相互对应,以便于后续的建模。As can be seen from the above description, the drawing division of the present invention means that the coordinate range and corresponding information of each drawing are determined on the software, that is, a whole two-dimensional drawing is divided into independent drawings on the software, and these drawings are separated by drawing names, floors Information, axis symbols and other information correspond to each other to facilitate subsequent modeling.
如图3所示,一种电子设备,包括存储器、处理器以及存储在所述存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述一种图纸分割方法的步骤。As shown in FIG. 3 , an electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the above-mentioned division of drawings when the computer program is executed. steps of the method.
从上述描述可知,本发明的有益效果在于:通过识别二维图纸中的轴符,根据轴符来确定每张图的坐标范围,从而实现了图纸的自动分割;由于轴符相对其他线条来说,特征明显,辨识度高,故而在图纸分割的过程中识别效率和准确度较高;同时,轴符处于每张图的边沿位置,借此来界定每张图的坐标范围,简单有效,使得分割效率较高以准确度较高;另外,轴符也可以用来判断轴线和标注线,通过轴线来判断建筑构件,以后续的翻模提供了便利。It can be seen from the above description that the beneficial effects of the present invention are: by identifying the axis symbols in the two-dimensional drawings, the coordinate range of each drawing is determined according to the axis symbols, thereby realizing the automatic division of the drawings; since the axis symbols are relatively different from other lines , the features are obvious and the recognition degree is high, so the recognition efficiency and accuracy are high in the process of dividing the drawing; at the same time, the axis symbol is located at the edge of each drawing, thereby defining the coordinate range of each drawing, which is simple and effective, making The segmentation efficiency is high and the accuracy is high; in addition, the axis symbol can also be used to judge the axis and the marking line, and the building components are judged by the axis, which provides convenience for subsequent mold turning.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述一种图纸分割方法的步骤。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of the above-mentioned method for dividing a drawing.
从上述描述可知,本发明的有益效果在于:通过识别二维图纸中的轴符,根据轴符来确定每张图的坐标范围,从而实现了图纸的自动分割;由于轴符相对其他线条来说,特征明显,辨识度高,故而在图纸分割的过程中识别效率和准确度较高;同时,轴符处于每张图的边沿位置,借此来界定每张图的坐标范围,简单有效,使得分割效率较高以准确度较高;另外,轴符也可以用来判断轴线和标注线,通过轴线来判断建筑构件,以后续的翻模提供了便利。It can be seen from the above description that the beneficial effects of the present invention are: by identifying the axis symbols in the two-dimensional drawings, the coordinate range of each drawing is determined according to the axis symbols, thereby realizing the automatic division of the drawings; since the axis symbols are relatively different from other lines , the features are obvious and the recognition degree is high, so the recognition efficiency and accuracy are high in the process of dividing the drawing; at the same time, the axis symbol is located at the edge of each drawing, thereby defining the coordinate range of each drawing, which is simple and effective, making The segmentation efficiency is high and the accuracy is high; in addition, the axis symbol can also be used to judge the axis and the marking line, and the building components are judged by the axis, which provides convenience for subsequent mold turning.
请参照图1以及图2,本发明的实施例一为:Please refer to FIG. 1 and FIG. 2, the first embodiment of the present invention is:
一种图纸分割方法,包括步骤:A method for dividing drawings, comprising the steps of:
S1、识别二维图纸中的轴符4;S1. Identify the axis symbol 4 in the two-dimensional drawing;
S2、根据轴符4确定每张图的坐标范围。S2. Determine the coordinate range of each image according to the axis symbol 4.
请参照图1以及图2,本发明的实施例二为:Please refer to FIG. 1 and FIG. 2 , the second embodiment of the present invention is:
一种图纸分割方法,在上述实施例一的基础上,步骤S1具体为:识别二维图纸中所有的圆形,判断圆形内是否存在英文字符或阿拉伯字符,若存在,则将包含英文字符或阿拉伯字符的圆形确定为轴符4。A drawing segmentation method, on the basis of the above-mentioned
如图2所示,圆形内分别包括1-1、1-15、1-A以及1-E,其中,1和15为阿拉伯字符,A和E为英文字符,则可以确定圆形加1-1、圆形加1-15、圆形加1-A以及圆形加1-E的图元为轴符4。As shown in Figure 2, the circle includes 1-1, 1-15, 1-A and 1-E respectively, where 1 and 15 are Arabic characters, A and E are English characters, then it can be determined that the circle plus 1 -1. The primitives of circle plus 1-15, circle plus 1-A, and circle plus 1-E are axis symbol 4.
请参照图1以及图2,本发明的实施例三为:Please refer to FIG. 1 and FIG. 2 , the third embodiment of the present invention is:
一种图纸分割方法,在上述实施例一的基础上,步骤S2具体为:A method for dividing drawings, on the basis of the above-mentioned first embodiment, step S2 is specifically:
S21、根据轴符4识别出所有的轴线5,若根据轴符4未识别出轴线5,则执行步骤S22;S21, identify all the axes 5 according to the axis symbol 4, if the axis 5 is not identified according to the axis symbol 4, then execute step S22;
S22、根据轴符4识别出所有的标注线6,根据标注线6生成轴线5;S22, identify all the
S23、将具有相交关系的轴线5组成一个轴网,确定每一个轴网的坐标范围,在本实施例中,如图2所示,若不在同一张图里,则轴线5不会相交,故而可以确定具有相交关系的轴线5一定在同一张图;S23. The axes 5 with the intersecting relationship are formed into a grid, and the coordinate range of each grid is determined. In this embodiment, as shown in FIG. 2, if not in the same graph, the axes 5 will not intersect, so It can be determined that the axes 5 with the intersecting relationship must be in the same drawing;
S24、将每一个轴网的坐标范围向外扩大第一数值,以得到每张图的坐标范围,第一数值为[500毫米,3000毫米]中的任一数值。S24. Expand the coordinate range of each grid to the outside by a first value to obtain the coordinate range of each image, where the first value is any value in [500 mm, 3000 mm].
应当说明的是,在实际的建筑图纸中,由于可以通过图层以及颜色等特征来进行区分不同线段,而在本实施例中,为了便于说明,才将图2中的轴符指引线7设置成虚线;另外,两条线段共线是指两条线段位于同一条直线上。It should be noted that, in actual architectural drawings, different line segments can be distinguished by features such as layers and colors, but in this embodiment, for the convenience of description, the axis mark guide line 7 in FIG. 2 is set. In addition, two line segments collinear means that the two line segments lie on the same straight line.
其中,步骤S21中根据轴符4识别出所有的轴线5具体为:Wherein, in step S21, all the axes 5 are identified according to the axis symbols 4 as follows:
S211、每一个轴符4均以自身为圆心,以(0,1000毫米]中的任一数值为半径,得到指引线筛选范围,将与指引线筛选范围相交的所有线段放入待确认指引线集合;S211. Each axis symbol 4 takes itself as the center of the circle, and takes any value in (0,1000 mm] as the radius to obtain the guide line screening range, and puts all the line segments that intersect with the guide line screening range into the guide line to be confirmed. gather;
S212、从待确认指引线集合中选出一条线段为第一线段,判断第一线段是否是唯一一条和对应的第一轴符相交的线段,若是,则第一线段为第一轴符指引线,否则继续从待确认指引线集合中选出一条线段进行判断,直到得到第一轴符指引线;S212. Select a line segment from the set of guiding lines to be confirmed as the first line segment, and determine whether the first line segment is the only line segment that intersects with the corresponding first axis symbol, and if so, the first line segment is the first axis mark the guide line, otherwise continue to select a line segment from the set of unconfirmed guide lines for judgment until the first axis mark guide line is obtained;
S213、从待确认指引线集合中,将与第一轴符指引线处于同一图层且至少与处于同一图层的任一线段平行的所有线段标记为轴符指引线7;S213, from the guide line set to be confirmed, mark all line segments that are on the same layer as the first axis symbol guide line and at least parallel to any line segment on the same layer as the axis symbol guide line 7;
S214、对待确认指引线集合中与第一轴符指引线不处于同一图层或与待确认指引线集合的所有线段均不平行的其他线段依次执行步骤S212及步骤S213,直到待确认指引线集合的所有线段均判断完毕,得到轴符指引线集合;S214. Steps S212 and S213 are executed sequentially for other line segments in the set of guide lines to be confirmed that are not in the same layer as the first axis symbol guide line or are not parallel to all line segments of the set of guide lines to be confirmed, until the set of guide lines to be confirmed All line segments of , have been judged, and the set of axis symbol guide lines is obtained;
S215、将与轴符指引线集合中任一轴符指引线7共线的线段标记为轴线5,如图2所示,在本实施例中,轴符指引线7用来连接轴线5和轴符4。S215, mark the line segment collinear with any axis symbol index line 7 in the axis symbol index line set as the axis line 5, as shown in FIG. 2, in this embodiment, the axis symbol index line 7 is used to connect the axis line 5 and the axis Symbol 4.
其中,步骤S22具体为:Wherein, step S22 is specifically:
S221、每一个轴符4均以自身为圆心,以(0,1000毫米]中的任一数值为半径,得到标注线筛选范围,将与标注线筛选范围相交且在线段方向的垂直两侧上具有阿拉伯字符的所有线段标记为标注线6,得到标注线集合,并记录标注线6与轴符4的对应关系;在本实施例中,如图2所示,距离为X1的标注线6分别与编号为1-1、编号为1-15的轴符4具有对应关系,距离为Y1的标注线6分别与编号为1-E、编号为1-A的轴符4具有对应关系;S221. Each axis symbol 4 takes itself as the center of the circle, and takes any value in (0,1000 mm] as the radius to obtain the label line screening range, which intersects with the label line screening range and is on the vertical sides of the line segment direction. All line segments with Arabic characters are marked as
S222、从每一个轴符4所对应的标注线6中找出长度最长的第一标注线,从所有的第一标注线中找出长度最长的第二标注线,将第一标注线相同的轴符4进行串联连接,得到同排轴符线;S222, find the longest first marking line from the marking
S223、将第一标注线上与对应轴符4垂直的点作为起始点,向着与对应轴符4所在的同排轴符线的方向相垂直且远离对应轴符4的方向延伸出辅助线段,辅助线段在遇到从其他第一标注线上延伸的其他辅助线段时终止,且辅助线段的长度小于等于第二标注线。S223, take the point perpendicular to the corresponding axis symbol 4 on the first marking line as the starting point, and extend an auxiliary line segment toward the direction of the axis symbol line in the same row where the corresponding axis symbol 4 is located and away from the direction of the corresponding axis symbol 4, The auxiliary line segment is terminated when it encounters other auxiliary line segments extending from other first dimension lines, and the length of the auxiliary line segment is less than or equal to the second dimension line.
其中,步骤S24具体为:Wherein, step S24 is specifically:
每一个轴网的最大横坐标增加第一数值以得到上限横坐标,每一个轴网的最小横坐标减去第一数值以得到下限横坐标,每一个轴网的最大纵坐标增加第一数值以得到上限纵坐标;每一个轴网的最小纵坐标减去第一数值以得到下限纵坐标,每张图的坐标范围包括相对应轴网的上限横坐标、下限横坐标、上限纵坐标以及下限纵坐标。The maximum abscissa of each grid is increased by the first value to obtain the upper abscissa, the minimum abscissa of each grid is subtracted by the first value to obtain the lower abscissa, and the maximum ordinate of each grid is increased by the first value to Obtain the upper limit ordinate; the minimum ordinate of each grid is subtracted from the first value to obtain the lower limit ordinate, and the coordinate range of each graph includes the upper limit abscissa, lower limit abscissa, upper limit ordinate and lower limit of the vertical axis of the corresponding grid coordinate.
请参照图1以及图2,本发明的实施例四为:Please refer to FIG. 1 and FIG. 2 , the fourth embodiment of the present invention is:
一种图纸分割方法,在上述实施例一的基础上,步骤S2之后还包括:A method for dividing drawings, on the basis of the above-mentioned
S3、在每张图的坐标范围内筛选出所有文字,判断文字的下方是否设置有一至两条线且是否包含预设类型名称,将设置有一至两条线且包含预设类型名称的文字标记为图名8,并记录每张图的坐标范围与图名8的对应关系;S3. Filter out all texts within the coordinate range of each image, determine whether there are one or two lines below the text and whether it contains a preset type name, and set a text mark with one or two lines containing the preset type name. is the
S4、从图名中提取楼层信息,将每张图的坐标范围、图名、楼层信息以及包括轴符的构件类型导入到树控件和XML中进行存贮和显示。S4. Extract the floor information from the map name, and import the coordinate range, map name, floor information and component types including axis symbols of each map into the tree control and XML for storage and display.
在本实施例中,如图2所示,第一张图的图名为五-十三层柱平法施工图,其中,五-十三层即为楼层信息,柱为预设类型名称,第一张图的图名表示为第五层至第十三层的柱体图。In this embodiment, as shown in FIG. 2 , the name of the first drawing is the construction drawing of the fifth-thirteenth floor column level method, wherein the fifth-thirteenth floor is the floor information, and the column is the preset type name. The title of the first graph is denoted as the histogram of the fifth to thirteenth floors.
请参照图3,本发明的实施例五为:Please refer to FIG. 3, the fifth embodiment of the present invention is:
一种电子设备1,包括存储器3、处理器2以及存储在存储器3上并可在处理器2上运行的计算机程序,处理器2执行计算机程序时实现实施例一至四中任一的一种图纸分割方法的步骤。An
本发明是实施例六为:The present invention is that the sixth embodiment is:
一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现实施例一至四中任一的一种图纸分割方法的步骤。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of the method for dividing a drawing in any one of
综上所述,本发明提供的一种图纸分割方法、电子设备以及存储介质,通过识别二维图纸中的轴符,通过轴符来确定轴线和标注线,在没有轴线的情况下通过标注线生成轴线,从而形成一个个独立的轴网,每一个独立的轴网便代表着每一个个独立的图,从而实现了图纸的自动分割。其中,对于轴符的识别、通过轴符来识别轴线和标注线,其特征明显、辨识度高、从而能有效的提高识别效率和准确度;同时,轴符处于每张图的边沿位置,轴线覆盖了每张图的中间位置,通过这轴网扩大范围来确定每张图的坐标范围,简单有效,使得分割效率较高以准确度较高;另外,轴线可以用来判断建筑构件,为后续的翻模提供了便利,即本发明提供一种效率更高、分割效果更加准确且便于后续翻模的技术方案。In summary, the present invention provides a method for dividing a drawing, an electronic device and a storage medium. By identifying the axis symbols in the two-dimensional drawings, the axis symbols and the labeling lines are determined by the axis symbols. Generating axes to form independent grids, each independent grid represents each independent drawing, thus realizing the automatic division of drawings. Among them, for the identification of the axis symbol, the axis and the label line are identified by the axis symbol, which has obvious characteristics and high recognition degree, which can effectively improve the recognition efficiency and accuracy; It covers the middle position of each picture, and the coordinate range of each picture is determined by expanding the range of this axis network, which is simple and effective, making the segmentation efficiency higher and the accuracy higher; It is convenient to turn over the mould, that is, the present invention provides a technical solution with higher efficiency, more accurate segmentation effect, and convenience for subsequent mould overturning.
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等同变换,或直接或间接运用在相关的技术领域,均同理包括在本发明的专利保护范围内。The above descriptions are only examples of the present invention, and are not intended to limit the scope of the present invention. Any equivalent transformations made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in related technical fields, are similarly included in the within the scope of patent protection of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010781312.6ACN112037224B (en) | 2018-12-27 | 2018-12-27 | Method for generating axis according to marking line, electronic equipment and storage medium |
| CN201811608028.8ACN109658415B (en) | 2018-12-27 | 2018-12-27 | Drawing segmentation method, electronic device and storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811608028.8ACN109658415B (en) | 2018-12-27 | 2018-12-27 | Drawing segmentation method, electronic device and storage medium |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010781312.6ADivisionCN112037224B (en) | 2018-12-27 | 2018-12-27 | Method for generating axis according to marking line, electronic equipment and storage medium |
| Publication Number | Publication Date |
|---|---|
| CN109658415A CN109658415A (en) | 2019-04-19 |
| CN109658415Btrue CN109658415B (en) | 2020-07-07 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811608028.8AActiveCN109658415B (en) | 2018-12-27 | 2018-12-27 | Drawing segmentation method, electronic device and storage medium |
| CN202010781312.6AActiveCN112037224B (en) | 2018-12-27 | 2018-12-27 | Method for generating axis according to marking line, electronic equipment and storage medium |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010781312.6AActiveCN112037224B (en) | 2018-12-27 | 2018-12-27 | Method for generating axis according to marking line, electronic equipment and storage medium |
| Country | Link |
|---|---|
| CN (2) | CN109658415B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US12430477B2 (en) | 2020-12-18 | 2025-09-30 | Autodesk, Inc. | Techniques for automatically designing structural systems for arbitrarily shaped buildings |
| US20220198082A1 (en)* | 2020-12-18 | 2022-06-23 | Autodesk, Inc. | Techniques for automatically generating frame grids for structural systems of buildings |
| CN114282288B (en)* | 2021-11-29 | 2024-10-18 | 深圳市万翼数字技术有限公司 | Shaft network identification method, device, equipment and storage medium |
| CN115329420B (en)* | 2022-07-18 | 2023-10-20 | 北京五八信息技术有限公司 | Marking generation method and device, terminal equipment and storage medium |
| CN116189194B (en)* | 2023-04-27 | 2023-07-14 | 北京中昌工程咨询有限公司 | Drawing enhancement segmentation method for engineering modeling |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103150751A (en)* | 2013-01-10 | 2013-06-12 | 江苏易图地理信息工程有限公司 | Three-dimensional modeling method for achieving building inside and outside integration in digital map |
| CN106372292A (en)* | 2016-08-29 | 2017-02-01 | 浙江大学城市学院 | Calculation method for building settlement caused by shield tunnel construction |
| CN107045526A (en)* | 2016-12-30 | 2017-08-15 | 许昌学院 | A kind of pattern recognition method of electronics architectural working drawing |
| CN108596066A (en)* | 2018-04-13 | 2018-09-28 | 武汉大学 | A kind of character identifying method based on convolutional neural networks |
| CN108648194A (en)* | 2018-04-23 | 2018-10-12 | 清华大学 | Based on the segmentation of CAD model Three-dimensional target recognition and pose measuring method and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4068596B2 (en)* | 2003-06-27 | 2008-03-26 | 株式会社東芝 | Graphic processing method, graphic processing apparatus, and computer-readable graphic processing program |
| JP4771807B2 (en)* | 2005-12-27 | 2011-09-14 | 富士通株式会社 | Computer-aided design apparatus, program and method thereof |
| CN100476350C (en)* | 2007-10-17 | 2009-04-08 | 南京大学 | Automatic positioning method of global coordinates in multi-associated engineering drawing environment |
| CN101673410B (en)* | 2008-09-12 | 2012-08-22 | 中国科学院计算技术研究所 | Vector building drawing based method for reconstructing three-dimensional model |
| CN101446999B (en)* | 2008-12-24 | 2010-09-29 | 南京大学 | Automatic Checking Method for Dimension Line Marking Mistakes in Engineering Drawings |
| CN103064993A (en)* | 2011-10-20 | 2013-04-24 | 鸿富锦精密工业(深圳)有限公司 | Processing system and method of size number information |
| CN102750553B (en)* | 2012-06-28 | 2015-06-17 | 北京中科广视科技有限公司 | Recognizing method of wall plane profile |
| CN104680578A (en)* | 2015-02-13 | 2015-06-03 | 上海同筑信息科技有限公司 | BIM-based axis labeling method and system |
| CN107145655B (en)* | 2017-04-25 | 2020-12-08 | 南京南瑞集团公司 | A Method for Establishing Symbolic Model of Power Network Equipment Vector Graphics Containing Topological Information |
| CN108197348B (en)* | 2017-12-11 | 2021-06-18 | 杭州品茗安控信息技术股份有限公司 | Method and device for correcting and processing surface member errors in constructional engineering |
| CN108268743B (en)* | 2018-02-09 | 2021-02-02 | 广州大学 | Well automatic identification method and system based on architectural drawings |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103150751A (en)* | 2013-01-10 | 2013-06-12 | 江苏易图地理信息工程有限公司 | Three-dimensional modeling method for achieving building inside and outside integration in digital map |
| CN106372292A (en)* | 2016-08-29 | 2017-02-01 | 浙江大学城市学院 | Calculation method for building settlement caused by shield tunnel construction |
| CN107045526A (en)* | 2016-12-30 | 2017-08-15 | 许昌学院 | A kind of pattern recognition method of electronics architectural working drawing |
| CN108596066A (en)* | 2018-04-13 | 2018-09-28 | 武汉大学 | A kind of character identifying method based on convolutional neural networks |
| CN108648194A (en)* | 2018-04-23 | 2018-10-12 | 清华大学 | Based on the segmentation of CAD model Three-dimensional target recognition and pose measuring method and device |
| Publication number | Publication date |
|---|---|
| CN112037224B (en) | 2024-03-22 |
| CN112037224A (en) | 2020-12-04 |
| CN109658415A (en) | 2019-04-19 |
| Publication | Publication Date | Title |
|---|---|---|
| CN109658415B (en) | Drawing segmentation method, electronic device and storage medium | |
| CN109670469B (en) | Axle network generation method, electronic device and storage medium | |
| CN109165401B (en) | Method and device for generating two-dimensional construction map based on civil structure three-dimensional model | |
| CN110334390B (en) | Method and device for identifying outer wall in computer-aided design (CAD), storage medium and processor | |
| CN107045526A (en) | A kind of pattern recognition method of electronics architectural working drawing | |
| JP3657771B2 (en) | 3D model creation device | |
| US9367737B2 (en) | Floor plan space detection | |
| CN115082622A (en) | Three-dimensional model generation method, device, equipment and storage medium | |
| CN114565703A (en) | Method, device and equipment for adjusting centralized labeling and readable storage medium | |
| CN110765739A (en) | Method for extracting table data and chapter structure from PDF document | |
| CN107909068A (en) | A kind of big data image curve reverse resolution method and system | |
| CN114386504A (en) | A method for character recognition of engineering drawings | |
| CN109754460B (en) | Automatic die overturning method, electronic equipment and storage medium | |
| CN114581639A (en) | A method for generating beam reinforcement information in BIM model based on beam leveling method construction drawings | |
| CN116468870B (en) | Three-dimensional visual modeling method and system for urban road | |
| CN106528736A (en) | Method and apparatus for displaying alignment line during dragging of page components | |
| CN118051571A (en) | Method and device for processing geographic information data of enclosing wall type | |
| CN117910072B (en) | Cesium-based pipe rack pipeline collision analysis method | |
| KR20110049412A (en) | Method and device for extracting shape information of hull block | |
| CN112200885B (en) | A method, system and computer-readable storage medium for identifying house wall lines | |
| CN115081076A (en) | A method, device, equipment and readable storage medium for calculating the amount of steel bars | |
| CN113657166A (en) | Intelligent auxiliary recognition method, system, terminal and storage medium for urban and rural settlement traditional texture | |
| CN110084893A (en) | A kind of method and apparatus of two three-dimensional hybrids editor | |
| CN113743063B (en) | Method, system and storage medium for generating physical property report of article | |
| CN119808694B (en) | Method and system for extracting bottom layer of block |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| PE01 | Entry into force of the registration of the contract for pledge of patent right | Denomination of invention:The invention relates to a drawing division method, an electronic device and a storage medium Effective date of registration:20210128 Granted publication date:20200707 Pledgee:China Merchants Bank Co.,Ltd. Fuzhou branch Pledgor:FUJIAN CHENXI INFORMATION TECHNOLOGY Co.,Ltd. Registration number:Y2021350000019 | |
| PE01 | Entry into force of the registration of the contract for pledge of patent right | ||
| CP01 | Change in the name or title of a patent holder | Address after:Floor 6, building 1, G area, Fuzhou Software Park, 89 software Avenue, Gulou District, Fuzhou City, Fujian Province 350000 Patentee after:Fujian Chenxi Information Technology Group Co.,Ltd. Address before:Floor 6, building 1, G area, Fuzhou Software Park, 89 software Avenue, Gulou District, Fuzhou City, Fujian Province 350000 Patentee before:FUJIAN CHENXI INFORMATION TECHNOLOGY Co.,Ltd. | |
| CP01 | Change in the name or title of a patent holder | ||
| PC01 | Cancellation of the registration of the contract for pledge of patent right | Date of cancellation:20220311 Granted publication date:20200707 Pledgee:China Merchants Bank Co.,Ltd. Fuzhou branch Pledgor:FUJIAN CHENXI INFORMATION TECHNOLOGY Co.,Ltd. Registration number:Y2021350000019 | |
| PC01 | Cancellation of the registration of the contract for pledge of patent right |