CN117351170B - A method and system for realizing regional three-dimensional model replacement - Google Patents
A method and system for realizing regional three-dimensional model replacement Download PDFInfo
- Publication number
- CN117351170B CN117351170B CN202311299864.3A CN202311299864A CN117351170B CN 117351170 B CN117351170 B CN 117351170B CN 202311299864 A CN202311299864 A CN 202311299864A CN 117351170 B CN117351170 B CN 117351170B
- Authority
- CN
- China
- Prior art keywords
- model
- replacement
- dimensional
- original
- models
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000012216 screening Methods 0.000 claims abstract description 14
- 230000004044 response Effects 0.000 claims abstract description 10
- 238000001914 filtration Methods 0.000 claims description 9
- 238000004458 analytical method Methods 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 claims description 6
- 238000010276 construction Methods 0.000 claims description 3
- 230000000875 corresponding effect Effects 0.000 description 16
- 238000012545 processing Methods 0.000 description 15
- 230000008569 process Effects 0.000 description 11
- 238000006467 substitution reaction Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 8
- 239000013598 vector Substances 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 230000000149 penetrating effect Effects 0.000 description 4
- 238000009877 rendering Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000008676 import Effects 0.000 description 2
- 230000001788 irregular Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010205 computational analysis Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/10—Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
Landscapes
- Physics & Mathematics (AREA)
- Geometry (AREA)
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Processing Or Creating Images (AREA)
Abstract
A method for realizing replacement of three-dimensional model in region includes constructing a replacement space containing some or all three-dimensional models in three-dimensional scene, screening the three-dimensional models in replacement space to determine original model to be replaced, obtaining replacement model to replace each original model with replacement model in response to replacement requirement, selecting model file of replacement model in replacement space in three-dimensional scene from three-dimensional model database, analyzing and determining center position and orientation of replacement model in model file and original model in three-dimensional scene, and replacing all original models in three-dimensional scene with replacement model based on determined center position and orientation.
Description
Technical Field
The invention relates to the technical field of computer graphics processing, in particular to a method and a system for realizing regional three-dimensional model replacement.
Background
At present, in the field of three-dimensional scene editing and replacing, a plurality of related technologies exist, but most of the technologies need to be processed manually, and the technologies specifically comprise CAD/CAM technology, wherein the CAD/CAM technology is widely applied to the field of three-dimensional model editing and replacing, the parametric modification and replacing operation of the three-dimensional model can be realized through the CAD/CAM technology, and the three-dimensional modeling software can realize the editing and replacing of the three-dimensional scene. For example, software such as 3ds Max, maya, etc. may implement editing and replacing operations on the three-dimensional model, and a specific implementation manner is to manually select three-dimensional model nodes, perform deleting/hiding operations on the three-dimensional model nodes, and finally insert a new model into the scene.
The Chinese patent application CN109410346A discloses a system for online editing of a three-dimensional building model, which comprises a user interaction interface, an image conversion module, an image checking module, an image calculation module, a three-dimensional model reconstruction module and a three-dimensional model online real-time rendering interaction module, wherein the user interaction interface is used for online inputting, editing and parameter modification of a CAD image file, the image conversion module is used for converting the CAD image file into a vector image, the image checking module is used for checking a closed area in the vector image, the image calculation module is used for calculating according to parameters in the CAD image file and the closed area and modeling and gridding the closed area, the three-dimensional model reconstruction module is used for combining a plurality of calculated images to reconstruct the three-dimensional model, and the three-dimensional model online real-time rendering interaction module is used for displaying and interacting the three-dimensional building model at a webpage end.
Although the existing related technology can realize editing and replacing of a three-dimensional scene, the replacing step is generally complicated, and the specific steps generally comprise (1) manually selecting model nodes and deleting the model nodes, (2) reintroducing a replaced new model, and (3) adjusting the position of the replaced model according to the replaced position. In the process of manually selecting nodes to execute deleting, replacing and adjusting operations, the problems of large data volume, incomplete selection, unclean deletion and the like may be encountered, and if the data volume generated in the process is too large, model nodes needed in the directory tree need to be filtered and judged (because models in a region often have scattered structures in the directory tree, manual multi-selection or screening by using a screening tool is needed, however, most software cannot perfectly support screening), so that the replacement efficiency is too low, and rapid replacement cannot be completed for the models in the designated region.
In summary, the current three-dimensional model replacement technology is mainly designed by selecting-deleting-importing basic functions from the perspective of model editing, and the service requirement is not fully considered. In view of this, it is desirable to propose a model replacement method to allow a user to edit and replace models in a three-dimensional scene more quickly and efficiently.
Furthermore, since the applicant has studied numerous documents and patents on the one hand, and since the applicant has made the present invention, the text is not to be limited to all details and matters of detail, but this is by no means the present invention does not feature these prior art features, but rather the present invention has features of all prior art, and the applicant has remained in the background art to which this invention pertains.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a method and a system for realizing regional three-dimensional model replacement, which aim to solve at least one or more technical problems in the prior art.
In order to achieve the above object, the present invention provides a method for implementing regional three-dimensional model replacement, including the following steps:
constructing a replacement space which partially or completely contains a plurality of three-dimensional models in the three-dimensional scene;
Screening and filtering a plurality of three-dimensional models in the replacement space to determine an original model to be replaced;
A replacement model is obtained in response to the replacement demand to replace each original model with a replacement model.
Compared with the prior art, which is mostly manually edited and replaced, the method aims at editing and replacing a delimited space region in a three-dimensional scene, and in the method, for the appointed/delimited space region, only one space geometric body or space enveloping body is needed to be formed in the three-dimensional space, the needed original model nodes can be filtered and screened out quickly, the models in the region are replaced directly, and meanwhile, the user is supported to select the replacement models for the second time so as to execute operations such as preview, inspection, adjustment and the like. In contrast, in the prior art, most of the nodes are selected one by one in the model directory tree repeatedly by manpower, when the nodes needed on the model directory tree are scattered or the volume is large, the manual selection is time-consuming and labor-consuming and inaccurate, the node searching function in the prior art cannot screen the model with a lot of default information, the model replacing method provides the function of defining the region division, allows a user to plan a certain range, omits the process of manually selecting a plurality of model nodes by the user, and has no requirement on model node names and node attributes, and the filtering and screening can be realized only by a three-dimensional model.
In the prior art, the three-dimensional model building process is to build the three-dimensional model step by step in the modes of dotting, wire lapping, paving and combining. For example, the prior art CN111223177a discloses a method and apparatus for constructing a three-dimensional model in a three-dimensional space by obtaining a two-dimensional panoramic image of the three-dimensional space and coordinates of four vertices of a first surface of the three-dimensional space in a coordinate system of the two-dimensional panoramic image, projecting the four vertices of the first surface into a three-dimensional projection space based on the coordinates of the four vertices of the first surface in the coordinate system of the two-dimensional panoramic image to obtain four first projection points of the four vertices of the first surface in the three-dimensional projection space, performing coplanar correction on the four first projection points to obtain four second projection points of the four vertices of the first surface in the three-dimensional projection space based on the four first projection points, obtaining four vertices of the first surface of the three-dimensional model based on the four vertices of the first surface of the three-dimensional model and the height of the three-dimensional space projected along the first coordinate axis, wherein the face and finally formed three-dimensional model entity have a stepwise and continuous directory tree structure, each having a specific model element of editing order. Therefore, if the partial content of the three-dimensional model established in the mode needs to be replaced, the existing conventional technical means generally directly selects a dotted line surface or a partial model of a three-dimensional entity to be replaced, and at the moment, the selected model to be replaced has a cross-sequence problem of a model directory tree structure, namely, the selected replacement section has a cross-sequence problem of a plurality of crotch structures and a plurality of editing sequences, so that the editing sequences in the model directory tree are disturbed, and once the editing sequences in the model directory tree have a discontinuous condition, the later combined rendering of the three-dimensional model is directly affected, so that the data operation processing capacity of the replaced three-dimensional model is improved. On the other hand, the sequence of the three-dimensional model directory tree replaced in this way will change, and the node selection function searching based on the editing sequence will have break points, so that the node search cannot be performed comprehensively, and the node search information is lost in the model replacement part. Compared with the prior art, the method takes the space area in the three-dimensional scene as an editing and replacing object, so that specific elements of the three-dimensional model to be edited and replaced can be contained in the part of the space area, thereby discarding the influence of the editing sequence in the model directory tree on the three-dimensional model editing and replacing process, and further remarkably reducing the data operation processing amount caused by the influence of the changes of the specific elements such as the dotted line and the plane of the three-dimensional model on the whole three-dimensional model in the three-dimensional model editing and replacing process.
It can be understood that when editing and replacing a part of the content in the three-dimensional model is required, the existing conventional processing manner needs to select a specific entity element in the three-dimensional model to be edited and replaced, for example, a dotted line, a plane, etc., and the element of the selected part needs to be determined by a determined reference coordinate system, where the normal reference coordinate system is a coordinate system determined when the three-dimensional model is initially built, and the position of the selected element needing to be replaced is determined based on the reference coordinate system, and different elements have completely different coordinate information. When the model to be replaced is needed to be newly added into the original model, at the moment, coordinate information corresponding to the selected element to be replaced is required to be endowed to each element of the model to be replaced and is incorporated into a model directory tree of the new model, and the process needs to perform corresponding data operation and processing on the coordinate information of each element, so that the processing amount of the data operation is remarkably increased. In contrast, the method limits the elements needing to be edited and replaced in a space area mode, so that all relevant elements of the target model needing to be edited and replaced are processed in a unified package data form, the step of processing coordinate information of each element is omitted, and the data volume needing to process the coordinate information is obviously reduced. The spatial region which needs to be edited and replaced exists in the original three-dimensional model in a correlated aggregate, and the position information of the spatial region can be determined only through single operation processing, so that the accurate position information which needs to be edited and replaced is provided, the data processing efficiency of the three-dimensional model editing and replacing is greatly improved, and particularly, the increase of the operation processing amount of the model editing and replacing caused by the editing sequence information in the model directory tree is avoided by forming a spatial geometric body or a spatial enveloping body in the three-dimensional space.
Preferably, constructing an alternative space containing a number of three-dimensional models, partially or entirely, in a three-dimensional scene comprises:
Constructing at least one plane area in the three-dimensional scene, wherein the plane area is positioned on at least one projection plane shared by a plurality of three-dimensional models to be replaced;
Determining the expansion height of the plane area according to the maximum envelope height of the projection surface along the normal direction;
and forming a replacement space based on the extended height.
Preferably, filtering the several three-dimensional models in the replacement space to determine the original model to be replaced comprises:
Determining a three-dimensional model with all vertexes and lines ending in a replacement space as a first original model to be replaced;
And determining the three-dimensional model with partial vertexes and lines ending in the replacement space as a second original model to be replaced.
Preferably, in the case that the three-dimensional model is a first original model in which both the vertex and the edge are located in the replacement space, the replacing step includes:
Selecting all first original models in the replacement space in a three-dimensional scene;
selecting model files of each replacement model to replace the first original model from the three-dimensional model database;
Analyzing and determining the center position and the orientation of each replacement model in the model file and each first original model in the three-dimensional scene;
All of the first original models in the three-dimensional scene are replaced with respective replacement models based on the determined center position and orientation.
Preferably, in the case that the three-dimensional model is a second original model in which part of the vertices and edges are located in the replacement space, the replacing step includes:
selecting at least one three-dimensional model section of the three-dimensional model penetrating or partially embedding replacement space in the three-dimensional scene;
determining a point or line of at least one three-dimensional model section intersecting the alternative spatial envelope as the vertex and/or outermost line of the alternative three-dimensional model section;
Determining the alternative three-dimensional model section as a second original model;
selecting model files of each replacement model to replace the second original model from the three-dimensional model database;
Analyzing and determining the center positions and orientations of each replacement model in the model file and each second original model in the three-dimensional scene;
The second original model in the three-dimensional scene is replaced with each replacement model based on the determined center position and orientation.
Preferably, the analyzing to determine the center position and orientation of each of the replacement model within the model file and each of the first original model or the second original model in the three-dimensional scene further comprises:
the center position and the orientation of each unit substitution space of each substitution model and each first original model or each second original model in the three-dimensional scene are determined through analysis. Compared with a plurality of models selected by a frame, the model bounding box (namely the unit replacement space) is a more regular geometric body, so that the calculation amount required by calculating the central position coordinates and the orientation vectors is smaller, and a significantly larger number of three-dimensional models can be quickly pasted and replaced at one time.
Preferably, obtaining a replacement model in response to the replacement requirement to replace each original model with a replacement model further comprises:
determining the arrangement position of the corresponding replacement model in the replacement space by using the relative geometric positions of all original models;
The original model in the three-dimensional scene is replaced with each replacement model based on the determined placement position.
Because the required calculation amount of the homoscaling is combined by taking all the replacement models in the three-dimensional space as objects, the single analysis of each vertex and each line (which possibly comprises the calculation of traversing a large number of nodes and implies a large memory consumption) is not required, and the replacement method provided by the invention does not need to traverse each node, so that the requirement of replacing a large number of three-dimensional models at one time can be met. Moreover, the replacement approach brought by the comparable scaling requires very little effort for later manual adjustment. It will be appreciated that when the range of the three-dimensional model to be edited and replaced is adjusted by conventional technical means in the prior art, the selected target element is an actual three-dimensional model component element such as a dotted line and a plane, and the range adjustment of a single element only involves the change of the element in the extending direction thereof, and does not extend the range adjustment of other elements. If a three-dimensional model needs to be edited and replaced in a large range, independent operation needs to be performed on each single element, and different elements may have completely different extending directions, so that the operation amounts to be adjusted by the different elements are also significantly different, and therefore, the data operation processing efficiency cannot be improved through a unified operation processing mode. In contrast, the invention can meet the expected range adjustment by limiting different elements in the same space region and adjusting the data of the expansion range of the space, and unifies the operation processing process of the range adjustment of the different elements into a single space region adjustment operation process, thereby avoiding the process of respectively operating the different elements in the three-dimensional model and remarkably reducing the operation workload of editing and replacing the three-dimensional model.
Preferably, the method for realizing the replacement of the regional three-dimensional model provided by the invention further comprises the following steps:
a replacement list for replacement is provided in connection with the model files of the selected respective replacement models to allow a user to determine correspondence between the replacement model and the original model based on the replacement list and to perform manual replacement of the replacement model.
Preferably, the maximum envelope height of the present invention is greater than or equal to the position of the vertex or line with the greatest normal height in the several three-dimensional models to be replaced.
Preferably, the present invention also relates to a system for implementing a regional three-dimensional model replacement, the system comprising:
a construction module for constructing a replacement space containing a plurality of three-dimensional models in part or in whole in the three-dimensional scene;
The determining module is used for screening and filtering a plurality of three-dimensional models in the replacement space to determine an original model to be replaced;
And the execution module is used for responding to the replacement requirement to acquire a replacement model so as to replace each original model with the replacement model.
Drawings
FIG. 1 is a schematic illustration of the spatial positions of an original model and a replacement model in a replacement space according to a preferred embodiment of the present invention;
FIG. 2 is a schematic diagram showing the spatial positions of an original model and a replacement model in a replacement space according to a preferred embodiment of the present invention;
Fig. 3 is a flow chart of a method for implementing regional three-dimensional model replacement according to a preferred embodiment of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making clear and defining the scope of the present invention. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein.
Example 1
The embodiment of the invention provides a method for realizing the replacement of a regional three-dimensional model, which comprises the following steps:
an alternate space is constructed in the three-dimensional scene that contains, in part or in whole, a number of three-dimensional models.
Several three-dimensional models in the filtered replacement space are screened to determine the original model to be replaced.
A replacement model is obtained in response to the replacement demand to replace each original model with a replacement model.
In particular, in the present invention, an original model may be understood as a three-dimensional model to be replaced in a constructed replacement space or space envelope. A replacement model may be understood as a three-dimensional model for replacing the original model in the constructed replacement space or space envelope. In other words, the original model replacing the corresponding position in the space or space envelope is replaced with the replacement model.
Fig. 1 shows one example of the spatial positions of the original model and the replacement model in the replacement space, and the dashed box shown in fig. 1 may represent the replacement space according to the present invention. The alternate space may be formed by stretching a planar region surrounding all vertices and lines of the "three-dimensional model" on at least one projection surface. For example, the replacement space can be formed by expanding the bottom surface of the vertical projection of the original models shown in fig. 1 along the height direction. Further, the replacement space contains, in part or in whole, one or more three-dimensional models (i.e., original models) to be replaced, and when the original model is replaced with a replacement model, a replacing operation is performed in the replacement space. It should be appreciated that while FIG. 1 shows one specific shape example of an alternate space, this is by way of illustration only as a non-limiting example, and in some embodiments, the alternate space may be any regular or irregular spatial geometry other than FIG. 1 that is capable of partially or fully containing several three-dimensional models.
According to a preferred embodiment, in the present invention, the step of constructing an alternative space partially or entirely containing a number of three-dimensional models in a three-dimensional scene may include:
at least one planar region is constructed in the three-dimensional scene, said planar region being located on at least one projection plane common to several three-dimensional models to be replaced.
And determining the expansion height of the plane area according to the maximum envelope height of the projection surface along the normal direction.
And forming the replacement space based on the extended height.
Specifically, firstly the planar area is located on at least one projection plane shared by a plurality of three-dimensional models to be replaced, and the planar area surrounds all vertexes and lines of the three-dimensional models to be replaced on the at least one projection plane, secondly, the expansion height of the planar area, namely the height required for the growth of the planar area to the other direction (such as the vertical direction), is determined according to the maximum envelope height of the three-dimensional models to be replaced along the normal direction from the at least one projection plane, and a space geometry or a space envelope body is formed according to the expansion height, and is taken as the replacement space, and the purpose of planning the replacement space is to select a plurality of three-dimensional models to be replaced. In particular, the three-dimensional model in which vertices and lines completely terminate in the substitution space is also referred to as a first original model hereinafter. Preferably, in the present invention, the maximum envelope height is greater than or equal to the position of the vertex or line with the greatest normal height in the several three-dimensional models to be replaced.
Generally, a user first creates a planar region manually and then, based on the determined planar region computational analysis, a spatial geometry or spatial envelope surrounding several three-dimensional models to be replaced is formed by a system processor (Central Processing Unit, CPU). For ease of understanding, this spatial geometry or spatial envelope is referred to herein as an alternate space.
In particular, the selection or creation of planar regions may be accomplished using region selection tools within the system or platform on which the method is implemented, similar to rectangular selection tools, polygon selection tools, etc. within existing modeling software. A model within a rectangular area can be selected by dragging a cursor over the graphical user interface using a rectangular selection tool, which is suitable for selecting a larger area. A model within a polygonal area may be selected by dragging a cursor over the graphical user interface using a polygonal selection tool, the selection being adapted to select irregularly shaped areas. It will be appreciated that the above-described manner of creating a planar region is by way of non-limiting example only and should not be taken as a specific limitation of the invention, as the planar region may also be created by other well-known means not disclosed herein by those skilled in the art.
The planar regions and their corresponding alternate spaces shown in fig. 1 are regular cubes and in other alternative embodiments the planar regions and their corresponding alternate spaces may be irregular space geometries. Specifically, when a plurality of three-dimensional models to be replaced are selected by using the planar area and the corresponding replacement space, the shape of the replacement space can be confirmed according to the shape of one or more three-dimensional models at the boundary of the replacement space. For example, if a three-dimensional model included in a surrounding surface on one side of the replacement space is an arc surface with respect to the contour on that side, part or all of the surrounding surface of the replacement space on that side may be shaped (e.g., arc) to accommodate the arc surface contour of the three-dimensional model. Or if the top surface of the three-dimensional model having the greatest normal height contained in the replacement space is a conical surface, part or all of the replacement space with respect to the top surrounding surface of the three-dimensional model may be shaped (e.g., tapered) to accommodate the conical contour of the three-dimensional model. Thus, a replacement space of various morphologies can be constructed to contain several types of three-dimensional models. In particular, validating the morphology of the replacement space based on the morphology of one or more three-dimensional models at the peripheral boundary of the replacement space may avoid selecting too much dead space (e.g., areas where no three-dimensional model exists), while reducing selecting too many model segments that may not need to be replaced but placed in the replacement space, thereby increasing the system processing computation.
According to a preferred embodiment, in the present invention, filtering several three-dimensional models in a replacement space to determine an original model to be replaced includes:
A three-dimensional model with all vertices and lines ending in the replacement space is determined as a first original model to be replaced.
And determining the three-dimensional model with partial vertexes and lines ending in the replacement space as a second original model to be replaced.
In particular, each three-dimensional model is typically a spatial volume structure composed of a combination of faces, each face contained by the spatial volume structure being constituted by a respective vertex and a connection line between the vertices. Thus, each three-dimensional model contains several vertices and edges. Further, in the determined replacement space, the spatial geometrical relationship of each three-dimensional model to the replacement space typically includes one or more three-dimensional models contained entirely in the replacement space or one or more three-dimensional models contained partially in the replacement space. In view of the above, the three-dimensional model with all vertexes and lines ending in the replacement space is determined as a first original model to be replaced, and the three-dimensional model with part of vertexes and lines ending in the replacement space is determined as a second original model to be replaced. Accordingly, when replacing or substituting the three-dimensional model (i.e., the original model) in the replacement space with the replacement model, at least the case where each three-dimensional model in the replacement space is replaced entirely or only partially is involved.
According to a preferred embodiment, in the present invention, obtaining a replacement model to replace each original model in response to the replacement requirement includes selecting a local model to generate a replacement model in response to the replacement requirement entered by the user. I.e. selecting the corresponding replacement model from the three-dimensional model database according to the user's requirements. Further, the portion that needs to be replaced can be determined by comparing the difference between the original model and the replacement model.
According to a preferred embodiment, in the first case where the vertices and edges of all the original models are located in the replacement space (i.e. the three-dimensional model is the first original model where the vertices and edges are located in the replacement space), the replacing step includes:
p1 selects all original models (i.e., first original models) within the replacement space in the three-dimensional scene.
P2 selects a corresponding model file(s) from the three-dimensional model database to replace each replacement model of all original models.
The P3 analysis determines the center position and orientation of each replacement model within the corresponding model file and each original model in the three-dimensional scene.
P4 replaces all original models in the three-dimensional scene with respective replacement models.
According to a preferred embodiment, the "substitution" operation in step P4 of the first scenario further comprises determining the center position and orientation of the respective replacement model from the center position and orientation of the respective original model, respectively, such that the respective replacement model is arranged in a three-dimensional scene according to the center position and orientation of the respective original model. In other words, the center positions and/or orientation vectors of the original model and the replaced replacement model in the replacement space are kept identical.
According to a preferred embodiment, after step P2 according to the first aspect of the invention, it is further comprised that a replacement list for replacement is provided to the user in connection with the model file of the selected replacement model, the replacement list being used by the user to manually determine the correspondence between the replacement model and the original model and to allow the user to manually perform the replacement. For example, the user may manually select replacement model nodes, and select whether to be replaced for a particular replacement model node. Further, in replacing or replacing the original model with the replacement model, the user is allowed to decide whether to delete or hide the original model from the scene.
According to a preferred embodiment, in step P3 of the first scenario of the present invention, the central positions and orientations of the bounding boxes of the replacement model and the original model may be replaced by determining the central positions and orientations of the bounding boxes of the replacement model and the original model when the analysis determines the central positions and orientations of the replacement model and the original model. In other words, the import or replacement position of the replacement model may be determined by analytically determining the correspondence of the center position and orientation of the respective unit replacement space of each replacement model and each original model (i.e., the first original model or the second original model) in the three-dimensional scene. Specifically, first, based on the determined one or more original models, a model bounding box (or a first unit substitution space) of the whole original models is acquired, and a first center coordinate system of the model bounding box is taken as a reference. Further, a second central coordinate system of a model bounding box (or a second unit replacement space) of the replacement model to be imported is obtained, and the two coordinate systems (namely the first central coordinate system and the second central coordinate system) are overlapped to be used as the import basis of the replacement position of the replacement model.
In particular, each of the original model and the replacement model may correspond to a unit of replacement space. Each original model or replacement model, for example, in the dashed box shown in fig. 1, has a minimum replacement space (not shown) that is contained within the replacement space described above, similar to a bounding box (e.g., a cube structure), and has a minimum spatial geometry that can completely contain the corresponding one of the original model or replacement model. Thus, the correspondence relationship of the center position and the orientation of the unit substitution space to which each of the original model and the substitution model corresponds is comparatively analyzed to determine the substitution/introduction position of the substitution model.
In some alternative embodiments, in addition to performing the first alternative of determining the placement position of the replacement model in terms of center position and orientation, for step P3 described above, the present invention provides in another aspect a second alternative of determining the placement position of the replacement model in terms of relative geometric positional relationships between the three-dimensional models within the three-dimensional scene. Specifically, the mutual spacing ratio between the replacement models is determined according to the mutual spacing ratio of the original models, for example, the mutual spacing is reduced in a same ratio or enlarged in a same ratio in the same three-dimensional space so as to meet the size difference brought by the replacement models. In other words, the second alternative is to determine the placement position at a relative pitch instead of the center position, but the orientation vector of the replacement model is consistent with the orientation vector of the corresponding original model.
According to a preferred embodiment, in the second case where part of the vertices and edges of the original model are located in the replacement space (e.g. a three-dimensional model segment that extends through or is partially embedded in the replacement space) (i.e. where the three-dimensional model is a second original model where part of the vertices and edges are located in the replacement space), the replacing step comprises:
p5 selects at least one three-dimensional model section of the three-dimensional model penetrating or partially embedded into the replacement space in the three-dimensional scene.
P6 determines a point or line of at least one three-dimensional model segment intersecting the alternative spatial envelope as the vertex and/or outermost line of the alternative three-dimensional model segment.
P7 determines the alternative three-dimensional model section as the second original model.
P8 selects model files for each replacement model from the three-dimensional model database to replace the second original model.
P9 analysis determines the center position and orientation of each of the replacement models within the model file and each of the second original models in the three-dimensional scene.
P10 replaces the second original model in the three-dimensional scene with each replacement model based on the determined center position and orientation.
In particular, in case that "at least one three-dimensional model section penetrating or partially embedded in the replacement space is predetermined to be replaced" when the original model within the replacement space is selected, a point or line of the at least one three-dimensional model section intersecting with the envelope of the replacement space is determined as a vertex and/or an outermost line of the replacement three-dimensional model section, thereby determining the replacement three-dimensional model section as the second original model. In other words, the second original model is a three-dimensional model section that should be replaced throughout or partially embedded in the replacement space, but is considered to be the original model within the replacement space during replacement.
As shown in fig. 2, when at least one three-dimensional model segment a is present in the replacement space, which extends through or is partially embedded in the replacement space, a point or line of the at least one three-dimensional model segment a intersecting the envelope of the replacement space is determined as the vertex and/or outermost line of the replacement three-dimensional model segment, and the replacement three-dimensional model segment is determined as the second original model that should be replaced. Model files for replacing each replacement model of the second original model are selected from the three-dimensional model database, and the three-dimensional model section a is replaced with the three-dimensional model section a' by analyzing the center positions and orientations of each replacement model and each second original model. Further, the three-dimensional model section B and the three-dimensional model section C, which are originally integrated with the three-dimensional model section a, outside the replacement space are adaptively combined with the replaced three-dimensional model section a' to form an integrated model.
By way of non-limiting example, a so-called adaptive combination is, for example, when the three-dimensional model section a is a partial segment of a certain pipe traversing the replacement space and the replaced three-dimensional model section a 'is another pipe of a pipe diameter that is comparatively small, the three-dimensional model section B and the three-dimensional model section C that were otherwise integral with the three-dimensional model section a outside the replacement space are scaled in a same manner and joined with the replaced three-dimensional model section a' at a point or line intersecting the envelope of the replacement space. Or when the three-dimensional model section a is a straight pipe that traverses the replacement space and the replaced three-dimensional model section a 'is a serpentine pipe having substantially the same diameter, the three-dimensional model section B and the three-dimensional model section C that are originally integral with the three-dimensional model section a outside the replacement space are joined with the replaced three-dimensional model section a' at a point or line intersecting the envelope of the replacement space. In addition, in other alternative embodiments, the three-dimensional model section B and the three-dimensional model section C that are originally integrated with the three-dimensional model section a outside the replacement space may be adaptively and synchronously replaced with the replaced three-dimensional model section a', and the user decides on the subsequent operation, such as rejecting the replacement, agreeing to the replacement, or modifying the replacement, etc. In particular, in replacing "at least one three-dimensional model section penetrating or partially embedding in the replacement space", a first alternative based on the model center position and orientation, or a second alternative based on the relative geometrical positional relationship between the models, may be employed.
According to a preferred embodiment, in a third case where there is a "three-dimensional model section to be preserved that is to be inserted through or partially into the replacement space" in addition to the first and second original models to be replaced within the replacement space, the replacing step comprises:
before step P3 of the first scenario, when the three-dimensional model with at least one vertex or edge outside the three-dimensional scene is determined when the analysis determines the center position and orientation of each replacement model within the corresponding model file and each original model in the three-dimensional scene, the three-dimensional model is determined to be a fixed three-dimensional model that is not the original model. In step P4 of the first case, the center position and orientation of the fixed three-dimensional model are not determined analytically, or the result of the analytical determination is not retained, and thus the fixed three-dimensional model does not have a replacement model corresponding thereto and used for substitution.
Further, based on the above-mentioned "three-dimensional model section to be preserved throughout or partially embedded in the replacement space" third scenario, there may be a fourth scenario as follows:
when the relative distance is calculated in the second alternative under the condition that the fixed three-dimensional model and the original model have fixed distance requirements due to regulations or objective conditions, the mutual distance of the alternative models is calculated following the mutual distance proportional relation of the first original model on the premise of keeping the absolute distance between the first original model and the second original model and/or the fixed three-dimensional model.
Preferably, according to the invention, the spacing between one first original model and the other first original model can also be set in advance as an absolute spacing that needs to be preserved, which is calculated to be preserved in the second alternative when performing the replacement for the original model.
In particular, the first alternative may be used in combination with the second alternative, i.e., the three-dimensional space is divided into at least one first region replaced with the central position as a key element, at least one second region replaced with the mutual spacing as a key element, at least one third region replaced with both the mutual spacing and the absolute spacing taken as key elements, and at least one fourth region replaced with the central position, the mutual spacing, and the absolute spacing taken as key elements.
FIG. 3 illustrates an operational flow of a method of implementing regional three-dimensional model replacement according to the present invention, which may specifically include the steps of:
s1, three-dimensional model data preparation.
S2, drawing a plane area and forming a replacement space containing one or more three-dimensional models to be replaced.
S3, responding to the replacement requirement of the user to acquire a local replacement model.
And S4, secondarily screening the replacement model in the preview window.
S5 replacing one or more three-dimensional models to be replaced in the replacement space with the replacement model.
And S6, adjusting the replacement position of the replaced replacement model.
According to a preferred embodiment, step S7 is further comprised at or after performing step S2 of obtaining a first center position of a model bounding box (or unit replacement space) of one or more three-dimensional models to be replaced in the replacement space.
According to a preferred embodiment, step S8 is also included at or after step S4, where a second center position of the model bounding box (or unit replacement space) of the one or more replacement models that perform the replacement is obtained. Further, step S9 is performed of aligning a first center position of a model bounding box (or a unit replacement space) of one or more three-dimensional models to be replaced with a second center position of a corresponding one or more model bounding boxes (or unit replacement spaces) of a replacement model to be replaced, thereby performing a replacement operation of the replacement model with respect to the original model based on the alignment result of the center positions in pairs.
It will be appreciated by those skilled in the art that other steps or operations may be included before, after or between the steps described above, as long as the objects of the invention are achieved, for example, to further optimize and/or improve the methods described herein. Furthermore, while the methods described herein are illustrated and described as a series of acts that are performed in a sequence, it should be understood that the methods are not limited by the order. For example, some acts may occur in a different order than described herein. Or one action may occur simultaneously with another action.
Example 2
The embodiment provides a system for realizing regional three-dimensional model replacement, which can comprise:
a construction module for constructing a replacement space containing a plurality of three-dimensional models in part or in whole in the three-dimensional scene;
The determining module is used for screening and filtering a plurality of three-dimensional models in the replacement space to determine an original model to be replaced;
And the execution module is used for responding to the replacement requirement to acquire a replacement model so as to replace each original model with the replacement model.
According to a preferred embodiment, in the present invention, the building block further may comprise:
The selecting unit is used for constructing at least one plane area which is positioned on at least one projection plane shared by a plurality of three-dimensional models to be replaced in the three-dimensional scene by a user;
the computing unit is used for determining the expansion height of the plane area according to the maximum envelope height of the projection surface along the normal direction;
And the forming unit is used for forming a replacement space based on the expansion height determined by the calculating unit.
According to a preferred embodiment, in the present invention, the determining module further may include:
The first screening unit is used for determining the three-dimensional model with all vertexes and lines ending in the replacement space as a first original model to be replaced;
and the second screening unit is used for determining the three-dimensional model with partial vertexes and lines ending in the replacement space as a second original model to be replaced.
According to a preferred embodiment, in the present invention, the execution module may further include:
the acquisition unit is used for responding to the replacement requirement input by the user to acquire a replacement model for replacement;
And a replacement unit for replacing each original model with a replacement model.
The beneficial effects of the system for implementing regional three-dimensional model replacement provided in this embodiment are the same as those of the method for implementing regional three-dimensional model replacement provided in the foregoing embodiment, and other technical features in the system for implementing regional three-dimensional model replacement are the same as those disclosed in the foregoing embodiment, so that redundancy is avoided, and details are not repeated here.
It should be noted that the above-described embodiments are exemplary, and that a person skilled in the art, in light of the present disclosure, may devise various solutions that fall within the scope of the present disclosure and fall within the scope of the present disclosure. It should be understood by those skilled in the art that the present description and drawings are illustrative and not limiting to the claims. The scope of the invention is defined by the claims and their equivalents. The description of the invention includes a plurality of inventive concepts, such as "preferably", "according to a preferred embodiment" or "optionally" each meaning that the corresponding paragraph discloses a separate concept, the applicant reserves the right to filed a divisional application according to each inventive concept.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311299864.3A CN117351170B (en) | 2023-10-09 | 2023-10-09 | A method and system for realizing regional three-dimensional model replacement |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311299864.3A CN117351170B (en) | 2023-10-09 | 2023-10-09 | A method and system for realizing regional three-dimensional model replacement |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117351170A CN117351170A (en) | 2024-01-05 |
CN117351170B true CN117351170B (en) | 2025-01-28 |
Family
ID=89362512
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311299864.3A Active CN117351170B (en) | 2023-10-09 | 2023-10-09 | A method and system for realizing regional three-dimensional model replacement |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117351170B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112800511A (en) * | 2020-12-31 | 2021-05-14 | 杭州群核信息技术有限公司 | Home decoration material adjusting method and device, computer equipment and storage medium |
CN115953535A (en) * | 2023-01-03 | 2023-04-11 | 深圳华为云计算技术有限公司 | Three-dimensional reconstruction method and device, computing equipment and storage medium |
CN116071529A (en) * | 2023-02-08 | 2023-05-05 | 珠海金山数字网络科技有限公司 | Three-dimensional model processing method and device |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10038894B1 (en) * | 2017-01-17 | 2018-07-31 | Facebook, Inc. | Three-dimensional scene reconstruction from set of two dimensional images for consumption in virtual reality |
CN109300188A (en) * | 2018-10-23 | 2019-02-01 | 北京旷视科技有限公司 | Threedimensional model processing method and processing device |
US11429756B2 (en) * | 2018-12-24 | 2022-08-30 | Dassault Systemes Solidworks Corporation | CAD models by creating best-fit approximate 3D B-rep geometry |
CN112381901B (en) * | 2020-11-16 | 2024-09-10 | 北京博能科技股份有限公司 | Three-dimensional model updating method and device and electronic equipment |
CN112560125B (en) * | 2020-12-10 | 2023-03-24 | 上海联泰科技股份有限公司 | Generation method, generation system and preprocessing system of lattice structure model |
CN114693782A (en) * | 2020-12-29 | 2022-07-01 | 北京外号信息技术有限公司 | Method and device for determining the conversion relationship between a three-dimensional scene model coordinate system and a physical coordinate system |
CN113052983A (en) * | 2021-04-14 | 2021-06-29 | 杭州群核信息技术有限公司 | Customizable indoor three-dimensional scene editing method, device and system and storage medium |
CN113593020B (en) * | 2021-08-10 | 2023-05-23 | 四川易方智慧科技有限公司 | ArcGIS-based large-scale three-dimensional urban scene generation method |
US11989848B2 (en) * | 2021-09-17 | 2024-05-21 | Yembo, Inc. | Browser optimized interactive electronic model based determination of attributes of a structure |
CN114202626B (en) * | 2021-12-07 | 2025-04-08 | 中煤浙江测绘地理信息有限公司 | Visual building model replacement method and storage medium |
CN115457202B (en) * | 2022-09-07 | 2023-05-16 | 北京四维远见信息技术有限公司 | Method, device and storage medium for updating three-dimensional model |
CN115471617A (en) * | 2022-10-14 | 2022-12-13 | 浙江省测绘科学技术研究院 | Local updating method for large-scene real-scene three-dimensional slice data |
CN115600307B (en) * | 2022-12-01 | 2023-03-10 | 北京飞渡科技有限公司 | Method for generating single building from Mesh model of urban scene |
-
2023
- 2023-10-09 CN CN202311299864.3A patent/CN117351170B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112800511A (en) * | 2020-12-31 | 2021-05-14 | 杭州群核信息技术有限公司 | Home decoration material adjusting method and device, computer equipment and storage medium |
CN115953535A (en) * | 2023-01-03 | 2023-04-11 | 深圳华为云计算技术有限公司 | Three-dimensional reconstruction method and device, computing equipment and storage medium |
CN116071529A (en) * | 2023-02-08 | 2023-05-05 | 珠海金山数字网络科技有限公司 | Three-dimensional model processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN117351170A (en) | 2024-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20080040080A1 (en) | System and Method for Identifying Original Design Intents Using 3D Scan Data | |
US7613539B2 (en) | System and method for mesh and body hybrid modeling using 3D scan data | |
US7821513B2 (en) | System and method for analyzing modeling accuracy while performing reverse engineering with 3D scan data | |
US20080303810A1 (en) | System and method for calculating loft surfaces using 3d scan data | |
CN100570639C (en) | Inverse Modeling Method Using Mesh Data as Features | |
US11263802B2 (en) | Method and apparatus for splitting three-dimensional volumes | |
JP2013507679A (en) | Method and system capable of 3D printing of 3D object model | |
WO2018029694A1 (en) | Systems and methods for printing of 3d models | |
CN110176064B (en) | Automatic identification method for main body object of photogrammetric generation three-dimensional model | |
JP2007198934A (en) | Region of interest extraction method of image data, computer program implementing the method, and region of interest extraction system | |
CN117853691B (en) | Graphic processing method and system of three-dimensional model | |
JP2002024306A (en) | Method and device for analysis model data generation and recording medium with analysis model data generation program recorded thereon | |
CN113538501A (en) | Building edge refinement method for low-altitude image DSM generation | |
JP2009122999A (en) | 3D shape optimization apparatus and 3D shape optimization method | |
CN114882272A (en) | Fusion analysis method for aerial manufacturing full-angle projection image surface patch attributes | |
CN117351170B (en) | A method and system for realizing regional three-dimensional model replacement | |
CN113536617B (en) | A method for rapid generation of detailed finite element models of complex structures | |
CN101533525A (en) | Method for analyzing the overlay of point and face | |
JP6294700B2 (en) | Image processing apparatus and image processing method | |
JP3786410B2 (en) | Fillet creation method and 3D CAD program | |
CN111862001A (en) | Semi-automatic labeling method and device for CT image, electronic equipment and storage medium | |
CN117333648A (en) | Method and system for fusing GIS three-dimensional terrain and digital information model | |
RU2470368C2 (en) | Image processing method | |
CN111222682A (en) | A Second-Order Optimization Simplification Method for Map Boundary Data | |
WO2015172504A1 (en) | Method for constructing three-dimensional objects and computer aided design system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |