CN109684656B - Assembly constraint inheritance method based on SolidWorks - Google Patents

Assembly constraint inheritance method based on SolidWorks Download PDF

Info

Publication number
CN109684656B
CN109684656B CN201811312888.7A CN201811312888A CN109684656B CN 109684656 B CN109684656 B CN 109684656B CN 201811312888 A CN201811312888 A CN 201811312888A CN 109684656 B CN109684656 B CN 109684656B
Authority
CN
China
Prior art keywords
constraint
solidworks
model
sfx
dimensional model
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
CN201811312888.7A
Other languages
Chinese (zh)
Other versions
CN109684656A (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.)
Peak and Frequency Regulation Power Generation Co of China Southern Power Grid Co Ltd
Original Assignee
Peak and Frequency Regulation Power Generation Co of China Southern Power Grid 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 Peak and Frequency Regulation Power Generation Co of China Southern Power Grid Co Ltd filed Critical Peak and Frequency Regulation Power Generation Co of China Southern Power Grid Co Ltd
Priority to CN201811312888.7A priority Critical patent/CN109684656B/en
Publication of CN109684656A publication Critical patent/CN109684656A/en
Application granted granted Critical
Publication of CN109684656B publication Critical patent/CN109684656B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an assembly constraint inheritance method based on SolidWorks, which is characterized in that the constraint information of a model drawn in SolidWorks software is subjected to light weight processing, an API of a SolidWorks constraint module is directly called by using a secondary development interface of the SolidWorks software, the defined constraint information is obtained and stored in an sfx light weight format, and when the model is led into MakeReal3D software, the constraint information of the model can be obtained by analyzing an sfx light weight format file, so that the step of redefining the constraint information of the model in MakeReal3D is omitted, the labor intensity is greatly reduced, and the working efficiency is improved.

Description

