CN115329420B - Marking generation method and device, terminal equipment and storage medium - Google Patents

Marking generation method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN115329420B
CN115329420B CN202210841377.4A CN202210841377A CN115329420B CN 115329420 B CN115329420 B CN 115329420B CN 202210841377 A CN202210841377 A CN 202210841377A CN 115329420 B CN115329420 B CN 115329420B
Authority
CN
China
Prior art keywords
target
coordinate
edge line
endpoint
line segment
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.)
Active
Application number
CN202210841377.4A
Other languages
Chinese (zh)
Other versions
CN115329420A (en
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.)
Beijing 58 Information Technology Co Ltd
Original Assignee
Beijing 58 Information 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 Beijing 58 Information Technology Co Ltd filed Critical Beijing 58 Information Technology Co Ltd
Priority to CN202210841377.4A priority Critical patent/CN115329420B/en
Publication of CN115329420A publication Critical patent/CN115329420A/en
Application granted granted Critical
Publication of CN115329420B publication Critical patent/CN115329420B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06T3/06
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention provides a marking generation method, a marking generation device, terminal equipment and a storage medium, and relates to the technical field of image processing. Comprising the following steps: projecting the house structure diagram into a two-dimensional plane coordinate system; extracting two first end point coordinates of each room area on one side of a target direction in a house structure diagram to obtain a first coordinate set formed by a plurality of first end point coordinates; removing the first end point coordinates, which are blocked by the target edge line segment at one side of the target direction, in the first coordinate set from the first coordinate set to obtain a second coordinate set; and drawing a target marking line of the house structure diagram in the target direction based on the target coordinate set. Each marking around the house structure drawing board can be drawn according to endpoints of all room areas which can be observed on one side of the marking, so that the marking can completely fit with the size of the whole house structure, the size of each room area can be accurately described, and the accuracy of drawing the marking is improved.

Description

