CN113535159A - Ruby language-based bidirectional parameterized modeling method for factory facilities - Google Patents

Ruby language-based bidirectional parameterized modeling method for factory facilities Download PDF

Info

Publication number
CN113535159A
CN113535159A CN202110817598.3A CN202110817598A CN113535159A CN 113535159 A CN113535159 A CN 113535159A CN 202110817598 A CN202110817598 A CN 202110817598A CN 113535159 A CN113535159 A CN 113535159A
Authority
CN
China
Prior art keywords
modeling
model
script
control
reverse
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110817598.3A
Other languages
Chinese (zh)
Inventor
胡世南
丁炜杰
黄震宇
孙露
华帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Shipbuilding NDRI Engineering Co Ltd
Original Assignee
China Shipbuilding NDRI Engineering 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 China Shipbuilding NDRI Engineering Co Ltd filed Critical China Shipbuilding NDRI Engineering Co Ltd
Priority to CN202110817598.3A priority Critical patent/CN113535159A/en
Publication of CN113535159A publication Critical patent/CN113535159A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • G06F8/355Round-trip engineering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a ruby language-based bidirectional parameterized modeling method for factory facilities, which is characterized in that ruby language is used for carrying out bidirectional parameterized modeling of forward creation and reverse modification of the factory facilities on SketchUp software, and forward creation of the factory facilities uses a forward modeling control and a forward modeling script to complete parameterized creation of a model; and in the reverse modification of the plant facility, the reverse modeling control reads the parameters attached to the model to be modified, and calls a corresponding reverse modeling script to create a new model so as to realize the parameterized modification of the model. Compared with the prior art, the method has the advantages of quickly establishing a plant facility model, quickly modifying the model by changing parameters, reducing the response speed of design change, reducing repeated labor and better solving the problem that most SketchUp plug-ins can only carry out unidirectional parametric modeling of plant facilities.

Description