Assembly constraint inheritance method based on SolidWorks
Technical Field
The invention belongs to the technical field of three-dimensional model assembly simulation, and particularly relates to an assembly constraint inheritance method based on SolidWorks.
Background
The realization of assembly constraint is one of important problems in the simulation of the virtual assembly process, and how to realize the definition of the constraint in the virtual assembly through a computer, how to correctly calculate the change of the spatial degree of freedom of the same part under the combined action of a plurality of constraints, how to adjust the spatial pose of the part under the constraint space, and the like are all the problems which need to be considered in the research of the assembly constraint problem in the virtual assembly and are also the core content in the research of the assembly constraint.
Because CAD engineers already define a large number of constraints in the Solidworks software, such as revolute pairs, sliding pairs, spherical hinges and the like, if the constraint definitions can be inherited in the process of locally importing the Solidworks model, the workload of redefining the constraints in the MakeReal3D software is greatly reduced, so that the labor intensity is greatly reduced, and the working efficiency is improved.
Traditional neutral data formats such as step, igs, obj, etc. are unable to hold constraint information defined in CAD, and few commercially available software are able to support the inheritance and transformation of CAD constraints. Therefore, it is necessary to develop a method capable of inheriting the SolidWorks assembly constraints, so that the SolidWorks model can inherit the constraint definitions in the process of local import, thereby reducing the labor intensity.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides an assembly constraint inheritance method based on SolidWorks, and the method is characterized in that when a model is drawn in SolidWorks, the constraint information of the model is subjected to lightweight processing, the constraint information is stored in an sfx lightweight format, and when the model is introduced into MakeReal3D software, the constraint information of the model is obtained by analyzing a lightweight format file, so that the step of redefining the constraint information of the model in MakeReal3D is omitted, the labor intensity is greatly reduced, and the working efficiency is improved.
In order to achieve the purpose, the invention adopts the technical scheme that:
an assembly constraint inheritance method based on SolidWorks comprises the following steps:
s1, creating a three-dimensional model by utilizing SolidWorks software, defining constraint information corresponding to the three-dimensional model, and carrying out lightweight processing on the three-dimensional model;
s2, directly calling the API of the SolidWorks constraint module by using the secondary development interface of the SolidWorks software;
s3, acquiring the constraint information of the defined three-dimensional model in SolidWorks through the API, firstly, defining the information format of sfx format, carrying out sfx formatting on the acquired three-dimensional model and the constraint information according to the analysis and explanation rules, reading the three-dimensional model and the constraint information through the agreed sfx format, and then storing the three-dimensional model and the constraint information as a model file of sfx format, wherein the stored model file of sfx format reserves the constraint information of the three-dimensional model;
s4, importing the sfx lightweight format file through MakeReal3D software, and analyzing the sfx lightweight format file to obtain the constraint information;
and S5, automatically creating constraints corresponding to the three-dimensional model in the MakeReal3D according to the constraint information, and obtaining the three-dimensional model with complete constraint information.
Specifically, in step S1, the method of performing the weight reduction processing on the constraint information specifically includes: when a parameterized model is drawn in SolidWorks software, firstly triangularizing the parameterized model in a reduction mode to obtain a renderable three-dimensional model; and then analyzing the three-dimensional model into OpenGL or DirectX for drawing, inheriting and exporting parameter characteristic information, and finally displaying on a screen.
Specifically, in step S3, the defined constraint information includes a parent object of the constraint, a child object, a constraint type, and a reference location of the constraint.
Further, in step S4, after importing the sfx lightweight format file into MakeReal3D, development needs to be performed through a secondary development interface of MakeReal3D, so that the sfx format data import format is increased.
Further, in step S4, after importing the sfx lightweight format file into MakeReal3D, the sfx format model file is analyzed based on the parameterized structure tree, points, lines, planes, assembly relationships, seats, measurements, and states to obtain the three-dimensional model that inherits the model constraint information.
Further, after the constraint information is obtained through analysis, the parameterized features are analyzed in depth, and the parameterized associated identification features are subjected to composite analysis, so that the obtained constraint information is ensured to be complete.
Compared with the prior art, the invention has the beneficial effects that: according to the method, the constraint information of the model drawn in the SolidWorks software is subjected to light weight processing, the API of the SolidWorks constraint module is directly called by using the secondary development interface of the SolidWorks software, the defined constraint information is obtained and stored in the sfx light weight format, and when the model is led into the MakeReal3D software, the constraint information of the model can be obtained by analyzing the sfx light weight format file, so that the step of redefining the model constraint information in the MakeReal3D is omitted, the labor intensity is greatly reduced, and the working efficiency is improved.
Drawings
FIG. 1 is a flow chart diagram of an assembly constraint inheritance method based on SolidWorks according to the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it is obvious that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Because the CAD digital prototype model of the power plant is modeled by Solidworks software, the model is more detailed, the data volume is very large, generally speaking, the CAD digital prototype model is a model file of a plurality of G, the number of triangular panels is as high as five to sixty thousand, and certain challenges are brought to virtual reality simulation software such as Makereal 3D. Model import or loading is the first step of virtual reality simulation, if the problem of data lightweight and import is not solved in this step, great workload is brought to subsequent programming development, rendering efficiency is also influenced, and customer experience is reduced. Therefore, the lightweight technology of the CAD model is particularly important in the project and is also a difficulty.
As shown in fig. 1, the present embodiment provides an assembly constraint inheritance method based on SolidWorks, which specifically includes the following steps:
s1, creating a three-dimensional model by utilizing SolidWorks software, defining constraint information corresponding to the three-dimensional model, and carrying out lightweight processing on the three-dimensional model;
s2, directly calling the API of the SolidWorks constraint module by using the secondary development interface of the SolidWorks software;
s3, acquiring the constraint information of the defined three-dimensional model in SolidWorks through the API, firstly, defining the information format of sfx format, carrying out sfx formatting on the acquired three-dimensional model and the constraint information according to the analysis and explanation rules, reading the three-dimensional model and the constraint information through the agreed sfx format, and then storing the three-dimensional model and the constraint information as a model file of sfx format, wherein the stored model file of sfx format reserves the constraint information of the three-dimensional model;
s4, importing the sfx lightweight format file through MakeReal3D software, and analyzing the sfx lightweight format file to obtain the constraint information;
and S5, automatically creating constraints corresponding to the three-dimensional model in the MakeReal3D according to the constraint information, and obtaining the three-dimensional model with complete constraint information.
Specifically, in step S1, the method of performing the weight reduction processing on the constraint information specifically includes: when a parameterized model is drawn in SolidWorks software, firstly triangularizing the parameterized model in a reduction mode to obtain a renderable three-dimensional model; and then analyzing the three-dimensional model into OpenGL or DirectX for drawing, inheriting and exporting parameter characteristic information, and finally displaying on a screen.
Further, triangularization of the parameterized model is specifically to convert the parameterized model into a triangular patch, in order to ensure the accuracy of analysis of the parameterized model, the parameterized shape is accurately converted into the triangular patch, and the parameterized data is not lost by means of the rendering function of the three-dimensional CAD software; the SolidWorks reduction mode has the advantages that the attribute information and the characteristic information of all models are contained when the models are opened, but the opening speed is very slow and about 50 minutes is needed; and after the file is opened, performing model format conversion by using an sfx converter, wherein the format of the final model file is a platform proprietary format.
Further, the triangle patch simplification algorithm of the model may adopt the following algorithm:
the first algorithm is to distribute a certain number of points on the original mesh, then to use the new vertex and old vertex to generate an intermediate mesh, finally to delete the old vertex in the intermediate mesh, and to perform local triangulation on the generated polygonal area to form a triangular mesh with the new point as the vertex. The new points are distributed by adopting a repulsive force algorithm, namely, the new points are randomly distributed at first, then repulsive force between the new points is calculated, and the new points are moved on the grid according to the repulsive force so as to be redistributed. The magnitude of the repulsive force is related to the distance between the new points, the curvature and the area of the triangle in which the new points are located.
The second algorithm searches coplanar or nearly coplanar patches on the initial mesh and merges them into a larger polygon, and then re-triangulates to fewer patches. Selecting a seed triangular surface, combining surrounding triangles into a larger surface according to a certain criterion, straightening the boundary, and triangularizing the boundary. The algorithm expands the near-plane merging algorithm through wired errors and more accurate local triangulation, and can perform automatic region segmentation when encountering polygons like holes and islands so as to generate a triangulated three-dimensional model without the holes and the islands.
Further, for the three-dimensional model obtained by the algorithm, the number of vertices of the three-dimensional model is compressed before further operation, namely triangular banding is carried out; in the three-dimensional model obtained by the algorithm, most of the triangular patches are separated, namely three vertexes represent a triangle; however, many triangles all have common edges, so that a basis is provided for triangle striping, N triangles are represented, 3N vertices need to be saved in a representation method using three vertices of each triangle, and only N +2 vertices need to be saved for representation in storage of the striped triangles, so that triangle patches of the model are greatly simplified.
Specifically, in step S3, the defined constraint information includes a parent object of the constraint, a child object, a constraint type, and a reference location of the constraint.
Further, in step S4, after importing the sfx lightweight format file into MakeReal3D, development needs to be performed through a secondary development interface of MakeReal3D, so that the sfx format data import format is increased.
Further, in step S4, after importing the sfx lightweight format file into MakeReal3D, the sfx format model file is analyzed based on the parameterized structure tree, points, lines, planes, assembly relationships, seats, measurements, and states to obtain the three-dimensional model that inherits the model constraint information.
Further, after the constraint information is obtained through analysis, the parameterized features are analyzed in depth, and the parameterized associated identification features are subjected to composite analysis, so that the obtained constraint information is ensured to be complete.
The MakeReal3D three-dimensional model local import supports mainstream CAD parameterized simulation model import (including CATIA V5 and other software output formats). After the model is imported, the integrity and the effectiveness of data in the conversion process can be ensured; and information such as a structure tree, geometric information, material information, assembly relation, assembly position and the like in the digital-analog is completely reserved in the data importing process.
The MakeReal3D platform can be well compatible with Solidworks model data, a Solidworks model file is generated into a model sfx file format in a local import mode and then is imported into a platform scene, characteristics and attribute information of the model can be reserved, and cognition of the equipment model is facilitated during roaming browsing.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (6)