Marking generation method and device, terminal equipment and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and apparatus for generating a reticle, a terminal device, and a storage medium.
Background
When a two-dimensional building structure is displayed, marking lines for indicating the building structure are usually drawn on four sides around the building structure, and the marking lines are provided with marking points corresponding to the building structure and distances between adjacent marking points, so that a user can know the sizes of all structures in the building structure.
In the related art, a center point is generally used to generate a line for each direction for a building structure, for example, when a line for a building structure above the center point is generated, the center point of the building structure is first determined, then the line for the building above the center point is drawn from the corner points of the room above the center point, and when a line for a building structure below the center point is generated, the center point of the building structure is also first determined, and then the line for the building above the corner points of the room below the center point is drawn from the corner points of the room below the center point.
However, when the marking is drawn in the above-described manner, a part of the room in the house structure diagram is ignored, which easily results in that the length of the marking cannot completely cover the length of the house structure diagram, and the drawn marking is inaccurate.
Disclosure of Invention
The embodiment of the invention provides a marking generation method, a marking generation device, terminal equipment and a storage medium, which are used for solving the problem of poor accuracy of the traditional marking drawing method.
In order to solve the technical problems, the invention is realized as follows:
in a first aspect, a reticle generating method, the method comprising:
projecting the house structure diagram into a two-dimensional plane coordinate system;
extracting two first end point coordinates of each room area on one side of a target direction in a house structure diagram to obtain a first coordinate set formed by a plurality of first end point coordinates;
removing the first end point coordinates, which are blocked by the target edge line segment at one side of the target direction, in the first coordinate set from the first coordinate set to obtain a second coordinate set; the target edge line segment is formed by connecting the coordinates of the two first end points;
and drawing a target marking line of the house structure diagram in the target direction based on the second coordinate set.
Optionally, the extracting two first end point coordinates of each room area on one side of the target direction in the building structure diagram to obtain a first coordinate set formed by a plurality of first end point coordinates includes:
acquiring target edge line segments of all room areas on one side of a target direction in the house structure diagram;
acquiring two first end point coordinates of the target edge line segment in the two-dimensional plane coordinate system;
And adding the first endpoint coordinates into an initial set according to the distribution sequence of the target edge line segments in the two-dimensional plane coordinate system to obtain a first coordinate set.
Optionally, the acquiring a target edge line segment of all room areas in the building structure diagram on one side of a target direction includes:
acquiring a plurality of edge line segments which enclose the room area in the house structure diagram;
and determining an edge line segment which is perpendicular to the target direction and is close to the target direction from the plurality of edge line segments as a target edge line segment of the room area.
Optionally, the removing, from the first coordinate set, the first endpoint coordinate blocked by the target edge line segment at the target direction side in the first coordinate set, to obtain a second coordinate set includes:
traversing first end point coordinates corresponding to each target edge line segment in the first coordinate set in a reverse order;
when the extended line of the traversed first endpoint coordinate in the target direction intersects with a target edge line segment corresponding to the first endpoint coordinate which is not traversed, determining the first endpoint coordinate which is traversed as a second endpoint coordinate;
And removing all the second endpoint coordinates from the coordinate set to obtain a second coordinate set.
Optionally, the target direction includes a transverse axis direction, a transverse axis opposite direction, a longitudinal axis direction, and a longitudinal axis opposite direction of the two-dimensional plane coordinate system, and the drawing the target line of the building structure diagram in the target direction based on the second coordinate set includes:
extracting the ordinate of each endpoint coordinate in the second coordinate set under the condition that the target direction is parallel to the transverse axis of the two-dimensional plane coordinate system, and drawing a target marking on the outer side of the target direction of the house structure diagram according to the ordinate;
and under the condition that the target direction is parallel to the longitudinal axis of the two-dimensional plane coordinate system, extracting the abscissa of each endpoint coordinate in the second coordinate set, and drawing a target marking outside the target direction of the house structure diagram according to the abscissa.
In a second aspect, an embodiment of the present invention further provides a reticle generating device, including:
the projection module is used for projecting the house structure diagram into a two-dimensional plane coordinate system;
the first coordinate module is used for extracting two first end point coordinates of each room area on one side of the target direction in the house structure diagram to obtain a first coordinate set formed by a plurality of first end point coordinates;
The second coordinate module is used for removing the first end point coordinate, which is blocked by the target edge line segment at one side of the target direction, in the first coordinate set from the first coordinate set to obtain a second coordinate set; the target edge line segment is formed by connecting the coordinates of the two first end points;
and the drawing module is used for drawing the target marking of the house structure diagram in the target direction based on the second coordinate set.
Optionally, the first coordinate module includes:
a target edge line segment sub-module, configured to obtain target edge line segments of all room areas in the building structure diagram on one side of a target direction;
the first end point coordinate submodule is used for acquiring two first end point coordinates of the target edge line segment in the two-dimensional plane coordinate system;
and the first coordinate set submodule is used for adding the first end point coordinate into the initial set according to the distribution sequence of the target edge line segments in the two-dimensional plane coordinate system to obtain a first coordinate set.
Optionally, the target edge line segment submodule includes:
an edge line segment sub-module, configured to obtain a plurality of edge line segments in the building structure diagram, where the edge line segments enclose the room area;
And the target edge line segment determining submodule is used for determining an edge line segment which is perpendicular to the target direction and is close to the target direction from the plurality of edge line segments as a target edge line segment of the room area.
Optionally, the second coordinate module includes:
the traversing submodule is used for traversing first end point coordinates corresponding to each target edge line segment in the first coordinate set in a reverse order;
the second endpoint coordinate submodule is used for determining the traversed first endpoint coordinate as a second endpoint coordinate when an extension line of the traversed first endpoint coordinate in the target direction intersects a target edge line segment corresponding to the first endpoint coordinate which is not traversed;
and the second coordinate set submodule is used for removing all second endpoint coordinates from the coordinate set to obtain a second coordinate set.
Optionally, the target direction includes a transverse axis direction, a transverse axis opposite direction, a longitudinal axis direction, and a longitudinal axis opposite direction of the two-dimensional plane coordinate system, and the drawing module includes:
the first drawing submodule is used for extracting the ordinate of each endpoint coordinate in the second coordinate set under the condition that the target direction is parallel to the transverse axis of the two-dimensional plane coordinate system, and drawing a target marking line outside the target direction of the house structure diagram according to the ordinate;
And the second drawing submodule is used for extracting the abscissa of each endpoint coordinate in the second coordinate set under the condition that the target direction is parallel to the longitudinal axis of the two-dimensional plane coordinate system, and drawing a target marking line outside the target direction of the house structure diagram according to the abscissa.
In a third aspect, an embodiment of the present invention further provides a terminal device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the reticle generating method as described in the previous first aspect.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program when executed by a processor implements the steps of the reticle generating method according to the previous first aspect.
In an embodiment of the present invention, the method includes: projecting the house structure diagram into a two-dimensional plane coordinate system; extracting two first end point coordinates of each room area on one side of a target direction in a house structure diagram to obtain a first coordinate set formed by a plurality of first end point coordinates; removing the first end point coordinates, which are blocked by the target edge line segment at one side of the target direction, in the first coordinate set from the first coordinate set to obtain a second coordinate set; the target edge line segment is formed by connecting two first end point coordinates; and drawing a target marking line of the house structure diagram in the target direction based on the target coordinate set. Therefore, each marking around the house structure drawing board can be drawn according to the endpoints of all room areas which can be observed on one side of the marking, so that the marking can completely fit the size of the whole house structure, the size of each room area can be accurately described, and the marking drawing accuracy is improved.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments of the present invention will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of steps of a method for generating a reticle according to an embodiment of the present invention;
FIG. 2 is a diagram of a building structure provided by an embodiment of the present invention;
FIG. 3 is a schematic diagram of an endpoint according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating specific steps of another method for generating a reticle according to an embodiment of the present invention;
FIG. 5 is a schematic illustration of a reticle provided by an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a reticle generating device according to an embodiment of the present invention;
Fig. 7 is a schematic hardware structure of a terminal device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Detailed description of the invention the method for generating the marking line is provided in the embodiment of the invention.
Referring to fig. 1, a flowchart of steps of a method for generating a reticle according to an embodiment of the present invention is shown.
And step 101, projecting the house structure diagram into a two-dimensional plane coordinate system.
In the embodiment of the invention, the house structure diagram refers to a graph capable of showing the planar structure of a building, such as a house type graph, a decoration graph, a planar design graph and the like. The house structure diagram can be directly drawn on a two-dimensional plane or can be obtained by projection of a house three-dimensional structure diagram on the plane, and the determining mode of the house structure diagram is not particularly limited in the embodiment of the invention.
Referring to fig. 2, fig. 2 illustrates a building structure diagram according to an embodiment of the present invention, and as shown in fig. 2, the building structure diagram may represent a building structure in a top view, where lines in the building structure diagram represent boundaries between walls or different building areas.
The building block diagram may be projected into a two-dimensional planar coordinate system to determine endpoint coordinates in the building block diagram in a subsequent step and to map the building block diagram with a reticle.
In general, the building structure is formed by vertical straight lines, and when the building structure is projected to the two-dimensional plane coordinate system, the trend of the lines in the building structure can be kept parallel to the transverse axis and the longitudinal axis in the two-dimensional plane coordinate system as much as possible, so that the drawn marking can be parallel to the wall of the building, and the aesthetic degree of the marking is improved.
When the building structure diagram shown in fig. 2 is projected onto the two-dimensional plane coordinate system, the center point of the building structure diagram can be aligned with the origin of coordinates of the two-dimensional plane coordinate system, and the longitudinal line in the building structure diagram is parallel to the longitudinal axis of the two-dimensional plane coordinate system, and the transverse line in the building structure diagram is parallel to the transverse axis of the two-dimensional plane coordinate system.
And 102, extracting two first end point coordinates of each room area on one side of the target direction in the house structure diagram to obtain a first coordinate set formed by a plurality of first end point coordinates.
In the embodiment of the invention, the marking can be drawn only in one direction of the building structure, for example, the marking can be drawn on the left side or the right side of the building structure, or the marking can be drawn in a plurality of directions of the building structure, for example, the marking can be drawn in four directions around the building structure.
To draw a reticle of a building structure in a target direction of a building structure diagram, first, all room areas in the building structure diagram may be identified, and two first end coordinates of each room area on one side of the target direction may be acquired. The room area may include an independent area in a house structure diagram such as an area of a room, an area of a corridor, an area of a balcony, an area of a vestibule, and the like.
Referring to fig. 3, fig. 3 shows a schematic diagram of an endpoint provided by an embodiment of the present invention, as shown in fig. 3, the target direction is the direction indicated by the arrow w in fig. 3, and the building structure diagram includes a room area a and a room area B, so that two first endpoints of the room area a on one side of the target direction w are an endpoint 111 and an endpoint 112, and two first endpoints of the room area B on one side of the first direction a are an endpoint 121 and an endpoint 122. The first endpoint coordinate corresponding to the endpoint 111 is the coordinate of the endpoint 111 in the two-dimensional plane coordinate system after the building structure diagram is projected to the two-dimensional plane coordinate system.
After determining the two first endpoint coordinates corresponding to all the room areas, all the first endpoint coordinates can be put into the set to obtain a first coordinate set.
For example, if the coordinates of the endpoint 121 in the two-dimensional plane coordinate system shown in fig. 3 are (x 1, y 1) and the coordinates of the endpoint 122 in the two-dimensional plane coordinate system are (x 1, y 1), the endpoint coordinates (x 1, y 1) and the endpoint coordinates (x 2, y 2) corresponding to the house area a may be added to the first coordinate set.
Step 103, removing the first end point coordinates, which are blocked by the target edge line segment at one side of the target direction, in the first coordinate set from the first coordinate set to obtain a second coordinate set; the target edge line segment is formed by connecting the coordinates of the two first end points.
In the embodiment of the present invention, the target edge line segment refers to a connecting line between two first end coordinates of the room area, as shown in fig. 3, where the line segment 11 is formed by connecting an end 111 and an end 112 of the room area a, and then the line segment 11 is the target edge line segment of the room area a. The line segment 12 is formed by connecting the end point 121 and the end point 122 of the room area B, and the line segment 12 is a target edge line segment of the room area B.
It should be noted that, in the actual application process, two first end point coordinates of the room area may be determined first, then a target edge line segment corresponding to the room area may be determined according to a connection line of the two first end point coordinates, or a target edge line segment corresponding to the room area may be determined first, and then two first end point coordinates corresponding to the room area may be determined according to the target edge line segment. The order of determining the first endpoint coordinates and the target edge line segments can be flexibly adjusted by a technician according to actual needs, which is not particularly limited in the embodiment of the present invention.
After the first coordinate set is obtained, the first endpoint coordinates in the first coordinate set may be traversed, and for each first endpoint coordinate, it may be determined whether the first endpoint coordinate is blocked by a target edge line segment on one side of the target direction of the first endpoint coordinate, where it is noted that the blocking may refer to that a projection point of the first endpoint coordinate in the first direction is located above the target edge line segment.
For example, as shown in fig. 3, when the first end point 111 of the room area a is blocked in the target direction w by the target edge line segment 14 of the room area D on the target direction w side thereof, the first end point coordinate corresponding to the first end point 111 is removed from the first coordinate set, and when the first end point 112 of the room area a is not blocked by any target edge line segment on the target direction w side, the first end point coordinate corresponding to the first end point 112 of the room area a is retained in the first coordinate set.
And 104, drawing a target marking line of the house structure diagram in the target direction based on the target coordinate set.
After the target coordinate set is obtained, the target coordinate set includes first end point coordinates of all the room areas on one side of the target direction, so that a target marking line of the building structure on one side of the target direction can be drawn according to the first end point coordinates, and the target marking line is used for indicating the length of structures such as side walls of the target direction of each room area in the building structure.
Specifically, the abscissa or ordinate values of all the first end coordinates in the target coordinate set may be extracted based on the trend of the target mark to be drawn, if the target mark to be drawn is parallel to the longitudinal axis in the two-dimensional plane coordinate system, the ordinate values of the first end coordinates are extracted, and if the target mark to be drawn is parallel to the transverse axis in the two-dimensional plane coordinate system, the abscissa values of the first end coordinates are extracted.
Under the condition that the target mark line to be drawn is parallel to the longitudinal axis in the two-dimensional plane coordinate system, the abscissa value of the target mark line can be determined according to the preset drawing position of the target mark line, the abscissa value of the target mark line and the extracted ordinate value of the first end point coordinate are combined to form mark points, each mark point is drawn in the two-dimensional plane coordinate system, and connecting lines of each mark point are drawn, so that the target mark line is obtained.
Under the condition that the target mark line to be drawn is parallel to the transverse axis in the two-dimensional plane coordinate system, the longitudinal coordinate value of the target mark line can be determined according to the preset drawing position of the target mark line, the longitudinal coordinate value of the target mark line and the extracted horizontal coordinate value of the first end point coordinate are combined to form mark points, each mark point is drawn in the two-dimensional plane coordinate system, and connecting lines of each mark point are drawn, so that the target mark line is obtained.
In the embodiment of the invention, after the target marking in one direction around the building structure diagram is drawn, the target direction can be determined again, and the steps are adopted to continue drawing the target marking in other directions until the target marking in four directions around the building structure diagram is drawn.
It should be noted that, according to the first end point coordinates corresponding to two adjacent points of the marking, the corresponding size marks, for example, 2.5m, 250cm, etc., may be displayed near the two adjacent points, in the actual distance in the building structure.
In summary, the method for generating the marking provided by the invention comprises the following steps: projecting the house structure diagram into a two-dimensional plane coordinate system; extracting two first end point coordinates of each room area on one side of a target direction in a house structure diagram to obtain a first coordinate set formed by a plurality of first end point coordinates; removing the first end point coordinates, which are blocked by the target edge line segment at one side of the target direction, in the first coordinate set from the first coordinate set to obtain a second coordinate set; the target edge line segment is formed by connecting two first end point coordinates; and drawing a target marking line of the house structure diagram in the target direction based on the target coordinate set. Therefore, each marking around the house structure drawing board can be drawn according to the endpoints of all room areas which can be observed on one side of the marking, so that the marking can completely fit the size of the whole house structure, the size of each room area can be accurately described, and the marking drawing accuracy is improved.
Example two
Detailed description of the invention the method for generating the marking line is provided in the embodiment of the invention.
Referring to fig. 4, a flowchart illustrating specific steps of another method for generating a reticle according to an embodiment of the present invention may include the following steps:
step 201, projecting the house structure diagram into a two-dimensional plane coordinate system.
In this step, reference is made to step 101, which is not repeated in the embodiment of the present invention.
Step 202, obtaining target edge line segments of all room areas on one side of a target direction in the house structure diagram.
In the embodiment of the invention, in order to draw the target marking line of the house structure diagram on one side of the target direction, firstly, the room area in the house structure diagram can be identified, and the target edge line segment on one side of the target direction in all the room areas can be obtained.
As shown in fig. 3, if the target direction is left, the target edge line segment of the room area a is a line segment corresponding to the wall on the left side of the room area a, that is, the target edge line segment 11. The target edge line segment of the room area B is the line segment corresponding to the wall on the left side of the room area B, i.e., the target edge line segment 12.
Optionally, step 202 further includes:
in step 2021, a plurality of edge line segments surrounding the room area in the building block diagram are obtained.
In the embodiment of the invention, in order to obtain the target edge line segments of the room area, all the edge line segments of the room area can be obtained first, and then the edge line segments matched with the target direction are found out from all the edge line segments of the room area to obtain the target edge line segments.
For example, as shown in fig. 3, if the target edge line segment of the room area a is to be determined, all edge line segments of the room area a may be obtained first, that is, four edge line segments surrounding the room area a are obtained, and then the four edge line segments are respectively matched with the target direction, so as to determine the target edge line segment corresponding to the room area a.
Substep 2022, determining an edge line segment of the plurality of edge line segments that is perpendicular to the target direction and that is near the target direction as a target edge line segment of the room region.
In the embodiment of the present invention, since the target edge line segment of each room area is an edge line segment of the room area on one side of the target direction, that is, the target edge line segment is perpendicular to the target direction, further, since the room area may correspond to a plurality of edge line segments perpendicular to the target direction, the target edge line segment also needs to be the edge line segment closest to one side of the target direction among all edge line segments perpendicular to the target direction, which correspond to the room area.
Specifically, an edge line segment which is perpendicular to the target direction and is close to the target direction among the plurality of edge line segments may be determined as a target edge line segment of the room area.
For example, as shown in fig. 3, the room area a corresponds to four edge line segments, wherein the edge line segments 11 and 21 are perpendicular to the target direction, and the edge line segments 11 are closer to the target direction w than the edge line segments 21, so the edge line segments 11 can be determined as the target edge line segments corresponding to the room area a.
Step 203, obtaining two first end point coordinates of the target edge line segment in the two-dimensional plane coordinate system.
In the embodiment of the invention, two end points of one target edge line segment are two first end point coordinates of one room area, so that after the target edge line segments corresponding to each room area are determined, the end point coordinates of the target edge line segments can be obtained, and the two first end point coordinates corresponding to the room area are obtained.
And 204, adding the first endpoint coordinates into an initial set according to the distribution sequence of the target edge line segments in the two-dimensional plane coordinate system to obtain a first coordinate set.
The distribution order of the target edge line segments in the two-dimensional plane coordinate system may refer to the distribution order of each target edge line segment in the two-dimensional plane coordinate system along the target direction, or may refer to the distribution order along the opposite direction of the target direction.
For example, as shown in fig. 3, the distribution order of the target edge line segments of each room area along the target direction w is an edge line segment 12, an edge line segment 11, an edge line segment 13, an edge line segment 14, an edge line segment 16, an edge line segment 15, an edge line segment 17, an edge line segment 18. It should be noted that if a plurality of target edge line segments are located at the same position in the target direction (for example, the edge line segment 11 and the edge line segment 13 in fig. 3), the order between the plurality of target edge line segments may be arbitrarily adjusted.
In the embodiment of the invention, all the first endpoint coordinates can be added into an initial set according to the distribution sequence of the corresponding target edge line segments in the two-dimensional plane coordinate system, so as to obtain a first coordinate set containing all the first endpoint coordinates. It should be noted that, for two first endpoint coordinates corresponding to the same target edge line segment, when the two first endpoint coordinates are added to the initial set, the first endpoint coordinates of one azimuth may precede the first endpoint coordinates of the other azimuth, or the sequence between the two first endpoint coordinates may not be limited.
For example, let the coordinates of the two first end points corresponding to the target edge line segment 11 be A1 and A2, the coordinates of the two first end points corresponding to the target edge line segment 12 be B1 and B2, the coordinates of the two first end points corresponding to the target edge line segment 13 be C1 and C2, and so on. The first endpoint coordinates are added to the initial set according to the distribution sequence of the target edge line segments along the target direction in the two-dimensional plane coordinate system, and the obtained first coordinate set can be [ B1, B2, A1, A2, C1, C2, D1, D2, F1, F2, E1, E2, G1, G2, H1, H2].
And 205, traversing the first end point coordinates corresponding to each target edge line segment in the first coordinate set in a reverse order.
In the embodiment of the invention, the traversal can be started from the first end point coordinate corresponding to the target edge line segment at one side far away from the target direction until the first end point coordinate corresponding to the target edge line segment at one side closest to the target direction is traversed.
Since the first coordinate set obtained by adding the first end point coordinates to the initial set according to the distribution order of the target edge line segments in the two-dimensional plane coordinate system when the first coordinate set is generated in the foregoing step, the starting point position from which the traversal starts can be selected from the first coordinate set according to the distribution order.
Specifically, in the case that the distribution sequence is that each target edge line segment is in the two-dimensional plane coordinate system and along the target direction, the whole first coordinate set may be traversed from the first endpoint coordinate of the first coordinate set. In the above-mentioned distribution sequence, when each target edge line segment is in the two-dimensional plane coordinate system and is in the opposite direction to the target direction, the whole first coordinate set may be traversed from the last first endpoint coordinate of the first coordinate set.
In the embodiment of the invention, the first coordinate set is generated through the distribution sequence of the target edge line segments, and each first endpoint coordinate in the first coordinate set is sequentially traversed from the starting position/the ending position of the first coordinate set according to the distribution sequence, so that the first endpoint coordinate can be sequentially traversed according to the distribution condition of the first endpoint coordinate on the plane without analyzing the arrangement sequence of the first endpoint coordinate in the two-dimensional plane coordinate system in the traversing process, and the traversing efficiency is improved.
And 206, determining the traversed first endpoint coordinate as a second endpoint coordinate when the extension line of the traversed first endpoint coordinate in the target direction intersects with the target edge line segment corresponding to the first endpoint coordinate which is not traversed.
In the embodiment of the invention, if the first endpoint coordinate is blocked by other target edge line segments at one side of the target direction, it is indicated that the first endpoint coordinate cannot be directly observed from one side of the target line to be generated, the target point corresponding to the first endpoint coordinate may not appear on the target line corresponding to the target direction, and the target point corresponding to the first endpoint coordinate may appear on other target lines corresponding to other directions, so that the effect of the generated line is improved, and the target point on the target line is more easily corresponding to each first endpoint.
For example, referring to fig. 5, fig. 5 shows a schematic diagram of a reticle provided in an embodiment of the present invention, as shown in fig. 5, a direction w corresponds to a reticle 61, a direction x corresponds to a reticle 62, a direction y corresponds to a reticle 63, and a direction z corresponds to a reticle 64. When the target direction is w, the first end point 111 of the room area a is blocked by the target edge line segment of the other room area on the w direction side thereof, and cannot be observed from the w direction side of the entire house, and therefore, the first end point 111 can be removed from the first coordinate set, and the target point corresponding to the first end point 111 is not generated on the reticle 61. When the reticle 62 corresponding to the direction x is subsequently generated, since the first end point 111 can be directly observed from the x-direction side, the reticle 621 corresponding to the first end point 111 can be generated on the reticle 62.
When traversing to a first endpoint coordinate, it can be determined whether the first endpoint coordinate is blocked by a target edge line segment on one side of the target direction of the first endpoint coordinate, and it should be noted that the blocking refers to that a projection point of the first endpoint coordinate in the first direction is located above the target edge line segment. In the embodiment of the invention, an extension line of the first endpoint coordinate can be made along the target direction, whether the extension line intersects with other target edge line segments or not is judged, if the extension line does not intersect with other target edge line segments, the next first endpoint coordinate is continuously traversed, and if the extension line intersects with other target edge line segments, the first endpoint coordinate is determined as the second endpoint coordinate.
Specifically, since in the first coordinate set, the two first end point coordinates corresponding to each target edge line segment always appear in adjacent pairs, and the first end point coordinates in the first coordinate set are arranged in the order of distribution of the corresponding target edge line segments in the two-dimensional plane coordinate system, it is possible for each traversed first end point coordinate to be compared with the two first end point coordinates corresponding to each non-traversed target edge line segment in the first coordinate set before or after it, so as to determine whether or not the extension line of the traversed first end point coordinate in the target direction intersects with other target edge line segments.
And under the condition that the target direction is parallel to the x axis of the two-dimensional plane coordinate system, comparing the ordinate values of the traversed first endpoint coordinates with the two first endpoint coordinates corresponding to all the non-traversed target edge line segments, if the ordinate values of the traversed first endpoint coordinates are larger than the ordinate values of one first endpoint coordinate corresponding to a certain non-traversed target edge line segment and smaller than the ordinate values of the other first endpoint coordinate corresponding to the non-traversed target edge line segment, the extension line of the traversed first endpoint coordinates in the target direction is intersected with the non-traversed target edge line segment, and determining the first endpoint coordinates as second endpoint coordinates.
For example, as shown in fig. 3, in the case where the first coordinate set is [ B1, B2, A1, A2, C1, C2, D1, D2, F1, F2, E1, E2, G1, G2, H1, H2], since the first end coordinates are added to the initial set in the order of distribution of the target edge line segments along the target direction when the first coordinate set is generated, the first coordinate set may be traversed from the start position of the first coordinate set, and when traversing to the 12 th first end coordinate E2, it may be determined whether the ordinate value corresponding to the first end coordinate E2 is located between the ordinate values of the two first end coordinates G1 and G2 corresponding to the target edge line segment 17, if the determination result is no, it may be continued to determine whether the ordinate value corresponding to the first end coordinate E2 is located between the ordinate values of the two first end coordinates H1 and H2 corresponding to the target edge line segment 18, and if the determination result is yes, it may be determined that the first end coordinate E2 is the second end point.
In the embodiment of the invention, all the first endpoint coordinates can be traversed from the first endpoint coordinates far away from the target direction, and the first endpoint coordinates which are traversed currently are compared with the first endpoint coordinates which are not traversed currently, so that whether the first endpoint coordinates which are traversed currently need to be reserved or not is determined, the speed of traversing the first endpoint coordinates is improved, all the first endpoint coordinates which can be observed from the target direction can be reserved, and therefore a more complete target marking is drawn on one side of the target direction.
And step 207, drawing a target marking of the house structure diagram in the target direction based on the second coordinate set.
In an embodiment of the present invention, the target direction may include a transverse axis direction, a transverse axis opposite direction, a longitudinal axis direction, and a longitudinal axis opposite direction of the two-dimensional planar coordinate system. Therefore, there is also a difference in the trend of the target reticle to be drawn in the two-dimensional plane coordinate system based on the difference in the target direction, the drawn target reticle is parallel to the longitudinal axis direction if the target direction is parallel to the transverse axis direction, and the drawn target reticle is parallel to the transverse axis direction if the target direction is parallel to the longitudinal axis direction.
Optionally, step 207 further comprises:
sub-step 2071, extracting ordinate of each endpoint coordinate in the second coordinate set, and drawing a target marking outside the target direction of the building structure according to the ordinate, when the target direction is parallel to the horizontal axis of the two-dimensional plane coordinate system.
As shown in fig. 5, if the target direction is the direction w, that is, the target direction is parallel to the horizontal axis, the ordinate of each endpoint coordinate in the second coordinate set corresponding to the target direction w may be extracted, the abscissa of the reticle may be determined, the same number of endpoint coordinates as the endpoint coordinates in the second coordinate set may be generated according to the abscissa of the reticle and the ordinate of each endpoint coordinate, each endpoint coordinate may be drawn in the two-dimensional plane coordinate system, and the connection line between each endpoint coordinate may be generated, so as to obtain the reticle 61 corresponding to the target direction w, and the endpoint 611 on the reticle 61.
It should be noted that, the abscissa may be calculated based on a preset distance from the building structure, for example, when the target direction is the negative direction of the horizontal axis, the minimum abscissa of all points in the building structure is determined, and then the minimum abscissa is subtracted by a preset distance to obtain the abscissa value corresponding to the target marking in the target direction. The technician may also determine the generation position of each marking line in other manners, and embodiments of the present invention are not specifically limited herein.
Further, if the distance between two adjacent targets in the marker line is too short, the target adhesion may not be distinguished, and the display effect of the generated marker line is affected. Specifically, the merging may be removing one of the two adjacent punctuations, or generating a new punctuation between the two adjacent punctuations, and removing the two adjacent punctuations from the reticle, and the technician may also merge the two adjacent punctuations in other manners according to actual needs, which is not limited in particular by the embodiment of the present invention.
Sub-step 2072, extracting the abscissa of each endpoint coordinate in the second coordinate set, and drawing a target marking outside the target direction of the building structure according to the abscissa, when the target direction is parallel to the longitudinal axis of the two-dimensional plane coordinate system.
This step is similar to the above-described substep 2071, and the embodiments of the present invention will not be described again.
In summary, another method for generating a reticle according to the present invention includes: projecting the house structure diagram into a two-dimensional plane coordinate system; extracting two first end point coordinates of each room area on one side of a target direction in a house structure diagram to obtain a first coordinate set formed by a plurality of first end point coordinates; removing the first end point coordinates, which are blocked by the target edge line segment at one side of the target direction, in the first coordinate set from the first coordinate set to obtain a second coordinate set; the target edge line segment is formed by connecting two first end point coordinates; and drawing a target marking line of the house structure diagram in the target direction based on the target coordinate set. Therefore, each marking around the house structure drawing board can be drawn according to the endpoints of all room areas which can be observed on one side of the marking, so that the marking can completely fit the size of the whole house structure, the size of each room area can be accurately described, and the marking drawing accuracy is improved.
Example III
Detailed description of the invention the embodiment of the invention provides a marking line generating device.
Referring to fig. 6, a schematic structural diagram of a reticle generating device according to an embodiment of the present invention is shown in fig. 6:
the marking generating device of the embodiment of the invention comprises: a projection module 501, a first coordinates module 502, a second coordinates module 503, and a rendering module 504.
The functions of the modules and the interaction relationship between the modules are described in detail below.
The projection module 501 is used for projecting the house structure diagram into a two-dimensional plane coordinate system;
the first coordinate module 502 is configured to extract two first end point coordinates of each room area on one side in the target direction in the building structure diagram, and obtain a first coordinate set formed by a plurality of first end point coordinates;
a second coordinate module 503, configured to remove, from the first coordinate set, a first endpoint coordinate that is blocked by the target edge line segment on one side of the target direction in the first coordinate set, to obtain a second coordinate set; the target edge line segment is formed by connecting the coordinates of the two first end points;
and a drawing module 504, configured to draw a target marking of the building structure diagram in the target direction based on the second coordinate set.
Optionally, the first coordinate module includes:
a target edge line segment sub-module, configured to obtain target edge line segments of all room areas in the building structure diagram on one side of a target direction;
the first end point coordinate submodule is used for acquiring two first end point coordinates of the target edge line segment in the two-dimensional plane coordinate system;
and the first coordinate set submodule is used for adding the first end point coordinate into the initial set according to the distribution sequence of the target edge line segments in the two-dimensional plane coordinate system to obtain a first coordinate set.
Optionally, the target edge line segment submodule includes:
an edge line segment sub-module, configured to obtain a plurality of edge line segments in the building structure diagram, where the edge line segments enclose the room area;
and the target edge line segment determining submodule is used for determining an edge line segment which is perpendicular to the target direction and is close to the target direction from the plurality of edge line segments as a target edge line segment of the room area.
Optionally, the second coordinate module includes:
the traversing submodule is used for traversing first end point coordinates corresponding to each target edge line segment in the first coordinate set in a reverse order;
the second endpoint coordinate submodule is used for determining the traversed first endpoint coordinate as a second endpoint coordinate when an extension line of the traversed first endpoint coordinate in the target direction intersects a target edge line segment corresponding to the first endpoint coordinate which is not traversed;
And the second coordinate set submodule is used for removing all second endpoint coordinates from the coordinate set to obtain a second coordinate set.
Optionally, the target direction includes a transverse axis direction, a transverse axis opposite direction, a longitudinal axis direction, and a longitudinal axis opposite direction of the two-dimensional plane coordinate system, and the drawing module includes:
the first drawing submodule is used for extracting the ordinate of each endpoint coordinate in the second coordinate set under the condition that the target direction is parallel to the transverse axis of the two-dimensional plane coordinate system, and drawing a target marking line outside the target direction of the house structure diagram according to the ordinate;
and the second drawing submodule is used for extracting the abscissa of each endpoint coordinate in the second coordinate set under the condition that the target direction is parallel to the longitudinal axis of the two-dimensional plane coordinate system, and drawing a target marking line outside the target direction of the house structure diagram according to the abscissa.
In summary, the marking generating device provided by the invention comprises: the projection module is used for projecting the house structure diagram into a two-dimensional plane coordinate system; the first coordinate module is used for extracting two first end point coordinates of each room area on one side of the target direction in the house structure diagram to obtain a first coordinate set formed by a plurality of first end point coordinates; the second coordinate module is used for removing the first end point coordinate, which is blocked by the target edge line segment at one side of the target direction, in the first coordinate set from the first coordinate set to obtain a second coordinate set; the target edge line segment is formed by connecting two first end point coordinates; and the drawing module is used for drawing the target marking of the house structure diagram in the target direction based on the second coordinate set. Therefore, each marking around the house structure drawing board can be drawn according to the endpoints of all room areas which can be observed on one side of the marking, so that the marking can completely fit the size of the whole house structure, the size of each room area can be accurately described, and the marking drawing accuracy is improved.
Example IV
Fig. 7 is a schematic hardware structure of a terminal device for implementing various embodiments of the present invention.
The terminal device 600 includes, but is not limited to: radio frequency unit 601, network module 602, audio output unit 603, input unit 604, sensor 605, display unit 606, user input unit 607, interface unit 608, memory 609, processor 610, and power supply 611. It will be appreciated by those skilled in the art that the terminal device structure shown in fig. 7 does not constitute a limitation of the terminal device, and the terminal device may comprise more or less components than shown, or may combine certain components, or may have a different arrangement of components. In the embodiment of the invention, the terminal equipment comprises, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer and the like.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 601 may be used to receive and send information or signals during a call, specifically, receive downlink data from a base station, and then process the downlink data with the processor 610; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 601 may also communicate with networks and other devices through a wireless communication system.
The terminal device provides wireless broadband internet access to the user via the network module 602, such as helping the user to send and receive e-mail, browse web pages, access streaming media, etc.
The audio output unit 603 may convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output as sound. Also, the audio output unit 603 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the terminal device 600. The audio output unit 603 includes a speaker, a buzzer, a receiver, and the like.
The input unit 604 is used for receiving audio or video signals. The input unit 604 may include a graphics processor (Graphics Processing Unit, GPU) 6041 and a microphone 6042, the graphics processor 6041 processing image data of still pictures or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 606. The image frames processed by the graphics processor 6041 may be stored in the memory 609 (or other storage medium) or transmitted via the radio frequency unit 601 or the network module 602. Microphone 6042 may receive sound and can process such sound into audio data. The processed audio data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 601 in the case of a telephone call mode.
The terminal device 600 further comprises at least one sensor 605, such as a light sensor, a motion sensor and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 6061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 6061 and/or the backlight when the terminal device 600 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when the accelerometer sensor is stationary, and can be used for recognizing the gesture (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking) and the like of the terminal equipment; the sensor 605 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which are not described herein.
The display unit 606 is used to display information input by a user or information provided to the user. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 607 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the terminal device. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072. Touch panel 6071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on touch panel 6071 or thereabout using any suitable object or accessory such as a finger, stylus, or the like). The touch panel 6071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 610, and receives and executes commands sent from the processor 610. In addition, the touch panel 6071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 607 may include other input devices 6072 in addition to the touch panel 6071. Specifically, other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein.
Further, the touch panel 6071 may be overlaid on the display panel 6061, and when the touch panel 6071 detects a touch operation thereon or thereabout, the touch operation is transmitted to the processor 610 to determine a type of a touch event, and then the processor 610 provides a corresponding visual output on the display panel 6061 according to the type of the touch event. Although in fig. 7, the touch panel 6071 and the display panel 6061 are two independent components to realize the input and output functions of the terminal device, in some embodiments, the touch panel 6071 and the display panel 6061 may be integrated to realize the input and output functions of the terminal device, which is not limited herein.
The interface unit 608 is an interface to which an external device is connected to the terminal apparatus 600. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 608 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal apparatus 600 or may be used to transmit data between the terminal apparatus 600 and an external device.
The memory 609 may be used to store software programs as well as various data. The memory 609 may mainly include a storage program area that may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, the memory 609 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 610 is a control center of the terminal device, connects various parts of the entire terminal device using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 609 and calling data stored in the memory 609, thereby performing overall monitoring of the terminal device. The processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The terminal device 600 may further include a power supply 611 (such as a battery) for supplying power to the respective components, and preferably, the power supply 611 may be logically connected to the processor 610 through a power management system, so that functions of managing charging, discharging, power consumption management, etc. are implemented through the power management system.
In addition, the terminal device 600 includes some functional modules, which are not shown, and will not be described herein.
Preferably, the embodiment of the present invention further provides a terminal device, including: the processor 610, the memory 609, and a computer program stored in the memory 609 and capable of running on the processor 610, where the computer program when executed by the processor 610 implements the processes of the above-described reticle generating method embodiment and achieves the same technical effects, and is not repeated herein.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, realizes the processes of the above-mentioned marking generation method embodiment, and can achieve the same technical effects, and in order to avoid repetition, the description is omitted here. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (12)

