CN108416824B - DWF file mapping method, device, computing equipment and medium - Google Patents

DWF file mapping method, device, computing equipment and medium Download PDF

Info

Publication number
CN108416824B
CN108416824B CN201810066085.1A CN201810066085A CN108416824B CN 108416824 B CN108416824 B CN 108416824B CN 201810066085 A CN201810066085 A CN 201810066085A CN 108416824 B CN108416824 B CN 108416824B
Authority
CN
China
Prior art keywords
file
information
image
new
dwf
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
CN201810066085.1A
Other languages
Chinese (zh)
Other versions
CN108416824A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201810066085.1A priority Critical patent/CN108416824B/en
Publication of CN108416824A publication Critical patent/CN108416824A/en
Application granted granted Critical
Publication of CN108416824B publication Critical patent/CN108416824B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/32Image data format

Landscapes

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

Abstract

The embodiment of the invention provides a DWF file mapping method. The method is used for inserting image content into a drawing, and specifically comprises the following steps: obtaining a DWF file corresponding to the drawing, wherein the DWF file comprises at least one geometric information file, and the geometric information file is used for storing geometric information of the drawing; and acquiring an image file corresponding to the image, and generating a new DWF file according to the image file and the geometric information file, wherein the new drawing file corresponds to the drawing in which the image is inserted. By forming a new file by the image file of the image and the drawing file of the drawing, the image pasting effect of inserting the image content into the drawing is realized. The method of the invention can avoid the help of the software environment of Autodesk when mapping the DWF file, thereby obviously reducing the operation difficulty and bringing better experience to users. In addition, the embodiment of the invention provides a DWF file mapping device.

Description