Ruby language-based bidirectional parameterized modeling method for factory facilities
Technical Field
The invention relates to the technical field of engineering design software development, in particular to a ruby language-based bidirectional parameterized modeling method for factory facilities.
Background
Two types of parametric modeling are generally adopted, one type is bidirectional parametric modeling, namely, a new construction of an engineering model is realized by editing parameters, and the created model can be repeatedly modified by modifying the parameters; the other is unidirectional parametric modeling, namely, the newly built model is intelligently realized by editing parameters, and the built model is only a three-dimensional graphic element and cannot be modified in a parametric mode. The parameterized design is a design process of writing the engineering itself into functions and processes, modifying initial conditions and obtaining engineering results by a computer. In engineering and mechanical design, parameters store all information of a three-dimensional computer model of a building and equipment, and a designer can create the three-dimensional model by editing the parameters. Sketch Up (architecture Sketch master) is a 3D architecture design software which is popular with designers and easy to use, and is the most popular three-dimensional design software in the design stage of the architecture scheme.
At present, SketchUp plug-in units commonly used in civil engineering industry mainly create curved surface and shape models in a parameterization mode, and lack the capability of creating industrial factory building facilities such as steel structure columns, crane beams and the like, and equipment models such as cranes, cutting machines and the like in a parameterization method. Furthermore, most of these plug-ins are only capable of unidirectional parametric modeling. In the design stage of the industrial plant scheme, the plant and equipment models are frequently changed, and the plug-in capable of performing bidirectional parametric modeling is obviously superior to the plug-in capable of performing unidirectional parametric modeling.
Disclosure of Invention
The invention aims to design a bidirectional parameterized modeling method of factory facilities based on a Ruby language aiming at the defects of the prior art, which adopts the Ruby language to realize bidirectional parameterized modeling of forward creation and reverse modification of industrial factory building facilities (including factory buildings, equipment and the like) and plug-in programs of displacement and copy of a model on SketchUp software, thereby improving the response speed of a scheme design stage to design change and reducing repeated labor, the bidirectional parameterized modeling method is simple, low in cost, safe and reliable, not only can quickly realize the creation of the factory building facility model through a parameter input mode, but also can quickly realize the modification of the model through a parameter change mode, and can still have the parameterized modification capability after the model is moved or copied, and a Ruby Application Programming Interface (API) is left by fully utilizing the Sketch Up, through Ruby programming, secondary development of the plug-in is carried out on the SketchUp, the function of the SketchUp is expanded, and the problem that most plug-ins can only carry out unidirectional parametric modeling is solved.
The purpose of the invention is realized as follows: a bidirectional parameterized modeling method for factory facilities based on a ruby language is characterized in that the ruby language is used for carrying out bidirectional parameterized modeling of forward creation and reverse modification of the factory facilities on SketchUp software and plug-in programs of displacement and copy of models of the bidirectional parameterized modeling, and the plug-in programs of the bidirectional parameterized modeling comprise: the system comprises five parts of program contents, namely a forward modeling control, a forward modeling script, a reverse modeling control, a reverse modeling script and a displacement and copy control; the forward building of the plant facilities uses a forward modeling control and a forward modeling script to complete the parameterization building of a model, and adds a control parameter input during modeling and the positioning point coordinates of the model to the model; in the reverse modification of the plant facility, the reverse modeling control reads the parameters attached to the model to be modified, calls a corresponding reverse modeling script to create a new model, attaches the new control parameters and the positioning point coordinates of the model to the new model, and deletes the old model to realize the parameterized modification of the model; and the displacement and copy of the model realize the displacement and copy of the selected model by using a displacement and copy control, and the new positioning point coordinates are attached to the moved or copied model.
The quantity of the forward modeling control, the forward modeling script and the reverse modeling script is consistent with the quantity of types of equipment or members which can be created, the forward modeling control and the forward modeling script of the same equipment or member are in a calling and called relation, and the forward modeling script is called by the forward modeling control to carry out parametric modeling.
The reverse modeling script and the forward modeling script are in a mirror image relationship.
Compared with the prior art, the method has the advantages of quickly establishing a plant facility model, quickly modifying the model by changing parameters, reducing the response speed of design change, reducing repeated labor, having simple modeling method, low cost, safety and reliability, still having the capability of being modified in a parameterization mode after the model is moved or copied, fully utilizing the Ruby Application Programming Interface (API) reserved in the Sketch Up, expanding the function of the Sketch Up and better solving the problem that most of plug-ins can only carry out unidirectional parameterization modeling.
Drawings
FIG. 1 is a software architecture diagram of a bi-directional parameterized modeling plug-in;
FIG. 2 is a diagram of a positioning function of a forward modeling control;
FIG. 3 is a diagram of a parameterized modeling function for forward modeling scripts;
FIG. 4 is a schematic diagram of an inverse parameterization model modification process;
FIG. 5 is a flowchart illustrating the operation of the displacement and copy control.
Detailed Description
The present invention will be described in further detail with reference to the following drawings and detailed description.
Example 1
The invention uses ruby language to carry out bidirectional parameterization modeling of forward creation and reverse modification of factory facilities on SketchUp software, and plug-in programs of displacement and copy of the model, and the specific bidirectional parameterization modeling process is as follows:
software architecture of bi-directional parameterized modeling plug-in
Referring to the attached figure 1, a plug-in program for bidirectional parametric modeling of a plant facility is developed by using a ruby language on the basis of SketchUp software, and the plug-in program consists of five parts, namely a forward modeling control, a forward modeling script, a reverse modeling control, a reverse modeling script and a displacement and copy control. The device comprises a plurality of forward modeling controls, a plurality of forward modeling scripts and a plurality of reverse modeling scripts, wherein each forward modeling control, each forward modeling script and each reverse modeling script corresponds to one type of equipment or component. The forward modeling control and the forward modeling script corresponding to the same equipment or component are in calling and called relation, and the forward modeling script is called by the forward modeling control to carry out parametric modeling; the reverse modeling script and the forward modeling script are in a mirror relationship, namely the reverse modeling script and the forward modeling script are completely the same as each other in terms of statement codes for controlling model generation, and the difference is that the forward modeling script of the same equipment or component can only be called by a corresponding forward modeling control; and all reverse modeling scripts can be invoked by the same reverse modeling control.
(II) construction of plant facility model
Referring to fig. 2, when a plant facility model is newly built, a forward modeling control is clicked first, and two points are positioned for the model in a model space. The forward modeling control opens a parameter entry interface.
Referring to fig. 3, the forward modeling control opens a parameter input interface, inputs parameters in the parameter input interface, calls a forward modeling script corresponding to the forward modeling control, and transmits the input parameters and the two-point positioning coordinates to the forward modeling script. The forward modeling script completes the creation of the model according to the input modeling parameters and positions the model at the position determined by the two points AB. Finally, the forward modeling script writes the model attribute information, the modeling parameters and the AB point coordinates on the newly created model respectively, so that the forward creation process of the model is completed.
(III) reverse parameterization modification of model
Referring to fig. 4, if the model needs to be modified in a reverse parameterization manner, the model to be modified is selected first, and a reverse modeling control is clicked. The reverse modeling control can sequentially read the model attribute information, the modeling parameters and the positioning AB point coordinate data which are added on the model, call the corresponding reverse modeling script according to the content of the model attribute information and then transmit the modeling parameters and the AB point coordinate data of the model to the reverse modeling control. The reverse modeling script reads the modeling parameters and the AB point coordinate data, generates a model parameter modification dialog box, modifies the related modeling parameters in the dialog box, clicks 'determination', creates a new model according to the modified parameters, writes the new modeling parameters and the AB point coordinate data onto the new model, and automatically deletes the old model to complete the reverse parameterization modification of the model.
(IV) moving or copying array of models
Referring to FIG. 5, if an array of moves or copies of a model is desired, the model to be modified is first selected, the displacement and copy control is clicked on, and the distance to move and the number to copy are entered in an open dialog box. The control copies and moves the model according to the input data, converts the displacement data into a correction value of the AB point coordinate attached to the model, and finishes correction of the AB point coordinate attached to the moved model.
According to the description of the step (three), if the parameterized model is moved by using the self-contained displacement command of SketchUp, the coordinate value of the AB point attached to the model is not changed, and if the moved model is parameterized and modified, the newly-built model is still positioned at the position before movement according to the original coordinate of the AB point. Therefore, the displacement and the control copying function are used for synchronously modifying the coordinates of the AB points on the model in the process of moving the model, and the position of the model after being modified in a parameterization mode is not disordered.
The invention can quickly realize the establishment of the plant facility model by inputting parameters, can also quickly realize the modification of the model by changing the parameters, and can still have the capability of being parameterized and modified after the model is moved or copied, thereby greatly improving the response speed of the scheme design stage to the design change and reducing the repeated labor.
The invention has been described in further detail in order to avoid limiting the scope of the invention, and it is intended that all such equivalent embodiments be included within the scope of the following claims.

