CN112836262A - Method for acquiring intersection state between planes, model generation method and related product - Google Patents

Method for acquiring intersection state between planes, model generation method and related product Download PDF

Info

Publication number
CN112836262A
CN112836262A CN201911156253.7A CN201911156253A CN112836262A CN 112836262 A CN112836262 A CN 112836262A CN 201911156253 A CN201911156253 A CN 201911156253A CN 112836262 A CN112836262 A CN 112836262A
Authority
CN
China
Prior art keywords
plane
intersection
point
normal vector
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911156253.7A
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 Shanghai Intelligent Technology Co ltd
Original Assignee
Jiuling Shanghai 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 Shanghai Intelligent Technology Co ltd filed Critical Jiuling Shanghai Intelligent Technology Co ltd
Priority to CN201911156253.7A priority Critical patent/CN112836262A/en
Publication of CN112836262A publication Critical patent/CN112836262A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/04Architectural design, interior design

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application relates to a method for acquiring intersection states between planes, a method for generating a model and a related product. The method comprises the following steps: acquiring a normal vector of a first plane and a normal vector of a second plane; wherein the first and second planes are planes with finite boundaries; if the normal vector of the first plane is parallel to the normal vector of the second plane, acquiring the intersection state according to the distance between the first plane and the second plane; and if the normal vector of the first plane is not parallel to the normal vector of the second plane, determining that the intersection state is not intersected. By adopting the method, the efficiency of model design can be improved.

Description

