CN112287432A - Target area acquisition method and device, computer equipment and storage medium - Google Patents

Target area acquisition method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112287432A
CN112287432A CN202011066112.9A CN202011066112A CN112287432A CN 112287432 A CN112287432 A CN 112287432A CN 202011066112 A CN202011066112 A CN 202011066112A CN 112287432 A CN112287432 A CN 112287432A
Authority
CN
China
Prior art keywords
line segment
target
enclosure
acquiring
segments
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.)
Withdrawn
Application number
CN202011066112.9A
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 CN202011066112.9A priority Critical patent/CN112287432A/en
Publication of CN112287432A publication Critical patent/CN112287432A/en
Withdrawn 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
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves

Landscapes

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

Abstract

The application relates to a target area acquisition method, a target area acquisition device, computer equipment and a storage medium. The method comprises the following steps: receiving an input building model, extracting a target line segment in the building model, and obtaining a line segment set according to the target line segment; acquiring end points of the target line segments from the line segment set, and determining starting line segments from the target line segments according to the end points; determining an associated line segment connected to an end of the starting line segment; selecting the associated line segment on the outermost side, and connecting the initial line segment with the selected associated line segment until a surrounding is formed; and acquiring the formed enclosure as a target area. By adopting the method, omission can be avoided, and the accuracy is improved.

Description

