CN115239884A - Reconstruction method and device for medium-assembled three-dimensional model - Google Patents

Reconstruction method and device for medium-assembled three-dimensional model Download PDF

Info

Publication number
CN115239884A
CN115239884A CN202210881014.3A CN202210881014A CN115239884A CN 115239884 A CN115239884 A CN 115239884A CN 202210881014 A CN202210881014 A CN 202210881014A CN 115239884 A CN115239884 A CN 115239884A
Authority
CN
China
Prior art keywords
dimensional model
acquiring
coordinate point
assembled
boundary
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
CN202210881014.3A
Other languages
Chinese (zh)
Inventor
刘亚
胡小明
章强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CSSC Huangpu Wenchong Shipbuilding Co Ltd
Original Assignee
CSSC Huangpu Wenchong Shipbuilding 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 CSSC Huangpu Wenchong Shipbuilding Co Ltd filed Critical CSSC Huangpu Wenchong Shipbuilding Co Ltd
Priority to CN202210881014.3A priority Critical patent/CN115239884A/en
Publication of CN115239884A publication Critical patent/CN115239884A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/17Mechanical parametric or variational design

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Graphics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a reconstruction method and a device of a medium-assembled three-dimensional model, which are characterized in that medium-assembled three-dimensional model data are obtained and converted into pure text format model data, wherein the pure text format model data comprise boundary positioning point data of each part; sequentially traversing the boundary positioning point data of each part, and fitting the boundary positioning point data of each part into a corresponding closed part boundary wire frame; and obtaining and stretching a boundary wire frame of the closed part according to the thickness direction of each part to obtain a part model of each part until all parts are traversed to obtain part models corresponding to all parts and obtain an assembled three-dimensional model in reconstruction. Compared with the prior art, the technical scheme of the invention realizes the reconstruction of the intermediate and assembled three-dimensional model and improves the accuracy of the constructed intermediate and assembled three-dimensional model by acquiring the intermediate and assembled three-dimensional model data in the plain text format and then reversely reconstructing the intermediate and assembled three-dimensional model data in the plain text format into the intermediate and assembled three-dimensional model.

Description

Reconstruction method and device for medium-assembled three-dimensional model
Technical Field
The invention relates to the technical field of model reconstruction, in particular to a method and a device for reconstructing a medium-sized three-dimensional model.
Background
At present, three-dimensional model data output by completely autonomous SPD ship design software cannot be directly used for manufacturing a built-in welding seam track and adding welding process parameters, and because the three-dimensional model output by the software is in a triangular patch format and is not a solid three-dimensional model.
The data format of the triangular patch model is an STL file format, the format is an interface protocol established by 3DSYSTEMS in 1998, and the STL file is composed of a plurality of triangular patches approximating the surface of the three-dimensional solid model and has the advantages of strong topological capability adaptability, simple generation algorithm, easy processing and the like.
The data format of the triangular patch model is only points, triangles and a plurality of elements, and basically, a 3D model is defined by a plurality of triangles, so that the data in the file comprises a complete list of XYZ coordinates of normals and vertexes of all the triangles; when the triangular patch model is processed, the topological relation among the triangles needs to be constructed, the more complex the curved surface is, the larger the curvature is, the larger the number of the formed triangles is, and the coordinate points of each triangle are recorded for at least more than 4 times, so that the data processing of the triangular patch model is very slow when the topological relation is constructed; in addition, the triangle forming the curved surface has gaps, namely the triangular patch is lost, and the defect is caused when the intersection part of the large-curvature curved surface is triangulated. On the displayed STL format model, there are incorrect cracks or holes, i.e. no triangles are present, violating the fill rule, and at this time, a number of small triangle patches should be added at the edges of the cracks or holes to satisfy the fill rule. In addition, the triangular patches are generated to different entities at the intersecting lines, so that the distortion of the triangular patches at the intersecting lines can be caused, and the fitting of the intersecting lines at the later stage is seriously influenced. Thirdly, overlapping triangular patches, wherein the overlapping of the triangular patches is mainly generated due to numerical rounding errors in the process of triangulating the patches; the vertices of the triangle are represented by floating point numbers in a 3D space, not integers, and if the rounding error range is large, overlapping of patches is caused, so that the accurate size cannot be measured.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the reconstruction method and the reconstruction device of the assembled three-dimensional model are provided, so that the assembled three-dimensional model is reconstructed, and the accuracy of the constructed assembled three-dimensional model is improved.
In order to solve the above technical problem, the present invention provides a method for reconstructing a medium-assembled three-dimensional model, comprising:
acquiring and converting the assembled three-dimensional model data into plain text format model data, wherein the plain text format model data comprises boundary positioning point data of each part;
sequentially traversing the boundary positioning point data of each part, and fitting the boundary positioning point data of each part into a corresponding closed part boundary wire frame;
and obtaining the thickness direction of each part, stretching the closed part boundary wire frame according to the thickness direction to obtain a part model of each part, and obtaining part models corresponding to all parts until all parts are traversed to obtain an assembled three-dimensional model in reconstruction.
In a possible implementation manner, the acquiring the intermediate three-dimensional model data specifically includes:
acquiring the ship number, the name of the middle assembly, the base surface information of the middle assembly and all component information of the middle assembly of the middle assembled three-dimensional model;
wherein the middle component name comprises a middle component name, a part name and a part name;
the medium component base surface information comprises three point coordinates, and a plane formed by the three point coordinates is parallel to the ground;
the information of all components of the middle assembly comprises part names, plate thicknesses and part boundary positioning point data corresponding to each part.
In a possible implementation manner, the obtaining of part boundary positioning point data corresponding to each part in the assembled three-dimensional model specifically includes:
sequentially acquiring all coordinate point information on a single part according to a preset sequence;
acquiring edge forms of all part edges on the single part, wherein the edge forms comprise straight line edges and arc edges;
when the part edge is a straight line edge, acquiring a first head coordinate point and a first tail coordinate point corresponding to the straight line edge from all coordinate point information;
when the part edge is an arc edge, acquiring a second head coordinate point, a second tail coordinate point and a middle coordinate point corresponding to the arc edge from all coordinate points;
and obtaining part boundary positioning point data corresponding to each part according to the first head coordinate point and the second tail coordinate point corresponding to the straight line edge, and the second head coordinate point, the second tail coordinate point and the middle coordinate point corresponding to the circular arc edge.
In a possible implementation manner, sequentially traversing the boundary positioning point data of each part, and fitting the boundary positioning point data of each part into a corresponding closed part boundary wire frame specifically includes:
sequentially traversing each part edge and the corresponding edge form in the boundary positioning point data of each part;
when the edge form is a straight line edge, acquiring a first head coordinate point and a first tail coordinate point corresponding to the straight line edge, and fitting the first head coordinate point and the first tail coordinate point to obtain a fitted straight line;
when the edge form is an arc edge, acquiring a second head coordinate point, a second tail coordinate point and a middle coordinate point corresponding to the arc edge, and fitting the second head coordinate point, the second tail coordinate point and the middle coordinate point to obtain a fitted arc;
and connecting the fitting straight line and the fitting straight line according to a preset sequence, and sequentially obtaining a closed part boundary wire frame corresponding to each part.
In a possible implementation manner, acquiring a thickness direction of each part specifically includes:
acquiring the type of each part, wherein the type of the part comprises a horizontal part, a longitudinal part and a transverse part;
when the part is a horizontal part, acquiring that the thickness direction of the horizontal part is that the horizontal plane faces upwards or the horizontal plane faces downwards;
when the part is a longitudinal part, acquiring that the thickness direction of the longitudinal part is towards a port or a starboard;
and when the part is a transverse part, acquiring the thickness direction of the transverse part towards the bow or the stern.
The embodiment of the invention also provides a device for reconstructing the intermediate three-dimensional model, which comprises: the device comprises a plain text format model data conversion module, a closed part boundary wire frame generation module and an assembled three-dimensional model reconstruction module;
the plain text format model data conversion module is used for acquiring and converting the assembled three-dimensional model data into plain text format model data, wherein the plain text format model data comprises boundary positioning point data of each part;
the closed part boundary wire frame generation module is used for sequentially traversing the boundary positioning point data of each part and fitting the boundary positioning point data of each part into a corresponding closed part boundary wire frame;
and the middle assembled three-dimensional model reconstruction module is used for acquiring the thickness direction of each part, stretching the closed part boundary wire frame according to the thickness direction to obtain a part model of each part until all parts are traversed to obtain part models corresponding to all parts, and obtaining a reconstructed middle assembled three-dimensional model.
In a possible implementation manner, the plain text format model data conversion module is configured to obtain the intermediate-assembly three-dimensional model data, and specifically includes:
acquiring the ship number, the middle component name, the middle component base plane information and all component information of the middle component of the middle assembled three-dimensional model;
wherein the middle component name comprises a middle assembly name, a part name and a part name;
the medium component base surface information comprises three point coordinates, and a plane formed by the three point coordinates is parallel to the ground;
the middle assembly whole component information comprises part names, plate thicknesses and part boundary positioning point data corresponding to each part.
In a possible implementation manner, the intermediate three-dimensional model reconstructing module is configured to obtain a thickness direction of each part, and specifically includes:
acquiring the type of each part, wherein the type of the part comprises a horizontal part, a longitudinal part and a transverse part;
when the part is a horizontal part, acquiring that the thickness direction of the horizontal part is that the horizontal plane faces upwards or the horizontal plane faces downwards;
when the part is a longitudinal part, acquiring that the thickness direction of the longitudinal part is towards the middle or the side;
and when the part is a transverse part, acquiring that the thickness direction of the transverse part is towards the bow or towards the tail.
In a possible implementation manner, the plain text format model data conversion module is configured to obtain part boundary positioning point data corresponding to each part in the intermediate-assemblage three-dimensional model, and specifically includes:
sequentially acquiring all coordinate point information on a single part according to a preset sequence;
acquiring edge forms of all part edges on the single part, wherein the edge forms comprise straight line edges and circular arc edges;
when the part edge is a straight line edge, acquiring a first head coordinate point and a first tail coordinate point corresponding to the straight line edge from all coordinate point information;
when the part edge is an arc edge, acquiring a second head coordinate point, a second tail coordinate point and a middle coordinate point corresponding to the arc edge from all coordinate points;
and obtaining part boundary positioning point data corresponding to each part according to the first head coordinate point and the second tail coordinate point corresponding to the straight line edge, and the second head coordinate point, the second tail coordinate point and the middle coordinate point corresponding to the circular arc edge.
In a possible implementation manner, the closed part boundary wire frame generating module is configured to sequentially traverse the boundary positioning point data of each part, and fit the boundary positioning point data of each part into a corresponding closed part boundary wire frame, and specifically includes:
sequentially traversing each part edge and the corresponding edge form in the boundary positioning point data of each part;
when the edge form is a straight line edge, acquiring a first head coordinate point and a first tail coordinate point corresponding to the straight line edge, and fitting the first head coordinate point and the first tail coordinate point to obtain a fitted straight line;
when the edge form is an arc edge, acquiring a second head coordinate point, a second tail coordinate point and a middle coordinate point corresponding to the arc edge, and fitting the second head coordinate point, the second tail coordinate point and the middle coordinate point to obtain a fitted arc;
and connecting the fitting straight line and the fitting straight line according to a preset sequence, and sequentially obtaining a closed part boundary wire frame corresponding to each part.
An embodiment of the present invention further provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements the method for reconstructing a neutral three-dimensional model according to any one of the above items when executing the computer program.
The embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, where when the computer program runs, a device on which the computer-readable storage medium is located is controlled to execute the method for reconstructing a medium-assembled three-dimensional model according to any one of the above items
Compared with the prior art, the reconstruction method and the device of the intermediate three-dimensional model have the following beneficial effects:
converting the assembled three-dimensional model data into plain text format model data by acquiring and converting the assembled three-dimensional model data into the plain text format model data, wherein the plain text format model data comprises boundary positioning point data of each part; sequentially traversing the boundary positioning point data of each part, and fitting the boundary positioning point data of each part into a corresponding closed part boundary wire frame; and obtaining and stretching a boundary wire frame of the closed part according to the thickness direction of each part to obtain a part model of each part until all parts are traversed to obtain part models corresponding to all parts and obtain an assembled three-dimensional model in reconstruction. Compared with the prior art, the technical scheme of the invention realizes the reconstruction of the intermediate and assembled three-dimensional model and improves the accuracy of the constructed intermediate and assembled three-dimensional model by acquiring the intermediate and assembled three-dimensional model data in the plain text format and then reversely reconstructing the intermediate and assembled three-dimensional model data in the plain text format into the intermediate and assembled three-dimensional model.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating an embodiment of a method for reconstructing a three-dimensional intermediate model according to the present invention;
FIG. 2 is a schematic structural diagram of an embodiment of an apparatus for reconstructing a medium three-dimensional model according to the present invention;
FIG. 3 is a diagram illustrating naming in plain text formatted model data according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of basic information of a middle component in model data in plain text format according to an embodiment of the present invention;
FIG. 5 is a schematic view of a flat plate component assembly according to an embodiment of the present invention;
FIG. 6 is a schematic view of the components of a toggle plate according to one embodiment of the present invention;
FIG. 7 is a schematic view of a panel component assembly according to an embodiment of the present invention;
FIG. 8 is a 100X100 square toggle detail drawing of one embodiment of the present invention;
FIG. 9 is a schematic representation of a 100X100 square toggle detail representation of an embodiment of the present invention;
FIG. 10 is a schematic illustration of the thickness direction definition of a part according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
Example 1
Referring to fig. 1, fig. 1 is a schematic flow chart of an embodiment of a method for reconstructing a medium-assembled three-dimensional model according to the present invention, as shown in fig. 1, the method includes steps 101 to 104, which are as follows:
step 101: and acquiring and converting the assembled three-dimensional model data into plain text format model data, wherein the plain text format model data comprises boundary positioning point data of each part.
In one embodiment, since the intermediate three-dimensional model output by the domestic ship SPD design software cannot be used for development, and the intermediate three-dimensional welding robot cannot read the intermediate three-dimensional model, in this embodiment, intermediate three-dimensional model data of the intermediate three-dimensional model, which cannot be read by the intermediate welding robot, is obtained, and the intermediate three-dimensional model data is converted into model data in a plain text format, that is, an XML file recording the intermediate three-dimensional model data.
In an embodiment, the intermediate three-dimensional model data is acquired, specifically, the ship number, the intermediate component name, the intermediate component base information, and all component information of the intermediate component of the intermediate three-dimensional model are acquired.
In one embodiment, the middle component name comprises a middle assembly name, a part name and a part name; the name of the middle component is a name, and the complete structural form of the naming rule of the middle component is as follows: medium group name + part name, e.g. 1L-FR26A-A1, where 1L denotes the first medium component, and so on, FR26A denotes No. 26 rib position rib plate framing component (minor component), a/B/C denotes No. 26 rib position rib plate in different positions, A1 denotes a plate part on the rib plate frame.
Preferably, as shown in fig. 3, fig. 3 is a naming schematic diagram in the plain text format model data; in fig. 3, name = ". Multidot.l 01L" is a middle group Name, block no = "207" is a segment Name, and ShipNO = "H3091" is a ship Name.
In one embodiment, the middle component base plane information includes three point coordinates, and a plane formed by the three point coordinates is parallel to the ground, that is, the middle component base plane is parallel to the ground; as shown in fig. 4, fig. 4 is a schematic diagram of medium component base information in model data in plain text format.
In one embodiment, the information of all the components of the middle assembly comprises part names, plate thicknesses and part boundary positioning points corresponding to all the parts.
In the SPD software, the types of the plates are divided into toggle plates, face plates and plane plates according to modeling functions, the three plates essentially belong to the plane plates, namely the plane plates are one type of parts, and all component information in the middle assembly is all part information, namely all part information, including shapes, plate thicknesses and part names.
In one embodiment, the composition of the flat plate member mainly includes a boundary, a boundary hole, a through hole, an inner hole, and a plate seam, as shown in fig. 5, fig. 5 is a schematic view of the composition of the flat plate member.
In one embodiment, the toggle plate mainly comprises a triangular toggle plate, a crescent toggle plate and a flanging toggle plate, the composition of the toggle plate part mainly comprises a boundary and a boundary hole, as shown in fig. 6, and fig. 6 is a schematic view of the composition of the toggle plate part.
In one embodiment, the composition of the panel member mainly includes the boundary, as shown in fig. 7, and fig. 7 is a schematic view of the composition of the panel member.
In one embodiment, due to the toggle plate, the face plate and the plane plate which are assembled in the assembly, the assembly boundary of the toggle plate, the face plate and the plane plate and lines of various holes follow the rule that all plate parts are closed, inner holes are closed, and all lines are composed of straight lines and circular arcs. Therefore, in this embodiment, when acquiring all component information of the middle assembly in the middle-assembled three-dimensional model data, the component parts in the middle-assembled three-dimensional model can be simplified into straight lines and circular arcs, and the acquisition of the part boundary positioning points corresponding to each part can be completed by extracting the coordinate points corresponding to the straight lines and the circular arcs of all closed graphs in the component parts and sequentially recording all the coordinate points.
Preferably, all coordinate point information on a single part is sequentially acquired according to a preset sequence by acquiring part boundary positioning points corresponding to each part; acquiring edge forms of all part edges on the single part, wherein the edge forms comprise straight line edges and arc edges; when the part edge is a straight line edge, acquiring a first head coordinate point and a first tail coordinate point corresponding to the straight line edge from all coordinate point information; when the part edge is an arc edge, acquiring a second head coordinate point, a second tail coordinate point and a middle coordinate point corresponding to the arc edge from all the coordinate points; and obtaining part boundary positioning point data corresponding to each part according to the first head coordinate point and the second tail coordinate point corresponding to the straight line edge, and the second head coordinate point, the second tail coordinate point and the middle coordinate point corresponding to the circular arc edge.
As an example in the present embodiment, by taking a square toggle part with an external dimension of 100X100 on a base surface as an example, as shown in fig. 8, fig. 8 is a schematic diagram of a square toggle part with an external dimension of 100X100, the toggle part is composed of a boundary hole and a boundary, the size of the boundary hole is a chamfer with a radius of 20, and how to obtain a part boundary positioning point corresponding to each part is described by this example:
s1: for the spatial position of the square toggle plate part, the part boundary positioning points of the square toggle plate part are sequentially marked, and the edges formed by the boundary positioning points of the square toggle plate part are also sequentially marked, as shown in fig. 9, fig. 9 is a schematic diagram of marking the square toggle plate part by 100 × 100.
S2: sequentially extracting coordinate point data of part boundary positioning points 1-6 on the square toggle plate part, wherein the coordinate point data are respectively as follows: point 1 (100, 0), point 2 (200, 100, 0), point 3 (200, 180, 0), point 4 (186, 0), point 5 (180, 200, 0), point 6 (100, 200, 0).
The point coordinate recording form corresponding to the side of the square part is divided into a straight line side and an arc side, the straight line side can determine a straight line by using a head end point and a tail end point, the arc side needs three points to determine an arc section, the three points of the arc respectively take the coordinates of the head end point and the tail end point of the arc and the midpoint of the arc section, and the circle passing through any three points in space is unique. According to the characteristics of the straight line and the circular arc, the data extraction mode of the straight line boundary and the circular arc boundary is as follows:
s3: sequentially extracting linear boundary data and circular arc boundary data on the square toggle plate part; and extracting the coordinates of the head and the tail end points corresponding to the straight line edge, and extracting the coordinates of the head and the tail end points corresponding to the arc edge and the coordinates of the middle point of the arc edge.
Straight line side 1: (head coordinates, tail coordinates) recorded as Point 1 (100, 0), point 2 (200, 100, 0).
The straight line edge 2 (head coordinate, tail coordinate) is recorded as point 2 (200, 100, 0), point 3 (200, 180, 0).
Arc edge 1: (head coordinates, middle point coordinates, tail coordinates) recorded as Point 3 (200, 180, 0), point 4 (186, 0), point 5 (180, 200, 0).
The straight line edge 3 (head coordinate, tail coordinate) is recorded as point 5 (180, 200, 0), point 6 (100, 200, 0).
The straight line edge 4 (head coordinate, tail coordinate) is recorded as point 6 (100, 200, 0), point 1 (100, 0).
In one embodiment, because the part boundary point information is extracted in the above manner, each edge corresponds to each other in front and back, and practically, each point coordinate is recorded twice, so that the boundary closure of the part can be ensured.
In one embodiment, in the middle assembly part structure, the number of complex parts is only a few part boundary holes and inner holes compared with the number of sample parts, but the minimum units of the side of the assembled parts are straight lines and circular arcs, so that part boundary positioning points corresponding to different parts can be obtained in the same manner.
In an embodiment, before extracting the part boundary positioning point, an attribute needs to be given to the extracted part boundary positioning point, specifically, whether the extracted part boundary positioning point is a boundary is judged, if so, the attribute is given to the extracted part boundary positioning point as boundary record data, and otherwise, the attribute is given to the extracted part boundary positioning point as non-boundary record data.
In one embodiment, the closed line segment with the inner hole as the interior of the boundary has the same way of extracting the data coordinate points as the way of extracting the boundary coordinate points. However, there is only one data segment of the boundary positioning point forming the boundary, but since one inner hole is a closed graph, the data segment of the inner hole positioning point of the inner hole is facilitated, and there are several data segments of the inner hole positioning point for several inner holes according to the number of the inner holes, and in the process of circularly extracting the inner hole information, each inner hole is ensured to be recorded, namely all inner hole information is extracted.
Step 102: and sequentially traversing the boundary positioning point data of each part, and fitting the boundary positioning point data of each part into a corresponding closed part boundary wire frame.
In one embodiment, all the part edges and the corresponding edge forms in the boundary positioning point data of each part are traversed in sequence; when the edge form is a straight line edge, acquiring a first head coordinate point and a first tail coordinate point corresponding to the straight line edge, and fitting the first head coordinate point and the first tail coordinate point to obtain a fitted straight line; when the edge is in the form of an arc edge, acquiring a second head coordinate point, a second tail coordinate point and a middle coordinate point corresponding to the arc edge, and fitting the second head coordinate point, the second tail coordinate point and the middle coordinate point to obtain a fitted arc; and connecting the fitting straight line and the fitting straight line in sequence to obtain a closed part boundary wire frame corresponding to each part.
As an illustration in this embodiment: when the sequence recorded in the boundary positioning point data of the part is as follows: the method comprises the steps that a straight line edge 1, a straight line edge 2, an arc edge 1, a straight line edge 3 and a straight line edge 4 are arranged, so that two coordinate points corresponding to the straight line 1 are fitted to obtain a fitted straight line 1, two coordinate points corresponding to the straight line 2 are fitted to obtain a fitted straight line 2, three coordinate points corresponding to the arc edge 1 are fitted to obtain a fitted arc 1, two coordinate points corresponding to the straight line 3 are fitted to obtain a fitted straight line 3, two coordinate points corresponding to the straight line 4 are fitted to obtain a fitted straight line 4, the fitted straight line 1, the fitted straight line 2, the fitted arc 1, the fitted straight line 3 and the fitted straight line 4 are sequentially connected according to the sequence recorded in the boundary positioning point data of the part, and a closed part boundary wire frame corresponding to the part is obtained.
In this embodiment, a closed part boundary wire frame is generated based on fitting of the part boundary positioning points of each part, that is, all recorded positioning point data segments in the plain text format model data are completely fitted to regenerate an entity graph, so as to obtain the closed part boundary wire frame.
Step 103: and obtaining the thickness direction of each part, stretching the closed part boundary wire frame according to the thickness direction to obtain a part model of each part, and obtaining part models corresponding to all parts until all parts are traversed to obtain an assembled three-dimensional model in reconstruction.
In one embodiment, the thickness of each part is data already assigned in the intermediate three-dimensional model, and therefore, the thickness of each part can be read by the model data in the plain text format; similarly, in the intermediate assembled three-dimensional model, the thickness direction of the part, i.e., the plate thickness direction of the part, is set, for example, the horizontal part has both upward and downward directions, the transverse part has both forward and aft directions, and the longitudinal part has both port and starboard directions.
In one embodiment, in order to ensure that the extracted plate thickness direction information can be matched with an actual model, the thickness directions of different types of parts are defined uniformly; specifically, the upward direction of the horizontal part is a positive value, and the downward direction of the horizontal part is a negative value; the heading of the transverse part towards the bow is a positive value, and the heading of the transverse part towards the stern is a negative value; the longitudinal elements are positive towards starboard and negative towards port. As shown in fig. 10, fig. 10 is a schematic view of the thickness direction definition of the part.
As an illustration in this embodiment: when the component is a longitudinal component, the thickness of the longitudinal component is 1, and the orientation of the longitudinal component is towards the starboard, the direction of the longitudinal component on the XYZ axis is set to (X =0.0, y =1.0, z = 0.0), when the component is a longitudinal component, the thickness of the longitudinal component is 1, and the orientation of the longitudinal component is towards the starboard, the direction of the longitudinal component on the XYZ axis is set to (X =0.0, y = -1.0, z = 0.0); when the component is a horizontal component, the thickness of the horizontal component is 1, and the orientation of the horizontal component is upward, the direction of the horizontal component on the XYZ axis is set to (X =0.0, y =0.0, z = 1.0), when the component is a horizontal component, the thickness of the horizontal component is 1, and the orientation of the horizontal component is upward, the direction of the horizontal component on the XYZ axis is set to (X =0.0, y =0.0, z = -1.0); when the piece is a lateral piece, the thickness of the lateral piece is 1, and the orientation of the lateral piece is toward the foreship, the direction of the lateral piece in the XYZ axis is set to (X =1.0, y =0.0, z = 0.0), when the piece is a lateral piece, the thickness of the lateral piece is 1, and the orientation of the lateral piece is toward the stern, the direction of the lateral piece in the XYZ axis is set to (X = -1.0, y = -0.0, z = -0.0).
In one embodiment, when the thickness direction of each part is obtained through the plain text format model data, the type of each part is obtained, wherein the type of the part comprises a horizontal part, a longitudinal part and a transverse part; when the part is a horizontal part, acquiring that the thickness direction of the horizontal part is that the horizontal plane faces upwards or the horizontal plane faces downwards; when the part is a longitudinal part, acquiring that the thickness direction of the longitudinal part is towards a port or a starboard; and when the part is a transverse part, acquiring that the thickness direction of the transverse part is towards the bow or the stern.
In one embodiment, after the thickness direction of the part is obtained, the closed part boundary wire frame is stretched along the part thickness scheme based on the part thickness, a part model of each part is obtained, and the change from the surface to the body is realized.
In one embodiment, each part has a corresponding spatial structure position, so that reconstruction of the assembled three-dimensional model can be completed only by traversing each part and when the part model of each part is reconstructed.
Example 2
Referring to fig. 2, fig. 2 is a schematic structural diagram of an embodiment of a device for reconstructing a built-up three-dimensional model according to the present invention, as shown in fig. 2, the device includes a plain text format model data conversion module 201, a closed part boundary wire frame generation module 202, and a built-up three-dimensional model reconstruction module 203, which are specifically as follows:
the plain text format model data conversion module 201 is configured to obtain and convert the assembled three-dimensional model data into plain text format model data, where the plain text format model data includes boundary positioning point data of each part.
The closed part boundary wire frame generation module 202 is configured to sequentially traverse the boundary positioning point data of each part, and fit the boundary positioning point data of each part into a corresponding closed part boundary wire frame.
The intermediate assembling three-dimensional model reconstructing module 203 is configured to obtain a thickness direction of each part, stretch the closed part boundary wire frame according to the thickness direction to obtain a part model of each part, and obtain part models corresponding to all parts until all parts are traversed to obtain a reconstructed intermediate assembling three-dimensional model.
In an embodiment, the plain text format model data conversion module 201 is configured to obtain intermediate-assembly three-dimensional model data; specifically, the ship number, the name of the middle assembly, the base surface information of the middle assembly and all component information of the middle assembly of the middle assembled three-dimensional model are obtained; wherein the middle component name comprises a middle assembly name, a part name and a part name; the medium component base surface information comprises three point coordinates, and a plane formed by the three point coordinates is parallel to the ground; the information of all components of the middle assembly comprises part names, plate thicknesses and part boundary positioning point data corresponding to each part.
In an embodiment, the intermediate three-dimensional model reconstructing module 203 is configured to obtain a thickness direction of each part; specifically, the type of each part is obtained, wherein the types of the parts comprise a horizontal part, a longitudinal part and a transverse part; when the part is a horizontal part, acquiring that the thickness direction of the horizontal part is that the horizontal plane faces upwards or the horizontal plane faces downwards; when the part is a longitudinal part, acquiring that the thickness direction of the longitudinal part is towards the middle or the side; and when the part is a transverse part, acquiring that the thickness direction of the transverse part is towards the bow or towards the tail.
In an embodiment, the plain text format model data conversion module 201 is configured to obtain part boundary positioning point data corresponding to each part in the intermediate assembled three-dimensional model; specifically, sequentially acquiring all coordinate point information on a single part according to a preset sequence; acquiring edge forms of all part edges on the single part, wherein the edge forms comprise straight line edges and arc edges; when the part edge is a straight line edge, acquiring a first head coordinate point and a first tail coordinate point corresponding to the straight line edge from all coordinate point information; when the part edge is an arc edge, acquiring a second head coordinate point, a second tail coordinate point and a middle coordinate point corresponding to the arc edge from all the coordinate points; and obtaining part boundary positioning point data corresponding to each part according to the first head coordinate point and the second tail coordinate point corresponding to the straight line edge, and the second head coordinate point, the second tail coordinate point and the middle coordinate point corresponding to the circular arc edge.
In an embodiment, the closed part boundary wireframe generating module 202 is configured to sequentially traverse the boundary positioning point data of each part, and fit the boundary positioning point data of each part into a corresponding closed part boundary wireframe; specifically, each part edge and the corresponding edge form in the boundary positioning point data of each part are traversed in sequence; when the edge form is a straight line edge, acquiring a first head coordinate point and a first tail coordinate point corresponding to the straight line edge, and fitting the first head coordinate point and the first tail coordinate point to obtain a fitted straight line; when the edge form is an arc edge, acquiring a second head coordinate point, a second tail coordinate point and a middle coordinate point corresponding to the arc edge, and fitting the second head coordinate point, the second tail coordinate point and the middle coordinate point to obtain a fitted arc; and connecting the fitting straight line and the fitting straight line according to a preset sequence to sequentially obtain a closed part boundary wire frame corresponding to each part.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
It should be noted that the above embodiments of the reconstruction apparatus for building a three-dimensional model are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
On the basis of the foregoing embodiment of the method for reconstructing a built-up three-dimensional model, another embodiment of the present invention provides a terminal device for reconstructing a built-up three-dimensional model, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the method for reconstructing a built-up three-dimensional model according to any one of the embodiments of the present invention is implemented.
Illustratively, the computer program may be partitioned in this embodiment into one or more modules that are stored in the memory and executed by the processor to implement the invention. The one or more modules may be a series of computer program instruction segments capable of performing specific functions for describing the execution of the computer program in the reconstruction terminal device of the assembled three-dimensional model.
The reconstruction terminal device of the middle-assembled three-dimensional model can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing devices. The reconstruction terminal device for the intermediate three-dimensional model can include, but is not limited to, a processor and a memory.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc., and the processor is a control center of the reconstruction terminal device of the central three-dimensional model, and various interfaces and lines are used to connect various parts of the reconstruction terminal device of the entire central three-dimensional model.
The memory may be configured to store the computer program and/or the module, and the processor may implement various functions of the reconstruction terminal device for assembling the three-dimensional model by executing or executing the computer program and/or the module stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile phone, and the like. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
On the basis of the above embodiment of the method for reconstructing a three-dimensional assembled model, another embodiment of the present invention provides a storage medium, where the storage medium includes a stored computer program, and when the computer program runs, a device in which the storage medium is located is controlled to execute the method for reconstructing a three-dimensional assembled model according to any one of the embodiments of the present invention.
In this embodiment, the storage medium is a computer-readable storage medium, and the computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, and so on. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
In summary, according to the reconstruction method and the reconstruction device for the medium-assembled three-dimensional model provided by the invention, the medium-assembled three-dimensional model data is obtained and converted into the model data in the pure text format, wherein the model data in the pure text format comprises the boundary positioning point data of each part; sequentially traversing the boundary positioning point data of each part, and fitting the boundary positioning point data of each part into a corresponding closed part boundary wire frame; and obtaining and stretching a boundary wire frame of the closed part according to the thickness direction of each part to obtain a part model of each part until all parts are traversed to obtain part models corresponding to all parts and obtain a three-dimensional model assembled in reconstruction. Compared with the prior art, the technical scheme of the invention realizes the reconstruction of the intermediate and assembled three-dimensional model and improves the accuracy of the constructed intermediate and assembled three-dimensional model by acquiring the intermediate and assembled three-dimensional model data in the plain text format and then reversely reconstructing the intermediate and assembled three-dimensional model data in the plain text format into the intermediate and assembled three-dimensional model.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and substitutions can be made without departing from the technical principle of the present invention, and these modifications and substitutions should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for reconstructing a three-dimensional model of a medium configuration, comprising:
acquiring and converting the assembled three-dimensional model data into plain text format model data, wherein the plain text format model data comprises boundary positioning point data of each part;
sequentially traversing the boundary positioning point data of each part, and fitting the boundary positioning point data of each part into a corresponding closed part boundary wire frame;
and obtaining the thickness direction of each part, stretching the closed part boundary wire frame according to the thickness direction to obtain a part model of each part until all parts are traversed to obtain part models corresponding to all parts, and obtaining an assembled three-dimensional model in reconstruction.
2. The method for reconstructing an intermediate three-dimensional model according to claim 1, wherein the acquiring of the intermediate three-dimensional model data specifically includes:
acquiring the ship number, the name of the middle assembly, the base surface information of the middle assembly and all component information of the middle assembly of the middle assembled three-dimensional model;
wherein the middle component name comprises a middle assembly name, a part name and a part name;
the medium component base surface information comprises three point coordinates, and a plane formed by the three point coordinates is parallel to the ground;
the middle assembly whole component information comprises part names, plate thicknesses and part boundary positioning point data corresponding to each part.
3. The method according to claim 2, wherein the obtaining of the part boundary positioning point data corresponding to each part in the intermediate assembled three-dimensional model specifically comprises:
sequentially acquiring all coordinate point information on a single part according to a preset sequence;
acquiring edge forms of all part edges on the single part, wherein the edge forms comprise straight line edges and arc edges;
when the part edge is a straight line edge, acquiring a first head coordinate point and a first tail coordinate point corresponding to the straight line edge from all coordinate point information;
when the part edge is an arc edge, acquiring a second head coordinate point, a second tail coordinate point and a middle coordinate point corresponding to the arc edge from all coordinate points;
and obtaining part boundary positioning point data corresponding to each part according to the first head coordinate point and the second tail coordinate point corresponding to the straight line edge, and the second head coordinate point, the second tail coordinate point and the middle coordinate point corresponding to the circular arc edge.
4. The method as claimed in claim 3, wherein traversing the boundary anchor point data of each part in turn, and fitting the boundary anchor point data of each part to a corresponding closed part boundary wire frame specifically comprises:
sequentially traversing each part edge and the corresponding edge form in the boundary positioning point data of each part;
when the edge form is a straight line edge, acquiring a first head coordinate point and a first tail coordinate point corresponding to the straight line edge, and fitting the first head coordinate point and the first tail coordinate point to obtain a fitted straight line;
when the edge is in the form of an arc edge, acquiring a second head coordinate point, a second tail coordinate point and a middle coordinate point corresponding to the arc edge, and fitting the second head coordinate point, the second tail coordinate point and the middle coordinate point to obtain a fitted arc;
and connecting the fitting straight line and the fitting straight line according to a preset sequence to sequentially obtain a closed part boundary wire frame corresponding to each part.
5. The method for reconstructing a three-dimensional model assembled in accordance with claim 1, wherein the obtaining of the thickness direction of each part specifically comprises:
acquiring the type of each part, wherein the type of the part comprises a horizontal part, a longitudinal part and a transverse part;
when the part is a horizontal part, acquiring that the thickness direction of the horizontal part is horizontal upward or horizontal downward;
when the part is a longitudinal part, acquiring that the thickness direction of the longitudinal part is towards a port or a starboard;
and when the part is a transverse part, acquiring the thickness direction of the transverse part towards the bow or the stern.
6. An apparatus for reconstructing a three-dimensional model of a medium, comprising: the system comprises a plain text format model data conversion module, a closed part boundary wire frame generation module and an assembled three-dimensional model reconstruction module;
the plain text format model data conversion module is used for acquiring and converting the assembled three-dimensional model data into plain text format model data, wherein the plain text format model data comprises boundary positioning point data of each part;
the closed part boundary wire frame generating module is used for sequentially traversing the boundary positioning point data of each part and fitting the boundary positioning point data of each part into a corresponding closed part boundary wire frame;
the middle assembled three-dimensional model reconstruction module is used for obtaining the thickness direction of each part, stretching the closed part boundary wire frame according to the thickness direction to obtain a part model of each part until all parts are traversed to obtain part models corresponding to all parts, and obtaining a reconstructed middle assembled three-dimensional model.
7. The apparatus for reconstructing an intermediate three-dimensional model according to claim 6, wherein the plain text format model data conversion module is configured to obtain intermediate three-dimensional model data, and specifically includes:
acquiring the ship number, the middle component name, the middle component base plane information and all component information of the middle component of the middle assembled three-dimensional model;
wherein the middle component name comprises a middle assembly name, a part name and a part name;
the medium component base surface information comprises three point coordinates, and a plane formed by the three point coordinates is parallel to the ground;
the middle assembly whole component information comprises part names, plate thicknesses and part boundary positioning point data corresponding to each part.
8. The apparatus for reconstructing an intermediate three-dimensional model according to claim 6, wherein the intermediate three-dimensional model reconstructing module is configured to obtain a thickness direction of each part, and specifically includes:
acquiring the type of each part, wherein the type of the part comprises a horizontal part, a longitudinal part and a transverse part;
when the part is a horizontal part, acquiring that the thickness direction of the horizontal part is that the horizontal plane faces upwards or the horizontal plane faces downwards;
when the part is a longitudinal part, acquiring that the thickness direction of the longitudinal part is towards the middle or the side;
and when the part is a transverse part, acquiring that the thickness direction of the transverse part is towards the bow or towards the tail.
9. A terminal device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the method of reconstructing an assembled three-dimensional model according to any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, comprising a stored computer program, wherein the computer program, when executed, controls an apparatus in which the computer-readable storage medium is located to perform a method for reconstructing a three-dimensional assembled model according to any one of claims 1 to 5.
CN202210881014.3A 2022-07-22 2022-07-22 Reconstruction method and device for medium-assembled three-dimensional model Pending CN115239884A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210881014.3A CN115239884A (en) 2022-07-22 2022-07-22 Reconstruction method and device for medium-assembled three-dimensional model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210881014.3A CN115239884A (en) 2022-07-22 2022-07-22 Reconstruction method and device for medium-assembled three-dimensional model

Publications (1)

Publication Number Publication Date
CN115239884A true CN115239884A (en) 2022-10-25

Family

ID=83674983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210881014.3A Pending CN115239884A (en) 2022-07-22 2022-07-22 Reconstruction method and device for medium-assembled three-dimensional model

Country Status (1)

Country Link
CN (1) CN115239884A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116956465A (en) * 2023-07-26 2023-10-27 中基科技(武汉)有限公司 XML-based hull structure model construction method, device, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116956465A (en) * 2023-07-26 2023-10-27 中基科技(武汉)有限公司 XML-based hull structure model construction method, device, equipment and medium

Similar Documents

Publication Publication Date Title
Barequet et al. Filling gaps in the boundary of a polyhedron
WO2018059155A1 (en) Method for constructing three-dimensional entity model having geometric error and computer readable storage medium
EP1645979A1 (en) Method and program for generating volume data from boundary representation data
CN114861500B (en) Method and system for automatically generating finite element model of tunnel structure based on three-dimensional point cloud
CN115239884A (en) Reconstruction method and device for medium-assembled three-dimensional model
CN114241018A (en) Tooth point cloud registration method and system and readable storage medium
CN108230452A (en) A kind of model filling-up hole method based on textures synthesis
CN111444573B (en) Ship symmetric segment model generation method and device, storage medium and terminal
CN116664776A (en) Three-dimensional visual editing system based on digital twin
CN118071960B (en) Semiconductor device simulation-oriented octree grid encryption and generation method
CN110222447B (en) Adaptive mesh division method and system based on octree
US7333104B2 (en) Method and program of converting three-dimensional shape data into cell internal data
CN109446749B (en) Design method and system suitable for ship jig, electronic terminal and storage medium
CN114202642A (en) Method and device for filling oversized holes in three-dimensional triangulation network model
CN100367284C (en) Boundary data inside/outside judgment method and program thereof
CN102982552A (en) Surface registration method based on ricci flow
CN111130569B (en) Spatial information data self-adaptive fault-tolerant processing method and system
CN116543134A (en) Method, device, computer equipment and medium for constructing digital twin model
CN116310753A (en) Vectorized skeleton extraction method and system for outdoor scene point cloud data
CN111199086A (en) Three-dimensional geometric discretization processing system
CN115758496A (en) Viewpoint planning method and system for three-dimensional measurement of blade
CN105844713A (en) Parametric surface reconstruction method based on manifold
CN112164131B (en) Method, device and computer equipment for cutting section of internal structure based on Unity engine
CN110335353B (en) Method, device, equipment and storage medium for automatically subdividing blocks
CN115861405A (en) Flat-bulb steel model data acquisition method and device for central assembly robot

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