Claims (3)

1. A bidirectional parameterized modeling method of factory facilities based on ruby language is characterized in that ruby language is used for carrying out bidirectional parameterized modeling of forward creation and reverse modification of factory facilities on SketchUp software and plug-in programs of displacement and copy of models of the bidirectional parameterized modeling, wherein the plug-in programs of the bidirectional parameterized modeling comprise a forward modeling control, a forward modeling script, a reverse modeling control, a reverse modeling script and a displacement and copy control; the forward building of the plant facilities uses a forward modeling control and a forward modeling script to complete the parameterization building of a model, and adds a control parameter input during modeling and the positioning point coordinates of the model to the model; in the reverse modification of the plant facility, the reverse modeling control reads the parameters attached to the model to be modified, calls a corresponding reverse modeling script to create a new model, attaches the new control parameters and the positioning point coordinates of the model to the new model, and deletes the old model to realize the parameterized modification of the model; the displacement and copy of the model realize the displacement and copy of the selected model by using a displacement and copy control, and the new positioning point coordinates are attached to the moved or copied model; and the displacement and copy control moves or copies the parameterized and created model and attaches the coordinates of the new positioning point to the moved or copied model.
2. The ruby language-based bi-directional parametric modeling method for plant facilities according to claim 1, wherein the number of the forward modeling control, the forward modeling script and the reverse modeling script is consistent with the number of types of devices or components that can be created, the forward modeling control and the forward modeling script of the same device or component are in a calling and called relationship, and the forward modeling script is called by the forward modeling control for parametric modeling.
3. The ruby language-based bi-directional parametric modeling method for plant facilities according to claim 1 or claim 2, wherein the reverse modeling script is in a mirror relationship with the forward modeling script.
CN202110817598.3A 2021-07-20 2021-07-20 Ruby language-based bidirectional parameterized modeling method for factory facilities Pending CN113535159A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110817598.3A CN113535159A (en) 2021-07-20 2021-07-20 Ruby language-based bidirectional parameterized modeling method for factory facilities

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110817598.3A CN113535159A (en) 2021-07-20 2021-07-20 Ruby language-based bidirectional parameterized modeling method for factory facilities