Target area acquisition method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of building aided design technologies, and in particular, to a target area acquisition method, apparatus, computer device, and storage medium.
Background
With the development of computer technology, computer aided design building models and the like, such as building models of buildings and the like, appear in the building field.
In the conventional technology, when a shear wall, a cross beam and the like are obtained, a floor slab needs to be split according to the shear wall and the cross beam, so that the building area and the like are calculated according to the shear wall and the connecting beam after the floor slab is split.
However, at present, shear walls and measures are generally grouped in a manual mode, and the building area of each group is calculated, and the calculation mode is easy to have omission and inaccurate in calculation result when the groups are grouped.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a target area acquisition method, an apparatus, a computer device, and a storage medium, which can avoid omission and ensure accuracy.
A target area acquisition method, the method comprising:
receiving an input building model, extracting a target line segment in the building model, and obtaining a line segment set according to the target line segment;
acquiring end points of the target line segments from the line segment set, and determining starting line segments from the target line segments according to the end points;
determining an associated line segment connected to an end of the starting line segment;
selecting the associated line segment on the outermost side, and connecting the initial line segment with the selected associated line segment until a surrounding is formed;
and acquiring the formed enclosure as a target area.
In one embodiment, the obtaining end points of the target line segments from the line segment set and determining starting line segments from the target line segments according to the end points includes:
acquiring a first endpoint of each target line segment in the line segment set, and selecting the minimum value of a first coordinate of the first endpoint;
selecting a target line segment which is the same as the minimum value of the first coordinate;
acquiring a second endpoint of the selected target line segment, and selecting the minimum value of a second coordinate of the second endpoint;
and acquiring a target line segment which is the same as the minimum value of the second coordinate from the selected target line segments as a starting line segment.
In one embodiment, the selecting the outermost associated line segment includes:
calculating the included angle between the initial line segment and the associated line segment;
and selecting the associated line segment with the largest included angle with the initial line segment as the associated line segment on the outermost side.
In one embodiment, the connecting the starting line segment and the selected associated line segment until a bounding box is formed includes:
connecting the tail end of the initial line segment with the initial end of the associated line segment, and judging whether an enclosure is formed;
and if no enclosure is formed, taking the connected initial line segment and the connected associated line segment as initial line segments, and continuously determining the associated line segment connected with the tail end of the initial line segment until the connected initial line segment and the connected associated line segment form an enclosure.
In one embodiment, the acquiring the formed enclosure as the target area includes:
acquiring the formed enclosure, and judging whether a target line segment exists outside the formed enclosure;
and if the target line segment exists outside the formed enclosure, continuously acquiring the end point of the target line segment from the line segment set until the formed enclosure does not have the target line segment, and acquiring the formed maximum enclosure as a target area.
In one embodiment, after extracting a target line segment in a building model and obtaining a line segment set according to the target line segment, the method further includes:
and preprocessing a target line segment in the line segment set, wherein the preprocessing comprises at least one of merging collinear line segments, breaking intersected line segments and removing head-to-tail individual line segments.
In one embodiment, after the obtaining the formed enclosure as the target area, the method includes:
and calculating the corresponding shear wall area and/or floor building area according to the target area.
A target area acquisition method, the method comprising:
obtaining a building model to be processed;
and calling a preset functional interface to enable the functional interface to process the building model to be processed according to the method of any one of the embodiments to generate a target area.
A target area acquisition apparatus, the apparatus comprising:
the receiving module is used for receiving an input building model, extracting a target line segment in the building model and obtaining a line segment set according to the target line segment;
the starting line segment determining module is used for acquiring the end points of the target line segments from the line segment set and determining starting line segments from the target line segments according to the end points;
an associated line segment determining module for determining an associated line segment connected to the end of the starting line segment;
the circulation module is used for selecting the associated line segment on the outermost side, and connecting the initial line segment with the selected associated line segment until a closure is formed;
and the target area acquisition module is used for acquiring the formed enclosure as a target area.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method described above 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 above-mentioned method.
According to the target area obtaining method, the target area obtaining device, the computer equipment and the storage medium, the target line segments in the building model are extracted, the initial line segments are determined, the associated line segments on the outermost side are selected from the associated line segments connected with the initial line segments, circulation is performed in sequence until the enclosure is formed, and then the target area can be obtained, so that the building area can be calculated, the user does not need to manually process, omission is avoided, and accuracy is guaranteed.
Drawings
FIG. 1 is a diagram of an application environment of a target area acquisition method in one embodiment;
FIG. 2 is a schematic flow chart diagram illustrating a method for obtaining a target area in one embodiment;
FIG. 3 is a diagram of a set of line segments in one embodiment;
FIG. 4 is a diagram illustrating the merging of collinear segments in one embodiment;
FIG. 5 is a diagram of a line segment interrupting an intersection in one embodiment;
FIG. 6 is a diagram illustrating removal of individual line segments from beginning to end in one embodiment;
FIG. 7 is a block diagram of a target area acquisition device in one embodiment;
FIG. 8 is a diagram illustrating an internal structure of a computer device according to an 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 target area obtaining method provided by the application can be applied to the application environment shown in fig. 1. 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, introduce corresponding parameters of a functional interface, and call the encapsulated function to obtain a result quickly, for example, the terminal 102 receives an input building model, extracts a target line segment in the building model, obtains a line segment set according to the target line segment, then calls a corresponding library file to obtain an end point of the target line segment from the line segment set, determines a starting line segment from the target line segment according to the end point, and determines an associated line segment connected to the end point of the starting line segment; then selecting the associated line segment on the outermost side, and connecting the initial line segment with the selected associated line segment until a surrounding is formed; the enclosure thus formed is acquired as a target area. The user does not need to manually process, so that omission is avoided, and the accuracy is ensured. 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 a plurality of servers.
In an embodiment, as shown in fig. 2, a method for acquiring a target area 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:receive the input building model, anAnd extracting a target line segment in the building model, and obtaining a line segment set according to the target line segment.
Specifically, a building model refers to a model having walls and beams, wherein the walls and beams may be represented by target line segments, and the set of all target line segments in the building model is referred to as a line segment set.
In development and design, problems are often encountered, for example, floor slabs are split according to wall beams, and the like, and the floor slabs need to be split according to input target line segments, so that the shear wall area-floor building area is calculated according to each enclosure after splitting.
Optionally, in order to ensure accuracy, the terminal may create a coordinate system before processing, and convert all lines into the same coordinate system. And judging whether all the lines are in the same plane, and if not, prompting the user that all the lines are not in the same plane. Only if all lines are in the same plane, the following process continues.
S204: and acquiring the end points of the target line segment from the line segment set, and determining a starting line segment from the target line segment according to the end points.
Specifically, the end points of the target line segment refer to two end points of one line segment. The starting line segment refers to a starting point determined according to a preset rule, and may be a line segment corresponding to an extremum point, for example. Such as a target line segment whose end point is the minimum value of the second coordinate, selected from the target line segments involved in the minimum value of the first coordinate. Referring to FIG. 3, in an XY coordinate system, where segments 1 and 4 are starting segments, there is a ordinate minimum and the endpoints also have abscissa minima. Specifically, the method for obtaining the initial line segment includes calculating an included angle, obtaining any one of the line segments with the largest included angle, such as line segment 1 and line segment 4 in fig. 3, if there are multiple initial line segments, calculating the included angle between each initial line segment, and then obtaining any one of the two line segments with the largest included angle.
At this time, preferably, since the starting line segment is acquired, the starting line segment is deleted from the line segment set.
S206: an associated line segment connected to the end of the starting line segment is determined.
Specifically, the associated line segment refers to a line segment connected to the end of the starting line segment, and line segments 2 and 18 in fig. 3 are associated line segments of line segment 1. Wherein the direction of the start line segment and the respective target line segment is directed in the extension direction of the first coordinate and the second coordinate.
S208: and selecting the associated line segment on the outermost side, and connecting the initial line segment with the selected associated line segment until a closure is formed.
Specifically, the outermost associated line segment refers to the outermost associated line segment in each associated line segment, where the outermost associated line segment may be determined by calculating an included angle, that is, calculating an included angle between the initial line segment and each associated line segment, and selecting the outermost associated line segment according to the included angle, preferably, deleting the outermost associated line segment from the line segment set, such as line segment 2 in fig. 3, then connecting line segment 1 and line segment 2, and taking the connected line segment as the initial line segment, then continuously obtaining the associated line segment connected to the end of the initial line segment, and selecting the outermost associated line segment, such as line segment 7. Optionally, if the number of the selected associated line segments is 1, the selected associated line segments are directly used as the associated line segments on the outermost side, and the included angle does not need to be calculated, that is, whether the number of the associated line segments is a preset value or not is judged, if yes, the line segment with the associated line segment being the outermost side is directly obtained, and if not, the included angle is continuously calculated to determine the associated line segment on the outermost side. As shown in fig. 3, the formed enclosure is line 1-line 2-line 7-line 8-line 5-line 6-line 3-line 4.
S210: and acquiring the formed enclosure as a target area.
Specifically, after the enclosure is formed, the terminal acquires the formed enclosure as a target area. In other embodiments, since the number of the related starting line segments may be greater than or equal to 2, after the enclosure is formed, it is further necessary to determine whether other starting line segments are not deleted, if so, continue to calculate the enclosure area according to the remaining starting line segments until the enclosure is formed, and then compare the formed enclosure to obtain the maximum enclosure area as the target area.
According to the target area obtaining method, the target line segments in the building model are extracted, then the initial line segments are determined, the associated line segments on the outermost side are selected from the associated line segments connected with the initial line segments, circulation is performed in sequence until the enclosure is formed, the target area can be obtained, manual processing by a user is not needed, omission is avoided, and accuracy is guaranteed.
In one embodiment, obtaining end points of a target line segment from a set of line segments and determining a starting line segment from the target line segment according to the end points comprises: acquiring a first endpoint of each target line segment in the line segment set, and selecting the minimum value of a first coordinate of the first endpoint; selecting a target line segment which is the same as the minimum value of the first coordinate; acquiring a second endpoint of the selected target line segment, and selecting the minimum value of a second coordinate of the second endpoint; and acquiring a target line segment which is the same as the minimum value of the second coordinate from the selected target line segments as a starting line segment.
Specifically, please continue to refer to fig. 3, first, the terminal places all target line segments into a line segment set, and then obtains a minimum value of a first coordinate, where the first coordinate and the second coordinate are a vertical coordinate and a horizontal coordinate, respectively, or a horizontal coordinate and a vertical coordinate, respectively. And after the terminal acquires the minimum value of the first coordinate, selecting a target line segment which meets the condition that the value of the first coordinate of any one endpoint is the same as the minimum value of the first coordinate from the line segment set, wherein the precision is 0.00001 mm. Such as line 1, line 2, line 4, line 7, and line 18 in fig. 3. Then, the terminal acquires two endpoints of the selected target line segment to form an endpoint set, and obtains a set of 10 endpoints as shown in fig. 3. Then, the terminal acquires an end point of the minimum value of the second coordinate from the end point set, acquires a line segment with any end point as the minimum value of the second coordinate, such as line segment 1 and line segment 4 in fig. 3, and adjusts the direction of the line segment to extend to the other end of the line segment by taking the minimum value of the second coordinate and the extreme point of the minimum value of the first coordinate as starting points.
In the above embodiment, the initial line segment is determined by the extreme point, so that the formation of the subsequent enclosure starts from one end, and the order is ensured.
In one embodiment, selecting the outermost associated line segment includes: calculating the included angle between the initial line segment and the associated line segment; and selecting the associated line segment with the largest included angle with the initial line segment as the associated line segment at the outermost side.
Specifically, the outermost associated line segment is selected by finding the outermost line segment of the associated line segments through angle judgment, for example, calculating the included angle between the initial line segment and each associated line segment, and then selecting the associated line segment with the largest included angle.
In the above embodiment, the associated line segment at the outermost side is determined by the included angle, so that the maximum enclosure can be obtained.
In one embodiment, connecting the starting line segment and the selected associated line segment until a bounding box is formed comprises: connecting the tail end of the initial line segment with the initial end of the associated line segment, and judging whether an enclosure is formed or not; and if no enclosure is formed, taking the connected initial line segment and the connected line segment as initial line segments, and continuously determining the connected line segment connected with the tail end of the initial line segment until the connected initial line segment and the connected line segment form an enclosure.
Specifically, the terminal connects the tail end of the initial line segment with the start end of the associated line segment, judges whether an enclosure is formed, directly outputs the enclosure if the enclosure is formed, continuously acquires the initial line segment to calculate other enclosures, continuously finds the associated line segment connected with the end point of the real line segment if the enclosure is not formed, then continuously finds the line segment on the outermost side of the associated line segments through angle judgment, deletes the line segment on the outermost side found, continuously connects the tail end of the initial line segment with the start end of the associated line segment, and judges whether the enclosure is formed. Wherein the starting line segment can be defined as a line formed by connecting the original starting line segment with the currently outermost associated line segment.
Optionally, when no enclosure is formed, it is further required to determine whether the number of target line segments in the line segment set is greater than 0, if so, the above-mentioned cycle is continued, otherwise, the cycle is ended, and the maximum enclosure is obtained from the formed enclosures.
In one embodiment, acquiring the formed enclosure as the target area includes: acquiring the formed enclosure, and judging whether a target line segment exists outside the formed enclosure; and if the target line segment exists outside the formed enclosure, continuously acquiring the end point of the target line segment from the line segment set until the formed enclosure does not have the target line segment, and acquiring the formed maximum enclosure as a target area.
Specifically, after the maximum enclosure is formed, if a plurality of extreme points exist, the enclosures corresponding to the plurality of 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 segment exists outside the formed enclosure is judged; and if the target line segment exists outside the formed enclosure, continuously acquiring the end point of the target line segment from the line segment set until the formed enclosure does not have the target line segment, 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 line segments are judged, the line segments 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, after extracting a target line segment in the building model and obtaining a line segment set according to the target line segment, the method further includes: and preprocessing the target line segments in the line segment set, wherein the preprocessing comprises at least one of merging collinear line segments, breaking intersected line segments and removing independent line segments from head to tail.
According to all the line segments after coordinate transformation, some preprocessing work is carried out on a line segment set for calculating the maximum contour, namely, collinear line segments are merged, intersected line segments are broken, and independent line segments at the head and the tail are removed.
The merging of collinear line segments refers to merging lines on the same straight line, that is, straight lines with an included angle of 0 degree or 180 degrees, as shown in fig. 4, which is a merged effect diagram.
The step of breaking the crossed line segments means whether the combined line segments are crossed with other line segments, if the combined line segments are crossed, the line segments are broken into two line segments according to the crossing points, and the crossing points are respectively used as the end points of the broken line segments, as shown in fig. 5, the line segment 1 in fig. 4 is broken into the line segment 2 and the line segment 3 in fig. 5, and the line segment 9 is broken into the line segment 23, the line segment 24, the line segment 28, the line segment 29 and the like.
Removing the individual line segments end-to-end is that an end point of the line segment is not connected to any line segment, and if this line segment is found, it is removed from the collection, and the new collection determines whether such a line segment exists. Such as line segment 19 and line segment 20 in fig. 5. Referring to fig. 6, line segment 1 is removed first, and then line segment 14 is removed.
In one embodiment, after the step of obtaining the formed enclosure as the target area includes: and calculating the corresponding shear wall area and/or floor building area according to the target area.
Specifically, the scenario: when the area of the shear wall-the area of a floor building is calculated, the largest enclosed area formed by the shear wall and the coupling beam needs to be found, so that the calculation of the two areas is facilitated. The parameters are all the line segments, the returned result is that all the maximum enclosure, namely the target area in the text, is obtained, and then the shear wall area-floor building area is calculated according to all the returned maximum enclosure areas.
As shown in fig. 3 to 6, the shear wall area-floor building area calculation is used as a scene, and when the shear wall area-floor building area is calculated, the height is fixed, and a maximum enclosing area formed by the shear wall and the coupling beam needs to be found, so that the calculation of the two areas is facilitated.
Specifically, a coordinate system is first created, and all lines are converted into the same coordinate system. And judging whether all the lines are in the same plane, and if not, prompting the user that all the lines are not in the same plane. Only if all lines are in the same plane, the calculation continues.
Secondly, according to all the line segments after coordinate transformation, a plurality of pre-processing works are carried out on the line segment set for calculating the maximum outline, namely, collinear line segments are merged, intersected line segments are broken, and independent line segments at the head and the tail are removed.
Finally, the maximum contour, i.e., the maximum bounding, is calculated. The method comprises the following steps of firstly, taking the end points of all line segments into a set, obtaining the minimum y value in the set, and taking out the set of the line segments: the condition is satisfied that the y value of any one end point is the same as the minimum y value. As shown in fig. 3, five line segments are taken, line segment 1, line segment 2, line segment 4, line segment 7, and line segment 18. The terminal obtains two end points of each line segment to obtain a set of 10 end points. The terminal acquires the endpoint with the minimum value x in the endpoints. A line segment having any one end point as the extreme point is taken, and line segments 1 and 4 are taken in fig. 3, and the direction of the line segment is adjusted to take the point as the starting point. The outer contour, i.e. the first starting line segment of the maximum bounding is calculated. The method is to calculate any line segment in the two line segments with the largest included angle. The starting line segment taken in fig. 3 is line segment 1. This starting line segment is removed from all line segments and is taken as the first line segment of the largest bounding box, the starting line segment. When the number of the line segments in the line segment set is more than 0, the following steps are circulated: finding a line segment set connected with the starting line segment end endpoint; finding the outermost line segment in the line segments through angle judgment; this found line segment is deleted from the set. Thus, the maximum enclosure of multiple line segments can be found circularly. If a plurality of maximum outer contours are selected, namely after an outer contour is found, the remaining line segments are judged, the line segments outside the known outer contour are collected, the maximum outer contour is selected again, and a plurality of maximum enclosing can be obtained by repeating the steps.
A target area acquisition method includes: obtaining a building model to be processed; and calling a preset functional interface to enable the functional interface to process the building model to be processed according to the method of any one of the embodiments to generate a target area.
Specifically, the specific definition of the target region acquisition method may be referred to above, and is not described herein again.
It should be understood that, although the steps in the flowchart of fig. 2 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 a portion of the steps in fig. 2 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 a portion of the other steps or stages.
In one embodiment, as shown in fig. 7, there is provided a target area acquisition apparatus including: a receiving module 100, an initial line segment determining module 200, an associated line segment determining module 300, a looping module 400, and a target area obtaining module 500, wherein:
the receiving module 100 is configured to receive an input building model, extract a target line segment in the building model, and obtain a line segment set according to the target line segment;
an initial line segment determining module 200, configured to obtain an endpoint of a target line segment from the line segment set, and determine an initial line segment from the target line segment according to the endpoint;
an associated line segment determining module 300 for determining an associated line segment connected to the end of the starting line segment;
a circulation module 400, configured to select an outermost associated line segment, and connect the initial line segment with the selected associated line segment until a bounding box is formed;
a target region obtaining module 500, configured to obtain the formed enclosure as a target region.
In one embodiment, the above-mentioned initial line segment determining module 200 may include:
the first extreme value acquisition unit is used for acquiring a first end point of each target line segment in the line segment set and selecting the minimum value of a first coordinate of the first end point;
the target line segment selecting unit is used for selecting a target line segment which is the same as the minimum value of the first coordinate;
the second extreme value acquisition unit is used for acquiring a second extreme point of the selected target line segment and selecting the minimum value of a second coordinate of the second extreme point;
and a starting line segment acquisition unit for acquiring a target line segment which is the same as the minimum value of the second coordinate from the selected target line segments as a starting line segment.
In one embodiment, the associated line segment determining module 300 may include:
the included angle calculating unit is used for calculating the included angle between the initial line segment and the associated line segment;
and the associated line segment acquisition unit is used for selecting the associated line segment with the largest included angle with the initial line segment as the associated line segment on the outermost side.
In one embodiment, the above-mentioned circulation module 400 may include:
the first judging unit is used for connecting the tail end of the initial line segment with the initial end of the associated line segment and judging whether an enclosure is formed or not;
and the circulating unit is used for taking the connected initial line segment and the associated line segment as the initial line segment and continuously determining the associated line segment connected with the tail end of the initial line segment until the connected initial line segment and the associated line segment form the enclosure if the enclosure is not formed.
In one embodiment, the target area obtaining module 500 includes:
the second judging unit is used for acquiring the formed enclosure and judging whether a target line segment exists outside the formed enclosure or not;
and the target area acquisition unit is used for continuously acquiring the end points of the target line segment from the line segment set if the target line segment exists outside the formed enclosure until the formed maximum enclosure is used as the target area when the target line segment does not exist outside the formed enclosure.
In one embodiment, the target area obtaining apparatus may further include:
and the preprocessing module is used for preprocessing the target line segment in the line segment set, and the preprocessing comprises at least one of merging collinear line segments, breaking intersected line segments and removing head and tail independent line segments.
In one embodiment, the target area obtaining apparatus may further include:
and the area calculation module is used for calculating the corresponding shear wall area and/or floor building area according to the target area.
A target area acquisition apparatus comprising:
the acquisition module is used for acquiring a building model to be processed;
and the processing module is used for calling a preset functional interface so that the functional interface processes the building model to be processed according to the method of any one of the embodiments to generate the target area.
For the specific definition of the target area acquiring device, reference may be made to the above definition of the target area acquiring method, which is not described herein again. The modules in the target area acquiring apparatus may be wholly or partially implemented by software, hardware, or a combination thereof. The modules can be embedded in a hardware form or independent from 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. 8. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by 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 target area acquisition method. 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. 8 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: receiving an input building model, extracting a target line segment in the building model, and obtaining a line segment set according to the target line segment; acquiring end points of the target line segments from the line segment set, and determining starting line segments from the target line segments according to the end points; determining an associated line segment connected to the end of the starting line segment; selecting the associated line segment on the outermost side, and connecting the initial line segment with the selected associated line segment until a closure is formed; and acquiring the formed enclosure as a target area.
In one embodiment, the obtaining an endpoint for a target line segment from a set of line segments and determining a starting line segment from the target line segment based on the endpoint, as implemented by a processor executing a computer program, comprises: acquiring a first endpoint of each target line segment in the line segment set, and selecting the minimum value of a first coordinate of the first endpoint; selecting a target line segment which is the same as the minimum value of the first coordinate; acquiring a second endpoint of the selected target line segment, and selecting the minimum value of a second coordinate of the second endpoint; and acquiring a target line segment which is the same as the minimum value of the second coordinate from the selected target line segments as a starting line segment.
In one embodiment, the selecting the outermost associated line segment, as performed by the processor executing the computer program, comprises: calculating the included angle between the initial line segment and the associated line segment; and selecting the associated line segment with the largest included angle with the initial line segment as the associated line segment at the outermost side.
In one embodiment, the joining the starting line segment and the selected associated line segment until the enclosure is formed, as implemented by the processor executing the computer program, comprises: connecting the tail end of the initial line segment with the initial end of the associated line segment, and judging whether an enclosure is formed or not; and if no enclosure is formed, taking the connected initial line segment and the connected line segment as initial line segments, and continuously determining the connected line segment connected with the tail end of the initial line segment until the connected initial line segment and the connected line segment form an enclosure.
In one embodiment, the obtaining the enclosure formed as the target area, as implemented by the processor executing the computer program, comprises: acquiring the formed enclosure, and judging whether a target line segment exists outside the formed enclosure; and if the target line segment exists outside the formed enclosure, continuously acquiring the end point of the target line segment from the line segment set until the formed enclosure does not have the target line segment, and acquiring the formed maximum enclosure as a target area.
In one embodiment, the extracting a target line segment in the building model, after obtaining a set of line segments according to the target line segment, implemented when the processor executes the computer program, further includes: and preprocessing the target line segments in the line segment set, wherein the preprocessing comprises at least one of merging collinear line segments, breaking intersected line segments and removing independent line segments from head to tail.
In one embodiment, the obtaining the enclosure formed by the processor when executing the computer program as the target area comprises: and calculating the corresponding shear wall area and/or floor building area according to the target area.
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: obtaining a building model to be processed; and calling a preset functional interface to enable the functional interface to process the building model to be processed according to the method of any one of the embodiments to generate a target area.
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: receiving an input building model, extracting a target line segment in the building model, and obtaining a line segment set according to the target line segment; acquiring end points of the target line segments from the line segment set, and determining starting line segments from the target line segments according to the end points; determining an associated line segment connected to the end of the starting line segment; selecting the associated line segment on the outermost side, and connecting the initial line segment with the selected associated line segment until a closure is formed; and acquiring the formed enclosure as a target area.
In one embodiment, a computer program implemented when executed by a processor for obtaining end points of a target line segment from a set of line segments and determining a starting line segment from the target line segment based on the end points, comprises: acquiring a first endpoint of each target line segment in the line segment set, and selecting the minimum value of a first coordinate of the first endpoint; selecting a target line segment which is the same as the minimum value of the first coordinate; acquiring a second endpoint of the selected target line segment, and selecting the minimum value of a second coordinate of the second endpoint; and acquiring a target line segment which is the same as the minimum value of the second coordinate from the selected target line segments as a starting line segment.
In one embodiment, the computer program when executed by the processor implements selecting the outermost associated line segment, comprising: calculating the included angle between the initial line segment and the associated line segment; and selecting the associated line segment with the largest included angle with the initial line segment as the associated line segment at the outermost side.
In one embodiment, the joining the starting line segment and the selected associated line segment until an enclosure is formed, as implemented by the computer program when executed by the processor, comprises: connecting the tail end of the initial line segment with the initial end of the associated line segment, and judging whether an enclosure is formed or not; and if no enclosure is formed, taking the connected initial line segment and the connected line segment as initial line segments, and continuously determining the connected line segment connected with the tail end of the initial line segment until the connected initial line segment and the connected line segment form an enclosure.
In one embodiment, the acquisition of the enclosure formed as the target area, as performed by the computer program when executed by the processor, comprises: acquiring the formed enclosure, and judging whether a target line segment exists outside the formed enclosure; and if the target line segment exists outside the formed enclosure, continuously acquiring the end point of the target line segment from the line segment set until the formed enclosure does not have the target line segment, and acquiring the formed maximum enclosure as a target area.
In one embodiment, the computer program, when executed by the processor, for extracting a target line segment in the building model, and after obtaining a set of line segments from the target line segment, further comprises: and preprocessing the target line segments in the line segment set, wherein the preprocessing comprises at least one of merging collinear line segments, breaking intersected line segments and removing independent line segments from head to tail.
In one embodiment, the computer program, when executed by a processor, when executed after obtaining the formed enclosure as the target area, comprises: and calculating the corresponding shear wall area and/or floor building area according to the target area.
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: obtaining a building model to be processed; and calling a preset functional interface to enable the functional interface to process the building model to be processed according to the method of any one of the embodiments to generate a target area.
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), among others.
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 target area acquisition method, the method comprising:
receiving an input building model, extracting a target line segment in the building model, and obtaining a line segment set according to the target line segment;
acquiring end points of the target line segments from the line segment set, and determining starting line segments from the target line segments according to the end points; determining an associated line segment connected to an end of the starting line segment;
selecting the associated line segment on the outermost side, and connecting the initial line segment with the selected associated line segment until a surrounding is formed;
and acquiring the formed enclosure as a target area.
2. The method of claim 1, wherein obtaining end points of the target line segments from the set of line segments and determining starting line segments from the target line segments according to the end points comprises:
acquiring a first endpoint of each target line segment in the line segment set, and selecting the minimum value of a first coordinate of the first endpoint;
selecting a target line segment which is the same as the minimum value of the first coordinate;
acquiring a second endpoint of the selected target line segment, and selecting the minimum value of a second coordinate of the second endpoint;
and acquiring a target line segment which is the same as the minimum value of the second coordinate from the selected target line segments as a starting line segment.
3. The method of claim 1, wherein selecting the outermost associated line segment comprises:
calculating the included angle between the initial line segment and the associated line segment;
and selecting the associated line segment with the largest included angle with the initial line segment as the associated line segment on the outermost side.
4. The method of claim 1, wherein said connecting the starting line segment and the selected associated line segment until a bounding box is formed comprises:
connecting the tail end of the initial line segment with the initial end of the associated line segment, and judging whether an enclosure is formed;
and if no enclosure is formed, taking the connected initial line segment and the connected associated line segment as initial line segments, and continuously determining the associated line segment connected with the tail end of the initial line segment until the connected initial line segment and the connected associated line segment form an enclosure.
5. The method of any one of claims 1 to 4, wherein the obtaining the formed enclosure as a target area comprises:
acquiring the formed enclosure, and judging whether a target line segment exists outside the formed enclosure;
and if the target line segment exists outside the formed enclosure, continuously acquiring the end point of the target line segment from the line segment set until the formed enclosure does not have the target line segment, and acquiring the formed maximum enclosure as a target area.
6. The method according to any one of claims 1 to 4, wherein the extracting a target line segment in the building model, and after obtaining a line segment set according to the target line segment, further comprises:
and preprocessing a target line segment in the line segment set, wherein the preprocessing comprises at least one of merging collinear line segments, breaking intersected line segments and removing head-to-tail individual line segments.
7. The method according to any one of claims 1 to 4, wherein after acquiring the formed enclosure as a target area, the method comprises:
and calculating the corresponding shear wall area and/or floor building area according to the target area.
8. A target area acquisition method, the method comprising:
obtaining a building model to be processed;
calling a preset functional interface so that the functional interface processes the building model to be processed according to the method of any one of claims 1 to 7 to generate a target area.
9. A target area acquisition apparatus, characterized in that the apparatus comprises:
the receiving module is used for receiving an input building model, extracting a target line segment in the building model and obtaining a line segment set according to the target line segment;
the starting line segment determining module is used for acquiring the end points of the target line segments from the line segment set and determining starting line segments from the target line segments according to the end points;
an associated line segment determining module for determining an associated line segment connected to the end of the starting line segment;
the circulation module is used for selecting the associated line segment on the outermost side, and connecting the initial line segment with the selected associated line segment until a closure is formed;
and the target area acquisition module is used for acquiring the formed enclosure as a target area.
10. 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 7 or 8.
CN202011066112.9A 2020-09-30 2020-09-30 Target area acquisition method and device, computer equipment and storage medium Withdrawn CN112287432A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011066112.9A CN112287432A (en) 2020-09-30 2020-09-30 Target area acquisition method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011066112.9A CN112287432A (en) 2020-09-30 2020-09-30 Target area acquisition method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112287432A true CN112287432A (en) 2021-01-29