1. An assembly constraint inheritance method based on SolidWorks is characterized by comprising the following steps:
s1, creating a three-dimensional model by utilizing SolidWorks software, defining constraint information corresponding to the three-dimensional model, and carrying out lightweight processing on the three-dimensional model;
s2, directly calling the API of the SolidWorks constraint module by using the secondary development interface of the SolidWorks software;
s3, acquiring the constraint information of the defined three-dimensional model in SolidWorks through the API, firstly, defining the information format of sfx format, carrying out sfx formatting on the acquired three-dimensional model and the constraint information according to the analysis and explanation rules, reading the three-dimensional model and the constraint information through the agreed sfx format, and then storing the three-dimensional model and the constraint information as a model file of sfx format, wherein the stored model file of sfx format reserves the constraint information of the three-dimensional model;
s4, importing the sfx lightweight format file through MakeReal3D software, and analyzing the sfx lightweight format file to obtain the constraint information;
and S5, automatically creating constraints corresponding to the three-dimensional model in the MakeReal3D according to the constraint information, and obtaining the three-dimensional model with complete constraint information.
2. The assembly constraint inheritance method based on SolidWorks as claimed in claim 1, wherein in step S1, the method for performing weight reduction processing on the three-dimensional model specifically comprises: when a parameterized model is drawn in SolidWorks software, firstly triangularizing the parameterized model in a reduction mode to obtain a renderable three-dimensional model; and then analyzing the three-dimensional model into OpenGL or DirectX for drawing, inheriting and exporting parameter characteristic information, and finally displaying on a screen.
3. The SolidWorks-based assembly constraint inheritance method according to claim 1, wherein the defined constraint information comprises a parent object, a child object, a constraint type and a reference position of the constraint in step S3.
4. The assembly constraint inheritance method based on SolidWorks as claimed in claim 1, wherein in step S4, after the sfx lightweight format file is imported into MakeReal3D, development needs to be performed through a secondary development interface of MakeReal3D, so as to increase the sfx format data import format.
5. The assembly constraint inheritance method based on SolidWorks as claimed in claim 1, wherein in step S4, after the sfx lightweight format file is imported into MakeReal3D, the sfx format model file is analyzed based on parameterized structure tree, point, line, plane, assembly relationship, sitting, measurement and state to obtain the three-dimensional model inheriting the model constraint information.
6. The assembly constraint inheritance method based on SolidWorks as claimed in claim 1, wherein after the constraint information is obtained by parsing, the parameterized features are analyzed through a deep analysis model, and the parameterized associated identification features are subjected to composite analysis to ensure that the obtained constraint information is complete.
CN201811312888.7A 2018-11-06 2018-11-06 Assembly constraint inheritance method based on SolidWorks Active CN109684656B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811312888.7A CN109684656B (en) 2018-11-06 2018-11-06 Assembly constraint inheritance method based on SolidWorks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811312888.7A CN109684656B (en) 2018-11-06 2018-11-06 Assembly constraint inheritance method based on SolidWorks

