CN110991050B - CAD (computer-aided design) image stacking method and related product - Google Patents

CAD (computer-aided design) image stacking method and related product Download PDF

Info

Publication number
CN110991050B
CN110991050B CN201911239458.1A CN201911239458A CN110991050B CN 110991050 B CN110991050 B CN 110991050B CN 201911239458 A CN201911239458 A CN 201911239458A CN 110991050 B CN110991050 B CN 110991050B
Authority
CN
China
Prior art keywords
cad
image
images
cad image
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911239458.1A
Other languages
Chinese (zh)
Other versions
CN110991050A (en
Inventor
李晨楠
赵伟玉
夏晨曦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Wanyi Digital Technology Co ltd
Original Assignee
Wanyi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wanyi Technology Co Ltd filed Critical Wanyi Technology Co Ltd
Priority to CN201911239458.1A priority Critical patent/CN110991050B/en
Publication of CN110991050A publication Critical patent/CN110991050A/en
Application granted granted Critical
Publication of CN110991050B publication Critical patent/CN110991050B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Abstract

The embodiment of the application provides a CAD (computer-aided design) overlay method and a related product, wherein the method comprises the following steps: the method comprises the steps of obtaining a plurality of first CAD images in a first file, calculating coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image, establishing a mapping relation corresponding to every two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relations, and performing overlapping operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.

Description

CAD (computer-aided design) image stacking method and related product
Technical Field
The application relates to the technical field of computers, in particular to a CAD (computer-aided design) image overlapping method and a related product.
Background
When a designer or a user designs a building, one Design cannot be formed at a time, and a good Design mostly undergoes multiple modifications and is gradually improved.
Disclosure of Invention
The embodiment of the application provides a CAD (computer-aided design) image folding method and a related product, wherein a plurality of first CAD images are subjected to image folding operation to obtain a target first CAD image, so that a user can conveniently check the images, and the improvement of user experience is facilitated.
In a first aspect, an embodiment of the present application provides a CAD overlay method, where the method includes:
acquiring a plurality of first CAD images in a first file;
calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image;
according to the coordinate sets, establishing a corresponding mapping relation between every two first CAD images in the first CAD images to obtain a plurality of mapping relations;
and performing image overlaying operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
In a second aspect, an embodiment of the present application provides a CAD drawing device, including: an acquisition unit, a calculation unit, a setup unit and an operation unit, wherein,
the acquisition unit is used for acquiring a plurality of first CAD images in a first file;
the calculating unit is used for calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, and each coordinate set corresponds to one first CAD image;
the establishing unit is used for establishing a corresponding mapping relation between every two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relations;
and the operation unit is used for carrying out image overlapping operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory; and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for some or all of the steps as described in the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program, where the computer program is used to make a computer execute some or all of the steps described in the first aspect of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product comprises a non-transitory computer-readable storage medium storing a computer program, the computer program being operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has the following beneficial effects:
it can be seen that, with the CAD drawing stacking method and the related product described in the embodiments of the present application, the method may include: the method comprises the steps of obtaining a plurality of first CAD images in a first file, calculating coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image, establishing a mapping relation corresponding to every two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relations, and performing overlapping operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flowchart of an embodiment of a CAD overlay method according to an embodiment of the present disclosure;
FIG. 2 is a schematic flowchart of an embodiment of a CAD overlay method according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating an embodiment of a CAD overlay method according to an embodiment of the present disclosure; (ii) a
FIG. 4 is a schematic structural diagram of an embodiment of a CAD overlay apparatus provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an embodiment of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic device related to the embodiments of the present application may include various handheld devices, vehicle-mounted devices, wearable devices (smart watches, smart bracelets, wireless headsets, augmented reality/virtual reality devices, smart glasses), computing devices or other processing devices connected to wireless modems, and various forms of User Equipment (UE), mobile Stations (MS), terminal devices (terminal device), and the like, which have wireless communication functions. For convenience of description, the above-mentioned devices are collectively referred to as electronic devices, and in addition, the electronic devices in the embodiments of the present application may also be servers.
Referring to fig. 1, a schematic flow chart diagram of an embodiment of a CAD drawing stacking method according to an embodiment of the present application is shown, where the CAD drawing stacking method described in this embodiment includes the following steps:
101. a plurality of first CAD images in a first file are acquired.
The first file may be a folder or a document file, the format of the document file may be dwg file format, dwt file format or dxf file format, but is not limited thereto, the first file may include a plurality of first CAD images, and the first CAD images may include at least one of the following: the plurality of first CAD images may be CAD images corresponding to different versions or formats, the plurality of first CAD images may be randomly arranged in the first file, and if the first file is a folder, the plurality of CAD images may be presented in the first file in a file format such as a dwg file format, a dwt file format, or a dxf file format.
Optionally, after the step 101, the following steps may be further included:
a1, acquiring a plurality of second CAD images in a second file;
a2, matching the plurality of second CAD images with the plurality of first CAD images one by one to obtain a plurality of matching degrees;
a3, selecting at least one first CAD image and at least one second CAD image corresponding to at least one matching degree which is smaller than or equal to a preset threshold value in the matching degrees;
a4, marking the at least one first CAD image and the at least one second CAD image respectively according to a preset mode to obtain a marked target first file and a marked target second file;
and A5, carrying out image overlapping operation on the first target file and the second target file to obtain a target file, wherein the target file comprises at least one first CAD image after marking and at least one second CAD image after marking.
The first file and the second file are two different files, and may be files corresponding to different users (designers), or design drawings of different versions corresponding to the same designer, where the preset threshold may be set by a user or default to a system, and is not limited herein, and the preset manner may be set by a user or default to a system, for example, the preset manner may be a color mark, and the target first file and the target second file may be respectively color-marked with different colors to distinguish the target first file from the target second file.
In addition, because when designing drawings, a plurality of designers may design the same building, but design different parts respectively, at this time, if a plurality of CAD images in a document are directly superimposed, which may cause the situation of overlapping or unclear parts, the images may be marked in a preset manner, and when primitives in CAD images corresponding to two different versions or different designers are overlapped, different parts may be distinguished.
Further, in a specific implementation, the plurality of first CAD images and the plurality of second CAD images may be matched to obtain a plurality of matching degrees, at least one first CAD image and at least one second CAD image corresponding to at least one matching degree smaller than or equal to a preset threshold in the plurality of matching degrees are selected to screen out different CAD images of the two files, the first CAD image and the second CAD image are marked according to a preset manner to distinguish the CAD images of the two images to obtain at least one target first file and at least one target second file, and finally, the target first file and the target second file are subjected to a layout overlapping operation to obtain a layout including at least one first target file, that is, the at least one first CAD image and the at least one second CAD image are subjected to a layout overlapping operation to obtain at least one target CAD image, where a specific layout overlapping operation is consistent with an embodiment of the present application, and thus, a plurality of design parts of design engineers are achieved, and a complete design efficiency is improved.
102. And calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image.
In a specific implementation, the plurality of first CAD images may be placed in different coordinate systems, and each first CAD image may correspond to one coordinate system, so that a coordinate corresponding to each first CAD image may be obtained, where the coordinate may be a coordinate corresponding to each image element in the CAD image or a coordinate corresponding to each pixel point in the image, so that a plurality of coordinate sets may be obtained, and each coordinate set corresponds to one first CAD image.
In one possible example, the step 102 of calculating coordinates of each of the plurality of first CAD images to obtain a plurality of coordinate sets may include the steps of:
21. determining the number of pixel lines corresponding to the first CAD image i, wherein the first CAD image i is any one of the plurality of first CAD images;
22. and traversing the pixel coordinates corresponding to the pixels of each row according to the pixel row number to obtain a coordinate set i corresponding to the first CAD image i.
In a specific implementation, a corresponding pixel range in the first CAD image i can be determined, a number of pixel lines corresponding to the first CAD image i is determined through the pixel range, and then, a coordinate corresponding to each pixel in the first CAD image i is obtained by traversing a pixel coordinate of each line of pixels corresponding to the number of pixel lines to obtain the coordinate set i, so that accuracy can be improved through a traversing manner.
103. And establishing a corresponding mapping relation between every two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relations.
In the embodiment of the present application, a plurality of corresponding first CAD images in a first file need to be subjected to a mapping operation, before the mapping operation is performed, a mapping relationship between every two first CAD images needs to be obtained, and the mapping relationship between every two first CAD images in the plurality of first CAD images can be obtained according to the plurality of coordinate sets.
In a possible example, in the step 103, establishing, according to the plurality of coordinate sets, a corresponding mapping relationship between every two first CAD images in the plurality of first CAD images to obtain a plurality of mapping relationships, may include the following steps:
31. according to a coordinate set i corresponding to the first CAD image i, calculating a coordinate j of each pixel in the first CAD image i, wherein the coordinate set j is mapped to a coordinate j in a first CAD image j, and the coordinate set j comprises a plurality of coordinates j, and the first CAD image j is different from the first CAD image i;
32. respectively calculating a first matrix corresponding to the coordinate set i and a second matrix corresponding to the coordinate set j based on the coordinate set i and the coordinate set j;
33. and determining a mapping relation between the first CAD image i and the first CAD image j based on the first matrix and the second matrix.
The mapping relationship between every two first CAD images can be obtained according to the coordinate set between every two first CAD images in the plurality of first CAD images, and the coordinate sets corresponding to the plurality of first CAD images can correspond to different coordinate systems, so that the mapping relationship between every two first CAD images can be obtained based on the mapping mode of the coordinates in the coordinate sets.
In a specific implementation, a coordinate set i corresponding to any one first CAD image i in the plurality of first CAD images may be mapped to a coordinate system corresponding to another first CAD image j, a coordinate j of the first CAD image i in the first CAD image j may be obtained, the coordinate set j includes a plurality of coordinates j, then, a first matrix corresponding to the coordinate set i and a second matrix corresponding to the coordinate set j may be respectively established according to the coordinate set i and the coordinate set j, the first matrix represents a coordinate relationship corresponding to all pixel points in the coordinate set i, the second matrix represents the coordinate set j, that is, the coordinate set j is mapped in the first CAD image j different from the first CAD image i, so that a mapping relationship between the first CAD image i and the second CAD image j may be determined based on the first matrix and the second matrix, and finally, a mapping relationship between every two first CAD images in the plurality of first CAD images may be obtained based on the above manner, thereby obtaining a plurality of mapping relationships.
104. And performing image overlaying operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
In this embodiment of the present application, because the plurality of first CAD images may be a plurality of first CAD images corresponding to different modification versions or design versions, based on the plurality of mapping relationships, the plurality of first CAD images may be subjected to a drawing stacking operation to obtain a target first CAD image, and the target first CAD image may include the plurality of first CAD images, which is beneficial to helping a user to search and compare CAD images.
In a possible example, the step 104, performing a mapping operation on the plurality of first CAD images based on the plurality of mapping relationships, may include the following steps:
41. sequencing the plurality of first CAD images to obtain a plurality of sequence numbers, wherein each sequence number corresponds to one first CAD image;
42. and mapping the coordinate set corresponding to the first CAD image with the smaller serial number in every two arbitrary first CAD images in the plurality of first CAD images to the first CAD image with the larger serial number according to the mapping relations based on the precedence relations of the plurality of serial numbers to obtain the target first CAD image.
In the method, when the images are overlapped, in order to avoid repeating the image overlapping operation, the plurality of first CAD images can be sorted, the sorting mode can be set by a user or default by a system, for example, the files corresponding to each CAD image can be sorted from large to small according to the memory size of the file to obtain a plurality of serial numbers, and a coordinate set corresponding to a first CAD image with a smaller serial number in every two arbitrary CAD images in the plurality of CAD images is mapped to a first CAD image with a larger serial number according to the precedence relationship of the serial numbers and the mapping relationship corresponding to two first CAD images corresponding to every two serial numbers, so that the steps are continuously repeated to finally obtain a target first CAD image, the image can include the plurality of first CAD images, and thus, the user or a designer can change or compare the plurality of first CAD images, and the user experience can be improved.
Optionally, when the target first CAD image is obtained, a serial number corresponding to each first CAD image is also displayed in the target first CAD image, so as to distinguish CAD images corresponding to different versions.
Optionally, before the step 104, before the overlaying operation is performed on the plurality of first CAD images based on the plurality of mapping relationships, the following steps may be further included:
b1, identifying the direction of each CAD image in the plurality of first CAD images;
b2, selecting a direction corresponding to any one of the first CAD images as a target direction;
and B3, adjusting the plurality of first CAD images based on the target direction.
The first CAD images stored in the first file are adjusted according to different directions, and then the adjusted first CAD images are subjected to image overlapping operation to obtain target first CAD images corresponding to the same direction, so that the viewing experience of a user is improved.
In a specific implementation, a direction corresponding to any one of the plurality of first CAD images may be selected as a target direction, and the plurality of directions corresponding to the plurality of first CAD images are adjusted to the target direction, so as to obtain a plurality of adjusted first CAD images.
The CAD image stacking method provided by the embodiment of the application can obtain a plurality of first CAD images in a first file, calculate the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, each coordinate set corresponds to one first CAD image, establish the corresponding mapping relation between every two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relations, and perform the stacking operation on the plurality of first CAD images based on the plurality of mapping relations to obtain the target first CAD image.
In accordance with the above, please refer to fig. 2, which is a flowchart illustrating an embodiment of a CAD drawing stacking method according to an embodiment of the present application. The CAD drawing stacking method described in this embodiment includes the following steps:
201. a plurality of first CAD images in a first file are acquired.
202. And calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image.
203. And calculating a coordinate j of each pixel in the first CAD image i mapped to a coordinate j in a first CAD image j according to a coordinate set i corresponding to the first CAD image i to obtain a coordinate set j, wherein the coordinate set j comprises a plurality of coordinates j, and the first CAD image j is different from the first CAD image i.
204. And respectively calculating a first matrix corresponding to the coordinate set i and a second matrix corresponding to the coordinate set j based on the coordinate set i and the coordinate set j.
205. And determining the mapping relation between the first CAD image i and the first CAD image j based on the first matrix and the second matrix to obtain a plurality of mapping relations.
206. And performing image overlaying operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
Optionally, the detailed description of the steps 201 to 206 may refer to the corresponding steps from step 101 to step 104 of the CAD drawing method described in fig. 1, and will not be described herein again.
It can be seen that, by the CAD stack-up method provided by the embodiment of the present application, a plurality of first CAD images in a first file may be obtained, coordinates of each image in the plurality of first CAD images are calculated to obtain a plurality of coordinate sets, each coordinate set corresponds to one first CAD image, according to a coordinate set i corresponding to the first CAD image i, each pixel coordinate in the first CAD image i is calculated to be mapped to a coordinate j in the first CAD image j to obtain a coordinate set j, wherein the coordinate set j includes a plurality of coordinates j, the first CAD image j is different from the first CAD image i, based on the coordinate set i and the coordinate set j, a first matrix corresponding to the coordinate set i and a second matrix corresponding to the coordinate set j are respectively calculated, based on the first matrix and the second matrix, a mapping relationship between the first CAD image i and the first CAD image j is determined to obtain a plurality of mapping relationships, based on the plurality of mapping relationships, the plurality of first CAD images are stacked up to obtain a target first CAD image, and thus, each first CAD image may be positioned to obtain a first mapping relationship between the first CAD image, and a plurality of mapping relationships may be performed to obtain a plurality of first CAD images, and a plurality of mapping relationships, and thus, the first CAD images may be performed to obtain a plurality of mapping relationships, which are performed according to a final mapping relationship between the first CAD images, and the plurality of first CAD images, which is advantageous for improving efficiency of the first CAD images.
In accordance with the above, please refer to fig. 3, which is a flowchart illustrating an embodiment of a CAD drawing stacking method according to an embodiment of the present application. The CAD overlay method described in this embodiment includes the following steps:
301. a plurality of first CAD images in a first file are acquired.
302. A plurality of second CAD images in the second file are acquired.
303. And matching the plurality of second CAD images with the plurality of first CAD images one by one to obtain a plurality of matching degrees.
304. And selecting at least one first CAD image and at least one second CAD image corresponding to at least one matching degree which is smaller than or equal to a preset threshold value in the matching degrees.
305. And marking the at least one first CAD image and the at least one second CAD image respectively according to a preset mode to obtain a marked target first file and a marked target second file.
306. And performing image overlapping operation on the first target file and the second target file to obtain a target file, wherein the target file comprises at least one first CAD image after marking and at least one second CAD image after marking.
Optionally, the detailed description of the steps 301 to 306 may refer to the corresponding steps from step 101 to step 104 of the CAD drawing method described in fig. 1, and will not be described herein again.
It can be seen that, by the CAD stack method provided by the embodiment of the present application, a plurality of first CAD images in a first file may be obtained, a plurality of second CAD images in a second file may be obtained, the plurality of second CAD images are matched with the plurality of first CAD images one by one to obtain a plurality of matching degrees, at least one first CAD image and at least one second CAD image corresponding to at least one matching degree smaller than or equal to a preset threshold value in the plurality of matching degrees are selected, at least one first CAD image and at least one second CAD image are marked in a preset manner, a target first file and a target second file after marking are obtained, the target first file and the target second file are stacked to obtain a target file, the target file includes the at least one first CAD image after marking and the at least one second CAD image after marking, so that the plurality of first CAD images and the plurality of second CAD images are compared to obtain different target first file and target second file, and then the at least one first CAD image and the second CAD image in the first file and the second file correspond to at least one second CAD image after marking, and the target file stacking operation may be beneficial to improve practicality of the stacked file.
In accordance with the above, the following is a device for implementing the CAD drawing folding method, specifically, the following is:
please refer to fig. 4, which is a schematic structural diagram of an embodiment of a CAD drawing stacking apparatus according to an embodiment of the present disclosure. The CAD drawing folding device described in this embodiment includes: the acquisition unit 401, the calculation unit 402, the establishment unit 403, and the operation unit 404 are, specifically as follows,
the acquiring unit 401 is configured to acquire a plurality of first CAD images in a first file;
the calculating unit 402 is configured to calculate coordinates of each of the plurality of first CAD images to obtain a plurality of coordinate sets, where each coordinate set corresponds to one first CAD image;
the establishing unit 403 is configured to establish, according to the multiple coordinate sets, a corresponding mapping relationship between every two first CAD images in the multiple first CAD images, so as to obtain multiple mapping relationships;
the operation unit 404 is configured to perform a drawing-stacking operation on the plurality of first CAD images based on the plurality of mapping relationships to obtain a target first CAD image.
The obtaining unit 401 may be configured to implement the method described in step 101, the calculating unit 402 may be configured to implement the method described in step 102, the establishing unit 403 may be configured to implement the method described in step 103, the operating unit 404 may be configured to implement the method described in step 104, and so on.
It can be seen that, with the CAD stack apparatus described in the embodiment of the present application, the apparatus may obtain a plurality of first CAD images in a first file, calculate coordinates of each image in the plurality of first CAD images, obtain a plurality of coordinate sets, each coordinate set corresponds to one first CAD image, establish a mapping relationship corresponding to each two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets, obtain a plurality of mapping relationships, and perform a stack operation on the plurality of first CAD images based on the plurality of mapping relationships, to obtain a target first CAD image.
In one possible example, in the calculating the coordinates of each of the plurality of first CAD images to obtain a plurality of coordinate sets, the calculating unit 402 is specifically configured to:
determining the number of pixel lines corresponding to the first CAD image i, wherein the first CAD image i is any one of the plurality of first CAD images;
and traversing the pixel coordinates corresponding to the pixels of each row according to the pixel row number to obtain a coordinate set i corresponding to the first CAD image i.
In a possible example, in the aspect that the mapping relationship corresponding to every two first CAD images in the plurality of first CAD images is established according to the plurality of coordinate sets, so as to obtain a plurality of mapping relationships, the establishing unit 403 is specifically configured to:
according to a coordinate set i corresponding to the first CAD image i, calculating a coordinate j of each pixel coordinate in the first CAD image i mapped to a first CAD image j to obtain a coordinate set j, wherein the coordinate set j comprises a plurality of coordinates j, and the first CAD image j is different from the first CAD image i;
respectively calculating a first matrix corresponding to the coordinate set i and a second matrix corresponding to the coordinate set j based on the coordinate set i and the coordinate set j;
and determining a mapping relation between the first CAD image i and the first CAD image j based on the first matrix and the second matrix.
In one possible example, in terms of performing the overlay operation on the plurality of first CAD images based on the plurality of mapping relationships, the operation unit 404 may be specifically configured to:
sequencing the plurality of first CAD images to obtain a plurality of sequence numbers, wherein each sequence number corresponds to one first CAD image;
and mapping the coordinate set corresponding to the first CAD image with the smaller serial number in every two arbitrary first CAD images in the plurality of first CAD images to the first CAD image with the larger serial number according to the mapping relations based on the precedence relations of the plurality of serial numbers to obtain the target first CAD image.
It can be understood that the functions of each program module of the CAD drawing folding device in this embodiment can be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process thereof may refer to the related description of the foregoing method embodiment, which is not described herein again.
In accordance with the above, please refer to fig. 5, which is a schematic structural diagram of an embodiment of an electronic device according to an embodiment of the present disclosure. The electronic device described in this embodiment includes: at least one input device 1000; at least one output device 2000; at least one processor 3000, e.g., a CPU; and a memory 4000, the input device 1000, the output device 2000, the processor 3000, and the memory 4000 being connected by a bus 5000.
The input device 1000 may be a touch panel, a physical button, or a mouse.
The output device 2000 may be a display screen.
The memory 4000 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 4000 is used for storing a set of program codes, and the input device 1000, the output device 2000 and the processor 3000 are used for calling the program codes stored in the memory 4000 to execute the following operations:
the processor 3000 is configured to:
acquiring a plurality of first CAD images in a first file;
calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image;
according to the coordinate sets, establishing a corresponding mapping relation between every two first CAD images in the first CAD images to obtain a plurality of mapping relations;
and carrying out overlapping operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image.
It can be seen that, with the electronic device described in the embodiment of the present application, a plurality of first CAD images in a first file may be obtained, coordinates of each image in the plurality of first CAD images are calculated to obtain a plurality of coordinate sets, each coordinate set corresponds to one first CAD image, a mapping relationship corresponding to each two first CAD images in the plurality of first CAD images is established according to the plurality of coordinate sets to obtain a plurality of mapping relationships, and a superimposition operation is performed on the plurality of first CAD images based on the plurality of mapping relationships to obtain a target first CAD image.
In one possible example, in the calculating the coordinates of each of the plurality of first CAD images to obtain a plurality of coordinate sets, the processor 3000 is specifically configured to:
determining the number of pixel lines corresponding to the first CAD image i, wherein the first CAD image i is any one of the plurality of first CAD images;
and traversing the pixel coordinates corresponding to the pixels of each row according to the pixel row number to obtain a coordinate set i corresponding to the first CAD image i.
In one possible example, in the aspect that the mapping relationship corresponding to every two first CAD images in the plurality of first CAD images is established according to the plurality of coordinate sets, so as to obtain a plurality of mapping relationships, the processor 3000 is specifically configured to:
according to a coordinate set i corresponding to the first CAD image i, calculating a coordinate j of each pixel coordinate in the first CAD image i mapped to a first CAD image j to obtain a coordinate set j, wherein the coordinate set j comprises a plurality of coordinates j, and the first CAD image j is different from the first CAD image i;
respectively calculating a first matrix corresponding to the coordinate set i and a second matrix corresponding to the coordinate set j based on the coordinate set i and the coordinate set j;
and determining a mapping relation between the first CAD image i and the first CAD image j based on the first matrix and the second matrix.
In one possible example, in the aspect of performing the overlay operation on the plurality of first CAD images based on the plurality of mapping relationships, the processor 3000 is specifically configured to:
sequencing the plurality of first CAD images to obtain a plurality of sequence numbers, wherein each sequence number corresponds to one first CAD image;
and mapping the coordinate set corresponding to the first CAD image with the smaller sequence number in every two any first CAD images in the plurality of first CAD images to the first CAD image with the larger sequence number according to the plurality of mapping relations based on the precedence relations of the plurality of sequence numbers to obtain the target first CAD image.
In one possible example, the processor 3000 is further configured to:
acquiring a plurality of second CAD images in a second file;
matching the plurality of second CAD images with the plurality of first CAD images one by one to obtain a plurality of matching degrees;
selecting at least one first CAD image and at least one second CAD image corresponding to at least one matching degree which is smaller than or equal to a preset threshold value in the matching degrees;
marking the at least one first CAD image and the at least one second CAD image respectively according to a preset mode to obtain a marked target first file and a marked target second file;
and performing image overlapping operation on the first target file and the second target file to obtain a target file, wherein the target file comprises at least one first CAD image after marking and at least one second CAD image after marking.
In one possible example, before performing the overlay operation on the plurality of first CAD images based on the plurality of mapping relationships, the processor 3000 is further specifically configured to:
identifying an orientation of each of the plurality of first CAD images;
selecting a direction corresponding to any one of the plurality of first CAD images as a target direction;
adjusting the plurality of first CAD images based on the target direction.
Embodiments of the present application further provide a computer storage medium, where the computer storage medium may store a program, and the program includes, when executed, some or all of the steps of any one of the CAD drawing methods described in the above method embodiments.
While the present application has been described in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from a review of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the word "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus (device), or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. A computer program stored/distributed on a suitable medium supplied together with or as part of other hardware, may also take other distributed forms, such as via the Internet or other wired or wireless telecommunication systems.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable CAD drawing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable CAD drawing device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable CAD drawing device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable CAD drawing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer implemented process such that the instructions which execute on the computer or other programmable device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Although the present application has been described in conjunction with specific features and embodiments thereof, it will be evident that various modifications and combinations can be made thereto without departing from the spirit and scope of the application. Accordingly, the specification and drawings are merely illustrative of the present application as defined in the appended claims and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the application. It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (9)

1. A CAD overlay method, comprising:
acquiring a plurality of first CAD images in a first file;
calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, wherein each coordinate set corresponds to one first CAD image;
according to the coordinate sets, establishing a corresponding mapping relation between every two first CAD images in the first CAD images to obtain a plurality of mapping relations;
performing image overlapping operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image;
wherein the overlaying the plurality of first CAD images based on the plurality of mapping relationships comprises: sequencing the plurality of first CAD images to obtain a plurality of sequence numbers, wherein each sequence number corresponds to one first CAD image; and mapping the coordinate set corresponding to the first CAD image with the smaller serial number in every two arbitrary first CAD images in the plurality of first CAD images to the first CAD image with the larger serial number according to the mapping relations based on the precedence relations of the plurality of serial numbers to obtain the target first CAD image.
2. The method of claim 1, wherein the calculating coordinates for each of the plurality of first CAD images to obtain a plurality of sets of coordinates comprises:
determining the number of pixel lines corresponding to a first CAD image i, wherein the first CAD image i is any one of the plurality of first CAD images;
and traversing the pixel coordinates corresponding to the pixels of each row according to the pixel row number to obtain a coordinate set corresponding to the first CAD image i.
3. The method according to claim 2, wherein the establishing a mapping relationship corresponding to each two of the plurality of first CAD images according to the plurality of coordinate sets, resulting in a plurality of mapping relationships, includes:
according to the coordinate set corresponding to the first CAD image i, calculating coordinates of each pixel in the first CAD image i, which are mapped to the first CAD image j, and obtaining the coordinate set corresponding to the first CAD image j, wherein the coordinate set comprises a plurality of coordinates, and the first CAD image j is different from the first CAD image i;
respectively calculating a first matrix corresponding to the first CAD image i and a second matrix corresponding to the first CAD image j based on the coordinate set corresponding to the first CAD image i and the coordinate set corresponding to the first CAD image j;
and determining a mapping relation between the first CAD image i and the first CAD image j based on the first matrix and the second matrix.
4. The method of claim 1, further comprising:
acquiring a plurality of second CAD images in a second file;
matching the plurality of second CAD images with the plurality of first CAD images one by one to obtain a plurality of matching degrees;
selecting at least one first CAD image and at least one second CAD image corresponding to at least one matching degree which is smaller than or equal to a preset threshold value in the matching degrees;
marking the at least one first CAD image and the at least one second CAD image respectively according to a preset mode to obtain a marked target first file and a marked target second file;
and carrying out image overlapping operation on the first target file and the second target file to obtain a target file, wherein the target file comprises at least one first CAD image after marking and at least one second CAD image after marking.
5. The method of any of claims 1-3, wherein prior to said performing an overlay operation on the plurality of first CAD images based on the plurality of mapping relationships, the method further comprises:
identifying an orientation of each of the plurality of first CAD images;
selecting a direction corresponding to any one of the plurality of first CAD images as a target direction;
adjusting the plurality of first CAD images based on the target direction.
6. A CAD overlay apparatus, comprising: an acquisition unit, a calculation unit, a setup unit and an operation unit, wherein,
the acquisition unit is used for acquiring a plurality of first CAD images in a first file;
the calculating unit is used for calculating the coordinates of each image in the plurality of first CAD images to obtain a plurality of coordinate sets, and each coordinate set corresponds to one first CAD image;
the establishing unit is used for establishing a corresponding mapping relation between every two first CAD images in the plurality of first CAD images according to the plurality of coordinate sets to obtain a plurality of mapping relations;
the operation unit is used for carrying out image overlapping operation on the plurality of first CAD images based on the plurality of mapping relations to obtain a target first CAD image; wherein the performing, based on the plurality of mapping relationships, a superimposition operation on the plurality of first CAD images includes: sequencing the plurality of first CAD images to obtain a plurality of sequence numbers, wherein each sequence number corresponds to one first CAD image; and mapping the coordinate set corresponding to the first CAD image with the smaller sequence number in every two any first CAD images in the plurality of first CAD images to the first CAD image with the larger sequence number according to the plurality of mapping relations based on the precedence relations of the plurality of sequence numbers to obtain the target first CAD image.
7. The apparatus according to claim 6, wherein, in said calculating coordinates of each of the plurality of first CAD images to obtain a plurality of sets of coordinates, the calculating unit is specifically configured to:
determining the number of pixel lines corresponding to a first CAD image i, wherein the first CAD image i is any one of the plurality of first CAD images;
and traversing the pixel coordinates corresponding to the pixels of each row according to the pixel row number to obtain a coordinate set corresponding to the first CAD image i.
8. An electronic device comprising a processor, a memory for storing one or more programs and configured for execution by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-5.
9. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-5.
CN201911239458.1A 2019-12-06 2019-12-06 CAD (computer-aided design) image stacking method and related product Active CN110991050B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911239458.1A CN110991050B (en) 2019-12-06 2019-12-06 CAD (computer-aided design) image stacking method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911239458.1A CN110991050B (en) 2019-12-06 2019-12-06 CAD (computer-aided design) image stacking method and related product

Publications (2)

Publication Number Publication Date
CN110991050A CN110991050A (en) 2020-04-10
CN110991050B true CN110991050B (en) 2022-10-14

Family

ID=70090579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911239458.1A Active CN110991050B (en) 2019-12-06 2019-12-06 CAD (computer-aided design) image stacking method and related product

Country Status (1)

Country Link
CN (1) CN110991050B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858987B (en) * 2020-07-08 2023-10-20 深圳市万翼数字技术有限公司 Problem viewing method of CAD image, electronic equipment and related products

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135935A (en) * 2012-02-13 2014-11-05 霍罗吉克公司 System and method for navigating a tomosynthesis stack using synthesized image data
CN104361556A (en) * 2014-10-22 2015-02-18 华为技术有限公司 Image synthesis method, image chip and image equipment
JP2018010455A (en) * 2016-07-13 2018-01-18 東芝プラントシステム株式会社 Three-dimensional cad data creation system and creation method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008063170A1 (en) * 2006-11-20 2008-05-29 Thomson Licensing System and method for compositing 3d images
JP5805536B2 (en) * 2008-10-12 2015-11-04 エフ・イ−・アイ・カンパニー High precision beam placement for local area navigation
JP6708407B2 (en) * 2015-12-25 2020-06-10 キヤノン株式会社 Image processing apparatus, image processing method and program
US10778962B2 (en) * 2017-11-10 2020-09-15 Misapplied Sciences, Inc. Precision multi-view display

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135935A (en) * 2012-02-13 2014-11-05 霍罗吉克公司 System and method for navigating a tomosynthesis stack using synthesized image data
CN104361556A (en) * 2014-10-22 2015-02-18 华为技术有限公司 Image synthesis method, image chip and image equipment
JP2018010455A (en) * 2016-07-13 2018-01-18 東芝プラントシステム株式会社 Three-dimensional cad data creation system and creation method

Also Published As

Publication number Publication date
CN110991050A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
US9401032B1 (en) Image-based color palette generation
CN104281864B (en) A kind of method and apparatus for generating Quick Response Code
CN111950056B (en) BIM display method and related equipment for building informatization model
CN111625160A (en) Application icon adjusting method and device
CN105338537B (en) A kind of method and terminal of the shared analysis of newly-increased base station site
CN109785408B (en) Mapping method and device and electronic equipment
CN111161195A (en) Feature map processing method and device, storage medium and terminal
CN105578043A (en) Picture composition method and device for photographing of camera
CN112055244A (en) Image acquisition method and device, server and electronic equipment
CN111290684B (en) Image display method, image display device and terminal equipment
CN106155542A (en) Image processing method and device
CN109359582A (en) Information search method, information search device and mobile terminal
CN105654103B (en) Image identification method and electronic equipment
CN110991050B (en) CAD (computer-aided design) image stacking method and related product
CN111782758A (en) Drawing review result viewing method based on CAD and related device
CN110619018A (en) Map overlay rarefying method, device, equipment and computer storage medium
CN109718554A (en) A kind of real-time rendering method, apparatus and terminal
CN106535002B (en) Desktop starter template layout updating method and device
CN111143912B (en) Display labeling method and related product
EP3410389A1 (en) Image processing method and device
CN109741420B (en) Region filling method and device, electronic equipment and storage medium
CN111107264A (en) Image processing method, image processing device, storage medium and terminal
JP2013120201A (en) Information processing apparatus and method
CN112419444B (en) Clothing sheet drawing method and device, electronic equipment and storage medium
CN109189524A (en) Image resource generation method and device

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230626

Address after: A601, Zhongke Naneng Building, No. 06 Yuexing 6th Road, Gaoxin District Community, Yuehai Street, Nanshan District, Shenzhen City, Guangdong Province, 518063

Patentee after: Shenzhen Wanyi Digital Technology Co.,Ltd.

Address before: 519000 room 105-24914, No.6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province (centralized office area)

Patentee before: WANYI TECHNOLOGY Co.,Ltd.