CN114969873A - Column generation method, device, equipment and medium based on drawing - Google Patents

Column generation method, device, equipment and medium based on drawing Download PDF

Info

Publication number
CN114969873A
CN114969873A CN202110196829.3A CN202110196829A CN114969873A CN 114969873 A CN114969873 A CN 114969873A CN 202110196829 A CN202110196829 A CN 202110196829A CN 114969873 A CN114969873 A CN 114969873A
Authority
CN
China
Prior art keywords
line
target
processing logic
initial
column
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110196829.3A
Other languages
Chinese (zh)
Inventor
尤勇敏
其他发明人请求不公开姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiuling Jiangsu Digital Intelligent Technology Co Ltd
Original Assignee
Jiuling Jiangsu Digital Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiuling Jiangsu Digital Intelligent Technology Co Ltd filed Critical Jiuling Jiangsu Digital Intelligent Technology Co Ltd
Priority to CN202110196829.3A priority Critical patent/CN114969873A/en
Publication of CN114969873A publication Critical patent/CN114969873A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/08Volume rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Graphics (AREA)
  • Structural Engineering (AREA)
  • Computational Mathematics (AREA)
  • Civil Engineering (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Architecture (AREA)
  • Software Systems (AREA)
  • Image Generation (AREA)

Abstract

The application relates to a method, a device, equipment and a medium for generating a column based on a drawing. The method comprises the following steps: reading a two-dimensional drawing to be processed; extracting line types in the two-dimensional drawing to be processed, and acquiring line processing logic corresponding to the line types; extracting and converting the corresponding lines according to the line processing logic to obtain initial lines; processing the initial line to obtain a target line of a corresponding column; and generating a column according to the target line. The method can improve the generation efficiency of the column.

Description

Method, device, equipment and medium for generating column based on drawing
Technical Field
The application relates to the technical field of building aided design, in particular to a method, a device, equipment and a medium for generating a column based on a drawing.
Background
Revit is the name of the Autodesk company under the heading of the next software suite. The revit series software is constructed for a Building Information Model (BIM) and can help an architectural designer to design, build and maintain a building with better quality and higher energy efficiency. CAD is a two-dimensional format commonly used in the industry, and almost all two-dimensional drawings are CAD drawings, including suppliers and design houses, etc.
In the traditional technology, three-dimensional modeling needs to be carried out on a CAD drawing through BIM, the model is drawn in the revit according to the information of each layer on the CAD drawing, the drawing is carried out according to the one-to-one contrast of curve segments or line segments in the layers, the work is repeated and tedious, certain errors exist in manual drawing, and the efficiency is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a drawing-based column generation method, apparatus, device, and medium that can improve efficiency.
A method of generating a drawing-based column, the method comprising:
reading a two-dimensional drawing to be processed;
extracting line types in the two-dimensional drawing to be processed, and acquiring line processing logic corresponding to the line types;
extracting and converting the corresponding lines according to the line processing logic to obtain initial lines;
processing the initial line to obtain a target line of a corresponding column;
and generating a column according to the target line.
In one embodiment, the line type includes at least one of a line segment, a circular arc, a circle, an ellipse, and a spline curve; the obtaining of the line processing logic corresponding to the line type includes:
and acquiring line processing logic corresponding to at least one of the line segment, the circular arc, the circle, the ellipse and the spline curve.
In one embodiment, the extracting and converting the corresponding line according to the line processing logic to obtain an initial line includes:
and reading the parameters of each line, and performing format conversion on the parameters of the lines according to the line processing logic to obtain the initial lines in the target format.
In one embodiment, the processing the initial line to obtain the target line of the corresponding pillar includes:
and calculating to obtain a minimum contour according to the initial line, and taking the line corresponding to the minimum contour as a target line of the corresponding column.
In one embodiment, the generating a bar according to the target line includes:
acquiring the floor height of a floor;
generating a pillar from the layer height and the minimum profile.
A drawing-based column generation apparatus, the apparatus comprising:
the reading module is used for reading the two-dimensional drawing to be processed;
the extraction module is used for extracting the line type in the two-dimensional drawing to be processed and acquiring the line processing logic corresponding to the line type;
the initial line acquisition module is used for extracting and converting the corresponding lines according to the line processing logic to obtain initial lines;
the target line acquisition module is used for processing the initial line to obtain a target line of a corresponding column;
and the column generation module is used for generating columns according to the target line.
In one embodiment, the line type includes at least one of a line segment, a circular arc, a circle, an ellipse, and a spline curve; the extraction module is used for acquiring line processing logic corresponding to at least one of the line segment, the circular arc, the circle, the ellipse and the spline curve.
In one embodiment, the initial line obtaining module is configured to read parameters of each line, and perform format conversion on the parameters of the line according to the line processing logic to obtain an initial line in a target format.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method in any of the above embodiments when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the above embodiments.
According to the method, the device, the equipment and the medium for generating the column based on the drawing, after the two-dimensional drawing to be processed is read, the line type is extracted, so that the corresponding line processing logic is determined, the corresponding line is extracted and converted through the line processing logic to obtain an initial line, and the initial line is processed to obtain a target line of the corresponding column; and the column is generated according to the target line, manual drawing is not needed again, and the efficiency is improved.
Drawings
FIG. 1 is a diagram of an application environment of a method for generating a drawing-based column according to an embodiment;
FIG. 2 is a schematic flow chart diagram of a method for generating a drawing-based column in one embodiment;
FIG. 3 is a schematic diagram of a manner in which a minimum profile is obtained in one embodiment;
FIG. 4 is a schematic flow chart diagram illustrating a method for generating a drawing-based column according to another embodiment;
FIG. 5 is a block diagram of an exemplary embodiment of a drawing-based bar generation apparatus;
FIG. 6 is a diagram of the internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The drawing-based column generation method can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. Wherein the terminal 102 communicates with the server 104 via a network. The server 104 may store a library file, the terminal 102 may introduce the library file into a project, transmit corresponding parameters of a functional interface, and call a packaged function to obtain a result quickly, for example, the terminal 102 may be installed with a library file corresponding to a line processing method in a two-dimensional drawing, so as to directly call the library file to generate a line, and further generate a column according to the generated line, specifically, the line processing method in the two-dimensional drawing may be to read a two-dimensional drawing to be processed; extracting line types in the two-dimensional drawing to be processed, and acquiring line processing logic corresponding to the line types; and extracting and converting the corresponding lines according to the line processing logic to obtain the initial lines. The terminal processes the initial lines to obtain target lines, then generates columns according to the target lines, extracts line types after reading the two-dimensional drawing to be processed, determines corresponding line processing logics, extracts and converts the corresponding lines through the line processing logics to obtain the initial lines, and processes the initial lines to obtain the target lines of the corresponding columns; and the column is generated according to the target line, manual drawing is not needed again, and the efficiency is improved.
The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by multiple servers.
In one embodiment, as shown in fig. 2, a drawing-based pillar generating method is provided, which is described by taking the method as an example applied to the terminal in fig. 1, and includes the following steps:
s202: and reading the two-dimensional drawing to be processed.
Specifically, the two-dimensional drawing to be processed is a drawing drawn by CAD in a two-dimensional format, which is only a virtual building model, where the CAD drawing includes parameters corresponding to the building model therein, such as line parameters of a line, where the line parameters include a line type, a length, a start position, an end position, and the like. The line parameters of different types of lines are different.
The two-dimensional drawing to be processed comprises a plurality of layers, such as a shear wall layer, a simulated curtain wall layer and the like, different functions are divided into different layers, and in the CAD drawn component, different components are drawn in different layers. Therefore, in this embodiment, different layers may be processed separately, or different layers may be directly obtained to a required layer for processing, for example, a pillar layer.
S204: and extracting the line type in the two-dimensional drawing to be processed, and acquiring the line processing logic corresponding to the line type.
S206: and extracting and converting the corresponding lines according to the line processing logic to obtain the initial lines.
Specifically, the line type includes, but is not limited to, at least one of a line, a circular arc, a circle, an ellipse, and a spline curve, and the terminal may directly read the line type in the line parameters.
Line processing logic refers to converting a line from a line in CAD to a line in a target format, e.g., to a line in a corresponding format in revit.
The terminal can query the corresponding line processing logic according to the line type, for example, matching is performed according to the name of the line type to obtain the corresponding line processing logic, wherein the terminal can maintain a configuration file, the name of the line type and the corresponding line processing logic are stored in the configuration file, so that the terminal can acquire the corresponding line processing logic by querying the configuration file, the line processing logic is stored through the configuration file, and modification of the line processing logic, for example, addition of the line type and the corresponding line processing logic, or adjustment of the corresponding line processing logic, can be facilitated.
Specifically, the terminal extracts lines from the two-dimensional drawing to be processed according to the line processing logic and converts the lines into lines in a target format, wherein the lines of different types can be processed in parallel, and therefore processing efficiency is improved.
Specifically, the conversion logic corresponding to each line type may be: for example, if the line type is a line, the terminal acquires the start position and the end position of the line, converts the start position and the end position into positions in the corresponding revit, and then connects the positions into a straight line. If the line type is an arc, the terminal can obtain the radius, the center, the starting angle, the end point angle and the plane where the arc is located in the parameters of the arc in the drawing to be processed through line processing logic, and accordingly the corresponding arc is drawn in the revit according to the radius, the center, the starting angle, the end point angle and the plane where the arc is located. If the line type is a circle, the terminal can obtain the radius, the center and the plane where the circle is located in the parameters of the circle in the drawing to be processed through the line processing logic, and accordingly the corresponding circle is drawn in the revit according to the radius, the center and the plane where the circle is located. If the line type is an ellipse, the terminal can obtain the major and minor axes, the center and the plane where the ellipse is located in the parameters of the ellipse in the drawing to be processed through line processing logic, and accordingly the corresponding ellipse is drawn in revit according to the major and minor axes, the center and the plane where the ellipse is located. If the line type is a Spline curve, the terminal can acquire parameters of the Spline curve in the drawing to be processed through the line processing logic, for example, the parameters of the Spline curve are acquired through API (application programming interface) getNurbsData, and are brought into NurbSpline.
It should be noted that the steps after reading the to-be-processed two-dimensional drawing may be integrated into a line conversion function, so that after reading the to-be-processed two-dimensional drawing each time, the terminal may call the line conversion function to obtain a corresponding line.
S208: and processing the initial line to obtain a target line of the corresponding column.
Specifically, after the terminal obtains the initial lines, that is, the initial lines in the format corresponding to revit, the terminal processes the initial lines, for example, the initial lines are used as a line set, and then the set is processed to obtain a minimum profile set, so that the lines corresponding to the minimum profile set are target lines.
S210: and generating a column according to the target line.
Specifically, after the target line is obtained, the column height and the column width can be obtained according to the target line, because the representation of the column on the CAD drawing is a rectangular area, the center point of the column is obtained by calculating the center points of all the points on the contour, and the corresponding column can be generated after the column height is obtained according to the layer height. And the conversion from a two-dimensional drawing to a three-dimensional column is realized.
According to the method for generating the column based on the drawing, after the two-dimensional drawing to be processed is read, the line type is extracted, so that the corresponding line processing logic is determined, the corresponding line is extracted and converted through the line processing logic to obtain an initial line, and the initial line is processed to obtain a target line of the corresponding column; and the column is generated according to the target line, manual drawing is not needed again, and the efficiency is improved.
In one embodiment, the line type includes at least one of a line, a circular arc, a circle, an ellipse, and a spline curve; acquiring line processing logic corresponding to the line type, wherein the line processing logic comprises the following steps: and acquiring line processing logic corresponding to at least one of a line, a circular arc, a circle, an ellipse and a spline curve.
Specifically, the conversion logic corresponding to each line type may be: for example, if the line type is a line, the terminal acquires the start position and the end position of the line, converts the start position and the end position into positions in the corresponding revit, and then connects the positions into a straight line. If the line type is an arc, the terminal can obtain the radius, the center, the starting angle, the end point angle and the plane where the arc is located in the parameters of the arc in the drawing to be processed through line processing logic, and accordingly the corresponding arc is drawn in the revit according to the radius, the center, the starting angle, the end point angle and the plane where the arc is located. If the line type is a circle, the terminal can obtain the radius, the center and the plane where the circle is located in the parameters of the circle in the drawing to be processed through the line processing logic, and accordingly the corresponding circle is drawn in the revit according to the radius, the center and the plane where the circle is located. If the line type is an ellipse, the terminal can acquire the major and minor axes, the center and the plane where the ellipse is located in the parameters of the ellipse in the drawing to be processed through line processing logic, and accordingly the corresponding ellipse is drawn in revit according to the major and minor axes, the center and the plane where the ellipse is located. If the line type is a Spline curve, the terminal can acquire parameters of the Spline curve in the drawing to be processed through the line processing logic, for example, the parameters of the Spline curve are acquired through API (application programming interface) getNurbsData, and are brought into NurbSpline.
In one embodiment, extracting and converting the corresponding line according to the line processing logic to obtain an initial line includes: and reading the parameters of each line, and performing format conversion on the parameters of the lines according to the line processing logic to obtain the initial lines in the target format.
Specifically, the terminal may read parameters of each line, and then perform format conversion on the parameters of the line according to the line processing logic, for example, perform format conversion on the key points, so as to determine the line in the target format, that is, convert the line into revit.
In one embodiment, processing the initial line to obtain a target line corresponding to the pillar includes: and calculating to obtain a minimum contour according to the initial line, and taking the line corresponding to the minimum contour as a target line of the corresponding column.
Specifically, in this embodiment, the minimum contour may be obtained as one function, so that the terminal may obtain the minimum contour corresponding to the initial line by calling the function, for example, the terminal calculates a maximum bounding corresponding to the target line, where the maximum bounding refers to a maximum area surrounded by all the target lines, that is, all the target lines are on or in the maximum area. The calculation of the maximum bounding can be found in detail below. And then grouping the target lines to obtain a first line group positioned on the maximum enclosure and a second line group positioned in the maximum enclosure.
Specifically, in order to facilitate processing, the target lines are grouped, and specifically, the target lines are divided into a first line group and a second line group according to a position relationship between the target lines and the maximum bounding box, where the first line group is located on the maximum bounding box, and the second line group is located in the maximum bounding box. Specifically, see fig. 3, where line 1, line 9, line 10, line 4, line 2, line 7, line 8, and line 3 are in a first line group and line 5, line 6, line 11, line 12, line 13, and line 14 are in a second line group. And acquiring a first line set of which the coordinates meet a preset rule from the first line group, and acquiring a starting line from the first line set. It should be noted that fig. 3 is only for explaining a generation manner of the minimum bounding, that is, the minimum contour, and does not represent an initial line of an actual pillar.
Specifically, the preset rule is to acquire a starting line, that is, a line to be judged from the first line set, where the preset rule is usually selected according to an extreme point of a coordinate in the line set, for example, according to a maximum value or a minimum value of a vertical coordinate or a sum coordinate. And inquiring a first associated line which is connected with the initial line and is positioned at the innermost side, connecting the current line with the selected first associated line to obtain the current line, inquiring a second associated line which is connected with the current line and is positioned at the innermost side, connecting the current line with the selected second associated line until a closure is formed, and modifying the line group of the closed lines.
Specifically, the terminal acquires a first associated line connected to the end of the start line, and then selects an innermost first associated line of the acquired first associated lines, for example, the innermost first associated line is determined according to an included angle between the first associated line and the start line.
The first correlation line refers to a line connected to the end of the starting line, and the line 9 in fig. 3 is the first correlation line of the line 1. Wherein the direction of the start line and the respective target line is directed in the direction of extension of the first coordinate and the second coordinate.
The innermost first correlation line refers to the innermost line of the first correlation lines, wherein the innermost first correlation line may be determined by calculating an included angle, that is, the included angle between the initial line and each first correlation line is calculated respectively, and the innermost first correlation line is selected according to the included angle, so that the grouping of the innermost first correlation lines is modified, such as line 9 in fig. 3, then line 1 and line 9 are connected, and the connected line is used as the current line, and then the second correlation line connected to the end of the current line is obtained continuously, and the innermost second correlation line, such as line 11, is selected. Optionally, if the number of the selected first associated lines and second associated lines is 1, the first associated lines and the second associated lines are directly used as the innermost first associated lines and second associated lines, and no further calculation of the included angle is needed, that is, it is first determined whether the number of the first associated lines and the second associated lines is a preset value, if so, the innermost lines of the first associated lines and the second associated lines are directly obtained, and if not, the included angle is continuously calculated to determine the innermost first associated lines and the innermost second associated lines. As in fig. 3, the resulting enclosure is line 1-line 9-line 11-line 6-line 5-line 3.
And after the enclosing is formed, the terminal modifies the line groups forming the enclosing lines, wherein for convenience, the modification principle is that the priority of the group is according to, the priority of the second line group is higher than that of the first line group, the priority of the first line group is higher than that of the irrelevant line group, the lines in the first line group can only be modified to the irrelevant line group when the group is modified, and the lines in the second line group can only be modified to the first line group when the group is modified. And continuously acquiring a next starting line from the first line set until no line exists in the first line set and no target line exists in the first line group and the second line group, and acquiring the formed enclosure as a target area.
Specifically, after one enclosing is obtained in the above steps, the terminal continues to determine whether a line exists in the first line set, if so, continues to obtain the current line according to the preset rule, and obtains a new enclosing corresponding to the current line, until no line exists in the first line set, continues to determine whether a target line exists in the first line group and the second line group, for example, in fig. 3, if a target line still exists in the first line group, continues to obtain a new current line, for example, line 5, and then obtains enclosing to be line 5-line 12-line 14-line 8. And judging whether a target line exists in the first line group or not until no line exists in the first line set and no target line exists in the first line group and the second line group, and acquiring the formed enclosure as a target area. As shown in fig. 3, the enclosing line 6, the line 11, the line 10, the line 13, the line 12, the enclosing line 14, the line 13, the line 4, the line 2, and the line 7 can also be acquired.
In one embodiment, calculating the maximum bounding box corresponding to the target line calculation comprises: obtaining a second line set according to the target line; acquiring an end point of the target line from the second line set, determining an initial line from the target line according to the end point, and deleting the initial line from the second line set; determining a second associated line connected with the tail end of the initial line; selecting the second associated line on the outermost side, deleting the selected second associated line from the second line set, and connecting the initial line and the selected second associated line until a closure is formed; acquiring the formed enclosure, and judging whether a target line exists outside the formed enclosure; and if the target line exists outside the formed enclosure, continuously acquiring the end point of the target line from the second line set until the formed enclosure does not have the target line, and acquiring the formed maximum enclosure as a target area.
Specifically, the end points of the target line refer to two end points of one line. The starting line is a starting point determined according to a preset rule, and may be a line corresponding to an extreme point, for example. The second associated line is a line connected with the tail end of the starting line, the outermost second associated line is a line located on the outermost side of each second associated line, the outermost second associated line can be determined by calculating an included angle, namely the included angle between the starting line and each second associated line is calculated respectively, the outermost second associated line is selected according to the included angle, and the outermost second associated line is deleted from the second line set. Specifically, after the maximum enclosure is formed, if multiple extreme points exist, the enclosures corresponding to the multiple extreme points need to be sequentially obtained, and the maximum enclosure is selected from the enclosures, for example, the formed enclosure is obtained, and whether a target line exists outside the formed enclosure is judged; and if the target line exists outside the formed enclosure, continuously acquiring the end point of the target line from the second line set until the formed enclosure does not have the target line, and acquiring the formed maximum enclosure as a target area.
That is, if a plurality of maximum outer contours are taken, that is, after an outer contour is found, the remaining lines are judged, the second lines outside the known outer contour are collected, the maximum outer contour is taken again, and the steps are repeated, so that a plurality of maximum enclosing can be obtained.
In one embodiment, generating a bar from the target line includes: acquiring the floor height of a floor; the pillars are generated according to the layer height and the minimum profile.
Specifically, after the target line is obtained, the length and width of the column can be obtained according to the target line, because the representation of the column on the CAD drawing is a rectangular area, the center point of the column is obtained by calculating the center points of all points on the contour, and the height of the column is obtained according to the layer height, so that the corresponding column can be generated. And the conversion from a two-dimensional drawing to a three-dimensional column is realized.
Specifically, referring to fig. 4, fig. 4 is a schematic diagram of the production of a drawing-based bar in another embodiment,
firstly, a two-dimensional drawing to be processed, namely a corresponding CAD drawing, is read, and then, a terminal reads a line type in line parameters.
Secondly, the terminal may query the corresponding line processing logic according to the line type, for example, perform matching according to the name of the line type to obtain the corresponding line processing logic.
And finally, the terminal extracts the lines in the two-dimensional drawing according to the line processing logic and converts the lines into initial lines in a target format. For example, if the line type is a line segment, the terminal acquires the start position and the end position of the line segment, converts the start position and the end position into positions in the corresponding revit, and then connects the positions into a straight line. If the line type is an arc, the terminal can obtain the radius, the center, the starting angle, the end point angle and the plane where the arc is located in the parameters of the arc in the drawing to be processed through line processing logic, and accordingly the corresponding arc is drawn in the revit according to the radius, the center, the starting angle, the end point angle and the plane where the arc is located. If the line type is a circle, the terminal can obtain the radius, the center and the plane where the circle is located in the parameters of the circle in the drawing to be processed through the line processing logic, and accordingly the corresponding circle is drawn in the revit according to the radius, the center and the plane where the circle is located. If the line type is an ellipse, the terminal can acquire the major and minor axes, the center and the plane where the ellipse is located in the parameters of the ellipse in the drawing to be processed through line processing logic, and accordingly the corresponding ellipse is drawn in revit according to the major and minor axes, the center and the plane where the ellipse is located. If the line type is a Spline curve, the terminal can acquire parameters of the Spline curve in the drawing to be processed through the line processing logic, for example, the parameters of the Spline curve are acquired through API (application programming interface) getNurbsData, and are brought into NurbSpline.
After the initial lines of the target format are obtained, the initial lines are processed to obtain a target line which can be enclosed into a minimum outline, then after the target line is obtained, the column height and the column width can be obtained according to the target line, because the expression of the column on a CAD drawing is a rectangular area, the central point of the column is obtained by calculating the central points of all points on the outline, and then the corresponding column can be generated after the column height is obtained according to the layer height. And the conversion from the two-dimensional drawing to the three-dimensional column is realized.
According to the method for generating the column based on the drawing, after the two-dimensional drawing to be processed is read, the line type is extracted, so that the corresponding line processing logic is determined, the corresponding line is extracted and converted through the line processing logic to obtain an initial line, and the initial line is processed to obtain a target line of the corresponding column; and the column is generated according to the target line, manual drawing is not needed again, and the efficiency is improved.
It should be understood that although the steps in the flowcharts of fig. 2 and 4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2 and 4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 5, there is provided a drawing-based column generating apparatus including: a reading module 100, an extraction module 200, an initial line acquisition module 300, a target line acquisition module 400, and a pillar generation module 500, wherein:
the reading module 100 is used for reading a two-dimensional drawing to be processed;
the extraction module 200 is configured to extract a line type in the two-dimensional drawing to be processed, and obtain a line processing logic corresponding to the line type.
The initial line obtaining module 300 is configured to extract and convert a corresponding line according to the line processing logic to obtain an initial line.
And a target line obtaining module 400, configured to process the initial line to obtain a target line of the corresponding pillar.
And a column generating module 500, configured to generate a column according to the target line.
In one embodiment, the line type includes at least one of a line, a circular arc, a circle, an ellipse, and a spline curve; the extraction module 200 is configured to obtain a line processing logic corresponding to at least one of a line, a circular arc, a circle, an ellipse, and a spline curve.
In one embodiment, the initial line obtaining module 300 is configured to read parameters of each line, and perform format conversion on the parameters of the line according to line processing logic to obtain an initial line in a target format.
In one embodiment, the target line obtaining module 400 is configured to calculate a minimum profile according to the initial line, and use a line corresponding to the minimum profile as a target line of a corresponding column.
In one embodiment, the column generation module 500 comprises:
the floor height acquisition unit is used for acquiring the floor height of a floor;
and the column generation unit is used for generating columns according to the layer height and the minimum profile.
For specific definition of the drawing-based column generation device, reference may be made to the above definition of the drawing-based column generation method, which is not described herein again. The various modules in the above-described drawing-based column generation apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device comprises a processor, a memory, a communication interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a method of drawing-based column generation. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: reading a two-dimensional drawing to be processed; extracting line types in the two-dimensional drawing to be processed, and acquiring line processing logic corresponding to the line types; extracting and converting the corresponding lines according to the line processing logic to obtain initial lines; processing the initial line to obtain a target line of a corresponding column; and generating a column according to the target line.
In one embodiment, the type of line involved in the execution of the computer program by the processor comprises at least one of a line, a circular arc, a circle, an ellipse, and a spline curve; the line processing logic for acquiring the line type corresponding to the line type, which is realized when the processor executes the computer program, comprises the following steps: and acquiring line processing logic corresponding to at least one of a line, a circular arc, a circle, an ellipse and a spline curve.
In one embodiment, the extracting and converting the corresponding line into the initial line according to the line processing logic when the processor executes the computer program includes: and reading the parameters of each line, and performing format conversion on the parameters of the lines according to the line processing logic to obtain the initial lines in the target format.
In one embodiment, the processing of the initial line to obtain the target line of the corresponding pillar, which is implemented when the processor executes the computer program, includes: and calculating to obtain a minimum contour according to the initial line, and taking the line corresponding to the minimum contour as a target line of the corresponding column.
In one embodiment, the generating of the bins from the target line, as implemented by the processor when executing the computer program, comprises: acquiring the floor height of a floor; the pillars are generated according to the layer height and the minimum profile.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: reading a two-dimensional drawing to be processed; extracting line types in the two-dimensional drawing to be processed, and acquiring line processing logic corresponding to the line types; extracting and converting the corresponding lines according to the line processing logic to obtain initial lines; processing the initial line to obtain a target line of a corresponding column; and generating a column according to the target line.
In one embodiment, the line types involved in the execution of the computer program by the processor include at least one of a line, a circular arc, a circle, an ellipse, and a spline curve; the line processing logic for acquiring the line type corresponding to the line type, which is realized when the processor executes the computer program, comprises the following steps: and acquiring line processing logic corresponding to at least one of a line, a circular arc, a circle, an ellipse and a spline curve.
In one embodiment, the extraction and conversion of the corresponding line into the initial line according to the line processing logic implemented when the computer program is executed by the processor includes: and reading the parameters of each line, and performing format conversion on the parameters of the lines according to the line processing logic to obtain the initial lines in the target format.
In one embodiment, the processing of the initial line to obtain the target line of the corresponding bin, implemented when the computer program is executed by the processor, includes: and calculating to obtain a minimum contour according to the initial line, and taking the line corresponding to the minimum contour as a target line of the corresponding column.
In one embodiment, the generating of the bins from the target line, implemented when the computer program is executed by the processor, comprises: acquiring the floor height of a floor; the pillars are generated according to the layer height and the minimum profile.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), for example.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of generating a drawing-based column, the method comprising:
reading a two-dimensional drawing to be processed;
extracting line types in the two-dimensional drawing to be processed, and acquiring line processing logic corresponding to the line types;
extracting and converting the corresponding lines according to the line processing logic to obtain initial lines;
processing the initial line to obtain a target line of a corresponding column;
and generating a column according to the target line.
2. The drawing-based pillar generation method of claim 1, wherein the line type includes at least one of a line segment, a circular arc, a circle, an ellipse, and a spline curve; the obtaining of the line processing logic corresponding to the line type includes:
and acquiring line processing logic corresponding to at least one of the line segment, the circular arc, the circle, the ellipse and the spline curve.
3. The method of claim 2, wherein the extracting and converting the corresponding line according to the line processing logic to obtain an initial line comprises:
and reading the parameters of each line, and performing format conversion on the parameters of the lines according to the line processing logic to obtain the initial lines in the target format.
4. The method of claim 1, wherein the processing the initial line to obtain a target line corresponding to a pillar comprises:
and calculating to obtain a minimum contour according to the initial line, and taking the line corresponding to the minimum contour as a target line of the corresponding column.
5. The method of claim 4, wherein the generating a bin from the target line comprises:
acquiring the floor height of a floor;
generating a pillar from the layer height and the minimum profile.
6. A drawing-based post generation apparatus, the apparatus comprising:
the reading module is used for reading the two-dimensional drawing to be processed;
the extraction module is used for extracting the line type in the two-dimensional drawing to be processed and acquiring the line processing logic corresponding to the line type;
the initial line acquisition module is used for extracting and converting the corresponding lines according to the line processing logic to obtain initial lines;
the target line acquisition module is used for processing the initial line to obtain a target line of a corresponding column;
and the column generation module is used for generating columns according to the target line.
7. The apparatus of claim 6, wherein the line type comprises at least one of a line segment, a circular arc, a circle, an ellipse, and a spline curve; the extraction module is used for acquiring line processing logic corresponding to at least one of the line segment, the circular arc, the circle, the ellipse and the spline curve.
8. The apparatus according to claim 7, wherein the initial line obtaining module is configured to read parameters of each line, and perform format conversion on the parameters of the line according to the line processing logic to obtain an initial line in a target format.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN202110196829.3A 2021-02-22 2021-02-22 Column generation method, device, equipment and medium based on drawing Pending CN114969873A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110196829.3A CN114969873A (en) 2021-02-22 2021-02-22 Column generation method, device, equipment and medium based on drawing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110196829.3A CN114969873A (en) 2021-02-22 2021-02-22 Column generation method, device, equipment and medium based on drawing