Publications (2)

Publication Number Publication Date
CN109684656A CN109684656A (en) 2019-04-26
CN109684656B true CN109684656B (en) 2020-12-25

Family

ID=66185296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811312888.7A Active CN109684656B (en) 2018-11-06 2018-11-06 Assembly constraint inheritance method based on SolidWorks

Country Status (1)

Country Link
CN (1) CN109684656B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111783272B (en) * 2020-05-21 2023-11-14 中国电子科技集团公司第十四研究所 Simplifying method for complex large electromechanical hybrid three-dimensional model
CN112684717A (en) * 2020-12-08 2021-04-20 南京理工大学 Construction method of virtual-real combined digital twin simulation experiment platform

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020400A (en) * 2013-01-05 2013-04-03 桂林电子科技大学 Module division method based on complex network edge betweennesses
CN105005642A (en) * 2015-06-25 2015-10-28 北京航空航天大学 Three-dimensional model batch format conversion and weight reduction method
CN105447253A (en) * 2015-11-27 2016-03-30 中国电子科技集团公司第三十八研究所 Integration method of three-dimensional process data
CN105741351A (en) * 2016-03-10 2016-07-06 李冀辉 Method for importing SolidWorks large assembly body three-dimension model into Aurora3DPresentation software
KR101838717B1 (en) * 2017-11-16 2018-03-14 캐드젠 주식회사 Method and apparatus for implementing providing work assist service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020400A (en) * 2013-01-05 2013-04-03 桂林电子科技大学 Module division method based on complex network edge betweennesses
CN105005642A (en) * 2015-06-25 2015-10-28 北京航空航天大学 Three-dimensional model batch format conversion and weight reduction method
CN105447253A (en) * 2015-11-27 2016-03-30 中国电子科技集团公司第三十八研究所 Integration method of three-dimensional process data
CN105741351A (en) * 2016-03-10 2016-07-06 李冀辉 Method for importing SolidWorks large assembly body three-dimension model into Aurora3DPresentation software
KR101838717B1 (en) * 2017-11-16 2018-03-14 캐드젠 주식회사 Method and apparatus for implementing providing work assist service

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于装配约束识别与提取技术的装配件变型设计方法;何桂华 等;《2011 年机械电子学学术会议论文集》;20110930;第227-231页 *

