CN107391872B - Method and device for using PDMS three-dimensional model in software - Google Patents
Method and device for using PDMS three-dimensional model in software Download PDFInfo
- Publication number
- CN107391872B CN107391872B CN201710656332.9A CN201710656332A CN107391872B CN 107391872 B CN107391872 B CN 107391872B CN 201710656332 A CN201710656332 A CN 201710656332A CN 107391872 B CN107391872 B CN 107391872B
- Authority
- CN
- China
- Prior art keywords
- dimensional model
- software
- model file
- format
- stl
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 229920000435 poly(dimethylsiloxane) Polymers 0.000 title claims abstract description 12
- 239000004205 dimethyl polysiloxane Substances 0.000 title claims abstract description 9
- 238000004987 plasma desorption mass spectroscopy Methods 0.000 title claims abstract description 9
- 235000013870 dimethyl polysiloxane Nutrition 0.000 title claims abstract 10
- CXQXSVUQTKDNFP-UHFFFAOYSA-N octamethyltrisiloxane Chemical compound C[Si](C)(C)O[Si](C)(C)O[Si](C)(C)C CXQXSVUQTKDNFP-UHFFFAOYSA-N 0.000 title claims abstract 7
- 238000004590 computer program Methods 0.000 claims description 19
- 238000012545 processing Methods 0.000 claims description 18
- 238000006243 chemical reaction Methods 0.000 claims description 13
- 238000012544 monitoring process Methods 0.000 claims description 8
- 238000009877 rendering Methods 0.000 claims description 6
- 238000012360 testing method Methods 0.000 claims description 6
- 230000006870 function Effects 0.000 description 12
- 230000008569 process Effects 0.000 description 10
- 238000013461 design Methods 0.000 description 8
- 238000011161 development Methods 0.000 description 7
- 238000012800 visualization Methods 0.000 description 6
- 230000004044 response Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000003889 chemical engineering Methods 0.000 description 1
- 238000012938 design process Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000003208 petroleum Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/10—Geometric CAD
- G06F30/13—Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2210/00—Indexing scheme for image generation or computer graphics
- G06T2210/04—Architectural design, interior design
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2210/00—Indexing scheme for image generation or computer graphics
- G06T2210/32—Image data format
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Geometry (AREA)
- Business, Economics & Management (AREA)
- Economics (AREA)
- Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computational Mathematics (AREA)
- Public Health (AREA)
- Pure & Applied Mathematics (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Analysis (AREA)
- Structural Engineering (AREA)
- Civil Engineering (AREA)
- Architecture (AREA)
- Mathematical Optimization (AREA)
- Water Supply & Treatment (AREA)
- General Health & Medical Sciences (AREA)
- Human Resources & Organizations (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Computer Graphics (AREA)
- Stored Programmes (AREA)
Abstract
The invention is suitable for the technical field of three-dimensional models, and provides a method and a device for using a three-dimensional model in software and a computer readable storage medium, wherein the method comprises the following steps: selecting a three-dimensional model to be embedded into preset software from the PDMS software, and converting the three-dimensional model into a three-dimensional model file in an STP format; adopting Solidworks software to convert the three-dimensional model file in the STP format into a three-dimensional model file in an STL format and outputting the three-dimensional model file in the STL format; calling VTK software to read the three-dimensional model file in the STL format, and embedding the read three-dimensional model file in the STL format into preset software. The invention can solve the problem that the prior art can not render the PDMS three-dimensional model in some independently developed professional software.
Description
Technical Field
The invention belongs to the technical field of three-dimensional models, and particularly relates to a method and a device for using a three-dimensional model in software and a computer readable storage medium.
Background
With the increasing demand of domestic nuclear power toward the international market, the independent development of nuclear power professional analysis software is increasingly important, and the competition of software strength also begins to move to the main battlefield of nuclear power competition. Therefore, how to utilize the existing resources and informatization technology and improve the quality and the development efficiency of the analysis software of the autonomy nuclear power major is very important. In the nuclear power industry, three-dimensional views such as monitoring position information and the like are often required to be displayed in professional software such as power plant fatigue monitoring and leakage monitoring which are independently developed, but PDMS (plant Design Management System) is served for Design, a generated model is very fine, and when the model is used in other fields, the data size is too large to become the largest obstacle, so that the three-dimensional model cannot be rendered in some autonomously developed professional software.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for a three-dimensional model to be used in software, and a computer-readable storage medium, so as to solve the problem that the prior art cannot render a PDMS three-dimensional model in some independently developed specialized software.
A first aspect of an embodiment of the present invention provides a method for using a PDMS three-dimensional model in software, where the method includes:
selecting a three-dimensional model to be embedded into preset software from the PDMS software, and converting the three-dimensional model into a three-dimensional model file in an STP format;
adopting Solidworks software to convert the three-dimensional model file in the STP format into a three-dimensional model file in an STL format and outputting the three-dimensional model file in the STL format;
calling VTK software to read the three-dimensional model file in the STL format, and embedding the read three-dimensional model file in the STL format into preset software.
A second aspect of the embodiments of the present invention provides an apparatus for using a PDMS three-dimensional model in software, the apparatus including:
the conversion module is used for selecting a three-dimensional model to be embedded into preset software from the PDMS software and converting the three-dimensional model into a three-dimensional model file in an STP format;
the processing module is used for converting the STP format three-dimensional model file into an STL format three-dimensional model file by adopting Solidworks software and outputting the STL format three-dimensional model file;
and the calling module is used for calling VTK software to read the three-dimensional model file in the STL format and embedding the read three-dimensional model file in the STL format into preset software.
A third aspect of embodiments of the present invention provides an apparatus for using a PDMS three-dimensional model in software, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to the first aspect when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, performs the steps of the method according to the first aspect.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: the embodiment of the invention selects a three-dimensional model to be embedded into preset software from PDMS software, converts the three-dimensional model into a three-dimensional model file in an STP format, converts the three-dimensional model file in the STP format into the three-dimensional model file in the STL format by adopting Solidworks software, outputs the three-dimensional model file in the STL format, calls VTK software to read the three-dimensional model file in the STL format and embeds the read three-dimensional model file in the STL format into the preset software. According to the embodiment of the invention, the requirement of utilizing the three-dimensional model in professional analysis software is met by fully utilizing the existing resources in a mode of combining PDMS software, Solidworks software and VTK software, so that the problem that the PDMS three-dimensional model cannot be rendered in some independently researched and developed professional software in the prior art is solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart of an implementation process of a method for using a PDMS three-dimensional model in software according to an embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating an implementation process of a method for using a PDMS three-dimensional model in software according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of an apparatus for using a PDMS three-dimensional model in software according to a third embodiment of the present invention;
fig. 4 is a schematic diagram of an apparatus for using a PDMS three-dimensional model in software according to a fourth embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
It should be understood that, the sequence numbers of the steps in this embodiment do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the inherent logic of the process, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Referring to fig. 1, which is a schematic flow chart illustrating an implementation process of a method for using a PDMS three-dimensional model in software according to an embodiment of the present invention, as shown in the figure, the method may include the following steps:
and S101, selecting a three-dimensional model to be embedded into preset software from the PDMS software, and converting the three-dimensional model into a three-dimensional model file in an STP format.
In the embodiment of the present invention, a three-dimensional model to be embedded in preset software may be selected from the PDMS software according to an operation of a user, and the three-dimensional model may be exported to a three-dimensional model file in STP format. The preset software may refer to preset software for importing a three-dimensional model selected from PDMS. The STP format three-dimensional model file is a 3D image file format of CAD drawing software, contains data of three-dimensional objects and provides support for data exchange of product models. The three-dimensional model file refers to a file containing a three-dimensional model.
Illustratively, the three-dimensional model to be derived is selected from PDMS software, and then sequentially input in a command line: and (3) clicking an enter key, and clicking an enter key, wherein the enter key is an exit file/D:/EXPORT-PDMS (for example, a folder named as EXPORT-PDMS is established in a D disc), and clicking the enter key, an exit ce, an exit finish and the enter key. And after the export is finished, entering a D disk to check the three-dimensional model file in the STP format.
The PDMS software is a 3D factory design system. In PDMS software, multiple professional groups can be co-designed to build a detailed 3D digital factory model. Each designer can see what the other designers are doing at any time during the design process. While the component information can be stored entirely in a parameterized component library. The PDMS software can automatically perform collision checks between the components and each of the specialty designs. Therefore, the accuracy of the design result is integrally guaranteed, and the design change caused by collision in the field construction process is effectively avoided. The pattern output by the PDMS software conforms to the traditional industry standard. Besides, it can output engineering report and material report of various standards according to the set style and style. PDMS software is widely applied to the design of electric power, chemical engineering and petroleum construction projects at present, has good openness and has the function of being interfaced with specific third-party software.
And S102, converting the STP format three-dimensional model file into an STL format three-dimensional model file by adopting Solidworks software, and outputting the STL format three-dimensional model file.
In the embodiment of the invention, the three-dimensional model file in the STP format is imported into Solidworks software, and then the three-dimensional model file in the STL format is exported. The STL format is a file format used to represent triangular meshes in computer graphics application systems.
For example, the three-dimensional model file in the STP format is imported into Solidworks software, and the three-dimensional model file may be: in a Solidworks software interface, an opening function at the upper left corner of the software is clicked, a prepared STP model file (namely a three-dimensional model file in an STP format) is selected, and an opening button is clicked, so that the three-dimensional model can be displayed on the interface.
The method for exporting the three-dimensional model file in the STL format by the Solidworks software can be as follows: the model file to be converted is selected and then the "save" function above the interface is clicked on, and the file type selects the STL format. STL files are of an ASCII coding type (data inside can be seen by a text editor) and a single STL file does not store all part information of the STL file (each part under the model file generates the STL file), and can be selected according to actual requirements; the attribute setting of the exported model can be carried out in an option button on a 'save' dialog box of Solidworks, the information such as data output mode, unit, quality, tolerance and the like can be selected, and finally, an STL format file is generated. Generally, in order to reduce the size of the converted three-dimensional model file, the output is selected as "binary (N)" (the opening of a text editor can see a stack of codes whose information can only be identified by a computer), and at the same time, the option of "saving all parts of an assembly body in a single file" is selected, and "determine" is clicked (the user can also select the option of "displaying STL information (W) before saving", so that some unnecessary information prompts can be reduced). Furthermore, the user may also adjust the quality of the three-dimensional model in output STL format.
Optionally, the outputting the three-dimensional model file in the STL format includes:
and outputting the three-dimensional model file in the STL format in a binary form.
In an embodiment of the present invention, outputting the STL format three-dimensional model file in a binary form may reduce the size of the STL format three-dimensional model file.
Optionally, the converting the three-dimensional model file in the STP format into the three-dimensional model file in the STL format using Solidworks software includes:
and when the Solidworks software export model attribute is set to be in the STL format, converting the three-dimensional model file in the STP format into the three-dimensional model file in the STL format. It should be noted that the three-dimensional model file may have a variety of conversion formats, and is not limited to the STL format, and meanwhile, the conversion tool is not limited to using Solidworks, and may also use other format conversion programs, as long as it can satisfy the requirement of the VTK tool for normal reading.
Step S103, calling VTK software to read the three-dimensional model file in the STL format, and embedding the read three-dimensional model file in the STL format into preset software.
Vtk (visualization toolkit) is an open source, free software system, mainly used for three-dimensional computer graphics, image processing and visualization. The VTK is designed and realized on the basis of object-oriented principle, the kernel of the VTK is constructed by C + +, comprises about 250,000 lines of codes, more than 2000 classes and also comprises a plurality of conversion interfaces, so that the VTK can be freely used by various languages of Java, Tcl/Tk and Python. The VTK is a powerful visualization development tool that provides direct technical support to researchers working in visualization application development.
Optionally, the calling the VTK to read the three-dimensional model file in the STL format, and embedding the read three-dimensional model file in the STL format into preset software includes:
and writing a test code by adopting a Python programming language, calling VTK software to read the three-dimensional model file in the STL format, rendering the three-dimensional model in the three-dimensional model file in the STL format, and embedding the rendered three-dimensional model into preset software for use.
In the embodiment of the invention, the test code is compiled by Python, and a VTK three-dimensional visualization tool is called to perform visualization programming, so that the PDMS three-dimensional model is rendered and used in the independent research and development software. The key of the embodiment of the invention is the selection of a PDMS model conversion tool and an independent development software three-dimensional model development tool, and the combination mode of PDMS + Solidworks + VTK is adopted, so that the requirement of utilizing a three-dimensional model in professional analysis software is met by fully utilizing the existing resources. And finally, calling a VTK tool to read and render the three-dimensional model in the STL format by utilizing Python programming, and embedding the three-dimensional model in the independently developed professional analysis software for use. Therefore, secondary utilization of the PDMS three-dimensional model can be realized, and the utilization rate of data resources is effectively improved; valuable nuclear power professional software developers can be liberated from heavy three-dimensional model rendering development, and manpower is used for professional work such as more important application software development, engineering calculation analysis and the like; the development efficiency of professional software such as a fatigue monitoring system is effectively accelerated, and the quality of the software is improved.
According to the embodiment of the invention, the requirement of utilizing the three-dimensional model in professional analysis software is met by fully utilizing the existing resources in a mode of combining PDMS software, Solidworks software and VTK software, so that the problem that the PDMS three-dimensional model cannot be rendered in some independently researched and developed professional software in the prior art is solved.
Referring to fig. 2, it is a schematic flow chart of an implementation process of a method for using a PDMS three-dimensional model in software according to a second embodiment of the present invention, and as shown in the figure, the method may include the following steps:
step S201, selecting a three-dimensional model to be embedded into preset software from the PDMS software, and converting the three-dimensional model into a three-dimensional model file in STP format.
The step is the same as step S101, and reference may be made to the related description of step S101, which is not repeated herein.
And S202, inputting the three-dimensional model file in the STP format into Solidworks software.
In the embodiment of the invention, the three-dimensional model file in the STP format is imported into Solidworks software.
For example, the three-dimensional model file in the STP format is imported into Solidworks software, and the three-dimensional model file may be: in a Solidworks software interface, an opening function at the upper left corner of the software is clicked, a prepared STP model file (namely a three-dimensional model file in an STP format) is selected, and an opening button is clicked, so that the three-dimensional model can be displayed on the interface.
Step S203, after receiving the STP format three-dimensional model file, the Solidworks software converts the STP format three-dimensional model file into an STL format three-dimensional model file and outputs the STL format three-dimensional model file.
In the embodiment of the invention, the three-dimensional model file in the STL format is exported in Solidworks software.
For example, the Solidworks software export the STL format three-dimensional model file may be: the model file to be converted is selected and then the "save" function above the interface is clicked on, and the file type selects the STL format. STL files are of an ASCII coding type (data inside can be seen by a text editor) and a single STL file does not store all part information of the STL file (each part under the model file generates the STL file), and can be selected according to actual requirements; the attribute setting of the exported model can be carried out in an option button on a 'save' dialog box of Solidworks, the information such as data output mode, unit, quality, tolerance and the like can be selected, and finally, an STL format file is generated. Generally, in order to reduce the size of the converted three-dimensional model file, the output is selected as "binary (N)" (the opening of a text editor can see a stack of codes whose information can only be identified by a computer), and at the same time, the option of "saving all parts of an assembly body in a single file" is selected, and "determine" is clicked (the user can also select the option of "displaying STL information (W) before saving", so that some unnecessary information prompts can be reduced). Furthermore, the user may also adjust the quality of the three-dimensional model in output STL format.
Step S204, calling VTK software to read the three-dimensional model file in the STL format, and embedding the read three-dimensional model file in the STL format into preset software.
The step is the same as step S103, and reference may be made to the related description of step S103, which is not described herein again.
According to the embodiment of the invention, the requirement of utilizing the three-dimensional model in professional analysis software is met by fully utilizing the existing resources in a mode of combining PDMS software, Solidworks software and VTK software, so that the problem that the PDMS three-dimensional model cannot be rendered in some independently researched and developed professional software in the prior art is solved.
Fig. 3 is a schematic view of an apparatus for using a PDMS three-dimensional model in software according to a third embodiment of the present invention, and for convenience of description, only the portions related to the third embodiment of the present invention are shown.
The device for using the PDMS three-dimensional model in software comprises:
the conversion module 31 is configured to select a three-dimensional model to be embedded in preset software from the PDMS software, and convert the three-dimensional model into a three-dimensional model file in an STP format;
the processing module 32 is configured to convert the three-dimensional model file in the STP format into a three-dimensional model file in an STL format by using Solidworks software, and output the three-dimensional model file in the STL format;
the calling module 33 is configured to call VTK software to read the three-dimensional model file in the STL format, and embed the read three-dimensional model file in the STL format in preset software.
Optionally, the processing module 32 includes:
the input unit is used for inputting the three-dimensional model file in the STP format into Solidworks software;
and the conversion unit is used for converting the three-dimensional model file in the STP format into the three-dimensional model file in the STL format after the Solidworks software receives the three-dimensional model file in the STP format.
Optionally, the processing module 32 is specifically configured to:
outputting the three-dimensional model file in the STL format in a binary form;
optionally, the invoking module 33 is specifically configured to:
writing a test code by adopting a Python programming language, calling VTK software to read the three-dimensional model file in the STL format, rendering a three-dimensional model in the three-dimensional model file in the STL format, and embedding the rendered three-dimensional model into preset software for use;
the processing module 32 is specifically configured to:
and when the Solidworks software export model attribute is set to be in the STL format, converting the three-dimensional model file in the STP format into the three-dimensional model file in the STL format.
According to the embodiment of the invention, the requirement of utilizing the three-dimensional model in professional analysis software is met by fully utilizing the existing resources in a mode of combining PDMS software, Solidworks software and VTK software, so that the problem that the PDMS three-dimensional model cannot be rendered in some independently researched and developed professional software in the prior art is solved.
Fig. 4 is a schematic diagram of an apparatus for using a PDMS three-dimensional model in software according to a fifth embodiment of the present invention. As shown in fig. 4, the mobile terminal 4 of this embodiment includes: a processor 40, a memory 41 and a computer program 42 stored in said memory 41 and executable on said processor 40. The processor 40, when executing the computer program 42, implements the steps in the method embodiments for using the PDMS three-dimensional models in software, such as the steps S101 to S103 shown in fig. 1. Alternatively, the processor 40, when executing the computer program 42, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 31 to 33 shown in fig. 3.
Illustratively, the computer program 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 42 in the mobile terminal 4. For example, the computer program 42 may be divided into a conversion module, a processing module and a calling module, and the specific functions of each module are as follows:
the conversion module is used for selecting a three-dimensional model to be embedded into preset software from the PDMS software and converting the three-dimensional model into a three-dimensional model file in an STP format;
the processing module is used for converting the STP format three-dimensional model file into an STL format three-dimensional model file by adopting Solidworks software and outputting the STL format three-dimensional model file;
and the calling module is used for calling VTK software to read the three-dimensional model file in the STL format and embedding the read three-dimensional model file in the STL format into preset software.
Optionally, the processing module includes:
the input unit is used for inputting the three-dimensional model file in the STP format into Solidworks software;
and the conversion unit is used for converting the three-dimensional model file in the STP format into the three-dimensional model file in the STL format after the Solidworks software receives the three-dimensional model file in the STP format.
Optionally, the processing module is specifically configured to:
outputting the three-dimensional model file in the STL format in a binary form;
optionally, the calling module is specifically configured to:
writing a test code by adopting a Python programming language, calling VTK software to read the three-dimensional model file in the STL format, rendering a three-dimensional model in the three-dimensional model file in the STL format, and embedding the rendered three-dimensional model into preset software for use;
the processing module is specifically configured to:
and when the Solidworks software export model attribute is set to be in the STL format, converting the three-dimensional model file in the STP format into the three-dimensional model file in the STL format.
The device 4 used by the PDMS three-dimensional model in the software may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The device for using the PDMS three-dimensional model in software may include, but is not limited to, a processor 40 and a memory 41. It will be understood by those skilled in the art that fig. 4 is only an example of the apparatus 4 for the PDMS three-dimensional model to be used in the software, and does not constitute a limitation to the apparatus 4 for the PDMS three-dimensional model to be used in the software, and may include more or less components than those shown, or combine some components, or different components, for example, the mobile terminal may further include an input-output device, a network access device, a bus, etc.
The processor 40 may be a central processing unit CPU, but may also be other general purpose processors, digital signal processors DSP, application specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the device 4 used by the PDMS three-dimensional model in software, such as a hard disk or a memory of the device 4 used by the PDMS three-dimensional model in software. The memory 41 may also be an external storage device of the device 4 used by the PDMS three-dimensional model in the software, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the device 4 used by the PDMS three-dimensional model in the software. Further, the memory 41 may also include both an internal storage unit and an external storage device of the apparatus 4 for using the PDMS three-dimensional model in software. The memory 41 is used for storing the computer program and other programs and data required by the mobile terminal. The memory 41 may also be used to temporarily store data that has been output or is to be output. It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.
Claims (9)
1. A method for using a PDMS three-dimensional model in software is characterized by comprising the following steps:
selecting a three-dimensional model to be embedded into preset software from the PDMS software, and converting the three-dimensional model into a three-dimensional model file in an STP format;
adopting Solidworks software to convert the three-dimensional model file in the STP format into a three-dimensional model file in an STL format and outputting the three-dimensional model file in the STL format;
writing a test code by adopting a Python programming language, calling VTK software to read the three-dimensional model file in the STL format, rendering a three-dimensional model in the three-dimensional model file in the STL format, and embedding the rendered three-dimensional model into preset software for use;
the preset software refers to preset software for importing a three-dimensional model selected from PDMS, and specifically is fatigue monitoring professional software or leakage monitoring professional software of a nuclear power plant.
2. The method of claim 1, wherein converting the STP formatted three-dimensional model file to an STL formatted three-dimensional model file using Solidworks software comprises:
inputting the three-dimensional model file in the STP format into Solidworks software;
and after receiving the three-dimensional model file in the STP format, the Solidworks software converts the three-dimensional model file in the STP format into a three-dimensional model file in an STL format.
3. The method of claim 1 or 2, wherein the outputting the STL formatted three-dimensional model file comprises:
and outputting the three-dimensional model file in the STL format in a binary form.
4. The method of claim 1, wherein converting the STP formatted three-dimensional model file to an STL formatted three-dimensional model file using Solidworks software comprises:
and when the Solidworks software export model attribute is set to be in the STL format, converting the three-dimensional model file in the STP format into the three-dimensional model file in the STL format.
5. An apparatus for use in software of a PDMS three-dimensional model, the apparatus comprising:
the conversion module is used for selecting a three-dimensional model to be embedded into preset software from the PDMS software and converting the three-dimensional model into a three-dimensional model file in an STP format;
the processing module is used for converting the STP format three-dimensional model file into an STL format three-dimensional model file by adopting Solidworks software and outputting the STL format three-dimensional model file;
the calling module is used for compiling a test code by adopting a Python programming language, calling VTK software to read the three-dimensional model file in the STL format, rendering a three-dimensional model in the three-dimensional model file in the STL format, and embedding the rendered three-dimensional model into preset software for use;
the preset software refers to preset software for importing a three-dimensional model selected from PDMS, and specifically is fatigue monitoring professional software or leakage monitoring professional software of a nuclear power plant.
6. The apparatus of claim 5, wherein the processing module comprises:
the input unit is used for inputting the three-dimensional model file in the STP format into Solidworks software;
and the conversion unit is used for converting the three-dimensional model file in the STP format into the three-dimensional model file in the STL format after the Solidworks software receives the three-dimensional model file in the STP format.
7. The apparatus of claim 6 or 5, wherein the processing module is specifically configured to:
outputting the three-dimensional model file in the STL format in a binary form;
the processing module is specifically configured to:
and when the Solidworks software export model attribute is set to be in the STL format, converting the three-dimensional model file in the STP format into the three-dimensional model file in the STL format.
8. An apparatus for use in software of a PDMS three-dimensional model, comprising a memory, a processor and a computer program stored in said memory and executable on said processor, characterized in that said processor implements the steps of the method according to any one of claims 1 to 4 when executing said computer program.
9. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710656332.9A CN107391872B (en) | 2017-08-03 | 2017-08-03 | Method and device for using PDMS three-dimensional model in software |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710656332.9A CN107391872B (en) | 2017-08-03 | 2017-08-03 | Method and device for using PDMS three-dimensional model in software |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107391872A CN107391872A (en) | 2017-11-24 |
CN107391872B true CN107391872B (en) | 2021-03-12 |
Family
ID=60343766
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710656332.9A Active CN107391872B (en) | 2017-08-03 | 2017-08-03 | Method and device for using PDMS three-dimensional model in software |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107391872B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108765538B (en) * | 2018-06-16 | 2022-03-22 | 桂林理工大学 | Method for hierarchical rendering of OSGB data based on CAD platform |
CN113361174B (en) * | 2021-06-17 | 2022-05-06 | 河北科技大学 | STP model-based large unmanned aerial vehicle collision probability calculation method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105117555A (en) * | 2015-09-06 | 2015-12-02 | 上海核工程研究设计院 | On-line browsing system of nuclear power three-dimensional design model |
CN105912655A (en) * | 2016-04-11 | 2016-08-31 | 东南大学 | WebGL-based three-dimensional model display method and corresponding Web-BIM engineering information integration management system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20050008886A (en) * | 2003-07-14 | 2005-01-24 | 두산중공업 주식회사 | Method for Transformation Auto CAD File to DPMS |
KR100786285B1 (en) * | 2007-05-21 | 2007-12-18 | 주식회사 테크서버 | The method to generate automatically from 3-dimensional data to 2-dimensional design, construction or installation drawing for plant engineering and shipbuilding |
-
2017
- 2017-08-03 CN CN201710656332.9A patent/CN107391872B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105117555A (en) * | 2015-09-06 | 2015-12-02 | 上海核工程研究设计院 | On-line browsing system of nuclear power three-dimensional design model |
CN105912655A (en) * | 2016-04-11 | 2016-08-31 | 东南大学 | WebGL-based three-dimensional model display method and corresponding Web-BIM engineering information integration management system |
Non-Patent Citations (2)
Title |
---|
Export 3D PDMS to STP File CAD;admin;《PDMSid》;20160514;第1-15页 * |
使用VTK与Python实现机械臂三维模型可视化;XXX已失联;《博客园》;20170302;第1-5页 * |
Also Published As
Publication number | Publication date |
---|---|
CN107391872A (en) | 2017-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3745256A1 (en) | External code integrations within a computing environment | |
CN101763447B (en) | Automatic data conversion method between three-dimensional modeling software and finite element analysis software | |
JP6601470B2 (en) | NATURAL LANGUAGE GENERATION METHOD, NATURAL LANGUAGE GENERATION DEVICE, AND ELECTRONIC DEVICE | |
CN108170425B (en) | Program code modification method and device and terminal equipment | |
CN113094770B (en) | Drawing generation method and device, computer equipment and storage medium | |
CN107391872B (en) | Method and device for using PDMS three-dimensional model in software | |
CN112558942A (en) | Operator registration method and related product | |
US10241767B2 (en) | Distributed function generation with shared structures | |
CN113705136A (en) | Integrated circuit automation logic synthesis system, method, device and medium | |
CN116301735B (en) | Method, device and storage medium for organizing software elements into software data links | |
CN111142871B (en) | Front-end page development system, method, equipment and medium | |
CN112506503A (en) | Programming method, device, terminal equipment and storage medium | |
US9383972B2 (en) | Methods and arrangements for processing and presentation of information | |
CN114092677B (en) | 3D model conversion optimization method, device and equipment | |
CN116070305A (en) | Digital twin modeling realization system, method and storage medium | |
CN110312990A (en) | Configuration method and system | |
Bocevska et al. | An example of application design using solidworks application programming interface | |
CN110222391A (en) | Electrical equipment drawing practice, system and terminal device | |
CN104423964A (en) | Method and system used for determining visualization credibility | |
EP4044111A1 (en) | Design assistance device, design assistance method, and design assistance program | |
Corre et al. | Fast template-based heterogeneous mpsoc synthesis on fpga | |
CN110879722B (en) | Method and device for generating logic schematic diagram and computer storage medium | |
CN113835688B (en) | Object packaging method of scientific computing language interpreter | |
CN112130841B (en) | SQL development method and device and terminal equipment | |
CN111177836A (en) | Method, system, medium and equipment for acquiring ocean engineering design data |
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 |