DWF file mapping method, device, computing equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a DWF file mapping method, a DWF file mapping device, a DWF file mapping computing device and a DWF file mapping medium.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
With the rapid development of computer technology, more and more drawing software is applied to many scenes such as work, daily life and the like. However, a drawing file generated by general drawing software needs specific software to be opened, and when a user wants to perform a mapping operation on a drawing, the user needs to download the specific software first to realize the mapping operation.
At present, some applications have appeared, which can check, mark, etc. a 2D or 3D drawing file, and a user can open the drawing file through the applications and then paste a picture to a designated position.
Disclosure of Invention
However, when the application in the prior art is used to implement the mapping operation, the content of the drawing file is separated from the content of the picture, and the picture content cannot be displayed after the mapped drawing file is opened by using the specific mapping software.
For this reason, there is a strong need for an improved mapping method, so that mapping can be performed without using specific drawing software, and the mapped drawing file can be correctly displayed in the specific software.
In this context, embodiments of the present invention are intended to provide a DWF file mapping method and mapping apparatus.
In a first aspect of embodiments of the present invention, there is provided a DWF file mapping method for inserting image content into a drawing, the method including: obtaining a DWF file corresponding to the drawing, wherein the DWF file comprises at least one geometric information file, and the geometric information file is used for storing geometric information of the drawing; and acquiring an image file corresponding to the image, and generating a new DWF file according to the image file and the geometric information file, wherein the new DWF file corresponds to the drawing in which the image is inserted.
In an embodiment of the present invention, the generating the new DWF file according to the image file and the geometry information file includes: creating a new geometric information file; reading the contents of the geometric information file and sequentially writing the contents into the new geometric information file; and writing the contents of the image file into the new geometric information file.
In another embodiment of the present invention, the method further includes: determining the position information of the image inserted into the drawing; and writing the position information into the new geometric information file.
In another embodiment of the present invention, the writing the location information into the new geometry information file includes: converting the position information into coordinate position information; and writing the coordinate position information into the new geometric information file.
In another embodiment of the present invention, the converting the position information into coordinate position information includes: acquiring the size information and the coordinate information of the drawing from the DWF file; determining the corresponding relation between the size information and the coordinate information; and converting the position information into the coordinate position information according to the corresponding relation.
In yet another embodiment of the present invention, the method further includes: writing configuration information of the image into the new geometric information file, wherein the configuration information comprises size information of the image.
In yet another embodiment of the present invention, the method further includes: and checking whether the information about the original drawing part in the new geometric information file is consistent with the information in the geometric information file.
In another embodiment of the present invention, the verifying whether the information about the original drawing part in the new geometric information file is consistent with the information in the geometric information file includes: and using an ending character of the information about the original drawing part in the new geometric information file as a delimiter, and checking whether the information before the delimiter in the new geometric information file is consistent with the information in the geometric information file, wherein the delimiter is used for separating the geometric information in the new geometric information file from the content information of the written image file.
In yet another embodiment of the present invention, the geometry information file includes a w2d file.
In a further embodiment of the present invention, the at least one geometric information file corresponds to at least one layer of the drawing.
In a second aspect of embodiments of the present invention, there is provided a DWF file mapping apparatus for inserting image content into a drawing, the apparatus including an obtaining module and a generating module. The acquisition module acquires a DWF file corresponding to the drawing, wherein the DWF file comprises at least one geometric information file, and the geometric information file is used for storing geometric information of the drawing. And a generating module acquires an image file corresponding to the image, and generates a new DWF file according to the image file and the geometric information file, wherein the new DWF file corresponds to the drawing in which the image is inserted.
In an embodiment of the present invention, the generating the new DWF file according to the image file and the geometry information file includes: creating a new geometric information file; reading the contents of the geometric information file and sequentially writing the contents into the new geometric information file; and writing the contents of the image file into the new geometric information file.
In another embodiment of the present invention, the apparatus further includes a determining module and a writing module. The determining module determines position information of the image inserted into the drawing. And the writing module writes the position information into the new geometric information file.
In another embodiment of the present invention, the writing the location information into the new geometry information file includes: converting the position information into coordinate position information; and writing the coordinate position information into the new geometric information file.
In another embodiment of the present invention, the converting the position information into coordinate position information includes: acquiring the size information and the coordinate information of the drawing from the DWF file; determining the corresponding relation between the size information and the coordinate information; and converting the position information into the coordinate position information according to the corresponding relation.
In yet another embodiment of the present invention, the apparatus further includes: and the configuration module writes the configuration information of the image into the new geometric information file, wherein the configuration information comprises the size information of the image.
In yet another embodiment of the present invention, the apparatus further includes: and the verification module is used for verifying whether the information about the original drawing part in the new geometric information file is consistent with the information in the geometric information file.
In another embodiment of the present invention, the verifying whether the information about the original drawing part in the new geometric information file is consistent with the information in the geometric information file includes: and using an ending character of the information about the original drawing part in the new geometric information file as a delimiter, and checking whether the information before the delimiter in the geometric information file is consistent with the information in the geometric information file, wherein the delimiter is used for separating the geometric information in the new geometric information file from the content information of the written image file.
In yet another embodiment of the present invention, the geometry information file includes a w2d file.
In a further embodiment of the present invention, the at least one geometric information file corresponds to at least one layer of the drawing.
In a third aspect of embodiments of the present invention, there is provided a computing device comprising: one or more memories storing executable instructions; and one or more processors executing the executable instructions to implement the DWF filemapping method of any of the above embodiments.
In a fourth aspect of embodiments of the present invention, there is provided a medium having stored thereon executable instructions that, when executed by a processor, implement the DWF filemapping method of any one of the above embodiments.
According to the DWF file mapping method and the DWF file mapping device, the image file of the image and the drawing file of the drawing are combined into a new file, and the mapping effect of inserting the image content into the drawing is achieved. The method of the invention can avoid the help of the software environment of Autodesk when mapping the DWF file, thereby obviously reducing the operation difficulty and bringing better experience to users.
Drawings
The above and other objects, features and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description read in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
FIG. 1 schematically shows an application scenario of a DWF file mapping method and mapping apparatus according to an embodiment of the present invention;
FIG. 2 schematically shows a flow chart of a DWF filemapping method according to an embodiment of the present invention;
FIG. 3 schematically shows a flow chart of a DWF filemapping method according to another embodiment of the present invention;
FIG. 4 schematically shows a schematic view of a computer-readable medium according to an embodiment of the invention;
FIG. 5 schematically shows a block diagram of a DWF filemapping apparatus according to an embodiment of the present invention;
FIG. 6 schematically shows a block diagram of a DWF filemapping apparatus according to another embodiment of the present invention; and
FIG. 7 schematically shows a schematic diagram of a computing device according to an embodiment of the invention.
In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts.
Detailed Description
The principles and spirit of the present invention will be described with reference to a number of exemplary embodiments. It is understood that these embodiments are given solely for the purpose of enabling those skilled in the art to better understand and to practice the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to the embodiment of the invention, a DWF file mapping method, a medium, a device and a computing device are provided.
In this document, it is to be understood that any number of elements in the figures are provided by way of illustration and not limitation, and any nomenclature is used for differentiation only and not in any limiting sense.
The principles and spirit of the present invention are explained in detail below with reference to several representative embodiments of the invention.
Summary of The Invention
The present inventors have found that, in order to reduce the difficulty of the mapping operation and improve the mapping effect, when an image is inserted into a drawing, a new file can be generated by combining an image file corresponding to the image and a drawing file corresponding to the drawing, and the new file includes information of the original paper file and information of the inserted image. Therefore, the image pasting effect of inserting the image content into the drawing can be achieved, and the drawing and the image can be displayed when a new file is opened.
Having described the general principles of the invention, various non-limiting embodiments of the invention are described in detail below.
Application scene overview
Referring first to fig. 1, fig. 1 schematically illustrates an application scenario 100 of a DWF file mapping method and mapping apparatus according to an embodiment of the present invention.
As shown in fig. 1, the application scene 100 includes a drawing sheet 110 and a plurality of images 120.
According to the embodiment of the present disclosure, the drawing 110 may be a drawing drawn by AutoCAD (Computer Aided Design) software, and the drawing file generated by the AutoCAD software may be a DWF (Design Web Format) file.
According to an embodiment of the present disclosure, the image 120 may be a picture-formatted image, such as TIFF, JPEG, GIF, PNG, or the like.
In the disclosed embodiment, the image 120 needs to be inserted into a specific location on the drawing sheet 110 (as shown in fig. 1). For example, a picture of furniture may be inserted in the finishing drawing.
Exemplary method
A method for DWF file mapping according to an exemplary embodiment of the invention is described below with reference to fig. 2 to 3 in connection with the application scenario of fig. 1. It should be noted that the above application scenarios are merely illustrated for the convenience of understanding the spirit and principles of the present invention, and the embodiments of the present invention are not limited in this respect. Rather, embodiments of the present invention may be applied to any scenario where applicable.
Fig. 2 schematically shows a flow chart of a DWF file mapping method according to an embodiment of the invention.
As shown in fig. 2, the method includes operations S210 to S220. The method may be used to insert image content into a drawing.
In operation S210, a DWF file corresponding to the drawing is obtained, where the DWF file includes at least one geometric information file, and the geometric information file is used to store geometric information of the drawing.
According to an embodiment of the disclosure, the drawing may be stored in a DWF file format. The drawing data in the DWF file is compressed and encrypted, so that the drawing data can be quickly, efficiently and safely spread and distributed.
The DWF file comprises at least one geometric information file, and the at least one geometric information file corresponds to at least one layer of the drawing respectively. The geometry information file may be an object in a DWF file that stores geometry information, including, for example, geometric representations of polygons, polylines, circles, and the like. In the embodiment of the present disclosure, the geometry information file may be, for example, a w2d file, and one w2d file corresponds to one layer of the DWF file, that is, the geometry information of one layer in the DWF file is stored in one w2d file.
In the embodiment of the disclosure, the DWF Toolkit of the Autodesk can be downloaded and compiled in advance, the DWF Toolkit is an open source code package which can read and write DWF files, and the DWF Toolkit can independently read and write 2D or 3D DWF/DWFx files without depending on other Autodesk software environments, for example, the DWF files can be read and written without depending on AutoCAD. The DWF files corresponding to the drawings can be read by the compiled DWF Toolkit, so that the DWF files corresponding to the drawings are obtained.
In operation S220, an image file corresponding to the image is acquired, and a new DWF file is generated according to the image file and the geometry information file, wherein the new DWF file corresponds to the drawing in which the image is inserted.
In the embodiment of the present disclosure, the image file corresponding to the image may be a file in a picture format, for example, a picture file in JPEG, PNG, or the like. The embodiment of the disclosure can read the content in the image file corresponding to the image.
According to an embodiment of the present disclosure, wherein generating the new DWF file from the image file and the geometry information file may include: creating a new geometric information file, reading the contents of the geometric information file and writing the contents of the geometric information file into the new geometric information file in sequence, and writing the contents of the image file into the new geometric information file.
For example, an embodiment of the present disclosure may create one or more new geometric information files, then read the contents of the geometric information files in the DWF file corresponding to the drawing through the DWF Toolkit, and sequentially write the read contents into the created new geometric information files, where at this time, the new geometric information files include geometric information corresponding to the drawing. Then, the contents of the acquired image file are written into a new geometric information file, and at this time, the new geometric information file contains both the geometric information corresponding to the drawing and the content information of the inserted image.
For example, another embodiment of the present disclosure may also create a new DWF file, read the DWF file corresponding to the drawing through the DWF Toolkit, and write the read contents into the new DWF file in sequence, where at this time, the new DWF file includes all information corresponding to the drawing. Then, the contents of the acquired image file can be written into the corresponding position of the geometry information file in the new DWF file, and at this time, the new DWF file contains both the drawing contents and the image contents.
For example, still another embodiment of the present disclosure may also write the image content directly to the corresponding location of the geometry information file in the DWF file via the corresponding read-write tool.
According to the method and the device for generating the image content of the DWF file, the image content of the image to be inserted and the DWF file of the drawing are combined to generate the new DWF file, so that the new DWF file contains the content of the original drawing and the image content of the inserted image, the image content can be inserted into the chartlet effect of the drawing, original drawing software or other design software does not need to be installed, the operation difficulty of a user is reduced, and the experience of the user is improved.
According to the embodiment of the disclosure, the image content is written into the corresponding geometric information file, so that the effect of pasting the image on the specified layer is realized, the image and the drawing content are integrated, the image content cannot be simply extracted, and the confidentiality of the image content is improved.
The new DWF file generated by the embodiment of the disclosure also conforms to the file format thereof, the new DWF file after mapping can be correctly opened in AutoCAD, and the drawing content after mapping is displayed.
Fig. 3 schematically shows a flow chart of a DWF file mapping method according to another embodiment of the invention.
As shown in fig. 3, the method includes operations S210 to S220 and S310 to S340. Operations S210 to S220 are the same as or similar to the method described above with reference to fig. 2, and are not described again here.
In operation S310, position information of the image insertion drawing is determined.
According to the embodiment of the disclosure, the user can determine the position information according to the position in the drawing where the image is to be inserted. For example, if the image needs to be inserted into the center of the drawing, the determined position information may be the center of the drawing. For example, if the image needs to be interpolated 4 feet from the left boundary of the drawing and 5 feet from the lower boundary, the determined location information may be (4 feet, 5 feet), etc.
In operation S320, the location information is written in the new geometry information file.
According to an embodiment of the present disclosure, writing the location information into the new geometry information file may include: converting the position information into coordinate position information, and writing the coordinate position information into a new geometric information file.
Wherein converting the location information into coordinate location information may include: the method comprises the steps of obtaining dimension information and coordinate information of a drawing from a DWF file, determining the corresponding relation between the dimension information and the coordinate information, and converting position information into coordinate position information according to the corresponding relation.
In the disclosed embodiment, the actual dimensions of the drawing, for example, the actual length and width, etc., can be obtained from the DWF file. Coordinate information of a specific point of the drawing may also be acquired from the DWF file, for example, a coordinate position of a lower left corner point of the drawing in the internal coordinate system and a coordinate position of an upper right corner point of the drawing in the internal coordinate system may be acquired. The corresponding relation can be established according to the real size of the drawing and the corresponding coordinate information. Thus, after the position information into which the image is to be inserted is determined, the coordinate position information in the internal coordinate system into which the image is to be inserted is determined based on the correspondence relationship. The coordinate position information is written into the new geometry information file so that the position of the image insertion can be specified.
In operation S330, configuration information of the image is written in the new geometric information file, wherein the configuration information includes size information of the image.
According to the embodiment of the present disclosure, configuration information about configuring an image may also be written into a new geometric information file, for example, size information or resolution information of the image or the like may be written into the new geometric information file to implement the configuration of the image.
In operation S340, it is checked whether the information on the original drawing part in the new geometry information file is identical to the information in the geometry information file.
In the embodiment of the present disclosure, an end character of the information on the original drawing part in the new geometry information file may be used as a delimiter for separating the geometry information in the new geometry information file from the content information of the written image file. For example, after the content in the geometry information file in the read DWF file is written into the new geometry information file, the end character of the content of the geometry information file is used as a delimiter, and then the content information of the image is written into the new geometry information file after the delimiter.
According to an embodiment of the present disclosure, verifying whether the information about the original drawing part in the new geometric information file is consistent with the information in the geometric information file may include: and checking whether the information before the delimiter in the new geometric information file is consistent with the information in the geometric information file.
For example, in order to ensure that the content of the original drawing before the drawing is pasted does not change with the drawing behavior, the new DWF file may be checked, and since only the new geometric information file in the new DWF file is changed, only the new geometric information file may be checked, for example, only the information about the original drawing part in the new geometric information file may be checked.
The embodiment of the disclosure can specify the position and the size of the image to be pasted, the pasted image and the original paper are integrated, and the relative position of the image and the drawing is not influenced even if operations such as rotation and translation are performed on the drawing in the file.
Exemplary Medium
Having described the method of an exemplary embodiment of the present invention, a computer-readable storage medium for implementing a DWF file mapping method of an exemplary embodiment of the present invention is described next with reference to FIG. 4, having stored thereon executable instructions that, when executed by a processor, implement the mapping method described above in any of the above-described method embodiments.
In some possible embodiments, the various aspects of the present invention may also be implemented in a program product, which includes program code for causing a terminal device to execute the steps in the DWF file mapping method according to the various exemplary embodiments of the present invention described in the "exemplary method" section above in this specification when the program product runs on the terminal device, for example, the terminal device may execute operation S210 shown in fig. 2 to obtain a DWF file corresponding to a drawing, where the DWF file includes at least one geometry information file, where the geometry information file is used for storing geometry information of the drawing; operation S220 acquires an image file corresponding to the image, and generates a new DWF file according to the image file and the geometry information file, where the new DWF file corresponds to the drawing in which the image is inserted.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
As shown in fig. 4, a program product 40 for data processing of charts according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Exemplary devices
Having described the medium of the exemplary embodiment of the present invention, next, a DWF file mapping apparatus of the exemplary embodiment of the present invention will be described with reference to fig. 5 to 6.
Fig. 5 schematically shows a block diagram of a DWF filemapping apparatus 500 according to an embodiment of the present invention.
As shown in fig. 5, the DWF file mapping apparatus 500 may include an obtaining module 510 and a generating module 520.
The obtaining module 510 may obtain a DWF file corresponding to a drawing, where the DWF file includes at least one geometric information file, and the geometric information file is used to store geometric information of the drawing. According to the embodiment of the present disclosure, the obtaining module 510 may perform, for example, the operation S210 described above with reference to fig. 2, which is not described herein again.
The generating module 520 may obtain an image file corresponding to the image, and generate a new DWF file according to the image file and the geometry information file, where the new DWF file corresponds to the drawing into which the image is inserted. According to the embodiment of the present disclosure, the generating module 510 may perform, for example, the operation S220 described above with reference to fig. 2, which is not described herein again.
According to the method and the device for generating the image content of the DWF file, the image content of the image to be inserted and the DWF file of the drawing are combined to generate the new DWF file, so that the new DWF file contains the content of the original drawing and the image content of the inserted image, the image content can be inserted into the chartlet effect of the drawing, original drawing software or other design software does not need to be installed, the operation difficulty of a user is reduced, and the experience of the user is improved.
According to the embodiment of the disclosure, the image content is written into the corresponding geometric information file, so that the effect of pasting the image on the specified layer is realized, the image and the drawing content are integrated, the image content cannot be simply extracted, and the confidentiality of the image content is improved.
The new DWF file generated by the embodiment of the disclosure also conforms to the file format thereof, the new DWF file after mapping can be correctly opened in AutoCAD, and the drawing content after mapping is displayed.
Fig. 6 schematically shows a block diagram of a DWF file mapping apparatus 600 according to another embodiment of the present invention.
As shown in fig. 6, the DWF file mapping apparatus 600 may include an acquisition module 510, a generation module 520, a determination module 530, a write module 540, a configuration module 550, and a verification module 560. The obtaining module 510 and the generating module 520 are the same as or similar to the modules described above with reference to fig. 5, and are not described herein again.
The determination module 530 determines position information of the image insertion drawing. According to the embodiment of the present disclosure, the determining module 530 may, for example, perform the operation S310 described above with reference to fig. 3, which is not described herein again.
The writing module 540 writes the location information into the new geometry information file. According to the embodiment of the present disclosure, the writing module 540 may, for example, perform the operation S320 described above with reference to fig. 3, which is not described herein again.
The configuration module 550 writes configuration information of the image into the new geometric information file, wherein the configuration information includes size information of the image. According to an embodiment of the present disclosure, the configuration module 550 may perform, for example, the operation S330 described above with reference to fig. 3, which is not described herein again.
The verification module 560 verifies whether the information on the original drawing part in the new geometry information file is consistent with the information in the geometry information file. According to the embodiment of the present disclosure, the checking module 560 may, for example, perform the operation S340 described above with reference to fig. 3, which is not described herein again.
It is understood that the obtaining module 510, the generating module 520, the determining module 530, the writing module 540, the configuring module 550, and the checking module 560 may be combined in one module to be implemented, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of the other modules and implemented in one module. According to an embodiment of the present invention, at least one of the obtaining module 510, the generating module 520, the determining module 530, the writing module 540, the configuring module 550, and the verifying module 560 may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or any other reasonable manner of integrating or packaging a circuit, as hardware or firmware, or as a suitable combination of software, hardware, and firmware implementations. Alternatively, at least one of the obtaining module 510, the generating module 520, the determining module 530, the writing module 540, the configuring module 550, and the checking module 560 may be at least partially implemented as a computer program module, which, when executed by a computer, may perform the functions of the respective modules.
Exemplary computing device
Having described the methods, media, and apparatus of exemplary embodiments of the present invention, a computing device implementing a DWF file mapping method and mapping apparatus of exemplary embodiments of the present invention is described next with reference to FIG. 7.
The embodiment of the invention also provides the computing equipment. As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible embodiments, a computing device according to the present invention may include at least one processing unit, and at least one memory unit. Wherein the storage unit stores program code which, when executed by the processing unit, causes the processing unit to perform the steps in the DWF file mapping method according to various exemplary embodiments of the present invention described in the above-mentioned "exemplary methods" section of this specification. For example, the processing unit may execute operation S210 shown in fig. 2 to obtain a DWF file corresponding to a drawing, where the DWF file includes at least one geometry information file, where the geometry information file is used to store geometry information of the drawing; operation S220 acquires an image file corresponding to the image, and generates a new DWF file according to the image file and the geometry information file, where the new DWF file corresponds to the drawing in which the image is inserted.
A computing device 70 for implementing the DWF file mapping method according to this embodiment of the invention is described below with reference to fig. 7. The computing device 70 shown in FIG. 7 is only one example and should not be taken to limit the scope of use and functionality of embodiments of the present invention.
As shown in fig. 7, computing device 70 is embodied in the form of a general purpose computing device. Components of computing device 70 may include, but are not limited to: the at least one processing unit 701, the at least one memory unit 702, and a bus 703 that couples various system components including the memory unit 702 and the processing unit 701.
Bus 703 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.
The storage unit 702 can include readable media in the form of volatile memory, such as Random Access Memory (RAM)7021 and/or cache memory 7022, and can further include Read Only Memory (ROM) 7023.
Storage unit 702 may also include a program/utility 7025 having a set (at least one) of program modules 7024, such program modules 7024 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Computing device 70 may also communicate with one or more external devices 704 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with computing device 70, and/or with any devices (e.g., router, modem, etc.) that enable computing device 70 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 705. Moreover, computing device 70 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) through network adapter 706. As shown, network adapter 706 communicates with the other modules of computing device 70 via bus 703. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computing device 70, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the mapping apparatus are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
While the spirit and principles of the invention have been described with reference to several particular embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, nor is the division of aspects, which is for convenience only as the features in such aspects may not be combined to benefit. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (16)