Method for acquiring intersection state between planes, model generation method and related product
Technical Field
The application relates to the technical field of building design, in particular to a method for acquiring intersection states between planes, a method for generating a model and a related product.
Background
With the rapid development of computer technology, automated aided design has been widely used in various industries.
Generally, in the field of building design, people use automated design software for design. For example, in the design process of a building model, designers often encounter the design of partially identical functions, such as the determination of the intersection state of faces. The traditional design method is that designers operate one by one according to design requirements so as to obtain the result of an intersection state, and then model design is carried out according to the obtained result.
However, the conventional method requires repeated manual operations of a designer, and thus is time-consuming, labor-consuming, and low in accuracy.
Disclosure of Invention
In view of the above, it is necessary to provide a method for acquiring an intersection state between planes, a method for generating a model, an apparatus, a computer device, and a storage medium, which can improve design efficiency and accuracy.
In a first aspect, an embodiment of the present application provides a method for acquiring an intersection state between planes, where the method includes:
acquiring a normal vector of a first plane and a normal vector of a second plane; wherein the first and second planes are planes with finite boundaries;
if the normal vector of the first plane is parallel to the normal vector of the second plane, acquiring the intersection state according to the distance between the first plane and the second plane;
and if the normal vector of the first plane is not parallel to the normal vector of the second plane, determining that the intersection state is not intersected.
In a second aspect, an embodiment of the present application provides a model generation method, where the method includes:
acquiring a first surface representing a first model to be generated and a second surface representing a second model to be generated;
determining the intersection state of the first surface and the second surface by adopting the intersection state acquisition method between the planes as described in any of the above embodiments;
and if the intersection state is intersection, generating the first model to be generated and the second model to be generated according to the intersection region.
In a third aspect, an embodiment of the present application provides an intersection state obtaining apparatus between planes, where the apparatus includes:
the acquisition module is used for acquiring a normal vector of a first plane and a normal vector of a second plane; wherein the first and second planes are planes with finite boundaries;
and the processing module is used for acquiring the intersection state according to the distance between the first plane and the second plane when the normal vector of the first plane is parallel to the normal vector of the second plane, and determining that the intersection state is not intersected when the normal vector of the first plane is not parallel to the normal vector of the second plane.
In a fourth aspect, an embodiment of the present application provides a model generation apparatus, where the apparatus includes:
the acquisition module is used for acquiring a first surface representing a first model to be generated and a second surface representing a second model to be generated;
a processing module, configured to determine an intersection state of the first surface and the second surface by using the method according to any one of claims 1 to 9, and if the intersection state is intersection, generate the first model to be generated and the second model to be generated according to the intersection region.
In a fifth aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the following steps when executing the computer program:
acquiring a normal vector of a first plane and a normal vector of a second plane; wherein the first and second planes are planes with finite boundaries;
if the normal vector of the first plane is parallel to the normal vector of the second plane, acquiring the intersection state according to the distance between the first plane and the second plane;
and if the normal vector of the first plane is not parallel to the normal vector of the second plane, determining that the intersection state is not intersected.
In a sixth aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the following steps when executing the computer program:
acquiring a first surface representing a first model to be generated and a second surface representing a second model to be generated;
determining the intersection state of the first surface and the second surface by adopting the intersection state acquisition method between the planes according to any one of the embodiments;
and if the intersection state is intersection, generating the first model to be generated and the second model to be generated according to the intersection region.
In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following steps:
acquiring a normal vector of a first plane and a normal vector of a second plane; wherein the first and second planes are planes with finite boundaries;
if the normal vector of the first plane is parallel to the normal vector of the second plane, acquiring the intersection state according to the distance between the first plane and the second plane;
and if the normal vector of the first plane is not parallel to the normal vector of the second plane, determining that the intersection state is not intersected.
In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following steps:
acquiring a first surface representing a first model to be generated and a second surface representing a second model to be generated;
determining the intersection state of the first surface and the second surface by adopting the intersection state acquisition method between the planes according to any one of the embodiments;
and if the intersection state is intersection, generating the first model to be generated and the second model to be generated according to the intersection region.
The method for acquiring the intersection state between the planes, the method for generating the model, the device for generating the model, the computer equipment and the storage medium are used for acquiring the normal vector of the first plane and the normal vector of the second plane through the computer equipment; and when the normal vector of the first plane is not parallel to the normal vector of the second plane, determining that the intersection state is not intersected. The method can judge the intersection state according to the normal vector of the plane, realizes the automatic and repeated execution of the judgment operation of the intersection state, and greatly improves the efficiency of the process of judging the intersection state by adopting the method, saves the labor, and greatly improves the accuracy of the result compared with the problems of time and labor waste and low accuracy caused by adopting a series of checking operations to judge the intersection by adopting the traditional designer.
Drawings
FIG. 1 is a diagram illustrating an internal structure of a computer device according to an embodiment;
fig. 2 is a schematic flowchart of a method for acquiring an intersection state between planes according to an embodiment;
FIG. 2a is a schematic view of the distance between two planes;
FIG. 2b is a schematic diagram of an established coordinate system provided by one embodiment;
fig. 3 is a schematic flowchart of a method for acquiring an intersection state between planes according to another embodiment;
FIG. 3a is a schematic diagram of the intersection of two planes as an inclusion relationship;
fig. 4 is a schematic flowchart of a method for acquiring an intersection state between planes according to yet another embodiment;
FIG. 4a is a schematic diagram of two planes with one intersection point;
fig. 5 is a schematic flowchart of a method for acquiring an intersection state between planes according to yet another embodiment;
fig. 5a and 5b are schematic diagrams respectively illustrating an embodiment in which the intersection point is 2 and the intersection points are located on the same edge;
fig. 6 is a schematic flowchart of a method for acquiring an intersection state between planes according to yet another embodiment;
FIG. 6a is a schematic illustration of a determined intersection region provided by one embodiment;
FIG. 7 is a schematic flow chart diagram illustrating a method for model generation, according to an embodiment;
FIG. 7a is a schematic view of a parapet model and a roofing model provided in accordance with an exemplary embodiment;
FIG. 7b is a schematic view of an interior wall model and a stud model provided in accordance with an embodiment;
fig. 8 is a schematic structural diagram of an intersection state acquisition device between planes according to an embodiment;
fig. 9 is a schematic structural diagram of a model generation apparatus 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 method for acquiring the intersection state between the planes and generating the model provided by the embodiment of the application can be applied to the computer equipment shown in fig. 1. The computer device comprises a processor, a memory, a network interface, a database, a display screen and an input device which are connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing various design models including point-line-plane and solid models in the following embodiments, and specific descriptions about various design models are provided in the following embodiments. The network interface of the computer device may be used to communicate with other devices outside over a network connection. Optionally, the computer device may be a server, a desktop, a personal digital assistant, other terminal devices such as a tablet computer, a mobile phone, and the like, or a cloud or a remote server, and the specific form of the computer device is not limited in the embodiment of the present application. 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. Of course, the input device and the display screen may not belong to a part of the computer device, and may be external devices of the computer device.
Those skilled in the art will appreciate that the architecture shown in fig. 1 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.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
It should be noted that the execution subject of the method embodiments described below may be an intersection state acquisition device between planes or a model generation device, and the device may be implemented as part or all of the computer device by software, hardware, or a combination of software and hardware. The following method embodiments are described by taking the execution subject as the computer device as an example.
Fig. 2 is a method for acquiring an intersection state between planes according to an embodiment. The embodiment relates to a specific process for automatically judging the intersection relation of two surfaces by computer equipment. As shown in fig. 2, includes:
s10, acquiring a normal vector of the first plane and a normal vector of the second plane; wherein the first and second planes are planes with finite boundaries.
It should be noted that the first plane and the second plane are both planes with limited boundaries, and alternatively, the first plane and the second plane may be triangles, quadrangles, pentagons, or any polygons. Specifically, the computer device may obtain a normal vector of the first plane and a normal vector of the second plane.
S20A, if the normal vector of the first plane is parallel to the normal vector of the second plane, acquiring the intersection state according to the distance between the first plane and the second plane.
Specifically, if the normal vector of the first plane is parallel to the normal vector of the second plane, the first plane and the second plane may be parallel planes, and may also be in the same reference plane. This reference plane represents a plane for reference and can be considered infinite. When the normal vector of the first plane and the normal vector of the second plane are parallel, the computer device may determine whether the intersection state of the first plane and the second plane is an intersection according to the distance between the two planes. For example, if the distance between the first plane and the second plane is 0, it can be determined that the first plane and the second plane are in the same reference plane, and whether the intersection state of the first plane and the second plane is intersection, disjointness or inclusive relationship is determined according to the position relationship of the points in the two planes. If the distance between the first plane and the second plane is not 0, the computer device may determine that the two planes are not in the same reference plane, but are parallel planes and thus do not intersect.
S20B, if the normal vector of the first plane and the normal vector of the second plane are not parallel, determining that the intersection state is not intersected.
Specifically, the computer device may determine that the first plane and the second plane are neither parallel planes nor located in the same reference plane when a normal vector of the first plane and a normal vector of the second plane are not parallel, so that the first plane and the second plane do not intersect.
It should be noted that the first plane and the second plane are used to characterize the model whose intersection needs to be determined. Optionally, the first plane and the second plane may be projections of two models to be designed on one plane, for example, the first plane is a projection of the parapet model to a plane parallel to the ground, the second plane may be a projection of the roof model to a plane parallel to the ground, the parapet model in the intersection region may be automatically deleted to avoid the house by judging the intersection relationship between the projection and the plane, so as to avoid generating a redundant parapet model in the house, so that the design model is more reasonable, the design efficiency is higher, and the accuracy is higher. For another example, the first plane may also be a projection of an inner wall model, the second plane may be a projection of a column model between the inner wall models, the inner wall is usually generated by avoiding the column model, when it is determined that the two are intersected, the redundant inner wall models are automatically avoided from being generated in the intersection region, but the inner wall models are respectively generated on two sides of the column, and partial redundant inner wall models are also avoided, so that the design model is more reasonable, the design efficiency is higher, and the accuracy is higher. Optionally, the embodiment is operated based on self-defined points, lines, surfaces and a single model, so that more models and functions can be conveniently edited and self-defined, the model design is modularized based on the functions, the functions are greatly enriched, the design efficiency of the model is greatly improved, meanwhile, the design is more convenient and easier to operate, the design efficiency and the design quality are improved, and the learning cost of designers is reduced.
In this embodiment, the computer device obtains a normal vector of the first plane and a normal vector of the second plane; and when the normal vector of the first plane is not parallel to the normal vector of the second plane, determining that the intersection state is not intersected. The method can judge the intersection state according to the normal vector of the plane, realizes the automatic and repeated execution of the judgment operation of the intersection state, and greatly improves the efficiency of the process of judging the intersection state by adopting the method, saves the labor, and greatly improves the accuracy of the result compared with the problems of time and labor waste and low accuracy caused by adopting a series of checking operations to judge the intersection by adopting the traditional designer. The method is applied to the model design process, for example, in the process of generating the interference model, the method can be automatically and repeatedly executed to obtain two intersected models, and the avoidance design is carried out aiming at the two intersected models, so that the overall efficiency and the accuracy of the model design are greatly improved, meanwhile, the rationality of the model design is greatly improved, and the design quality is greatly improved.
Optionally, on the basis of the foregoing embodiment, a possible implementation manner of the step S10 may include: taking the cross multiplication directions of two adjacent sides of the first plane as a normal vector of the first plane, and taking the cross multiplication directions of two adjacent sides of the second plane as a normal vector of the second plane. Optionally, after the step S10, a process of determining whether normal vectors of two planes are parallel may be further included, including: the computer device may determine whether corresponding coordinate ratios of the normal vector of the first plane and the normal vector of the second plane are equal; if so, determining that the normal vector of the first plane is parallel to the normal vector of the second plane; and if not, determining that the normal vector of the first plane is not parallel to the normal vector of the second plane. Specifically, the computer device determines whether the corresponding coordinate ratio of the normal vector of the first plane and the normal vector of the second plane is equal, which may be determining whether x1/x2 and y1/y2 are equal, where x1 and y1 are coordinates of a point on the normal vector of the first plane, and x2 and y2 are coordinates of a point on the normal vector of the second plane, respectively. If the two planes are equal, determining that the normal vectors of the two planes are parallel, and otherwise, determining that the normal vectors of the two planes are not parallel. In this embodiment, the method is used to obtain the normal vector of the first plane and the normal vector of the second plane through the information of the point-line plane automatically defined by the system, and determine whether the normal vector of the first plane and the normal vector of the second plane are equal by using the method.
Alternatively, one possible implementation of the step S20A of "obtaining the intersection state according to the distance between the first plane and the second plane" may include: establishing an updating plane coordinate system according to the first plane and the second plane, and selecting a first comparison point in the first plane based on the updating plane coordinate system; acquiring the distance between the first comparison point and the second plane; taking the distance between the first comparison point and the second plane as the distance between the first plane and the second plane; if the distance between the first plane and the second plane is zero, determining that the first plane and the second plane are in the same reference plane, and determining the intersection state according to the intersection point of the first plane and the second plane; and if the distance between the first plane and the second plane is not zero, determining that the intersection state is not intersected.
Specifically, the computer device may use a vertex of one of the planes, for example, the first plane, as an origin, an edge of the vertex is an X-axis, and a direction of a vector perpendicular to the edge and a normal vector of the first plane is a Y-axis (i.e., a cross product of the edge vector and the normal vector of the plane) to establish an updated plane coordinate system, as shown in fig. 2 b. And converting the edges of the first plane and the second plane into a newly established updating plane coordinate system, thereby completing the conversion from three dimensions to two dimensions, and facilitating the subsequent coordinate calculation to be simpler and more convenient. The computer apparatus arbitrarily selects a point within the first plane as a first comparison point based on the updated planar coordinate system, then calculates a distance between the first comparison point and the second plane, and takes this distance as the distance between the first plane and the second plane. If the distance between the first plane and the second plane is zero and the normal vectors of the first plane and the second plane are parallel, it can be determined that the first plane and the second plane are in the same reference plane, and then the computer device can determine the intersection state of the first plane and the second plane according to the intersection point of the two planes, which will be described in detail later and will not be repeated herein. If the distance between the first plane and the second plane is not zero, and since the normal vectors of the first plane and the second plane are parallel, it can be determined that the first plane and the second plane are parallel and thus do not intersect. As shown in fig. 2a, the two planes are denoted P and P', respectively, and the distance between the planes can also be seen in fig. 2 a.
In this embodiment, the computer device establishes an updated planar coordinate system according to the first plane and the second plane, and based on the updated planar coordinate system, realizes three-dimensional to two-dimensional conversion, so that subsequent coordinate calculation is simpler and more convenient. The computer equipment selects a first comparison point in a first plane, acquires the distance between the first comparison point and a second plane, and then takes the distance between the first comparison point and the second plane as the distance between the first plane and the second plane. When the distance between the first plane and the second plane is zero, the first plane and the second plane are determined to be in the same reference plane, so that the coplanar first plane and the coplanar second plane can be accurately screened out, the intersection state is determined according to the intersection point of the first plane and the second plane, and when the distance between the first plane and the second plane is not zero, the first plane and the second plane are determined to be parallel planes, the intersection state is not intersected, the judgment result obtained by the method is more accurate and reasonable, the algorithm is simple and easy to implement, and the overhead of the system is reduced.
Optionally, one possible implementation manner of "obtaining the distance between the first comparison point and the second plane" in the above embodiment may include: optionally selecting one point on the second plane as a second comparison point; and dividing the product of the vector from the second comparison point to the first comparison point and the product of the normal vector point multiplication of the second plane by the distance between the first comparison point and the second comparison point to obtain the distance between the first comparison point and the second plane. For example, if the first comparison point is X, the second comparison point is Y, and the projection point of the second comparison point B on the first plane is Z, the distance D between the first comparison point and the second plane can be represented as
Figure BDA0002284878360000091
In this embodiment, the distance between the first comparison point and the second plane is determined by the above method, and the algorithm is simple and easy to implement, thereby reducing the overhead of the system.
Alternatively, when the first plane and the second plane are in the same reference plane, possible implementations of the step of "determining the intersection state according to the intersection point of the first plane and the second plane" include the following methods shown in fig. 3, 4, 5, or 6.
A possible implementation of the above-mentioned step "determining the intersection state according to the intersection point of the first plane and the second plane" may be as shown in fig. 3, and includes:
s21, acquiring the intersection point of the boundary of the first plane and the boundary of the second plane.
And S22A, if the number of the intersection points is zero, executing plane inclusion relation judgment operation to obtain the intersection state. Wherein the executing the plane containing relation judging operation comprises: selecting a first target point in the first plane, and judging whether the first target point is positioned in the second plane; if so, determining that the intersection state is that the second plane contains the first plane; if not, selecting a second target point in the second plane, and judging whether the second target point is located in the first plane, if so, determining that the intersection state is that the first plane contains the second plane, and if not, determining that the intersection state is not intersected.
Specifically, the computer device obtains the intersection points of the boundaries of the first plane and the second plane, and the intersection points of all the edges of the first plane and all the edges of the second plane, which may be obtained by traversing all the edges. When the number of intersection points is zero, and there is no intersection point at the boundary of the first plane and the second plane, it may be included, as shown in fig. 3a, or completely separated, i.e. not intersected. At this time, a plane inclusion relation judgment operation is performed, specifically, the computer device selects a first target point from the first plane, judges whether the first target point is located in the second plane, and if so, determines that the intersection state is that the second plane includes the first plane. If not, selecting a second target point in the second plane, and continuously judging whether the second target point is located in the first plane, if the second target point is located in the first plane, determining that the intersection state is that the first plane contains the second plane, and if the second target point is not located in the first plane, determining that the intersection state is not intersected, namely a separated state.
In this embodiment, the computer device obtains the intersection state by obtaining the intersection point of the boundary of the first plane and the boundary of the second plane, and when the number of the intersection points is zero, executing the plane inclusion relation determination operation. The method for judging the plane containing relationship comprises the following steps: selecting a first target point in the first plane, and judging whether the first target point is positioned in a second plane; if yes, determining that the intersection state is that the second plane comprises the first plane; if not, selecting a second target point in the second plane, and judging whether the second target point is located in the first plane, if so, determining that the intersection state is that the first plane contains the second plane, and if not, determining that the intersection state is non-intersection.
Optionally, as a possible implementation manner of the step "determining the intersection state according to the intersection point of the first plane and the second plane" in fig. 4, the method includes:
S22B, if the number of the intersection points is one, acquiring a non-intersection point in the first plane as the first target point.
And S23, executing the plane inclusion relation judgment operation to obtain the intersection state.
Specifically, when the number of the intersection points is one, as shown in fig. 4a, the computer device may select a non-intersection point that is not the intersection point in the first plane as the first target point, and then perform the above-mentioned plane inclusion relation determination operation, that is, determine whether the first target point is located in the second plane, and if so, determine that the intersection state is that the second plane includes the first plane. If not, selecting a second target point in the second plane, and continuously judging whether the second target point is located in the first plane, if the second target point is located in the first plane, determining that the intersection state is that the first plane contains the second plane, and if the second target point is not located in the first plane, determining that the intersection state is not intersected, namely a separated state. In this embodiment, the computer device obtains the intersection state by acquiring the non-intersection point therein as the first target point and executing the plane inclusion relationship determination operation, and the intersection state determined by the method accurately determines all intersection states including non-intersection, inclusion, and which plane includes which plane when the number of the intersection points is 1, so that the result of the intersection state determination is accurate and reasonable.
Optionally, fig. 5 as a possible implementation of the step "determining the intersection state according to the intersection point of the first plane and the second plane" includes:
S22C, if the number of the intersection points is two and the two intersection points are located on the same edge, selecting a first intersection point from the intersection points, taking an end point of the first edge where the first intersection point is located as a traversal starting point, and sequentially calculating whether an end point located in the second plane exists in the end points of each edge along the boundary of the first plane; wherein the first edge is an edge of the first plane.
And S24A, if yes, determining that the intersection state is intersection, and taking the end point of the edge of the first plane located in the second plane and a closed area formed by the intersection point as the intersection area of the first plane and the second plane.
S24B, if not, taking an end point of the second edge where the first intersection point is located as the traversal start point, sequentially calculating, along the boundary of the second plane, whether an end point located in the first plane exists in end points of each edge, if an end point located in the first plane exists in end points of edges of the second plane, determining that the intersection state is intersection, and taking an end point of an edge of the second plane located in the first plane and a closed area formed by the intersection points as an intersection area; if the end point located in the first plane does not exist in the end points of the edges of the second plane, determining that the intersection state is not intersected; wherein the second edge is an edge of the second plane.
Specifically, as shown in fig. 5a and 5B, the number of the intersection points is two, and two intersection points are located on the same edge, for example, the two intersection points are a point a and a point B, and a and B are located on the same edge. Referring to fig. 5a, the computer device records information of points a (11,24) and B (14,24), the points a being located on the edges 11 and 24. The computer device selects a first intersection point A from two intersection points A and B, and takes an end point C of a first edge 11 where the first intersection point A is located as a traversal starting point, whether an end point located in the second plane exists in the end points of each edge is sequentially calculated along the boundary of the first plane, namely, the judgment of the end point position is carried out along the edges of 12, 13, 14, 15 and 11 until the C point of the 11 edge is ended, C, D, E are located in the second plane in the figure 5a, therefore, the intersection state is determined to be intersection, and the end point (C, D, E) of the edge of the first plane located in the second plane and the intersection point (A, B) form a closed area as the intersection area of the first plane and the second plane. If the end point of each edge does not exist in the end points of the edges sequentially calculated along the boundary of the first plane, namely the situation after the first plane and the second plane are exchanged, the computer device takes one end point of the second edge where the first intersection point is located as a traversal starting point, sequentially calculates whether the end point of each edge exists in the end points of the edges sequentially calculated along the boundary of the second plane, and determines that the intersection state is intersection if the end point of the edge of the second plane exists in the first plane, and takes the end point of the edge of the second plane located in the first plane and a closed area formed by the intersection points as an intersection area; if there is no end point located in the first plane in the end points of the edges of the second plane, as shown in fig. 5b, it is determined that the intersection state is not intersected; wherein the second edge is an edge of the second plane.
In this embodiment, when the number of the intersection points is two and two intersection points are located on the same edge, the computer device selects a first intersection point from the intersection points, uses an end point of the first edge where the first intersection point is located as a traversal start point, sequentially calculates whether an end point located in a second plane exists in the end points of each edge along a boundary of the first plane, determines that the intersection state is intersection when the end point exists, and uses a closed area formed by the end point and the end point of the first plane located in the second plane as an intersection area of the first plane and the second plane. If the end points of the edges of the second plane exist, determining that the intersection state is intersection, and taking the end points of the edges of the second plane located in the first plane and a closed area formed by the intersection points as an intersection area; if the end point in the first plane does not exist in the end points of the edges of the second plane, the intersection state is determined to be non-intersection, and the result of the intersection state determined by the method is accurate, so that the result of designing the model is more accurate and reasonable.
Optionally, fig. 6 as a possible implementation of the step "determining the intersection state according to the intersection point of the first plane and the second plane" includes:
S22D, if the number of the intersection points is two and the two intersection points are located on different sides, or the number of the intersection points is more than two, determining that the intersection state is intersection.
Optionally, when the number of the intersection points is two and two of the intersection points are located on different edges, or the number of the intersection points is greater than two, the method may further include the step of acquiring an intersection region.
S25, selecting first intersection points from the intersection points, taking the end point of a first edge where the first intersection points are located as a traversal starting point, and sequentially calculating the end points of edges which belong to the first plane and are located in the second plane along the boundary of the first plane; wherein the first edge is an edge of the first plane.
And S26, taking the end point of the second edge where the first intersection point is located as a traversal starting point, and sequentially calculating the end points of the edges which belong to the second plane and are located in the first plane along the boundary of the second plane.
S27, taking a closed area formed by the end point of the edge belonging to the first plane and located in the second plane, the end point of the edge belonging to the second plane and located in the first plane and the intersection point as an intersection area; wherein the second edge is an edge of the second plane.
Specifically, when the number of the intersection points is two and the two intersection points are located on different sides, as shown in fig. 6a, or the number of the intersection points is greater than two, the intersection state of the computer device is intersection. Referring to fig. 6a, the computer device selects a first intersection point a from intersection points a and B, where a and B are different edges, and takes an end point C of a first edge 12 where the first intersection point a is located as a traversal start point, sequentially calculates end points of edges belonging to a first plane and located within a second plane along a boundary of the first plane, takes an end point of the second edge where the first intersection point is located as a traversal start point, and sequentially calculates end points of edges belonging to the second plane and located within the first plane along a boundary of the second plane. And taking a closed area consisting of the end point of the side which belongs to the first plane and is positioned in the second plane, the end point of the side which belongs to the second plane and is positioned in the first plane and the intersection point as an intersection area. The computer device first finds the end point C of the edge 12, C lying in the second plane, the computer device records the coordinates of a, inserting a point C (0,13) between AB, the modifications A (0,21), B and C are not on the same side, the end points of the two sides of C are D, D is in the second plane, the coordinates of point D are recorded and D (0,14) is inserted between BC, C (0,0) is modified, D and B are on the same side, the coordinates of B are recorded, D (0,0), B (0,24) is modified, B and a are different sides, the end point E of the side of B is in a second plane, the coordinates of E are recorded, insert E (0,21) between BA, modify B (0,0), because E and A are on the same side, record the coordinate of E, modify E (0,0), A (0,0), regard the closed area enclosed by A, C, D, B, E as the intersection area. The intersection state judged by the method adopted by the embodiment is accurate, so that the result of the design model is more accurate and reasonable.
Optionally, on the basis of the foregoing embodiment, the method further includes: and converting the intersection region into a three-dimensional space. The computer equipment converts the two-dimensional space to the three-dimensional space of the intersected area, so that the distribution condition of the intersected area can be accurately obtained in the three-dimensional model, the model design in the intersected area can be adjusted in a self-adaptive mode based on the distribution of the intersected area, for example, a parapet wall model is not generated in the intersected area corresponding to the parapet wall model and the roof model, an inner wall model is not generated in the intersected area of the upright post model and the inner wall model, and the model design is more accurate and reasonable.
In one embodiment, as shown in FIG. 7, a model generation method is provided. As shown in fig. 7, includes:
s71, a first surface representing the first model to be generated and a second surface representing the second model to be generated are obtained.
S72, determining the intersection state of the first surface and the second surface by using the method for obtaining the intersection state between the planes according to any of the above embodiments.
And S73, if the intersection state is intersection, generating the first model to be generated and the second model to be generated according to the intersection region.
Specifically, the computer device obtains a first surface representing the first model to be generated and a second surface representing the second generation generative model, obtains an intersection state of the first surface and the second surface by using the intersection state obtaining method between the planes in the above embodiment, and generates the first model to be generated and the second model to be generated according to the intersection region when the intersection state is intersection. For example, the original model is not generated in the intersecting region, but other models intersecting the original model are avoided. Optionally, when the intersection state is a non-intersection or inclusion case, the model continues to be generated in the original manner.
In this embodiment, the computer device determines the intersection state of the first surface and the second surface by obtaining the first surface representing the first model to be generated and the second surface representing the second model to be generated, and when the intersection state is intersection, the first model to be generated and the second model to be generated are generated according to the intersection region, so that the influence of the intersection part of the models in the model generation process can be fully considered, and the generation of a collision or redundant model is avoided. Optionally, the embodiment is operated based on self-defined points, lines, surfaces and a single model, so that more models and functions can be conveniently edited and self-defined, the model design is modularized based on the functions, the functions are greatly enriched, the design efficiency of the model is greatly improved, meanwhile, the design is more convenient and easier to operate, the design efficiency and the design quality are improved, and the learning cost of designers is reduced.
Optionally, the first model to be generated in the above embodiment is an inner wall model, and the second model to be generated is an upright column model; or the first model to be generated is a parapet model, and the second model to be generated is a roof model. As shown in fig. 7a, the parapet does not need to be generated in the intersection region, so the generation of the parapet model is more accurate and reasonable. As shown in fig. 7b, the inner wall line is broken by the pillar model, so that the inner wall model does not need to be generated in the intersection region, and only two sides of the pillar model are generated, and the generation of the inner wall model is more accurate and reasonable.
It should be understood that although the various steps in the flow charts of fig. 2-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-7 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 8, there is provided an intersection state acquiring apparatus between planes, including:
an obtaining module 100, configured to obtain a normal vector of a first plane and a normal vector of a second plane; wherein the first and second planes are planes with finite boundaries;
a processing module 200, configured to obtain the intersection state according to a distance between the first plane and the second plane when the normal vector of the first plane is parallel to the normal vector of the second plane, and determine that the intersection state is non-intersected when the normal vector of the first plane is not parallel to the normal vector of the second plane.
In an embodiment, the obtaining module 100 is specifically configured to use the cross-multiplication directions of two adjacent sides of the first plane as a normal vector of the first plane, and use the cross-multiplication directions of two adjacent sides of the second plane as a normal vector of the second plane; judging whether the corresponding coordinate ratios of the normal vector of the first plane and the normal vector of the second plane are equal or not; if so, determining that the normal vector of the first plane is parallel to the normal vector of the second plane; and if not, determining that the normal vector of the first plane is not parallel to the normal vector of the second plane.
In an embodiment, the processing module 200 is specifically configured to establish an updated planar coordinate system according to the first plane and the second plane, and select a first comparison point in the first plane based on the updated planar coordinate system; acquiring the distance between the first comparison point and the second plane; taking the distance between the first comparison point and the second plane as the distance between the first plane and the second plane; if the distance between the first plane and the second plane is zero, determining that the first plane and the second plane are in the same reference plane, and determining the intersection state according to the intersection point of the first plane and the second plane; and if the distance between the first plane and the second plane is not zero, determining that the intersection state is not intersected.
In one embodiment, the processing module 200 is specifically configured to select a point in the second plane as a second comparison point; dividing the product of the vector from the second comparison point to the first comparison point and the product of the normal vector point multiplication of the second plane by the distance between the first comparison point and the second comparison point to obtain the distance between the first comparison point and the second plane.
In an embodiment, the processing module 200 is specifically configured to, when the first plane and the second plane are in the same reference plane, obtain an intersection point of a boundary of the first plane and a boundary of the second plane; if the number of the intersection points is zero, executing plane inclusion relation judgment operation to obtain the intersection state;
wherein the executing the plane containing relation judging operation comprises: selecting a first target point in the first plane, and judging whether the first target point is positioned in the second plane; if so, determining that the intersection state is that the second plane contains the first plane; if not, selecting a second target point in the second plane, and judging whether the second target point is located in the first plane, if so, determining that the intersection state is that the first plane contains the second plane, and if not, determining that the intersection state is not intersected.
In an embodiment, the processing module 200 is specifically configured to, if the number of the intersection points is one, obtain a non-intersection point in the first plane as the first target point, and execute the plane inclusion relation determining operation to obtain the intersection state.
In an embodiment, the processing module 200 is specifically configured to, if the number of the intersection points is two and two intersection points are located on the same edge, select a first intersection point from the intersection points, use an end point of the first edge where the first intersection point is located as a traversal starting point, and sequentially calculate, along a boundary of the first plane, whether an end point located in the second plane exists in end points of each edge; wherein the first edge is an edge of the first plane; if so, determining that the intersection state is intersection, and taking a closed area formed by an end point of the edge of the first plane located in the second plane and the intersection point as an intersection area of the first plane and the second plane; if not, taking an end point of a second edge where the first intersection point is located as the traversal starting point, sequentially calculating whether an end point located in the first plane exists in end points of each edge along the boundary of the second plane, if the end point located in the first plane exists in the end points of the edges of the second plane, determining that the intersection state is intersection, and taking the end point of the edge of the second plane located in the first plane and a closed area formed by the intersection points as an intersection area; if the end point located in the first plane does not exist in the end points of the edges of the second plane, determining that the intersection state is not intersected; wherein the second edge is an edge of the second plane.
In an embodiment, the processing module 200 is specifically configured to determine that the intersection state is intersection if the number of the intersection points is two and two intersection points are located on different edges, or the number of the intersection points is greater than two; selecting a first intersection point from the intersection points, taking an end point of a first edge where the first intersection point is located as a traversal starting point, and sequentially calculating end points of edges which belong to the first plane and are located in the second plane along the boundary of the first plane; wherein the first edge is an edge of the first plane; taking the end point of the second edge where the first intersection point is located as a traversal starting point, and sequentially calculating the end points of the edges which belong to the second plane and are located in the first plane along the boundary of the second plane; taking a closed region composed of an end point of a side belonging to the first plane and located in the second plane, an end point of a side belonging to the second plane and located in the first plane, and the intersection point as an intersection region; wherein the second edge is an edge of the second plane.
In one embodiment, the processing module 200 is further configured to convert the intersection region into a three-dimensional space.
In one embodiment, as shown in fig. 9, there is provided an intersection state acquiring apparatus between planes, including:
an obtaining module 300, configured to obtain a first surface representing a first model to be generated and a second surface representing a second model to be generated;
the processing module 400 is configured to determine an intersection state of the first surface and the second surface by using the method for obtaining an intersection state between planes as described in the foregoing embodiment, and if the intersection state is intersection, generate the first model to be generated and the second model to be generated according to the intersection region.
In one embodiment, the first model to be generated is an inner wall model, and the second model to be generated is an upright column model; or the first model to be generated is a parapet model, and the second model to be generated is a roof model.
For specific limitations of the intersection state obtaining device and the model generating device between the planes, reference may be made to the above limitations on the intersection state obtaining method and the model generating method between the planes, respectively, and details are not repeated here. The respective modules in the intersection state acquisition means and the model generation means between the planes described above may be implemented in whole or in part by software, hardware, and 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, 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:
acquiring a normal vector of a first plane and a normal vector of a second plane; wherein the first and second planes are planes with finite boundaries;
if the normal vector of the first plane is parallel to the normal vector of the second plane, acquiring the intersection state according to the distance between the first plane and the second plane;
and if the normal vector of the first plane is not parallel to the normal vector of the second plane, determining that the intersection state is not intersected.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
taking the cross multiplication directions of two adjacent sides of the first plane as a normal vector of the first plane, and taking the cross multiplication directions of two adjacent sides of the second plane as a normal vector of the second plane;
after the obtaining of the normal vector of the first plane and the normal vector of the second plane, the method includes: judging whether the corresponding coordinate ratios of the normal vector of the first plane and the normal vector of the second plane are equal or not;
if so, determining that the normal vector of the first plane is parallel to the normal vector of the second plane;
and if not, determining that the normal vector of the first plane is not parallel to the normal vector of the second plane.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
establishing an updating plane coordinate system according to the first plane and the second plane, and selecting a first comparison point in the first plane based on the updating plane coordinate system;
acquiring the distance between the first comparison point and the second plane;
taking the distance between the first comparison point and the second plane as the distance between the first plane and the second plane;
if the distance between the first plane and the second plane is zero, determining that the first plane and the second plane are in the same reference plane, and determining the intersection state according to the intersection point of the first plane and the second plane;
and if the distance between the first plane and the second plane is not zero, determining that the intersection state is not intersected.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
optionally selecting one point on the second plane as a second comparison point;
dividing the product of the vector from the second comparison point to the first comparison point and the product of the normal vector point multiplication of the second plane by the distance between the first comparison point and the second comparison point to obtain the distance between the first comparison point and the second plane.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
acquiring an intersection point of the boundary of the first plane and the boundary of the second plane;
if the number of the intersection points is zero, executing plane inclusion relation judgment operation to obtain the intersection state;
wherein the executing the plane containing relation judging operation comprises:
selecting a first target point in the first plane, and judging whether the first target point is positioned in the second plane;
if so, determining that the intersection state is that the second plane contains the first plane;
if not, selecting a second target point in the second plane, and judging whether the second target point is located in the first plane, if so, determining that the intersection state is that the first plane contains the second plane, and if not, determining that the intersection state is not intersected.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
if the number of the intersection points is one, acquiring a non-intersection point in the first plane as the first target point, and executing the plane inclusion relation judgment operation to obtain the intersection state.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
if the number of the intersection points is two and the two intersection points are located on the same edge, selecting a first intersection point from the intersection points, taking an end point of a first edge where the first intersection point is located as a traversal starting point, and sequentially calculating whether an end point located in the second plane exists in the end points of each edge along the boundary of the first plane; wherein the first edge is an edge of the first plane;
if so, determining that the intersection state is intersection, and taking a closed area formed by an end point of the edge of the first plane located in the second plane and the intersection point as an intersection area of the first plane and the second plane;
if not, taking an end point of a second edge where the first intersection point is located as the traversal starting point, sequentially calculating whether an end point located in the first plane exists in end points of each edge along the boundary of the second plane, if the end point located in the first plane exists in the end points of the edges of the second plane, determining that the intersection state is intersection, and taking the end point of the edge of the second plane located in the first plane and a closed area formed by the intersection points as an intersection area; if the end point located in the first plane does not exist in the end points of the edges of the second plane, determining that the intersection state is not intersected; wherein the second edge is an edge of the second plane.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
if the number of the intersection points is two and the two intersection points are positioned on different edges, or the number of the intersection points is more than two, determining that the intersection state is intersection;
selecting a first intersection point from the intersection points, taking an end point of a first edge where the first intersection point is located as a traversal starting point, and sequentially calculating end points of edges which belong to the first plane and are located in the second plane along the boundary of the first plane; wherein the first edge is an edge of the first plane;
taking the end point of the second edge where the first intersection point is located as a traversal starting point, and sequentially calculating the end points of the edges which belong to the second plane and are located in the first plane along the boundary of the second plane;
taking a closed region composed of an end point of a side belonging to the first plane and located in the second plane, an end point of a side belonging to the second plane and located in the first plane, and the intersection point as an intersection region; wherein the second edge is an edge of the second plane.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and converting the intersection region into a three-dimensional space.
It should be clear that, in the embodiments of the present application, the process of executing the computer program by the processor is consistent with the process of executing the steps in the above method, and specific reference may be made to the description above.
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:
acquiring a first surface representing a first model to be generated and a second surface representing a second model to be generated;
determining the intersection state of the first surface and the second surface by adopting the intersection state acquisition method between the planes in any embodiment;
and if the intersection state is intersection, generating the first model to be generated and the second model to be generated according to the intersection region.
In one embodiment, the first model to be generated is an inner wall model, and the second model to be generated is an upright column model; or the first model to be generated is a parapet model, and the second model to be generated is a roof model.
It should be clear that, in the embodiments of the present application, the process of executing the computer program by the processor is consistent with the process of executing the steps in the above method, and specific reference may be made to the description above.
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:
acquiring a normal vector of a first plane and a normal vector of a second plane; wherein the first and second planes are planes with finite boundaries;
if the normal vector of the first plane is parallel to the normal vector of the second plane, acquiring the intersection state according to the distance between the first plane and the second plane;
and if the normal vector of the first plane is not parallel to the normal vector of the second plane, determining that the intersection state is not intersected.
In one embodiment, the computer program when executed by the processor further performs the steps of:
taking the cross multiplication directions of two adjacent sides of the first plane as a normal vector of the first plane, and taking the cross multiplication directions of two adjacent sides of the second plane as a normal vector of the second plane;
after the obtaining of the normal vector of the first plane and the normal vector of the second plane, the method includes: judging whether the corresponding coordinate ratios of the normal vector of the first plane and the normal vector of the second plane are equal or not;
if so, determining that the normal vector of the first plane is parallel to the normal vector of the second plane;
and if not, determining that the normal vector of the first plane is not parallel to the normal vector of the second plane.
In one embodiment, the computer program when executed by the processor further performs the steps of:
establishing an updating plane coordinate system according to the first plane and the second plane, and selecting a first comparison point in the first plane based on the updating plane coordinate system;
acquiring the distance between the first comparison point and the second plane;
taking the distance between the first comparison point and the second plane as the distance between the first plane and the second plane;
if the distance between the first plane and the second plane is zero, determining that the first plane and the second plane are in the same reference plane, and determining the intersection state according to the intersection point of the first plane and the second plane;
and if the distance between the first plane and the second plane is not zero, determining that the intersection state is not intersected.
In one embodiment, the computer program when executed by the processor further performs the steps of:
optionally selecting one point on the second plane as a second comparison point;
dividing the product of the vector from the second comparison point to the first comparison point and the product of the normal vector point multiplication of the second plane by the distance between the first comparison point and the second comparison point to obtain the distance between the first comparison point and the second plane.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring an intersection point of the boundary of the first plane and the boundary of the second plane;
if the number of the intersection points is zero, executing plane inclusion relation judgment operation to obtain the intersection state;
wherein the executing the plane containing relation judging operation comprises:
selecting a first target point in the first plane, and judging whether the first target point is positioned in the second plane;
if so, determining that the intersection state is that the second plane contains the first plane;
if not, selecting a second target point in the second plane, and judging whether the second target point is located in the first plane, if so, determining that the intersection state is that the first plane contains the second plane, and if not, determining that the intersection state is not intersected.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the number of the intersection points is one, acquiring a non-intersection point in the first plane as the first target point, and executing the plane inclusion relation judgment operation to obtain the intersection state.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the number of the intersection points is two and the two intersection points are located on the same edge, selecting a first intersection point from the intersection points, taking an end point of a first edge where the first intersection point is located as a traversal starting point, and sequentially calculating whether an end point located in the second plane exists in the end points of each edge along the boundary of the first plane; wherein the first edge is an edge of the first plane;
if so, determining that the intersection state is intersection, and taking a closed area formed by an end point of the edge of the first plane located in the second plane and the intersection point as an intersection area of the first plane and the second plane;
if not, taking an end point of a second edge where the first intersection point is located as the traversal starting point, sequentially calculating whether an end point located in the first plane exists in end points of each edge along the boundary of the second plane, if the end point located in the first plane exists in the end points of the edges of the second plane, determining that the intersection state is intersection, and taking the end point of the edge of the second plane located in the first plane and a closed area formed by the intersection points as an intersection area; if the end point located in the first plane does not exist in the end points of the edges of the second plane, determining that the intersection state is not intersected; wherein the second edge is an edge of the second plane.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the number of the intersection points is two and the two intersection points are positioned on different edges, or the number of the intersection points is more than two, determining that the intersection state is intersection;
selecting a first intersection point from the intersection points, taking an end point of a first edge where the first intersection point is located as a traversal starting point, and sequentially calculating end points of edges which belong to the first plane and are located in the second plane along the boundary of the first plane; wherein the first edge is an edge of the first plane;
taking the end point of the second edge where the first intersection point is located as a traversal starting point, and sequentially calculating the end points of the edges which belong to the second plane and are located in the first plane along the boundary of the second plane;
taking a closed region composed of an end point of a side belonging to the first plane and located in the second plane, an end point of a side belonging to the second plane and located in the first plane, and the intersection point as an intersection region; wherein the second edge is an edge of the second plane.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and converting the intersection region into a three-dimensional space.
It should be clear that, in the embodiments of the present application, the process of executing the computer program by the processor is consistent with the process of executing the steps in the above method, and specific reference may be made to the description above.
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:
acquiring a first surface representing a first model to be generated and a second surface representing a second model to be generated;
determining the intersection state of the first surface and the second surface by adopting the intersection state acquisition method between the planes in any embodiment;
and if the intersection state is intersection, generating the first model to be generated and the second model to be generated according to the intersection region.
In one embodiment, the first model to be generated is an inner wall model, and the second model to be generated is an upright column model; or the first model to be generated is a parapet model, and the second model to be generated is a roof model.
It should be clear that, in the embodiments of the present application, the process of executing the computer program by the processor is consistent with the process of executing the steps in the above method, and specific reference may be made to the description above.
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 may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
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 (15)