Publications (1)

Publication Number Publication Date
CN114969873A true CN114969873A (en) 2022-08-30

Family

ID=82954432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110196829.3A Pending CN114969873A (en) 2021-02-22 2021-02-22 Column generation method, device, equipment and medium based on drawing

Country Status (1)

Country Link
CN (1) CN114969873A (en)

Similar Documents

Publication Publication Date Title
CN110516370B (en) Prefabricated part deepening drawing generation method and device, computer equipment and medium
CN115293751B (en) Method, system and equipment for processing BIM model data of rail transit
CN113094770B (en) Drawing generation method and device, computer equipment and storage medium
CN113010937B (en) Parametric modeling method of member section steel bar and related device
CN110363854B (en) Curved surface template segmentation method and device, computer equipment and storage medium
JP5644606B2 (en) Mesh number prediction method, analysis apparatus, and program
CN112241565A (en) Modeling method and related device
CN110765507A (en) Three-dimensional CAD (computer-aided design) modeling method, device and system based on cloud service technology
CN112287432A (en) Target area acquisition method and device, computer equipment and storage medium
US10943037B2 (en) Generating a CAD model from a finite element mesh
CN114241524A (en) Human body posture estimation method and device, electronic equipment and readable storage medium
CN112287429B (en) Building target area determination method and device, computer equipment and storage medium
CN113378435A (en) Particle generation method, device, equipment and storage medium
CN114969873A (en) Column generation method, device, equipment and medium based on drawing
CN112287427B (en) Building wall position determining method and device, computer equipment and storage medium
US11960868B2 (en) Branch objects for dependent optimization problems
CN112529984B (en) Method, device, electronic equipment and storage medium for drawing polygon
CN115249303A (en) Layout drawing method, device, equipment and storage medium based on drawing segmentation
CN114820968A (en) Three-dimensional visualization method and device, robot, electronic device and storage medium
CN114329868A (en) Substation equipment safety distance checking method and device and computer equipment
CN114969871A (en) Wall generation method, device and equipment based on drawing and storage medium
CN110717291A (en) Welding structure deformation simulation method, device, equipment and storage medium
CN114969872A (en) Drawing data processing method, device, equipment and medium
KR102156336B1 (en) Method for reconstructing three-dimensional shape
CN112287428B (en) Building wall generation method and device, computer equipment and storage medium

Legal Events

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