1. A reticle generating method, the method comprising:
projecting the house structure diagram into a two-dimensional plane coordinate system;
extracting two first end point coordinates of each room area on one side of a target direction in a house structure diagram to obtain a first coordinate set formed by a plurality of first end point coordinates;
removing the first end point coordinates, which are blocked by the target edge line segment at one side of the target direction, in the first coordinate set from the first coordinate set to obtain a second coordinate set; the target edge line segment is formed by connecting the coordinates of the two first end points;
the first endpoint coordinates, which are blocked by the target edge line segment at one side of the target direction, include: a first endpoint coordinate at which a projected point in the target direction is located over at least one of the target edge line segments;
and drawing a target marking line of the house structure diagram in the target direction based on the second coordinate set.
2. The method according to claim 1, wherein extracting two first endpoint coordinates of each room region on one side of the target direction in the building structure diagram to obtain a first coordinate set composed of a plurality of first endpoint coordinates comprises:
Acquiring target edge line segments of all room areas on one side of a target direction in the house structure diagram;
acquiring two first end point coordinates of the target edge line segment in the two-dimensional plane coordinate system;
and adding the first endpoint coordinates into an initial set according to the distribution sequence of the target edge line segments in the two-dimensional plane coordinate system to obtain a first coordinate set.
3. The method according to claim 2, wherein the acquiring the target edge line segments of all room areas in the building structure on one side of the target direction includes:
acquiring a plurality of edge line segments which enclose the room area in the house structure diagram;
and determining an edge line segment which is perpendicular to the target direction and is close to the target direction from the plurality of edge line segments as a target edge line segment of the room area.
4. The method according to claim 2, wherein the removing the first endpoint coordinate, which is blocked by the target edge line segment on the target direction side, from the first coordinate set to obtain the second coordinate set includes:
traversing first end point coordinates corresponding to each target edge line segment in the first coordinate set in a reverse order;
When the extended line of the traversed first endpoint coordinate in the target direction intersects with a target edge line segment corresponding to the first endpoint coordinate which is not traversed, determining the first endpoint coordinate which is traversed as a second endpoint coordinate;
and removing all the second endpoint coordinates from the coordinate set to obtain a second coordinate set.
5. The method of claim 1, wherein the target direction comprises a transverse axis direction, a transverse axis opposite direction, a longitudinal axis direction, and a longitudinal axis opposite direction of the two-dimensional planar coordinate system, the drawing a target reticle of the building block diagram in the target direction based on the second set of coordinates, comprising:
extracting the ordinate of each endpoint coordinate in the second coordinate set under the condition that the target direction is parallel to the transverse axis of the two-dimensional plane coordinate system, and drawing a target marking on the outer side of the target direction of the house structure diagram according to the ordinate;
and under the condition that the target direction is parallel to the longitudinal axis of the two-dimensional plane coordinate system, extracting the abscissa of each endpoint coordinate in the second coordinate set, and drawing a target marking outside the target direction of the house structure diagram according to the abscissa.
6. A reticle generating device, the device comprising:
the projection module is used for projecting the house structure diagram into a two-dimensional plane coordinate system;
the first coordinate module is used for extracting two first end point coordinates of each room area on one side of the target direction in the house structure diagram to obtain a first coordinate set formed by a plurality of first end point coordinates;
the second coordinate module is used for removing the first end point coordinate, which is blocked by the target edge line segment at one side of the target direction, in the first coordinate set from the first coordinate set to obtain a second coordinate set; the target edge line segment is formed by connecting the coordinates of the two first end points;
the first endpoint coordinates, which are blocked by the target edge line segment at one side of the target direction, include: a first endpoint coordinate at which a projected point in the target direction is located over at least one of the target edge line segments;
and the drawing module is used for drawing the target marking of the house structure diagram in the target direction based on the second coordinate set.
7. The apparatus of claim 6, wherein the first coordinate module comprises:
A target edge line segment sub-module, configured to obtain target edge line segments of all room areas in the building structure diagram on one side of a target direction;
the first end point coordinate submodule is used for acquiring two first end point coordinates of the target edge line segment in the two-dimensional plane coordinate system;
and the first coordinate set submodule is used for adding the first end point coordinate into the initial set according to the distribution sequence of the target edge line segments in the two-dimensional plane coordinate system to obtain a first coordinate set.
8. The apparatus of claim 7, wherein the target edge line segment submodule comprises:
an edge line segment sub-module, configured to obtain a plurality of edge line segments in the building structure diagram, where the edge line segments enclose the room area;
and the target edge line segment determining submodule is used for determining an edge line segment which is perpendicular to the target direction and is close to the target direction from the plurality of edge line segments as a target edge line segment of the room area.
9. The apparatus of claim 7, wherein the second coordinate module comprises:
the traversing submodule is used for traversing first end point coordinates corresponding to each target edge line segment in the first coordinate set in a reverse order;
The second endpoint coordinate submodule is used for determining the traversed first endpoint coordinate as a second endpoint coordinate when an extension line of the traversed first endpoint coordinate in the target direction intersects a target edge line segment corresponding to the first endpoint coordinate which is not traversed;
and the second coordinate set submodule is used for removing all second endpoint coordinates from the coordinate set to obtain a second coordinate set.
10. The apparatus of claim 6, wherein the target direction comprises a transverse axis direction, a transverse axis opposite direction, a longitudinal axis direction, and a longitudinal axis opposite direction of the two-dimensional planar coordinate system, the rendering module comprising:
the first drawing submodule is used for extracting the ordinate of each endpoint coordinate in the second coordinate set under the condition that the target direction is parallel to the transverse axis of the two-dimensional plane coordinate system, and drawing a target marking line outside the target direction of the house structure diagram according to the ordinate;
and the second drawing submodule is used for extracting the abscissa of each endpoint coordinate in the second coordinate set under the condition that the target direction is parallel to the longitudinal axis of the two-dimensional plane coordinate system, and drawing a target marking line outside the target direction of the house structure diagram according to the abscissa.
11. A terminal device, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of the reticle generating method according to any one of claims 1 to 5.
12. A computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the reticle generating method according to any one of claims 1 to 5.
CN202210841377.4A 2022-07-18 2022-07-18 Marking generation method and device, terminal equipment and storage medium Active CN115329420B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210841377.4A CN115329420B (en) 2022-07-18 2022-07-18 Marking generation method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210841377.4A CN115329420B (en) 2022-07-18 2022-07-18 Marking generation method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115329420A CN115329420A (en) 2022-11-11
CN115329420B true CN115329420B (en) 2023-10-20