1. A method for acquiring an intersection state between planes, the method comprising:
acquiring a normal vector of a first plane and a normal vector of a second plane; wherein the first and second planes are planes with finite boundaries;
if the normal vector of the first plane is parallel to the normal vector of the second plane, acquiring the intersection state according to the distance between the first plane and the second plane;
and if the normal vector of the first plane is not parallel to the normal vector of the second plane, determining that the intersection state is not intersected.
2. The method of claim 1, wherein obtaining the normal vector of the first plane and the normal vector of the second plane comprises:
taking the cross multiplication directions of two adjacent sides of the first plane as a normal vector of the first plane, and taking the cross multiplication directions of two adjacent sides of the second plane as a normal vector of the second plane;
after the obtaining of the normal vector of the first plane and the normal vector of the second plane, the method includes: judging whether the corresponding coordinate ratios of the normal vector of the first plane and the normal vector of the second plane are equal or not;
if so, determining that the normal vector of the first plane is parallel to the normal vector of the second plane;
and if not, determining that the normal vector of the first plane is not parallel to the normal vector of the second plane.
3. The method of claim 1, wherein said obtaining the intersection state from the distance between the first plane and the second plane comprises:
establishing an updating plane coordinate system according to the first plane and the second plane, and selecting a first comparison point in the first plane based on the updating plane coordinate system;
acquiring the distance between the first comparison point and the second plane;
taking the distance between the first comparison point and the second plane as the distance between the first plane and the second plane;
if the distance between the first plane and the second plane is zero, determining that the first plane and the second plane are in the same reference plane, and determining the intersection state according to the intersection point of the first plane and the second plane;
and if the distance between the first plane and the second plane is not zero, determining that the intersection state is not intersected.
4. The method of claim 3, wherein said obtaining a distance between said first comparison point and said second plane comprises:
optionally selecting one point on the second plane as a second comparison point;
dividing the product of the vector from the second comparison point to the first comparison point and the product of the normal vector point multiplication of the second plane by the distance between the first comparison point and the second comparison point to obtain the distance between the first comparison point and the second plane.
5. The method of claim 3, wherein determining the intersection state from the intersection point of the first plane and the second plane when the first plane and the second plane are in the same reference plane comprises:
acquiring an intersection point of the boundary of the first plane and the boundary of the second plane;
if the number of the intersection points is zero, executing plane inclusion relation judgment operation to obtain the intersection state;
wherein the executing the plane containing relation judging operation comprises:
selecting a first target point in the first plane, and judging whether the first target point is positioned in the second plane;
if so, determining that the intersection state is that the second plane contains the first plane;
if not, selecting a second target point in the second plane, and judging whether the second target point is located in the first plane, if so, determining that the intersection state is that the first plane contains the second plane, and if not, determining that the intersection state is not intersected.
6. The method of claim 5, wherein said determining the intersection state from the intersection point of the first plane and the second plane further comprises:
if the number of the intersection points is one, acquiring a non-intersection point in the first plane as the first target point, and executing the plane inclusion relation judgment operation to obtain the intersection state.
7. The method of claim 5, wherein said determining the intersection state from the intersection point of the first plane and the second plane further comprises:
if the number of the intersection points is two and the two intersection points are located on the same edge, selecting a first intersection point from the intersection points, taking an end point of a first edge where the first intersection point is located as a traversal starting point, and sequentially calculating whether an end point located in the second plane exists in the end points of each edge along the boundary of the first plane; wherein the first edge is an edge of the first plane;
if so, determining that the intersection state is intersection, and taking a closed area formed by an end point of the edge of the first plane located in the second plane and the intersection point as an intersection area of the first plane and the second plane;
if not, taking an end point of a second edge where the first intersection point is located as the traversal starting point, sequentially calculating whether an end point located in the first plane exists in end points of each edge along the boundary of the second plane, if the end point located in the first plane exists in the end points of the edges of the second plane, determining that the intersection state is intersection, and taking the end point of the edge of the second plane located in the first plane and a closed area formed by the intersection points as an intersection area; if the end point located in the first plane does not exist in the end points of the edges of the second plane, determining that the intersection state is not intersected; wherein the second edge is an edge of the second plane.
8. The method of claim 5, wherein said determining the intersection state from the intersection point of the first plane and the second plane further comprises:
if the number of the intersection points is two and the two intersection points are positioned on different edges, or the number of the intersection points is more than two, determining that the intersection state is intersection;
selecting a first intersection point from the intersection points, taking an end point of a first edge where the first intersection point is located as a traversal starting point, and sequentially calculating end points of edges which belong to the first plane and are located in the second plane along the boundary of the first plane; wherein the first edge is an edge of the first plane;
taking the end point of the second edge where the first intersection point is located as a traversal starting point, and sequentially calculating the end points of the edges which belong to the second plane and are located in the first plane along the boundary of the second plane;
taking a closed region composed of an end point of a side belonging to the first plane and located in the second plane, an end point of a side belonging to the second plane and located in the first plane, and the intersection point as an intersection region; wherein the second edge is an edge of the second plane.
9. The method according to claim 7 or 8, characterized in that the method further comprises:
and converting the intersection region into a three-dimensional space.
10. A method of model generation, comprising:
acquiring a first surface representing a first model to be generated and a second surface representing a second model to be generated;
determining the intersection of the first surface and the second surface using the method of any of claims 1-9;
and if the intersection state is intersection, generating the first model to be generated and the second model to be generated according to the intersection region.
11. The method according to claim 10, wherein the first model to be generated is an interior wall model and the second model to be generated is a stud model; or
The first model to be generated is a parapet model, and the second model to be generated is a roof model.
12. An intersection state acquisition apparatus between planes, characterized by comprising:
the acquisition module is used for acquiring a normal vector of a first plane and a normal vector of a second plane; wherein the first and second planes are planes with finite boundaries;
and the processing module is used for acquiring the intersection state according to the distance between the first plane and the second plane when the normal vector of the first plane is parallel to the normal vector of the second plane, and determining that the intersection state is not intersected when the normal vector of the first plane is not parallel to the normal vector of the second plane.
13. An apparatus for model generation, the apparatus comprising:
the acquisition module is used for acquiring a first surface representing a first model to be generated and a second surface representing a second model to be generated;
a processing module, configured to determine an intersection state of the first surface and the second surface by using the method according to any one of claims 1 to 9, and if the intersection state is intersection, generate the first model to be generated and the second model to be generated according to the intersection region.
14. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 11 when executing the computer program.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 11.
CN201911156253.7A 2019-11-22 2019-11-22 Method for acquiring intersection state between planes, model generation method and related product Pending CN112836262A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911156253.7A CN112836262A (en) 2019-11-22 2019-11-22 Method for acquiring intersection state between planes, model generation method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911156253.7A CN112836262A (en) 2019-11-22 2019-11-22 Method for acquiring intersection state between planes, model generation method and related product