Publications (1)

Publication Number Publication Date
CN113535159A true CN113535159A (en) 2021-10-22

Family

ID=78128880

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110817598.3A Pending CN113535159A (en) 2021-07-20 2021-07-20 Ruby language-based bidirectional parameterized modeling method for factory facilities

Country Status (1)

Country Link
CN (1) CN113535159A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080189675A1 (en) * 2006-10-16 2008-08-07 International Business Machines Corporation Method and system for providing tooling instructions through parameterization as an aid for software application development
FR3022659A1 (en) * 2014-06-24 2015-12-25 Intersyntax RELATIVE COPY-GLUE METHOD
CN107729703A (en) * 2017-11-27 2018-02-23 中船第九设计研究院工程有限公司 One kind is based on " Sketch Up " the factory building process design methods of " Ruby " language
CN110362887A (en) * 2019-06-27 2019-10-22 中铁四局集团有限公司 A kind of fast modeling method based on Revit
CN110717214A (en) * 2019-10-18 2020-01-21 中交 (天津) 生态环保设计研究院有限公司 Dredging engineering building parameterized modeling method based on graphical programming
CN111324965A (en) * 2020-03-04 2020-06-23 杭州群核信息技术有限公司 Cloud-based universal parameterized model analysis method and design system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080189675A1 (en) * 2006-10-16 2008-08-07 International Business Machines Corporation Method and system for providing tooling instructions through parameterization as an aid for software application development
FR3022659A1 (en) * 2014-06-24 2015-12-25 Intersyntax RELATIVE COPY-GLUE METHOD
CN107729703A (en) * 2017-11-27 2018-02-23 中船第九设计研究院工程有限公司 One kind is based on " Sketch Up " the factory building process design methods of " Ruby " language
CN110362887A (en) * 2019-06-27 2019-10-22 中铁四局集团有限公司 A kind of fast modeling method based on Revit
CN110717214A (en) * 2019-10-18 2020-01-21 中交 (天津) 生态环保设计研究院有限公司 Dredging engineering building parameterized modeling method based on graphical programming
CN111324965A (en) * 2020-03-04 2020-06-23 杭州群核信息技术有限公司 Cloud-based universal parameterized model analysis method and design system

Similar Documents

Publication Publication Date Title
CN104965947B (en) A kind of bridge three-dimensional design method based on BIM technology
EP3719752B1 (en) Generating animation rigs using scriptable reference modules
CN107229790B (en) Bridge structure information model system for generating three-dimensional and two-dimensional graphs and using method
JP6441262B2 (en) Machining program editing apparatus, method, and editing program
CN102637016A (en) A machine tool control process and apparatus therefor
CN106737676A (en) It is a kind of based on script can secondary development industrial robot programing system
CN103678737A (en) Lever system virtual assembly method
CN108875167A (en) A kind of construction site three dimensional arrangement optimization method based on BIM technology
CN113836702A (en) Robot teaching programming method and robot teaching programming device
CN113535159A (en) Ruby language-based bidirectional parameterized modeling method for factory facilities
US9639992B2 (en) Methods and systems for multilevel editing of subdivided polygonal data
CN113297764A (en) Finite element parametric model modeling method, system and storage medium
US20030160779A1 (en) Method and apparatus for managing solid model feature history and changes
CN105138758A (en) Finite element parametric analysis system and analysis method based on database
Li et al. Research on Design Program of Buffer Valve based on Python
CN106055329A (en) MATLAB and HFSS interface control method
JP2003288113A (en) Simulation method of equipment and simulation program of equipment
Hsu et al. The development of the intuitive teaching-based design method for robot-assisted fabrication applied to bricklaying design and construction
CN107908813B (en) Urban planning digital terrain parameterization processing method based on ObjectARX
CN113626904A (en) Three-dimensional process commander layout method for automobile industry factory building
CN112365776A (en) Method for simulating oil flow in hydraulic circuit pipeline based on Unity
JPH01191233A (en) Automatic program generating system
CN113050924A (en) Planbar-based prefabricated part generation method
CN117634087A (en) Parameterized modeling method, system, equipment and medium for spring damping system
CN117494250A (en) CAD drawing-based hull toggle plate parameterization drawing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20211022