Family

ID=74422913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011066112.9A Withdrawn CN112287432A (en) 2020-09-30 2020-09-30 Target area acquisition method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112287432A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112287430A (en) * 2020-09-30 2021-01-29 久瓴(江苏)数字智能科技有限公司 Building wall generation method and device, computer equipment and storage medium
CN113392256A (en) * 2021-06-15 2021-09-14 万翼科技有限公司 Edge component object generation method, device, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112287430A (en) * 2020-09-30 2021-01-29 久瓴(江苏)数字智能科技有限公司 Building wall generation method and device, computer equipment and storage medium
CN112287430B (en) * 2020-09-30 2022-06-28 久瓴(江苏)数字智能科技有限公司 Building wall generation method and device, computer equipment and storage medium
CN113392256A (en) * 2021-06-15 2021-09-14 万翼科技有限公司 Edge component object generation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110516370B (en) Prefabricated part deepening drawing generation method and device, computer equipment and medium
CN113010937B (en) Parametric modeling method of member section steel bar and related device
CN112287430B (en) Building wall generation method and device, computer equipment and storage medium
CN112287432A (en) Target area acquisition method and device, computer equipment and storage medium
CN110335345B (en) Curtain wall node rendering method and device, computer equipment and storage medium
CN113920184B (en) Polygon simplification method, device, equipment and computer readable storage medium
CN110363854B (en) Curved surface template segmentation method and device, computer equipment and storage medium
CN107564077A (en) A kind of method and device for drawing road network
CN112287429B (en) Building target area determination method and device, computer equipment and storage medium
CN112287427B (en) Building wall position determining method and device, computer equipment and storage medium
KR100396357B1 (en) Method for automatically determining trackers along contour and storage medium storing program for implementing the same
CN109448115A (en) Processing method, device and the computer equipment of threedimensional model
CN115249303A (en) Layout drawing method, device, equipment and storage medium based on drawing segmentation
CN112287431A (en) Target area acquisition method and device, computer equipment and storage medium
CN112836263B (en) Axle network generation method and device, computer equipment and storage medium
CN114428984A (en) Wall processing method and device in model, computer equipment and storage medium
CN106548501B (en) Image drawing method and device
CN109064393B (en) Face special effect processing method and device
CN114969873A (en) Column generation method, device, equipment and medium based on drawing
CN112287434B (en) Building line segment generation method and device, computer equipment and storage medium
CN112750193A (en) Power transmission equipment three-dimensional model modeling method, device, equipment and storage medium
CN112287428B (en) Building wall generation method and device, computer equipment and storage medium
CN113987650A (en) Beam model generation method and device and computer equipment
CN113987651A (en) Method and device for generating plate model and computer equipment
CN114969871A (en) Wall generation method, device and equipment based on drawing 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
WW01 Invention patent application withdrawn after publication

Application publication date: 20210129

WW01 Invention patent application withdrawn after publication