Publications (1)

Publication Number Publication Date
CN112836262A true CN112836262A (en) 2021-05-25

Family

ID=75922829

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911156253.7A Pending CN112836262A (en) 2019-11-22 2019-11-22 Method for acquiring intersection state between planes, model generation method and related product

Country Status (1)

Country Link
CN (1) CN112836262A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107633523A (en) * 2016-07-18 2018-01-26 巧夺天宫(深圳)科技有限公司 Extraction construction characteristic line method and system based on a cloud
CN107958483A (en) * 2016-10-14 2018-04-24 中国石油化工股份有限公司 A kind of Stratum Modeling
CN109671093A (en) * 2018-12-20 2019-04-23 上海羡通交通科技有限公司 A kind of automatic testing method in plane geometric figure multiple combinations region

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107633523A (en) * 2016-07-18 2018-01-26 巧夺天宫(深圳)科技有限公司 Extraction construction characteristic line method and system based on a cloud
CN107958483A (en) * 2016-10-14 2018-04-24 中国石油化工股份有限公司 A kind of Stratum Modeling
CN109671093A (en) * 2018-12-20 2019-04-23 上海羡通交通科技有限公司 A kind of automatic testing method in plane geometric figure multiple combinations region

Similar Documents

Publication Publication Date Title
CN111275820B (en) Method, device, terminal and storage medium for drawing three-dimensional wall based on two-dimensional plane
CN113010937B (en) Parametric modeling method of member section steel bar and related device
CN106934842B (en) Method and device for identifying closed area
CN109388843B (en) Visualization system and method of truss antenna based on VTK (virtual terminal K), and terminal
CN112464322B (en) Building component arrangement method and device, computer equipment and storage medium
CN114048540A (en) Wall column processing method and device based on construction engineering calculation model
Huhnt Reconstruction of edges in digital building models
CN112287427B (en) Building wall position determining method and device, computer equipment and storage medium
CN112287432A (en) Target area acquisition method and device, computer equipment and storage medium
CN110704901B (en) Method for placing connecting nodes of gable roof guide beams and related products
CN112836262A (en) Method for acquiring intersection state between planes, model generation method and related product
CN110704898A (en) Method for placing connecting node between tiger window model and roof truss girder model and product
CN115511701A (en) Method and device for converting geographic information
CN110489510B (en) Road data processing method and device, readable storage medium and computer equipment
CN110942007B (en) Method and device for determining hand skeleton parameters, electronic equipment and storage medium
CN110704900B (en) Method for placing connection node between keel column model and wall keel model and product
CN110765509B (en) Method and device for generating main roof hole-opening reinforcing node
CN112464327B (en) Door and window model arrangement method and device, computer equipment and storage medium
CN110765513B (en) Method for placing connecting node of wall keel model and L-shaped top guide beam model and product
CN109410304B (en) Projection determination method, device and equipment
CN112632679A (en) Building information model scene rendering method and device and computer equipment
CN110555260A (en) Cable working well model data processing method and device and computer equipment
CN113158280B (en) Roof main body structure generation method, device, computer equipment and storage medium
CN110765508B (en) Method and device for generating tiger window gable truss node and storage medium
CN118298103A (en) Method, device, equipment, medium and product for determining texture coordinates of roadway three-dimensional model

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