Family

ID=83916997

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210841377.4A Active CN115329420B (en) 2022-07-18 2022-07-18 Marking generation method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115329420B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1131217A (en) * 1997-07-14 1999-02-02 Hitachi Software Eng Co Ltd House evaluation processing system
CN108829435A (en) * 2018-06-19 2018-11-16 数据堂(北京)科技股份有限公司 A kind of image labeling method and general image annotation tool
CN111968247A (en) * 2020-07-10 2020-11-20 北京城市网邻信息技术有限公司 Method and device for constructing three-dimensional house space, electronic equipment and storage medium
CN112037224A (en) * 2018-12-27 2020-12-04 福建省晨曦信息科技股份有限公司 Method for generating axis according to marking line, electronic equipment and storage medium
CN112127261A (en) * 2020-10-14 2020-12-25 福州鼓楼瞳睁科技有限公司 A adjustable equipment of drawing of landmark line for construction
CN112948920A (en) * 2021-02-03 2021-06-11 浙江交工集团股份有限公司 Method and system for quickly modeling roadbed and pavement BIM model based on Revit platform
CN113744329A (en) * 2020-05-29 2021-12-03 宁波方太厨具有限公司 Automatic region division and robot walking control method, system, equipment and medium
WO2022022654A1 (en) * 2020-07-30 2022-02-03 华为技术有限公司 Indoor map generation method and apparatus
CN114329675A (en) * 2021-12-31 2022-04-12 北京有竹居网络技术有限公司 Model generation method, model generation device, electronic device, and readable storage medium
CN114370859A (en) * 2022-01-13 2022-04-19 安徽中擎建设发展有限公司 Laser marking method for plastering inner wall of building

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130300740A1 (en) * 2010-09-13 2013-11-14 Alt Software (Us) Llc System and Method for Displaying Data Having Spatial Coordinates
WO2019228188A1 (en) * 2018-05-30 2019-12-05 贝壳找房(北京)科技有限公司 Method and apparatus for marking and displaying spatial size in virtual three-dimensional house model

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1131217A (en) * 1997-07-14 1999-02-02 Hitachi Software Eng Co Ltd House evaluation processing system
CN108829435A (en) * 2018-06-19 2018-11-16 数据堂(北京)科技股份有限公司 A kind of image labeling method and general image annotation tool
CN112037224A (en) * 2018-12-27 2020-12-04 福建省晨曦信息科技股份有限公司 Method for generating axis according to marking line, electronic equipment and storage medium
CN113744329A (en) * 2020-05-29 2021-12-03 宁波方太厨具有限公司 Automatic region division and robot walking control method, system, equipment and medium
CN111968247A (en) * 2020-07-10 2020-11-20 北京城市网邻信息技术有限公司 Method and device for constructing three-dimensional house space, electronic equipment and storage medium
WO2022022654A1 (en) * 2020-07-30 2022-02-03 华为技术有限公司 Indoor map generation method and apparatus
CN112127261A (en) * 2020-10-14 2020-12-25 福州鼓楼瞳睁科技有限公司 A adjustable equipment of drawing of landmark line for construction
CN112948920A (en) * 2021-02-03 2021-06-11 浙江交工集团股份有限公司 Method and system for quickly modeling roadbed and pavement BIM model based on Revit platform
CN114329675A (en) * 2021-12-31 2022-04-12 北京有竹居网络技术有限公司 Model generation method, model generation device, electronic device, and readable storage medium
CN114370859A (en) * 2022-01-13 2022-04-19 安徽中擎建设发展有限公司 Laser marking method for plastering inner wall of building

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Coding Technology of Building Space Marking Position;Jichang Cao,et al.;《Springer Nature Switzerland AG 2021》;全文 *
三维室内场景的地面布置图自动生成系统;宋海林 等;《图像图形技术研究与应用》;全文 *
尺寸界线上表面粗糙度自动标注工具开发;郑上海;《中国计量学院学报》;全文 *

Also Published As

Publication number Publication date
CN115329420A (en) 2022-11-11

Similar Documents

Publication Publication Date Title
CN108459797B (en) Control method of folding screen and mobile terminal
CN109078319B (en) Game interface display method and terminal
CN107846583B (en) Image shadow compensation method and mobile terminal
CN107783747B (en) Interface display processing method and mobile terminal
WO2021121237A1 (en) Video stream clipping method and electronic device
US20230014409A1 (en) Detection result output method, electronic device and medium
CN110908517B (en) Image editing method, image editing device, electronic equipment and medium
CN111464428A (en) Audio processing method, server, electronic device, and computer-readable storage medium
CN110944113B (en) Object display method and electronic equipment
CN109618055B (en) Position sharing method and mobile terminal
CN111026263B (en) Audio playing method and electronic equipment
CN110740265B (en) Image processing method and terminal equipment
CN109327605B (en) Display control method and device and mobile terminal
CN108495276B (en) Sharing method and device of digital business card
CN110839108A (en) Noise reduction method and electronic equipment
CN115329420B (en) Marking generation method and device, terminal equipment and storage medium
CN110764650A (en) Key trigger detection method and electronic equipment
CN110781331A (en) Picture display method, electronic equipment and computer readable storage medium
CN113808209B (en) Positioning identification method, positioning identification device, computer equipment and readable storage medium
CN111145083B (en) Image processing method, electronic equipment and computer readable storage medium
CN109194943B (en) Image processing method and terminal equipment
CN111401463B (en) Method for outputting detection result, electronic equipment and medium
CN110933308A (en) Photographing method, electronic device, and storage medium
CN111523286B (en) Picture display method, picture display device, electronic equipment and computer readable storage medium
CN110930878B (en) Control method of flexible screen and electronic equipment

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
GR01 Patent grant
GR01 Patent grant