A method for representing a variable-tolerance solid model

CN114943104BActive Publication Date: 2026-07-14BEIJING SOLUTION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING SOLUTION TECH CO LTD
Filing Date
2022-05-19
Publication Date
2026-07-14

Smart Images

  • Figure CN114943104B_ABST
    Figure CN114943104B_ABST
Patent Text Reader

Abstract

The application relates to a variable-tolerance solid model representation method, which is characterized in that a local modeling tolerance member variable is added to the data structure of each topological element in a B-rep solid model, a new definition method of the B-rep solid model is formed, and the modeling tolerance variable calculation and definition steps in the solid model representation method are given. The application proposes a 'variable-tolerance' concept in the B-rep solid model, that is, each topological element has its own local tolerance, the traditional solid representation theory is perfected, a 'local amplification' modeling tolerance processing strategy is adopted, the modeling tolerance is defined as a variable value, the representation range of the solid is expanded, and the error problem existing in the geometric model import of a CAE (Computer Aided Engineering) and CFD (Computational Fluid Dynamics) system is solved. The method can automatically generate a variable-tolerance B-rep solid model, manual modification is not needed, time and labor are saved, and the method can be applied to various industrial and architectural design fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology and relates to a model for representing the data structure of polyhedrons or curved surfaces, and more particularly to a method for representing solid models with variable tolerance. Background Technology

[0002] The boundary representation model of solids (B-rep), proposed by Ian Braid of the Cambridge CAD Laboratory in the early 1970s, is a data structure used to represent polyhedral or curved solids and is the core foundation of geometric modeling platforms. Existing commercial geometric modeling platforms include Parasolid from Siemens (Germany), ACIS and CGM from Dassault Systèmes (France), while there are no mature geometric modeling platforms in China. Geometric modeling platforms are the underlying software core of computer-aided design and manufacturing systems (CAD / CAM), the foundation of all industrial design, manufacturing, and analysis software, and are the most important industrial software. Existing boundary representation models of solids have constant tolerances, hindering model conversion between different geometric modeling systems.

[0003] In the process of digital product design, the main purpose of constructing a geometric model is to separate form from application. The main content of the geometric model is the geometric representation of components. Geometric models can be represented using wireframe, surface, and solid representation methods.

[0004] The geometric representation must satisfy:

[0005] 1. Accuracy: Within a certain tolerance range, it can distinguish whether a point is inside, outside, or on the model;

[0006] 2. Completeness: The represented 3D shapes fully support various applications;

[0007] 3. Closure: Any legal geometric model can still be represented after geometric modeling.

[0008] Wireframe and surface models cannot meet the needs of industrial applications, so solid surfaces are used to represent geometric models. Describing shapes generally involves two aspects: geometry and topology. Geometry relates to size, position, and dimensions, while topology relates to shape. Curves and surfaces are used to represent the geometric properties of shapes. Simply put, boundary representation = geometry (points, curves, surfaces) + topology (vertices, edges, faces).

[0009] Boundary representation typically includes topological elements such as faces, loops, edges, and vertices:

[0010] 1. A face is a bounded, non-self-intersecting, connected surface with directionality. The effective extent of a face is defined by an outer ring and several inner rings. A face can have no inner rings, but it must have an outer ring.

[0011] 2. A loop is a closed boundary of a surface, composed of ordered, directed edges. A loop cannot self-intersect; that is, the edges of a loop cannot intersect at any other point except for sharing endpoints. Loops have an inner and an outer boundary.

[0012] 3. An edge is the boundary between two adjacent faces of an object. An edge can only be shared by two faces. An edge has a direction, pointing from the starting point to the ending point.

[0013] 4. A vertex is an endpoint of an edge and is not allowed to appear inside an edge.

[0014] In the ACIS geometry platform, the types of geometric elements include:

[0015] 1. Curve—the basic class, from which subclasses such as line, ellipse, and intersection are derived. Each type of curve can be viewed as a parametric curve:

[0016] (1) Straight line;

[0017] (2) Ellipse;

[0018] (3) Intersection line;

[0019] (4) Parameter domain curve.

[0020] 2. Surface—basic class, from which the following subclasses are derived:

[0021] (1) Plane;

[0022] (2) Conical surface;

[0023] (3) Spline surface.

[0024] In the ACIS geometry platform, the topology element types include:

[0025] 1. body;

[0026] 2. Shell;

[0027] 3. Subshell;

[0028] 4. face;

[0029] 5. Loop;

[0030] 6. Co-edge;

[0031] 7. Edge;

[0032] 8. Vertex.