1. A DWF file mapping method for inserting image content into a drawing sheet, the method comprising:
obtaining a DWF file corresponding to the drawing, wherein the DWF file comprises at least one geometric information file, the geometric information file is used for storing geometric information of the drawing, the geometric information file is a w2d file, and each w2d file corresponds to one layer of the DWF file;
acquiring an image file corresponding to the image, and generating a new DWF file according to the image file and the geometric information file, wherein the new DWF file corresponds to the drawing in which the image is inserted;
the generating a new DWF file according to the image file and the geometric information comprises:
creating a new geometric information file;
reading the contents of the geometric information file and sequentially writing the contents into the new geometric information file; and
and writing the content of the image file into the new geometric information file.
2. The method of claim 1, further comprising:
determining the position information of the image inserted into the drawing;
and writing the position information into the new geometric information file.
3. The method of claim 2, wherein said writing the location information into the new geometry information file comprises:
converting the position information into coordinate position information;
and writing the coordinate position information into the new geometric information file.
4. The method of claim 3, wherein said converting the location information to coordinate location information comprises:
acquiring the size information and the coordinate information of the drawing from the DWF file;
determining the corresponding relation between the size information and the coordinate information;
and converting the position information into the coordinate position information according to the corresponding relation.
5. The method of claim 1, further comprising:
writing configuration information of the image into the new geometric information file, wherein the configuration information comprises size information of the image.
6. The method of claim 1, further comprising:
and checking whether the information about the original drawing part in the new geometric information file is consistent with the information in the geometric information file.
7. The method of claim 6, wherein the verifying whether the information about the original drawing part in the new geometry information file is consistent with the information in the geometry information file comprises:
and using an ending character of the information about the original drawing part in the new geometric information file as a delimiter, and checking whether the information before the delimiter in the new geometric information file is consistent with the information in the geometric information file, wherein the delimiter is used for separating the geometric information in the new geometric information file from the content information of the written image file.
8. A DWF file mapping apparatus for inserting image content into a drawing sheet, the apparatus comprising:
the acquisition module is used for acquiring a DWF file corresponding to the drawing, the DWF file comprises at least one geometric information file, the geometric information file is used for storing geometric information of the drawing, the geometric information file is a w2d file, and each w2d file corresponds to one layer of the DWF file;
the generating module is used for acquiring an image file corresponding to the image and generating a new DWF file according to the image file and the geometric information file, wherein the new DWF file corresponds to the drawing inserted with the image;
the generating a new DWF file according to the image file and the geometric information comprises:
creating a new geometric information file;
reading the contents of the geometric information file and sequentially writing the contents into the new geometric information file; and
and writing the content of the image file into the new geometric information file.
9. The apparatus of claim 8, further comprising:
the determining module is used for determining the position information of the image inserted into the drawing;
and the writing module writes the position information into the new geometric information file.
10. The apparatus of claim 9, wherein said writing the location information into the new geometry information file comprises:
converting the position information into coordinate position information;
and writing the coordinate position information into the new geometric information file.
11. The apparatus of claim 10, wherein said converting the location information to coordinate location information comprises:
acquiring the size information and the coordinate information of the drawing from the DWF file;
determining the corresponding relation between the size information and the coordinate information;
and converting the position information into the coordinate position information according to the corresponding relation.
12. The apparatus of claim 8, further comprising:
and the configuration module writes the configuration information of the image into the new geometric information file, wherein the configuration information comprises the size information of the image.
13. The apparatus of claim 8, further comprising:
and the verification module is used for verifying whether the information about the original drawing part in the new geometric information file is consistent with the information in the geometric information file.
14. The apparatus of claim 13, wherein the verifying whether the information on the original drawing part in the new geometry information file is consistent with the information in the geometry information file comprises:
and using an ending character of the information about the original drawing part in the new geometric information file as a delimiter, and checking whether the information before the delimiter in the geometric information file is consistent with the information in the geometric information file, wherein the delimiter is used for separating the geometric information in the new geometric information file from the content information of the written image file.
15. A computing device, comprising:
one or more memories storing executable instructions; and
one or more processors executing the executable instructions to implement the method of any one of claims 1-7.
16. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, implement a method according to any one of claims 1 to 7.
CN201810066085.1A 2018-01-23 2018-01-23 DWF file mapping method, device, computing equipment and medium Active CN108416824B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810066085.1A CN108416824B (en) 2018-01-23 2018-01-23 DWF file mapping method, device, computing equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810066085.1A CN108416824B (en) 2018-01-23 2018-01-23 DWF file mapping method, device, computing equipment and medium

