CN109684656A - A kind of assembly constraint inheritance method based on SolidWorks - Google Patents

A kind of assembly constraint inheritance method based on SolidWorks Download PDF

Info

Publication number
CN109684656A
CN109684656A CN201811312888.7A CN201811312888A CN109684656A CN 109684656 A CN109684656 A CN 109684656A CN 201811312888 A CN201811312888 A CN 201811312888A CN 109684656 A CN109684656 A CN 109684656A
Authority
CN
China
Prior art keywords
constraint
model
solidworks
sfx
format
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.)
Granted
Application number
CN201811312888.7A
Other languages
Chinese (zh)
Other versions
CN109684656B (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

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 present invention discloses a kind of assembly constraint inheritance method based on SolidWorks, the present invention carries out light-weight technologg by the constraint information to the model drawn in SolidWorks software, and the API of Solidworks constraints module is called directly using the second development interface of SolidWorks software, get defined good constraint information, and it is saved in sfx lightweight format, when model is imported MakeReal 3D software, by parsing sfx lightweight formatted file, the constraint information of model can be obtained, to eliminate the step of redefining model constraint information in MakeReal 3D, significantly reduce labor intensity, it improves work efficiency.

Description

A kind of assembly constraint inheritance method based on SolidWorks
Technical field
The invention belongs to threedimensional model assembly simulation technical field, specifically a kind of assembly constraint based on SolidWorks Inheritance method.
Background technique
The realization of assembly constraint is one of the major issue in Virtual assemble process simulation, how to be realized by computer empty How the definition constrained in quasi- assembly, be computed correctly same components its spatial degrees of freedom under the collective effect of multiple constraints How variation carries out the adjustment etc. of spatial pose to components under constraint space, is all in Virtual assemble to assembly constraint Core content in the problem of research institute of problem must be taken into consideration and assembly constraint research.
Since CAD engineer defines a large amount of constraint in Solidworks software, as revolute, sliding pair, Flexural pivot etc., if these constraint definitions can be inherited during Solidworks model locally imports, this will be can be greatly reduced The workload of these constraints is redefined in MakeReal3D software, to substantially reduce labor intensity, improves working efficiency.
Traditional neutral-data format such as step, igs, obj etc. are cannot to save constraint information defined in CAD, also very The succession and conversion that rare business software can support CAD to constrain.Therefore, SolidWorks dress can be inherited by needing to develop one kind Method with constraint, so that SolidWorks model can inherit these constraint definitions during locally importing, to reduce Labor intensity.
Summary of the invention
In response to the problems existing in the prior art, the purpose of the present invention is to provide a kind of assembly constraints based on SolidWorks Inheritance method, the present invention is by when rendering model, doing light-weight technologg to the constraint information of model, and will in SolidWorks The constraint information is stored in sfx lightweight format, when model is imported MakeReal 3D software, by parsing lightweight Formatted file obtains the constraint information of model, to eliminate the step for redefining model constraint information in MakeReal 3D Suddenly, labor intensity is significantly reduced, is improved work efficiency.
To achieve the above object, the technical solution adopted by the present invention is that:
A kind of assembly constraint inheritance method based on SolidWorks, comprising the following steps:
S1 creates threedimensional model using SolidWorks software, defines constraint information corresponding with threedimensional model, and to institute It states threedimensional model and does light-weight technologg;
S2 is connect using the API that the second development interface of SolidWorks software calls directly SolidWorks constraints module Mouthful;
S3 is obtained the constraint information of the defined good threedimensional model in SolidWorks by the api interface, appointed The information format for determining sfx format, the threedimensional model and constraint information that will acquire according to parsing and interpretative rule carry out sfx format Change, the model file of sfx format is saved as after reading by the sfx format of agreement, the model file of the sfx format of preservation retains The constraint information of threedimensional model;
S4 imports the sfx lightweight formatted file by MakeReal 3D software, by parsing the sfx lightweight Formatted file obtains the constraint information;
S5 automatically creates constraint corresponding with the threedimensional model according to the constraint information in MakeReal 3D, Obtain the threedimensional model for having holonomic constriants information.
Specifically, in step S1, to the method for constraint information progress light-weight technologg specifically: in SolidWorks In software when rendering parameter model, by the model trigonometric ratio of parametrization first under reduction-mode, the three-dimensional that can be rendered is obtained Model;Then the threedimensional model is parsed into OpenGL or DirectX and is drawn, while inherited parameter characteristic information is simultaneously Export, finally shows on the screen.
Specifically, in step S3, the defined good constraint information includes the parent object, subobject, constraint class of constraint The reference position of type and constraint.
Further, it in step S4, after sfx lightweight formatted file is imported MakeReal 3D, needs to pass through The second development interface of MakeReal 3D is developed, and the data import format of sfx format is increased.
It further,, will also be to sfx format after sfx lightweight formatted file is imported MakeReal 3D in step S4 Structure tree of the model file based on parametrization, point, line, surface, assembly relation, seat, measurement, state parsed, inherited The threedimensional model of model constraint information.
Further, after parsing obtains the constraint information, by the feature of parametrization described in deep analysis, and to described Multiple association identification features of parametrization carry out compound parsing, are complete with the constraint information ensured.
Compared with prior art, the beneficial effects of the present invention are: the present invention is by drawing in SolidWorks software The constraint information of model carries out light-weight technologg, and is called directly using the second development interface of SolidWorks software The API of Solidworks constraints module gets defined good constraint information, and is saved in sfx lightweight format, is inciting somebody to action When model imports MakeReal 3D software, by parsing sfx lightweight formatted file, the constraint information of model can be obtained, from And the step of model constraint information is redefined in MakeReal 3D is eliminated, labor intensity is significantly reduced, is improved Working efficiency.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of the assembly constraint inheritance method based on SolidWorks of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the present invention, technical solution of the present invention is clearly and completely described, it is clear that Described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on the implementation in the present invention Example, those of ordinary skill in the art's all other embodiment obtained under the conditions of not making creative work belong to The scope of protection of the invention.
Since the CAD digital prototype model of power plant is using Solidworks software modeling, and model is more detailed, number It is very big according to measuring, it is all usually the model file of several G, gore the piece number is up to five, 60,000,000, this gives The virtual reality emulation software of MakeReal3D etc brings certain challenge.Model imports or load is virtual reality emulation The first step will be brought greatly to subsequent programming development if this step does not solve the problems, such as data lightweight and imports Workload, and influence whether rendering efficiency, reduce customer experience.So the Lightweight Technology of CAD model is in this project It is particularly important, while being also a difficult point.
As shown in Figure 1, a kind of assembly constraint inheritance method based on SolidWorks is present embodiments provided, this method tool Body the following steps are included:
S1 creates threedimensional model using SolidWorks software, defines constraint information corresponding with threedimensional model, and to institute It states threedimensional model and does light-weight technologg;
S2 is connect using the API that the second development interface of SolidWorks software calls directly SolidWorks constraints module Mouthful;
S3 is obtained the constraint information of the defined good threedimensional model in SolidWorks by the api interface, appointed The information format for determining sfx format, the threedimensional model and constraint information that will acquire according to parsing and interpretative rule carry out sfx format Change, the model file of sfx format is saved as after reading by the sfx format of agreement, the model file of the sfx format of preservation retains The constraint information of threedimensional model;
S4 imports the sfx lightweight formatted file by MakeReal 3D software, by parsing the sfx lightweight Formatted file obtains the constraint information;
S5 automatically creates constraint corresponding with the threedimensional model according to the constraint information in MakeReal 3D, Obtain the threedimensional model for having holonomic constriants information.
Specifically, in step S1, to the method for constraint information progress light-weight technologg specifically: in SolidWorks In software when rendering parameter model, by the model trigonometric ratio of parametrization first under reduction-mode, the three-dimensional that can be rendered is obtained Model;Then the threedimensional model is parsed into OpenGL or DirectX and is drawn, while inherited parameter characteristic information is simultaneously Export, finally shows on the screen.
It further, is specifically that parameterized model is converted into triangle surface by the model trigonometric ratio of parametrization, in order to Ensure the accuracy parsed to parameterized model, parametric modeling is accurately transformed into triangle surface, needs by three-dimensional The rendering function of CAD software itself come guarantee parametrization data do not lose;The advantages of SolidWorks reduction-mode is to open The attribute information and characteristic information of all models are contained when model, but therefore opening speed is very slow, take around 50 minutes left sides It is right;After opening, model format conversion is carried out with sfx converter, final mask file format is platform proprietary format .sfx File.
Further, the triangle surface of the model, which simplifies algorithm, can be used following algorithm:
A certain number of points are first distributed on original grid by the first algorithm, then raw using new summit and old vertex At an intermediate mesh, the old vertex in intermediate mesh is finally deleted, and local triangle is carried out to the polygonal region of generation, It is formed newly to put the triangular mesh for vertex.Wherein divide and sets up the new one using repulsive force algorithm, the i.e. new point of first random distribution, then Calculate the repulsive force between new point, according to repulsive force on grid these mobile new points, redistribute them.Repulsive force it is big The curvature and area of small triangle the distance between with new point, where new point are related.
Second algorithm, searched on initial mesh coplanar or approximate coplanar dough sheet be merged into it is one bigger more Side shape, then trigonometric ratio obtains less dough sheet again.A seed triangular facet is selected, according to certain criterion by the three of surrounding It is angular to merge into a bigger face, then boundary is straightened, then trigonometric ratio is carried out to it.Algorithm passes through wired error and more smart True local triangle extends hither plane and merges algorithm, and is able to carry out automatically when encountering the polygon in similar hole, island Region segmentation, with generate without hole, island trigonometric ratio threedimensional model.
Further, the threedimensional model obtained for above-mentioned algorithm, will be to its number of vertex before further operation Mesh is compressed, i.e. triangle strip;In the threedimensional model that above-mentioned algorithm obtains, triangle surface is each separated mostly , i.e. three vertex indicate a triangle;However wherein many triangles all have public side, are thus triangle Striping provide the foundation, indicate N number of triangle, need to save 3N using the representation method on each Atria vertex Vertex, and saved using the triangle of striping and only need N+2 vertex that can indicate, greatly simplify the three of model Angular dough sheet.
Specifically, in step S3, the defined good constraint information includes the parent object, subobject, constraint class of constraint The reference position of type and constraint.
Further, it in step S4, after sfx lightweight formatted file is imported MakeReal 3D, needs to pass through The second development interface of MakeReal 3D is developed, and the data import format of sfx format is increased.
It further,, will also be to sfx format after sfx lightweight formatted file is imported MakeReal 3D in step S4 Structure tree of the model file based on parametrization, point, line, surface, assembly relation, seat, measurement, state parsed, inherited The threedimensional model of model constraint information.
Further, after parsing obtains the constraint information, by the feature of parametrization described in deep analysis, and to described Multiple association identification features of parametrization carry out compound parsing, are complete with the constraint information ensured.
The importing of MakeReal3D threedimensional model local importing support mainstream CAD parameterized simulation model (including CATIA V5 Equal softwares output format).Model can ensure completeness and efficiency of the data in conversion process after importing;Knot in digital-to-analogue Paper mulberry, geological information, material information, assembly relation, the information such as rigging position completely retain in data importing process.
MakeReal3D platform can be very good compatible Solidworks model data, will by way of locally importing Solidworks model file generates model sfx file format, then is directed into platform scene, can reserving model feature, belong to Property information, convenient for roaming browsing when carry out device model cognition.
It although an embodiment of the present invention has been shown and described, for the ordinary skill in the art, can be with A variety of variations, modification, replacement can be carried out to these embodiments without departing from the principles and spirit of the present invention by understanding And modification, the scope of the present invention is defined by the appended.

Claims (6)

1. a kind of assembly constraint inheritance method based on SolidWorks, which comprises the following steps:
S1 creates threedimensional model using SolidWorks software, defines constraint information corresponding with threedimensional model, and to described three Dimension module does light-weight technologg;
S2 calls directly the api interface of SolidWorks constraints module using the second development interface of SolidWorks software;
S3 is obtained the constraint information of the defined good threedimensional model in SolidWorks by the api interface, first arranged The information format of sfx format, the threedimensional model and constraint information that will acquire according to parsing and interpretative rule carry out sfx formatting, The model file of sfx format is saved as after reading by the sfx format of agreement, the model file of the sfx format of preservation remains The constraint information of threedimensional model;
S4 imports the sfx lightweight formatted file by MakeReal 3D software, by parsing the sfx lightweight format File obtains the constraint information;
S5 automatically creates constraint corresponding with the threedimensional model in MakeReal 3D, obtains according to the constraint information The threedimensional model for having holonomic constriants information.
2. a kind of assembly constraint inheritance method based on SolidWorks according to claim 1, which is characterized in that step In S1, to the method for constraint information progress light-weight technologg specifically: the rendering parameter mould in SolidWorks software When type, by the model trigonometric ratio of parametrization first under reduction-mode, the threedimensional model that can be rendered is obtained;Then by the three-dimensional Model analyzing is drawn into OpenGL or DirectX, while inherited parameter characteristic information and being exported, and is finally shown on the screen Show.
3. a kind of assembly constraint inheritance method based on SolidWorks according to claim 1, which is characterized in that step In S3, the defined good constraint information includes parent object, subobject, constrained type and the reference bit of constraint of constraint It sets.
4. a kind of assembly constraint inheritance method based on SolidWorks according to claim 1, which is characterized in that step In S4, after sfx lightweight formatted file is imported MakeReal 3D, need by the second development interface of MakeReal 3D into Row exploitation, increases the data import format of sfx format.
5. a kind of assembly constraint inheritance method based on SolidWorks according to claim 1, which is characterized in that step In S4, after sfx lightweight formatted file is imported MakeReal 3D, will also model file to sfx format based on parametrization Structure tree, point, line, surface, assembly relation, seat, measurement, state are parsed, and the three-dimensional mould for inheriting model constraint information is obtained Type.
6. a kind of assembly constraint inheritance method based on SolidWorks according to claim 1, which is characterized in that parsing After obtaining the constraint information, by the feature of deep analysis model parameterization, and to multiple association identifications of the parametrization Feature carries out compound parsing, is complete with the constraint information ensured.
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 true CN109684656A (en) 2019-04-26
CN109684656B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111783272A (en) * 2020-05-21 2020-10-16 中国电子科技集团公司第十四研究所 Method for simplifying 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 年机械电子学学术会议论文集》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111783272A (en) * 2020-05-21 2020-10-16 中国电子科技集团公司第十四研究所 Method for simplifying complex large electromechanical hybrid three-dimensional model
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

Also Published As

Publication number Publication date
CN109684656B (en) 2020-12-25

Similar Documents

Publication Publication Date Title
Ji et al. Easy mesh cutting
CN108710739A (en) A kind of Building Information Model lightweight and three-dimensional scenic visualization method and system
CN102096937B (en) A hair motion compositor system and optimization techniques for use in a hair/fur pipeline
CN110516303A (en) Bridge construction management method for visualizing and device based on lightweight BIM
US20050243085A1 (en) Model 3D construction application program interface
CN107273543B (en) DGN data format conversion method
KR100503789B1 (en) A rendering system, rendering method, and recording medium therefor
CN102203781A (en) System and method for hybrid solid and surface modeling for computer-aided design environments
CN109844818A (en) For establishing the method and associated system of the deformable 3d model of element
CN114169055B (en) Method and system for enabling BIM model to be light
CN112446937B (en) Project progress three-dimensional visualization method based on BIM technology
CN110096268A (en) By the system and method for the executable program of the VR/AR/MR device secondary editor of stateization living
CN116070334B (en) Multi-dimensional model construction method for digital twin application
CN115659445A (en) Method for rendering and displaying CAD model on webpage in lightweight mode based on Open Cascade
CN109684656A (en) A kind of assembly constraint inheritance method based on SolidWorks
CN111221514B (en) OsgEarth-based three-dimensional visualization component implementation method and system
CN117689833A (en) Urban three-dimensional model construction method, system and medium based on rule modeling
CN109858059B (en) Application method of virtual reality technology based on CAD (computer-aided design) super-large model in hydropower station simulation
Du Application of CAD aided intelligent technology in landscape design
CN114254238A (en) Three-dimensional Web modeling platform based on digital twinning
CN117095127A (en) Machine room modeling method, device, computer equipment and storage medium
JP4813639B2 (en) Feature-type macro language for defining customized analysis and customized graphics functions
Ganster et al. An integrated framework for procedural modeling
Xie CAD Modeling technology for building engineering based on extended diagram and polymorphic model
CN109615709A (en) The modeling of multiple person cooperational three-dimensional scenic and method for drafting based on cloud computing

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

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

EE01 Entry into force of recordation of patent licensing contract