[0033] The following discusses the existing problems with B-rep solid models and their solutions. Because different CAD systems use different types of curves and surfaces, converting B-rep solid models between systems requires curve and surface approximation, resulting in errors in the converted B-rep solid model. On the other hand, the modeling tolerance of B-rep solid models used in existing CAD software is generally set to a constant ε>0. ε is called the modeling tolerance. For example, for the Parasolid geometry modeling platform, the default unit is meters, and this tolerance value is generally taken as 10. -8 If the crack error e between two adjacent surfaces in the geometric model is greater than ε, and the overall model tolerance ε is increased to make ε>e, it may lead to some other logical problems in the model, such as surfaces that were not originally overlapping becoming overlap after being enlarged by ε. Summary of the Invention

[0034] The purpose of this invention is to propose a "variable tolerance" model representation method in B-rep solid models and to provide a method for defining the local shape tolerance of each topological element, thereby expanding the representation range and capabilities of traditional B-rep solid models and effectively solving the problem of converting geometric models between different CAD systems.

[0035] To achieve the above objectives, the technical solution of the present invention is a variable tolerance entity model representation method, characterized in that: in the B-rep entity model, a local modeling tolerance member variable is added to the data structure of each topological element to form a new B-rep entity model definition method.

[0036] In the above technical solution, the steps and methods for defining the shape tolerance variable are as follows:

[0037] Step 1: For a face, if its corresponding curved surface is obtained through precise transformation, then define the face modeling tolerance as 0 (see...). Figure 1 If the corresponding surface is obtained through fitting, then the shape tolerance of that surface is defined as the fitting error (see...). Figure 2 );

[0038] Step 2: For an edge, if it is a precise edge, then define its tolerance as the shape tolerance ε (see...). Figure 3 Otherwise, assuming its adjacent coedges are coedge1 and coedge2, calculate the "nearest distance" d = max{h1,h2} between coedge1 and coedge2, where The tolerance of this edge is then defined as d (see...). Figure 4 );

[0039] Step 3: For a vertex, let the n coedges connected to that vertex be denoted as coedgei, and let the endpoint of coedgei at that vertex be v. i Then take v i Let the centroid be v, and v be the new position of the vertex. Then, the shape tolerance of the vertex is defined as ε = max{||vv| ... i |||i=1,...,n}, (see Figure 5 ).

[0040] The variable tolerance technique does not affect the geometric algorithms such as curve / curve intersection, curve / surface intersection, and surface / surface intersection in the solid modeling system. However, some algorithms for processing topological elements need to be redesigned. For example, algorithms for determining whether a point coincides with a vertex, whether a point is on an edge, and whether a point is inside a clipping surface need to take local tolerance into account.

[0041] The advantages and positive effects of this invention are that the variable tolerance technology improves the traditional entity representation theory, expands the representation range of entities, and helps to solve the error problem in the import of geometric models into CAE and CFD systems.

[0042] This invention proposes the concept of "variable tolerance" in the B-rep entity model, that is, each topological element has its own local tolerance.

[0043] This invention expands upon the traditional definition method of B-rep solid models by adopting a "local magnification" shape tolerance processing strategy, defining the shape tolerance as a variable value. Specifically, different local tolerance definition methods are provided for vertices, edges, and faces. Using this variable tolerance model representation method, problems existing in the conversion of B-rep solid models between different CAD systems can be solved. For example, when a product model designed in a CATIA system is converted to a CFD system, its solid model may have problems such as cracks. If a traditional "constant tolerance" B-rep solid model is used, manual interactive modification of the geometric model is required, which is time-consuming and labor-intensive. However, if a "variable tolerance" B-rep solid model is used, a variable tolerance B-rep solid model can be automatically generated without manual modification, saving time and effort, and can be applied to various industrial and architectural design fields. Attached Figure Description

[0044] Figure 1 It is a schematic diagram of precise surface transformation with an error of 0.

[0045] Figure 2 This is a schematic diagram of an inaccurate surface transformation, with an error > 0.

[0046] Figure 3This is a schematic diagram of the error of the B-rep solid model after the "edge" transformation in the common modeling tolerance method (the shaded area represents the error range).

[0047] Figure 4 This is a schematic diagram of the error of the B-rep solid model after the "edge" transformation in the deformation tolerance method (the shaded area represents the error range).

[0048] Figure 5 This is the method for calculating vertex tolerance.

[0049] Figure 6 This refers to the module division of a CFD system. Detailed Implementation

[0050] Example 1 illustrates the implementation of the present invention using CFD (Computational Fluid Dynamics) surface preprocessing software as an example. The main functions of CFD (Computational Fluid Dynamics) surface preprocessing software are to import geometric models (generally IGES files), repair geometric models, mesh the geometric models, and export the mesh.

[0051] This embodiment uses Windows 10 as the operating environment, OpenGL as the graphics engine, and Visual C++ 2015 as the development tool. The CFD geometry module uses curve and surface libraries, curve and surface modeling, and surface intersection algorithms as its core technologies, built upon a geometry library (GP.dll), a 3D graphics library (VI.dll), an IGES transformation library (IGES.dll), and a meshing algorithm library (Mesh.dll). The system is divided into five layers (e.g., ...). Figure 6 As shown, the framework uses an MFC document / view architecture. The main classes in the system framework include:

[0052] 1. The application (CCFDApp) is a CWinApp derived object that acts as a container for the entire application. The application is an entry point for message processing, and all data objects shared between various documents and models (such as font libraries, linetype libraries, tool libraries, etc.) are set up in CCFDApp.

[0053] 2. A frame window is a CFrameWnd derived object. The CFrameWnd class is used to create the main window of an application, supporting system menus and control bars (toolbars, status bars, etc.), and managing view and document objects as the main window. View objects and control bars become child windows of CFrameWnd.

[0054] 3. A document (CCFDDoc) is a CDocument derived object that stores the application's model data, mainly including CModel (local coordinate system, curves, surfaces, part geometry information, etc.) and CSelSet (selection set, i.e., the information of the currently selected primitives).

[0055] 4. The CCFDView is a derived object of CView. It accepts user input for the application and displays associated document data. The CCFDView class mainly contains OpenGL resource handles, etc.

[0056] 5. The model (CModel) defines the part's geometric model, feature model, and mesh model. It mainly contains the geometric information that constitutes the part model, such as surfaces (trimmed surfaces), curves (section lines, contour lines, etc.), and reference planes (local coordinate systems).

[0057] 6. Geometric features derived from CFeature are the basic units that make up a CAD model. They can generally be deleted, edited, translated, rotated, and picked independently. Some interfaces of CPart are designed for geometric features. The base class CFeature of geometric features mainly contains information such as name, color index, bounding box, number, and creation time.

[0058] The system is a finite state machine: it consists of three layers: a GUI layer, a business logic layer (i.e., a model layer or application layer), and a foundation layer. Only the GUI layer is related to the operating system and OpenGL graphics display, while the model layer and foundation layer are independent of the operating system. The GUI layer implements system common resource management, interactive picking, interactive commands, and a graphical interface. The business logic layer maintains the application model data structure, including geometric objects, feature objects, mesh objects, and boundary conditions, and implements the relevant interfaces for maintaining the data structure.

[0059] The main geometric features derived from CFeature are:

[0060] 1. Reference Plane (CRefPlane): This is the xy plane of a local coordinate system, containing coordinate system information (RFRAME). CCFDDoc has a current reference plane, and curves drawn interactively by the user are all within this reference plane.

[0061] 2. Reference Curve (CRefCur): Can be a straight line, circular arc, circle, elliptical arc, ellipse, or NURBS curve. These curves form the basis of the surface. Data members for this class include: a curve, parameter range, discrete polyline, line type name, etc.

[0062] 3. Trimmed Surface (CRefSur): This can be a plane, cylinder, cone, sphere, torus, NURBS surface, or equidistant surface, etc. The reference surface class contains information such as a surface, a rectangular parameter domain, and a set of discrete triangular pieces. The reference surface contains the trimming boundary information of the surface, so it can represent a trimmed surface.

[0063] This system uses IGES.dll to build an IGES file import class (CIgesImport), which converts entity primitives in IGES files into B-rep models for the system. The main function of the IGES file import class is to import clipped surfaces, enabling the import of models from other CAD systems.

[0064] The following describes the B-rep entity model data structure of this system. First, a simplified topological model of the clipped surface is presented: the TSM data structure is based on the clipped surface model represented by B-rep, which stores EDGE and FACE linked lists. A FACE contains a geometric surface SURFACE and one or more clipping loops LOOP. A LOOP consists of several FINs (stored in an array). A FIN contains the corresponding EDGE and LOOP, as well as the geometric curve CURVE and parameter interval INTERVAL.

[0065] The specific data structure is defined as follows:

[0066]

[0067]

[0068]

[0069] The topology reconstruction process for the trimmed surface model is as follows:

[0070]

[0071] The edge matching process for trimmed surfaces is as follows:

[0072]

[0073]

[0074]

[0075] The method proposed in this invention can also be applied to various industrial and architectural design engineering software.

Claims

1. A variable tolerance entity model representation method, which adds a local modeling tolerance member variable to the data structure of each topological element in the B-rep entity model, forming a new definition method for the B-rep entity model, characterized in that: The steps for calculating and defining the shape tolerance variable are as follows: Step 1: For a face, if its corresponding surface is obtained through precise transformation, the shape tolerance of the face is defined as 0; if its corresponding surface is obtained through fitting, the shape tolerance of the face is defined as the fitting error. Step 2: For an edge, if it is a precise edge, define its tolerance as the shape tolerance ε; otherwise, assuming its adjacent coedges are coedge1 and coedge2, calculate the "nearest distance" between coedge1 and coedge2. ,in , If , then the tolerance of this edge is defined as d; Step 3: For a vertex, let the n coedges connected to the vertex be denoted as coedgei, and let the endpoint of coedgei at the vertex be vi. Then take the centroid of vi as v, which is the new position of the vertex. Then define the shape tolerance of the vertex as ε = max{∥v-vi∥|i=1,...,n}.