Publications (2)

Publication Number Publication Date
CN108416824A CN108416824A (en) 2018-08-17
CN108416824B true CN108416824B (en) 2022-05-03

Family

ID=63126254

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810066085.1A Active CN108416824B (en) 2018-01-23 2018-01-23 DWF file mapping method, device, computing equipment and medium

Country Status (1)

Country Link
CN (1) CN108416824B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114004908B (en) * 2021-11-01 2023-01-06 中筑创联建筑科技(北京)有限公司 Implementation method for simplifying DWG two-dimensional engineering drawing

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100881346B1 (en) * 2008-05-22 2009-02-04 새한항업(주) Drawing system for composing the datum point of an aerial photograph taken by digital picture
CN102880283A (en) * 2011-07-14 2013-01-16 师源 Interaction type multimedia production and broadcast system with fusion of three-dimensional and two-dimensional data
CN104750913A (en) * 2015-03-05 2015-07-01 中国电建集团昆明勘测设计研究院有限公司 Method for automatically transforming DWG three-dimensional model into X three-dimensional model
CN105069226A (en) * 2015-08-03 2015-11-18 常州赞云软件科技有限公司 Three-dimensional modeling method based on template
CN105334216A (en) * 2014-06-10 2016-02-17 通用电气公司 Method and system used for automatic parts inspection
CN107092354A (en) * 2017-04-01 2017-08-25 宁强 The method of Sketchup model virtuals reality transformation technology

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853734A (en) * 2012-11-30 2014-06-11 苏州利驰电子商务有限公司 Drawing content difference comparison method and system
KR102224845B1 (en) * 2014-07-22 2021-03-08 삼성전자주식회사 Method and apparatus for hybrid rendering

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100881346B1 (en) * 2008-05-22 2009-02-04 새한항업(주) Drawing system for composing the datum point of an aerial photograph taken by digital picture
CN102880283A (en) * 2011-07-14 2013-01-16 师源 Interaction type multimedia production and broadcast system with fusion of three-dimensional and two-dimensional data
CN105334216A (en) * 2014-06-10 2016-02-17 通用电气公司 Method and system used for automatic parts inspection
CN104750913A (en) * 2015-03-05 2015-07-01 中国电建集团昆明勘测设计研究院有限公司 Method for automatically transforming DWG three-dimensional model into X three-dimensional model
CN105069226A (en) * 2015-08-03 2015-11-18 常州赞云软件科技有限公司 Three-dimensional modeling method based on template
CN107092354A (en) * 2017-04-01 2017-08-25 宁强 The method of Sketchup model virtuals reality transformation technology

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A review of Internet-based product information sharing and visualization;ShushengZhang等;《Computers in Industry》;20040531;第54卷(第1期);第1-15页 *
互联网上矢量图形文件及其浏览机制的研究;汤志东等;《工程图学学报 》;20040630(第2期);第27-33页 *