Also Published As

Publication number Publication date
CN109684656A (en) 2019-04-26

Similar Documents

Publication Publication Date Title
Wang et al. Lidar point clouds to 3-D urban models $: $ A review
KR101546703B1 (en) System for processing massive bim data of building
CN101512633B (en) A hair motion compositor system and optimization techniques for use in a hair/fur pipeline
CN104346769A (en) Lossless compression of a 3D mesh including transforming of the mesh to an image
CN102203781A (en) System and method for hybrid solid and surface modeling for computer-aided design environments
CN107464286B (en) Method, device, equipment and readable medium for repairing holes in three-dimensional city model
CN105761303A (en) Creation Of Bounding Boxes On 3d Modeled Assembly
CN113158288A (en) Information model geometric lightweight method based on component reuse and reassembly
CN107273543B (en) DGN data format conversion method
KR20140142470A (en) Method for generating a tree model and a forest model and apparatus for the same
CN113538706B (en) Digital sand table-based house scene display method, device, equipment and storage medium
CN113724401B (en) Three-dimensional model cutting method and device, computer equipment and storage medium
CN111028335B (en) Point cloud data block surface patch reconstruction method based on deep learning
CN105205861A (en) Tree three-dimensional visualization model realization method based on Sphere-Board
CN105760570A (en) Viewpoint selection in the redering of a set of objects
CN109684656B (en) Assembly constraint inheritance method based on SolidWorks
CN109858059B (en) Application method of virtual reality technology based on CAD (computer-aided design) super-large model in hydropower station simulation
US10943037B2 (en) Generating a CAD model from a finite element mesh
CN115659445A (en) Method for rendering and displaying CAD model on webpage in lightweight mode based on Open Cascade
JP2002324251A (en) Method for editing graphics object
CN112818450B (en) BIM (building information modeling) model organization method based on block index
CN114169055A (en) Method and system for lightening BIM (building information modeling) model
CN113888701A (en) Method and system for converting curved surface 3D model into mesh 3D model in Obj format
CN113392348A (en) BIM-based tunnel main body structural steel IFC2x3 data visualization method
JP2021111376A (en) 3d modelled object of physical prototype of product

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
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20190426

Assignee: China Southern power grid peak shaving and frequency modulation (Guangdong) energy storage technology Co.,Ltd.

Assignor: China Southern Power Grid Energy Storage Co.,Ltd.

Contract record no.: X2023980042321

Denomination of invention: A SolidWorks based Assembly Constraint Inheritance Method

Granted publication date: 20201225

License type: Common License

Record date: 20230922