Also Published As

Publication number Publication date
CN108416824A (en) 2018-08-17

Similar Documents

Publication Publication Date Title
CN107450897B (en) Cross-platform migration method and device for graphic engine
WO2003032202A2 (en) Section extraction tool for pdf documents
JP2005310160A (en) Apparatus and method for reconstituting three-dimensional graphics data
US11625843B2 (en) Systems and methods for automatic alignment of drawings
CN110532497B (en) Method for generating panorama, method for generating three-dimensional page and computing device
WO2017034953A1 (en) System and method for object compression and state synchronization
US10664980B2 (en) Vector graphics handling processes for user applications
CN108416824B (en) DWF file mapping method, device, computing equipment and medium
CN109634611B (en) Mobile terminal three-dimensional model ply file analysis and display method based on OpenGL
JP6193406B2 (en) Serialization for differential encoding
CN111008934B (en) Scene construction method, device, equipment and storage medium
US11120607B2 (en) Information generating apparatus, information processing apparatus, control method, and non-transitory computer-readable storage medium
JP5374567B2 (en) Image processing apparatus, image processing system, and image processing method
KR20140120156A (en) Method of generating 3-d graphic data with improved usability for mobile device and application development environment enabling the method
JP2011175629A (en) System and method for rendering of printable data
US20210103553A1 (en) System and method for caching converted files and compiling computer code from the cache
CN112417390A (en) File processing method, device, equipment and storage medium
CN114616596A (en) Free view video decoding
CN113448576A (en) File conversion method, device and related equipment
CN113918664B (en) Data processing method and device
KR102541262B1 (en) METHOD, APPARATUS AND COMPUTER-READABLE MEDIUM OF Applying an object to VR content
CN115174993B (en) Method, apparatus, device and storage medium for video production
US20240111496A1 (en) Method for running instance, computer device, and storage medium
CN112988276B (en) Resource package generation method and device, electronic equipment and storage medium
US11373031B2 (en) Systems and methods for implementing layout designs using JavaScript

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