3D CAD system
The 3D CAD system uses a differential polyhedron model to represent shapes in CSG format, addressing conversion issues by enabling high-speed display and efficient data exchange of solid models with curved surfaces.
Patent Information
- Application Number
- JP2023555987
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2041-10-28
AI Technical Summary
The conversion of 3D CAD models between different systems is hindered by modeling accuracy differences, leading to inefficiencies and obstacles in data exchange, particularly due to the use of B-Rep representation methods which introduce errors and CSG methods which are slow and less convenient for complex shapes.
A 3D CAD system utilizing a differential polyhedron model to represent shapes in CSG format, including a primitive generation unit, storage unit for CSG data, and display processing unit to handle curved surfaces without modeling errors, enabling high-speed display through real-time ray tracing.
Enables rapid and accurate representation of shapes with curved surfaces in CSG format, facilitating smooth data conversion and high-speed display of solid models across different systems.
Smart Images

Figure 0007716695000006 
Figure 0007716695000007 
Figure 0007716695000008
Abstract
Description
Technical Field
[0001] This technology relates to a 3D CAD system using solid models.
Background Art
[0002] The basic concept of digital transformation (DX) is to perform existing work virtually and increase the part that shifts to reliable and high-speed processing by algorithms in order to achieve a significant improvement in productivity. Numbers, text, etc. are easy to virtualize, but in the manufacturing world, since "things" are handled, in order to represent "things" virtually, they must be three-dimensionally modeled and represented in the virtual world.
[0003] Conventionally, "things" have been made into three-dimensional models using 3D CAD (3D Computer Aided Design) systems, but problems often occur in data conversion between 3D CAD systems. For this reason, it has become an obstacle to smooth cooperation between systems and has been a cause for the lack of progress in the DX of the manufacturing industry.
[0004] As standards and mechanisms for three-dimensional model conversion between 3D CAD systems, for example, IGES (Initial Graphics Exchange Specification) of ANSI (American National Standard Institute) standards and STEP (Standard for the Exchange of Product model data) as ISO (International Organization for Standardization) standards have been established, but data conversion is not going well with just the standards. The biggest reason is that the mechanism for handling the calculation error called modeling accuracy differs depending on the 3D CAD system. The reason for requiring modeling accuracy lies in the method of representing three-dimensional models.
[0005] Examples of shapes represented by 3D models include wireframe models, surface models, and solid models. Most 3D CAD systems use solid models. Methods for representing solid models have conventionally been considered in two ways: B-Rep (Boundary Representation) and CSG (Constructive Solid Geometry).
[0006] B-Rep is a representation method in which the surface of a 3D model is covered with multiple curved surfaces, joined at the boundaries to form a closed surface, and the inside is considered the target 3D model. On the other hand, CSG is a method of constructing a 3D model by performing set operations on basic shapes called primitives (see, for example, Non-Patent Document 1).
[0007] In terms of the convenience of handling free-form surfaces and interfaces such as 3DCAM (3D Computer Aided Manufacturing) that apply 3D models, the B-Rep representation method is more convenient . Therefore, most current 3D CAD systems adopt B-Rep, and CSG is only used for an auxiliary role. B-Rep is also adopted in STEP, which is a conversion standard for 3D data.
[0008] However, in B-Rep, since it is necessary to introduce curved surfaces in the 3D model, modeling errors must be introduced. In current 3D CAD systems, it is mainstream to use parametric surfaces such as B-spline surfaces. A parametric surface is a surface formed by projecting a rectangle in the (u, v) space onto the xyz space by a two-variable function F(u, v). Therefore, four deformations are the basic form.
[0009] FIG. 31 is a diagram showing an example of a surface trimmed by a boundary line in B-Rep. As shown in FIG. 31, in B-Rep, trimming is performed with a boundary line and a trimmed surface is used. Since the method of representing a surface boundary line is also a parametric curve represented by parameters, the surface boundary line does not exactly lie on the surface. If the gap between the surface boundary line and the surface is below the modeling accuracy, it is only determined that the surface boundary line lies on the surface.
[0010] FIG. 32 is a diagram showing an example of a surface boundary line connecting between surfaces in B-Rep. As shown in FIG. 32, in B-Rep, the surfaces are connected with respect to the boundary line using the information of the first surface and the second surface, and as a whole, the inside of the surface is recognized as a solid model. Therefore, a gap inevitably forms between the surfaces. Since this modeling accuracy varies depending on the 3D CAD system, it is a main factor causing problems in the conversion of 3D models.
[0011] On the other hand, the representation method by CSG is currently used to assist the B-Rep representation. The representation of a solid model by CSG has advantages such as not requiring consideration of modeling errors, which are the main cause of data conversion troubles. The reasons why a 3D CAD system with CSG representation has not become mainstream include slow display speed and difficulty in representing shapes including surfaces because there are few types of primitives, which are the basic elements of 3D models.
Prior Art Documents
Patent Documents
[0012]
Non-Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0013] The present technology has been proposed in view of such a conventional situation, and provides a 3D CAD system capable of rapidly displaying a shape including a curved surface in CSG representation.
Means for Solving the Problem
[0014] The 3D CAD system according to the present technology is a set of differential polyhedra including coordinate values of triangular vertices, normal vectors of triangular vertices, and curve elements composed of start points and end points consisting of triangular vertices and tangent vectors of the start points and end points. Three-dimensional Using a differential polyhedron model, a curved surface is formed by connecting the sides of the differential polyhedra, a closed surface is formed by connecting the curved surfaces with a curved surface boundary line, and a primitive generation unit that generates a primitive, which is a set of points belonging to the interior of the closed surface, and a storage unit that stores CSG data representing a solid model in CSG representation according to the tree structure of the set operation of the primitives, and a display processing unit that obtains the intersection of the solid model and a ray from the intersection of the closed surface of the primitive and the ray by a set operation based on the CSG data and calculates the reflection position and reflection direction of the ray in the solid model. Yes, including a triangular mesh model
[0015] Further, the 3D CAD method according to the present technology is a set of differential polyhedra including coordinate values of triangular vertices, normal vectors of triangular vertices, and curve elements composed of start points and end points consisting of triangular vertices and tangent vectors of the start points and end points. Three-dimensional Using a differential polyhedron model, a curved surface is formed by connecting the sides of the differential polyhedra, a closed surface is formed by connecting the curved surfaces with a curved surface boundary line, a primitive generation step of generating a primitive, which is a set of points belonging to the interior of the closed surface, a storage step of storing CSG data representing a solid model in CSG representation in a storage unit according to the tree structure of the set operation of the primitives, and a display processing step of obtaining the intersection of the solid model and a ray from the intersection of the closed surface of the primitive and the ray by a set operation based on the CSG data and calculating the reflection position and reflection direction of the ray in the solid model. Yes, including a triangular mesh model
[0016] In addition, the 3D CAD program according to the present technology is a set of differential polyhedra including the Three-dimensional coordinate values of triangle vertices, the normal vectors of triangle vertices, and curve elements composed of starting and ending points consisting of triangle vertices and the tangent vectors of the starting and ending points. Yes, including a triangular mesh model Using the differential polyhedron model, connect the sides of the differential polyhedra to form a curved surface, form a closed surface by connecting the spaces between the curved surfaces with a curved surface boundary line, and generate a primitive that is a set of points belonging to the inside of the closed surface. A primitive generation step, a storage step of storing CSG data in which a solid model is represented in CSG by the tree structure of the set operation of the primitives in a storage unit, and based on the set operation of the CSG data, from the intersection of the closed surface of the primitive and the ray, obtain the intersection of the solid model and the ray, and calculate the reflection position and reflection direction of the ray in the solid model. The computer is caused to execute a display processing step.
Advantages of the Invention
[0017] According to the present technology, a shape including a curved surface can be represented in CSG without considering modeling errors, and a solid model can be displayed at high speed.
Brief Description of the Drawings
[0018]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Figure 19
Figure 20
Figure 21
Figure 22
Figure 23
Figure 24
Figure 25
Figure 26
Figure 27
Figure 28
Figure 29
Figure 30
Figure 31
Figure 32
[0019] Hereinafter, embodiments of the present technology will be described in detail in the following order with reference to the drawings. 1. 3D CAD System 2. Surfaces by Differential Polyhedra 3. Set Operations of Primitives 4. Display of 3D Models
[0020] <1. 3D CAD System> FIG. 1 is a block diagram showing a configuration example of a 3D CAD system according to the present embodiment. As shown in FIG. 1, the 3D CAD system includes a shape processing unit 1 that performs shape processing of primitives, a storage unit 2 that stores CSG (Constructive Solid Geometry) data, and a CSG table A display processing unit 3 that displays a solid model represented, and a data conversion unit 4 that converts data of other formats into data in CSG representation and converts data in CSG representation into data of other formats. Further, the shape processing unit 1 includes a primitive generation unit 11, a set operation processing unit 12, and a drawing line generation unit 13.
[0021] The primitive generation unit 11 uses a differential polyhedron model that is a set of differential polyhedra including coordinate values of triangle vertices, normal vectors of triangle vertices, start and end points composed of triangle vertices, and curve elements composed of tangent vectors at the start and end points. Then, the primitive generation unit 11 connects the sides of the differential polyhedra to form a surface, forms a closed surface in which the surfaces are connected by a surface boundary line, and generates a primitive that is a set of points belonging to the inside of the closed surface. Thereby, it is possible to easily represent a shape including a surface. Here, the closed surface means a surface that separates the three-dimensional space into two regions.
[0022] In addition, based on the coordinate values of the triangle vertices and the normal vectors of the triangle vertices, the primitive generation unit 11 adds a curve element composed of a starting point and an ending point consisting of triangle vertices and the tangent vectors of the starting point and the ending point, and generates a differential polyhedron. Thereby, for example, a differential polyhedron can be generated using a triangle having normal vector information at its vertices.
[0023] In addition, the primitive generation unit 11 generates a spatial geodesic using the coordinate values of the triangle vertices and the normal vectors of the triangle vertices shared by the adjacent first differential polyhedron and the second differential polyhedron, constructs a connection relationship by sharing the spatial geodesic, and constitutes a curved surface. That is, the primitive generation unit 11 constructs a connection relationship by sharing a spatial geodesic between the adjacent first differential polyhedron and the second differential polyhedron, and constitutes a curved surface by this connection relationship.
[0024] In addition, the primitive generation unit 11 constructs a connection relationship between the curved surfaces using the curve elements shared between the curved surfaces, and constructs a closed curved surface that connects the curved surfaces. When a connection relationship between the curved surfaces is constructed using the curve elements shared between the curved surfaces and the curved surfaces are connected, the connection relationship of the curve elements between the curved surfaces becomes the boundary line between the curved surfaces, and this becomes the curved surface boundary line. Thereby, the curved surfaces can be connected by the curved surface boundary line composed of the connection of the curve elements without considering the modeling error.
[0025] The curve element is preferably represented by a cubic polynomial curve shown in the following formula (1).
[0026]
Number
[0027] Here, the curve element includes a starting point and an ending point consisting of triangle vertices and the tangent vectors of the starting point and the ending point, and the length of the curve element can be represented by the following formula (2).
[0028]
Number
[0029] In Equation (2), since the upper limit of integration involves the length of the curve, the coefficients A → , B → , C → , D → are determined by performing iterative calculations so that the curve length = Equation (2).
[0030] The set operation processing unit 12 performs set operations between primitives and realizes set operations by performing only symbolic operations. By executing set operations using only symbolic operations, a simple data structure and the stability of set operations can be realized. In the tree structure of the set operations of primitives, when the same set operation symbol exists above and below the hierarchy, the set operation symbol is omitted. As a result, the amount of calculation can be reduced.
[0031] The drawing generation unit 13 generates the intersection line of two primitives as a drawing line. As a result, in the primitive generation unit 11, a new primitive can be generated based on the drawing line.
[0032] The storage unit 2 stores CSG data representing a solid model in CSG representation according to the tree structure of the set operations of primitives. The storage unit 2 stores the CSG data processed by the shape processing unit 1, for example, a storage such as RAM (Random Access Memory) or a hard disk. As will be described later, the CSG data has a tree structure in which primitives can be configured with a set model of triangles and set operations between primitives are possible. With this CSG data, a solid model can be represented using the tree structure by set operations between primitives.
[0033] The display processing unit 3 obtains the intersection of the solid model and the ray from the intersection of the closed surface of the primitive and the ray by set operations based on the CSG data, and calculates the reflection position and reflection direction of the ray in the solid model.
[0034] The display processing unit 3 obtains the intersection of the solid model and the ray by omitting the set operation symbol when the same set operation symbol exists above and below the hierarchy in the tree structure of the primitive set operation. Thereby, the amount of calculation can be reduced, and the solid model in CSG representation can be displayed at a higher speed.
[0035] The display processing unit 3 is, for example, a GPU (Graphics Processing Unit), has a ray tracing API (Application Programming Interface) described based on CUDA (Compute Unified Device Architecture), and obtains the intersection of the solid model and the ray using real-time ray tracing. Thereby, the intersection of the ray and the closed surface of the primitive and the normal vector of the closed surface at the intersection can be calculated at high speed by hardware, and can be displayed in real time.
[0036] The data conversion unit 4 converts files such as STEP (Standard for the Exchange of Product model data), IGES (Initial Graphics Exchange Specification) into data in CSG representation, and converts data in CSG representation into files such as STEP and IGES.
[0037] According to such a 3D CAD system, by using a closed surface formed by connecting the sides of differential polyhedra as basic elements, connecting the sides of the differential polyhedra to form a surface, and further connecting the surfaces with surface boundary lines, a shape including a surface can be represented in CSG without considering modeling errors, and the solid model can be displayed at high speed.
[0038] FIG. 2 is a block diagram showing a configuration example of a computer device that realizes the 3D CAD system according to the present embodiment. As shown in FIG. 2, the computer device includes a CPU (Central Processing Unit) 21 that performs execution processing of a program, a GPU (Graphics Processing Unit) 22 that performs arithmetic processing, a ROM (Read Only Memory) 23 that stores a program executed by the CPU 21, a RAM (Random Access Memory) 24 that expands a program and data, an operation input unit 25 that receives various input operations by a user, a storage 26 that fixedly stores a program and data, and an input / output interface 27 that inputs and outputs data.
[0039] The CPU 21 is capable of performing processes such as the primitive generation unit 11, the set operation processing unit 12, and the drawing line generation unit 13 described above. Further, the CPU 21 reads, for example, a 3D CAD program recorded in the storage 26, expands it in the RAM 24, and executes it to control the operations of each block.
[0040] The GPU 22 has a video memory (VRAM) and is capable of performing drawing processing and calculation processing in response to a request from the CPU 21. Further, the GPU 22 has, for example, a ray tracing API (Application Programming Interface) described based on CUDA (Compute Unified Device Architecture).
[0041] The ROM 23 is, for example, a non-volatile memory that can only be read, and stores information such as constants necessary for the operations of each block of the computer device. The RAM 24 is a volatile memory and is used not only as an expansion area for an operation program but also as a storage area for temporarily storing intermediate data and the like output in the operations of each block of the computer device.
[0042] The operation input unit 25 is a user interface used when performing an input operation on the computer device 1. The operation input unit 25 outputs commands such as execution or stop of the above-described information processing to the CPU 21 according to the input operation of the user.
[0043] The storage 26 records the above-described information processing program and the like developed in the RAM 24. As the storage 26, an HDD (Hard Disk Drive), an SSD (Solid State Drive), an optical drive, or the like can be used. The input / output interface 27 can output the image generated by the GPU 22 to a display device.
[0044] In such a hardware configuration, the above-described 3D CAD system can be realized by the cooperation of software executed by the CPU 21, the GPU 22, the ROM 23, the RAM 24, the CPU 21, and the like. Further, the software program may be configured to be downloaded via the Internet or the like in addition to being stored and distributed in a recording medium such as an optical disk or a semiconductor memory.
[0045] <2. Surfaces by Differential Polyhedra> [Differential Polyhedron Model] The differential polyhedron model is a set of differential polyhedra that are basic elements, and is also a set of points generated by repeatedly subdividing differential polyhedra. For the subdivision of differential polyhedra, the midpoint of the boundary line connecting two points of a triangle can be used. The boundary line may be a geodesic in space or a curve element, and in either case, it is called a differential polyhedron. Here, the vertex of the differential polyhedron is defined as a point, and the side is defined as an edge.
[0046] Figure 3 is a diagram for explaining the subdivision process of differential polyhedra. Figure 3(A) shows a triangle model, Figure 3(B) shows a boundary line by a geodesic in space, Figure 3(C) shows one differential polyhedron, and Figure 3(D) shows two differential polyhedra. In the differential polyhedron model, when edges coincide with each other, they are regarded as the same line, which is defined as a ridge line, and both ends of the ridge line A point is defined as a vertex. The subdivision of a differential polyhedron generates a spatial geodesic using the normal vectors of the vertices at both ends of the edge of the differential polyhedron model, adds a vertex and a normal vector to the midpoint of the spatial geodesic to generate two edges. Since the processing on a computer must end in a finite number of times, it is approximated by a tiny triangle composed of three points after a finite number of subdivisions. The one with the number of subdivisions being n times is called an n-differential polyhedron.
[0047] FIG. 4 is a diagram for explaining the subdivision process of a differential polyhedron including a curve element. FIG. 4(A) shows a triangle model including a curve element, FIG. 4(B) shows a boundary line formed by the curve element, and FIG. 4(C) shows a 1-differential polyhedron. The curve element is composed of two vertices of a triangle and a tangent vector at the vertex. As shown in FIG. 4(C), for the subdivision when the boundary line is a curve element, the midpoint of the curve element can be used, and the average of the normal vectors at both ends of the curve element can be used as the intermediate vector.
[0048] FIG. 5(A) is a diagram for explaining a differential polyhedron, and FIG. 5(B) is a diagram for explaining curve element information. The differential polyhedron model is a set of basic differential polyhedrons, and has triangle information including point information of the vertices (α, β, γ) of a triangle, curve element information of the sides (αβ, βγ, γα) of the triangle, a point ID of the point information, and a curve element ID of the curve element information. The point information has a point table including the three-dimensional coordinate values of the point and the normal vector (u α , u β , u γ ) for each point ID. The curve element information has a curve element table including the point ID of the edge start point, the point ID of the edge end point, the tangent vector of the edge start point, and the tangent vector of the edge end point for each curve element ID. The triangle information has a triangle table including the point ID, the curve element ID, the direction (positive direction or negative direction) of the curve element, and the normal vector of the triangle for each triangle ID. Here, the normal vector and the tangent vector are normalized vectors.
[0049] That is, the differential polyhedron model has the coordinate values of the triangle vertices (α, β, γ) and the normal vector (uα , u β , u γ ), and a set model of triangles including starting points and ending points consisting of triangle vertices (α, β, γ), and tangent vectors (v1 αβ , v2 αβ , v1 βγ , v2 βγ , v1 γα , v2 γα ).
[0050] The tangent vector of the starting point and the tangent vector of the ending point are normalized vectors and can be represented by, for example, a cubic polynomial curve as shown in Equation (1).
[0051]
Equation
[0052] Here, the curve element includes starting points and ending points consisting of triangle vertices, and the tangent vectors of the starting point and the ending point. The length of the curve element can be represented by the following Equation (2).
[0053]
Equation
[0054] In Equation (2), since the length of the curve appears in the upper limit of the integral, the coefficients A → , B → , C → , D → are determined by repeating the calculation so that the length of the curve = Equation (2).
[0055] As shown in FIG. 5(B), when the side of the differential polyhedron is a curve element, by interpolating the two points between the starting point and the ending point with a curve element including the starting point and the ending point and the tangent vectors of the starting point and the ending point, it becomes possible to handle the surface as described later. The differential polyhedron is a polygon model of a triangle mesh model and is in the obj format, which is a data format for CG (Computer Graphics). It can be converted into a formula. Therefore, by using a differential polyhedron model, which is a set of differential polyhedra, data communication between 3D systems can be smoothed. Also, high affinity with CG software can be obtained, and the smoothness of a curved surface can be easily expressed.
[0056] [Data Structure of CSG Representation] FIG. 6 is a diagram for explaining the data structure of a primitive and the data structure of a primitive within a CSG representation. The CSG tree node is the root node, and the CSG node and the primitive node are child nodes of the CSG tree node.
[0057] The CSG node has a set operation type node as a child node, and for each CSG node ID, it has a table including a primitive ID, a parent node ID, a left child node ID, and a right child node ID. The primitive node has, as child nodes, a three-dimensional coordinate node, a three-dimensional vector node, a surface element node, a curve element node, a surface node, and a surface boundary line node.
[0058] The three-dimensional coordinate node has a table including the coordinate values (x, y, z) of a triangle vertex for each three-dimensional coordinate ID. The three-dimensional coordinate vector has a table including the components (x, y, z) of a normal vector and a tangent vector for each three-dimensional vector ID. The surface element node has a table including a vertex coordinate ID, a vertex normal ID, and a curve element ID for each surface element ID. The surface element is the same as a differential polyhedron. The curve element node has a table including a start point coordinate ID, an end point coordinate ID, a tangent vector ID at the start point, a tangent vector ID at the end point, a left adjacent surface element ID, and a right adjacent surface element ID for each curve element ID. The surface node has a table including a group of surface element IDs for each surface ID. The surface boundary line node has a table including a group of curve element IDs and the direction of the curve element group for each surface boundary line ID.
[0059] Here, a curved surface is a differential polyhedron group surrounded by a curved surface boundary line, and the curved surface boundary line is composed of a continuous sequence of curve elements. In other words, a curved surface has differential polyhedron information, and a curved surface boundary line has curve element information. With such a data structure, a primitive including a curved surface can be represented by a differential polyhedron model, and set operations on the primitive can be performed.
[0060] [Generation of Differential Polyhedron Model] The differential polyhedron model can be converted from files such as STEP (Standard for the Exchange of Product model data), IGES (Initial Graphics Exchange Specification), and STL (Standard Triangulated Language). Note that STL is sometimes also called "StereoLithography".
[0061] First, convert from a 3D CAD model to an aggregate model of triangles including the coordinate values of triangle vertices and the normal vectors of triangle vertices, and create a point table including the coordinate values of triangle vertices and the normal vectors of triangle vertices, and a triangle table including point IDs.
[0062] This aggregate model is a model in which a normal vector calculated from CAD data and added to the vertices of a polygon when approximating a curved surface with a triangle polygon with a specified approximation error is added to the vertices of the polygon. The triangle polygon model with normal vectors is output with a specified accuracy from a curved surface represented by, for example, a cubic polynomial by a program. The triangle polygon model with normal vectors is preferably output with the accuracy of double-precision floating-point numbers.
[0063] Next, using the triangular aggregate model, extract the edges of the triangles, and for each curve element ID, create a curve element table that includes the point ID of the edge start point, the point ID of the edge end point, the tangent vector of the edge start point, and the tangent vector of the edge end point. Add the curve element ID and the direction of the curve element (positive direction or negative direction) to the triangle table.
[0064] Thus, a differential polyhedron model, which is a set model of triangles, can be generated, including the coordinate values of the triangular vertices (α, β, γ), the normal vector (u α , u β , u γ ) of the triangular vertices (α, β, γ), the start and end points consisting of the triangular vertices (α, β, γ), and the tangent vectors (v1 αβ , v2 αβ , v1 βγ , v2 βγ , v1 γα , v2 γα ) of the start and end points.
[0065] [Surface and Surface Boundary Line] Figure 7 is a diagram showing an example of a surface and a surface boundary line, and Figure 8 is a diagram showing an example of a surface without a surface boundary line. As shown in Figures 7 and 8, the surface is composed of connecting differential polyhedra at the vertices, and the ends of the surface are curve elements. Since there are normal vectors at the vertices, when performing subdivision, normal vectors are given to the intermediate points. Repeating this process generates normal vectors everywhere on the differential polyhedron, and the orientation of the differential polyhedron is determined by the direction of the normal vector. Therefore, there is also a natural orientation of the surface on the surface.
[0066] The boundary line is a group of curve elements that are smoothly connected, like the double-arrow dotted line range shown in Figure 7, and the surface is surrounded by continuous boundary lines. The boundary line has an ordered list of surface elements that make up one surface and an ordered list of surface elements that make up the other surface, and can represent the connection relationship of the surfaces. Also, as shown in Figure 8, there are surfaces without boundary lines. Note that the definitions of the surface and the boundary line here are different from the general definitions of the surface and the boundary line and are local definitions.
[0067] [Closed surface] FIG. 9 is a diagram showing a cube as an example of a closed surface, FIG. 10 is a diagram showing a cylinder as an example of a closed surface, and FIG. 11 is a diagram showing a free surface as an example of a closed surface. A closed surface is formed by connecting a plurality of surfaces with boundary lines to form a closed surface. However, it is assumed that the closed surface does not self-intersect. It is also possible to reverse the direction of the closed surface by reversing the normal vector, and it is also possible to assign a direction to the closed surface.
[0068] <3. Set operations on primitives> A closed surface separates the three-dimensional space into two regions. The set of points on the back side of the closed surface is called a primitive. Also, a primitive has a local coordinate system.
[0069] Since a primitive is a set of points, set operations can be performed on the primitive. Since there are parts different from the definition of the original set operation, it is clearly defined here.
[0070] [Complementary set] The complementary set of a primitive is treated as the closure of the set of points other than the primitive in the three-dimensional space. For this reason, the complementary set of a primitive includes the points on the closed surface. The complementary set of a primitive means the closure of the complementary set of a general set and is sometimes represented by the symbol A ~ and is sometimes written as complement(A). Also, the complementary set of a primitive is called the complementary set as an abbreviation.
[0071] [Union] The union of primitives is the union in the ordinary sense. When performing the union operation of primitive A and primitive B to obtain the union, the complementary set operation of the primitive and coordinate transformation can be assigned as attributes.
[0072] The primitive after coordinate transformation is represented by T A A, and when represented as T A A ∪ T BB shows that after transforming the position by each coordinate transformation, a union operation is performed. The symbol for the union is ∪. Instead of primitives, union operations between unions, and union operations between a union and a primitive can be performed.
[0073] FIG. 12 is a diagram showing an example of a tree structure having unions and intersections of primitives. In FIG. 12, the attributes include coordinate transformation and complement operation. Also, the parts of the symbols for the union and intersection in the tree structure are called nodes.
[0074] [Intersection] The intersection of primitives is also an intersection in the normal sense. Similar to the union, when performing the intersection operation of primitive A and primitive B to obtain the intersection, the complement operation and coordinate transformation of the primitive can be assigned as attributes. Also, similar to the union, the primitively transformed by coordinate transformation is represented by T A A, and when represented as T A A ∩ T B B shows that after transforming the position by each coordinate transformation, an intersection is taken. The symbol for the intersection is ∩. Instead of primitives, intersection operations between unions and intersections, and intersection operations between unions, intersections, and primitives can be performed.
[0075] FIG. 13 is a diagram schematically showing an example of the result of set operations of primitives. FIG. 13(A) is a diagram schematically showing an example of a cube primitive A and a cylinder primitive B. FIG. 13(B) is a diagram schematically showing an example of the union A ∪ B of the cube primitive A and the cylinder primitive B. FIG. 13(C) is the intersection A ∩ B ~ of the cube primitive A and the cylinder primitive B, schematically shown as an example. A ∩ B ~ becomes the difference obtained by removing the set of primitive B from the set of primitive A, and by this operation, the difference between primitives can be obtained. B ~ represents the closure of the complement of B, and B ~may also be represented as the complement set (B). FIG. 13(D) is a diagram schematically showing an example of the product A ∩ B of the cubic primitive A and the cylindrical primitive B.
[0076] [Hierarchical Compression] FIG. 14 is a diagram showing an example of a tree structure when operation symbols are omitted in the tree structure shown in FIG. 12. In the tree structure of the set operation of primitives, when there are the same operation symbols above and below the hierarchy, the operation symbols can be omitted. This process is called hierarchical compression. For example, the tree structure shown in FIG. 12 can be changed to the tree structure as shown in FIG. 14. In the tree structure shown in FIG. 14, the attribute A’ is an attribute obtained by synthesizing the attribute A and the attribute AB. Similarly, the attribute B’ is an attribute obtained by synthesizing the attribute B and the attribute AB. Hierarchical compression becomes important when obtaining the intersection set of a ray and a solid model represented by a CSG representation in the real-time ray tracing process described later.
[0077] [Set Operation] FIG. 15 is a diagram showing an example of a tree structure of features, and FIG. 16 is a diagram showing an example of a tree structure of parts. As shown in FIG. 15, a set generated by the union and intersection operations corresponding to nodes is called a feature. Also, as shown in FIG. 16, a set generated at the topmost node is called a part. A solid model represented by a CSG representation can be represented by the definition of a primitive and a tree structure in a computer.
[0078] Feature 1 is obtained by separately performing transformations of scaling and moving a cubic primitive and performing a union operation of these primitives. The part is created by making a hole in the set of Feature 1 using a cylinder, and can be created by performing a complement operation and then obtaining the intersection set with Feature 1 after scaling and arranging the cylindrical primitive. Such operations in a computer can be performed only by coordinate transformation and symbol manipulation.
[0079] <4.3D Model Display> FIG. 17 is a diagram for explaining shading. FIG. 17(A) is a diagram for explaining flat shading, and FIG. 17(B) is a diagram for explaining Phong shading. Flat shading is to display a 3D model using light reflected in the direction of the normal vector of a triangle of a differential polyhedron model. Also, Phong shading is to interpolate the normal vector within a triangle with the vertex normal vectors of the triangles of a differential polyhedron model and display a 3D model using light reflected in the normal vector.
[0080] In this way, by using a differential polyhedron model, which is an aggregate model of triangles, as the 3D model and quickly calculating the reflected light when light is applied to the triangles, the 3D model can be quickly shaded and displayed.
[0081] Also, a 3D model in CSG representation can use real-time ray tracing. Ray tracing is a method of simulating the physical phenomenon when a person looks at an object, a method of tracking reflection, scattering, and attenuation for each individual ray of light in an object or the environment where the object is placed, and ultimately a method of obtaining the rays of light that enter the visual field. In recent years, GeForce RTX (trademark) has been released by NVIDIA, and real-time ray tracing has been realized. By customizing this hardware, it becomes possible to directly display a solid model in CSG representation in real time.
[0082] For real-time ray tracing processing, for example, Nvidia OptiX (trademark) can be used. Nvidia OptiX (trademark) is a ray tracing API (Application Programming Interface) described based on CUDA (Compute Unified Device Architecture). is a ray tracing API (Application Programming Interface) described based on CUDA (Compute Unified Device Architecture). It can. The feature of Nvidia OptiX (trademark) is that various processes of ray tracing, such as ray collision determination, behavior during collision, and behavior during non-collision, can be programmed. Even for models to which existing shaders cannot be applied, users can perform ray tracing efficiently by writing programs.
[0083] Figure 18 is a flowchart for explaining real-time ray tracing processing. First, in step S11, a ray (light ray) is generated, and in step S12, the ray is advanced to each object. Here, an object is the part at the topmost level of the feature.
[0084] In step S13, the ray is made to collide with each object to obtain the intersection point. The shortest intersection point between the ray and the part can be obtained as follows.
[0085] First, intersection information including a start point bit string, an end point bit string, a provisional bit string, and a final bit string is prepared for each lowest-level feature. The length of each bit string is the number of intersection points between the light ray and all closed surfaces. Then, the intersection points between the light ray and the closed surfaces are arranged in the order of the propagation direction of the light ray, and intersection numbers are assigned from 1 in the order of the propagation direction.
[0086] If there is a point where the light ray penetrates the closed surface of the primitive directly belonging to the feature, a bit is set at the position of the intersection number in the start point bit string. In the case of a point where it leaves the closed surface, a bit is set at the position of the intersection number in the end point bit string.
[0087] Next, using the start point bit string and the end point bit string, the provisional bit string is processed using set operation symbols.
[0088] FIG. 19 is a diagram for explaining a method of calculating a provisional bit string. FIG. 19(A) shows the provisional bit calculation of the union set, and FIG. 19(B) shows the provisional bit calculation of the intersection set. In the case of the union set operation, the cumulative calculation array shown in FIG. 19(A) is used. Starting from the beginning of the column, the start bit string and the end bit string are checked. If a bit is set at the position of the start bit string, 1 is added. If a bit is set at the position of the end bit string, 1 is subtracted from the next position. The processing of the provisional bit string is completed by setting bits at positions of non-zero columns. Also, in the case of the intersection set operation, as shown in FIG. 19(B), bits are set in the provisional bit string from the position with the largest intersection number where the bit of the start bit string is set to the position with the smallest intersection number where the bit of the end bit string is set.
[0089] The processing of the final bit string is performed in order from the feature at the lowest level. For the feature at the lowest level, the provisional bit string is directly copied to the final bit string. The feature one level higher performs a set operation between its own provisional bit string and the final bit string of the feature below it and writes it to the final bit string.
[0090] In this way, the final bit strings of the features at higher levels are sequentially determined, and the final bit string of the part at the highest level of the feature is determined. Then, the position of the smallest intersection number in the final bit string of the part becomes the intersection of the ray and the part, and based on this intersection and the normal vector, the reflection position and reflection direction of the ray can be obtained.
[0091] In step S14, it is determined whether the ray tracing of the entire scene has been completed. If it is determined that the ray tracing of the entire scene has been completed, the process proceeds to step S15. If it is determined that the ray tracing of the entire scene has not been completed, the process returns to step S12 to make the ray proceed to each object.
[0092] In step S15, it is determined whether the closest intersection of the ray has been determined. If it is determined that the intersection has been determined, the process proceeds to step S16. If it is determined that the intersection has not been determined, the process proceeds to step S17.
[0093] In step S16, the three-dimensional model is displayed using shading for the shortest collision object, and in step S17, the three-dimensional model is displayed using shading for non-collision.
[0094] By performing such real-time ray tracing processing in hardware, the reflection position and reflection direction of light rays in the three-dimensional model can be calculated and displayed in real time.
[0095] [Specific Example] Next, a specific example will be given to explain the method for obtaining the shortest intersection point between the light ray and the solid model in CSG representation in step S13 described above.
[0096] FIG. 20 is a diagram schematically showing the situation where light rays 1 to 3 pass through a solid model in CSG representation, and FIG. 21 is a diagram showing an example of the tree structure of the solid model in CSG representation shown in FIG. 20. In the specific example, as shown in FIG. 20, the range where light rays 1 to 3 pass through the three-dimensional model is obtained from the lowest layer of the tree structure shown in FIG. 21 by set operation symbols, and the position where the light ray first hits is obtained. More specifically, in the range of the complement set ((A∩B)∪(C∩D))∩E, the positions where light rays 1 to 3 first pass through are obtained.
[0097] Here, by performing the above-described hierarchical compression, the number of features can be reduced, and the intersection information required for each feature can be reduced. Also, since there is no change between the intersection points of the light ray and the closed surface of the primitive that constitutes the solid model, it can be considered that the interval is compressed.
[0098] FIG. 22 is a diagram schematically showing the situation where light ray 1 passes through a solid model in CSG representation, and FIG. 23 is a diagram for explaining the intersection information of light ray 1 passing through a feature. As shown in FIG. 22, light ray 1 is B in , C in , B out , D in , E in , C out , D out , E outPass through the closed surfaces of primitives A to E in the order of
[0099] As shown in FIG. 23, using the intersection point information, obtain the final bit string of (A ∩ B) ∪ (C ∩ D) from the final bit strings of (A ∩ B) and (C ∩ D), and obtain the final bit string of the complement set ((A ∩ B) ∪ (C ∩ D)). Here, since the final bit string of the complement set ((A ∩ B) ∪ (C ∩ D)) includes points on the closed surface, in the final bit string of (A ∩ B) ∪ (C ∩ D), the bit string is inverted from the position +1 of the position with the smallest intersection point number where the bit is set to the position -1 of the position with the largest intersection point number. That is, the final bit string of the complement set ((A ∩ B) ∪ (C ∩ D)) is the inverted bit string of the bit string set at intersection point numbers 2 to 5. Then, perform a set operation on the provisional bit string of the complement set ((A ∩ B) ∪ (C ∩ D)) ∩ E and the final bit string of the complement set ((A ∩ B) ∪ (C ∩ D)) to obtain the final bit string of the complement set ((A ∩ B) ∪ (C ∩ D)) ∩ E. From the final bit string, it can be seen that the first position where the ray 1 passes through the solid model in CSG representation is at the position C of intersection point number 6 out is the position.
[0100] FIG. 24 is a diagram schematically showing the situation where the ray 2 passes through the solid model in CSG representation, and FIG. 25 is a diagram for explaining the intersection point information where the ray 2 passes through the feature. As shown in FIG. 24, the ray 2 passes through in A in B in E out A in C out B in D out C out D out the closed surfaces of primitives A to E in the order of
[0101] As shown in Fig. 25, using the intersection information, in the same way as described above, the final bit sequence of (A ∩ B) ∪ (C ∩ D) is obtained from the final bit sequences of (A ∩ B) and (C ∩ D), and the final bit sequence of the complement set ((A ∩ B) ∪ (C ∩ D)) is obtained. The final bit sequence of the complement set ((A ∩ B) ∪ (C ∩ D)) is the one obtained by inverting the bit sequence standing at intersection number 3. Then, the provisional bit sequence of the complement set ((A ∩ B) ∪ (C ∩ D)) ∩ E and the final bit sequence of the complement set ((A ∩ B) ∪ (C ∩ D)) are subjected to set operation to obtain the final bit sequence of the complement set ((A ∩ B) ∪ (C ∩ D)) ∩ E. From the final bit sequence, it can be seen that the first position where the ray 2 passes through the solid model in CSG representation is the position of A at intersection number 4 out is understood.
[0102] Fig. 26 is a diagram schematically showing the situation where the ray 3 passes through the solid model in CSG representation, and Fig. 27 is a diagram for explaining the intersection information when the ray 3 passes through the feature. As shown in Fig. 26, the ray 3 passes through the closed surfaces of the primitives A to E in the order of E in , A in , B in , A out , C in , B out , D in , C out , D out , E out .
[0103] As shown in Fig. 27, using the intersection information, in the same way as described above, the final bit sequence of (A ∩ B) ∪ (C ∩ D) is obtained from the final bit sequences of (A ∩ B) and (C ∩ D), and the final bit sequence of the complement set ((A ∩ B) ∪ (C ∩ D)) is obtained. The final bit sequence of the complement set ((A ∩ B) ∪ (C ∩ D)) is the one obtained by inverting the bit sequence where the bits are not standing. Then, the provisional bit sequence of the complement set ((A ∩ B) ∪ (C ∩ D)) ∩ E and the final bit sequence of the complement set ((A ∩ B) ∪ (C ∩ D)) are subjected to set operation to obtain the final bit sequence of the complement set ((A ∩ B) ∪ (C ∩ D)) ∩ E. From the final bit sequence, it can be seen that the first position where the ray 3 passes through the solid model in CSG representation is the position of E at intersection number 1 in is understood.
[0104] [Display Example] FIG. 28 is a diagram showing a display example of Feature 1 shown in FIG. 15. FIG. 29 is a diagram showing a display example of the part shown in FIG. 16. Further, FIG. 30 is a display example of the part obtained by performing a union operation on Feature 1 and the cylinder.
[0105] Since the 3D CAD system displays a 3D model on a 2D screen, it frequently changes the viewing point for model recognition. However, by using a differential polyhedron model, which is a triangular aggregate model, for the 3D model and quickly calculating the reflected light when light is applied to the triangles, the display when the viewing point is changed can be processed quickly. In particular, by using hardware capable of real-time ray tracing, a solid model represented by CSG can be displayed in real time.
Explanation of Reference Numerals
[0106] 1 Shape processing unit, 2 Storage unit, 3 Display processing unit, 4 Data conversion unit, 11 Primitive generation unit, 12 Set operation processing unit, 13 Drawing line generation unit, 21 CPU, 22 GPU, 23 ROM, 24 RAM, 25 Operation input unit, 26 Storage, 27 Input / output interface
Claims
1. A set of differential polyhedra including the three-dimensional coordinate values of the triangle vertices, the normal vectors of the triangle vertices, and the curve elements composed of the start and end points consisting of the triangle vertices and the tangent vectors of the start and end points. Using a differential polyhedron model including a triangle mesh model, the sides of the differential polyhedra are connected to form a curved surface, and the curved surfaces are connected by a curved surface boundary line to form a closed surface. A primitive generation unit that generates a primitive, which is a set of points belonging to the interior of the closed surface, A storage unit that stores CSG data representing a solid model in CSG representation by the tree structure of the set operation of the primitive, A display processing unit that obtains the intersection point between the solid model and the ray from the intersection point between the closed surface of the primitive and the ray by the set operation based on the CSG data, and calculates the reflection position and reflection direction of the ray in the solid model A 3D CAD system comprising the above.
2. The 3D CAD system according to claim 1, wherein the primitive generation unit adds a curve element composed of a start point and an end point consisting of triangle vertices and tangent vectors of the start point and the end point based on the three-dimensional coordinate values of the triangle vertices and the normal vectors of the triangle vertices, and generates the differential polyhedron.
3. The 3D CAD system according to claim 1 or 2, wherein the primitive generation unit generates a geodesic line using the three-dimensional coordinate values and the normal vectors of the triangle vertices shared by the adjacent first differential polyhedron and the second differential polyhedron, constructs a connection relationship by sharing the geodesic line, and forms a curved surface.
4. The 3D CAD system according to any one of claims 1 to 3, wherein the primitive generation unit constructs a connection relationship between the curved surfaces using the curve elements shared between the curved surfaces, and constructs a closed surface connecting the curved surfaces.
5. The 3D CAD system according to any one of claims 1 to 4, wherein the curve element composed of the tangent vectors of the start point and the end point is represented by a cubic polynomial curve shown in the following formula (1). 【Number 1】
6. The 3D CAD system according to any one of claims 1 to 5, wherein the display processing unit omits the set operation symbol when there are the same set operation symbols above and below the hierarchy in the tree structure of the set operation of the primitive, and obtains the intersection point between the solid model and the ray.
7. The 3D CAD system according to any one of claims 1 to 6, wherein the display processing unit obtains an intersection point between the solid model and a ray using real-time ray tracing.
8. further comprising a drawing generation unit that generates an intersection line of two primitives as a drawing line, The 3D CAD system according to any one of claims 1 to 7, wherein the primitive generation unit generates a new primitive based on the drawing line.
9. The 3D CAD system according to claim 1, wherein the differential polyhedron model includes a triangular mesh model with normal vectors added by calculating normal vectors of triangle vertices from CAD data.
10. The 3D CAD system according to claim 1, wherein the primitive generation unit generates a spatial geodesic using normal vectors of vertices at both ends of an edge line of the differential polyhedron model, adds vertices and normal vectors to an intermediate point of the spatial geodesic to generate two edge lines, and subdivides the differential polyhedron.
11. The 3D CAD system according to claim 1, wherein the display processing unit calculates a reflection position and a reflection direction of a ray in the solid model based on vertices and normal vectors of triangles of the differential polyhedron model.
12. a set of differential polyhedra including three-dimensional coordinate values of triangle vertices, normal vectors of triangle vertices, curve elements composed of start points and end points consisting of triangle vertices, and tangent vectors of the start points and end points, using a differential polyhedron model including a triangular mesh model, connecting sides of the differential polyhedra to form a surface, connecting between the surfaces with a surface boundary line to form a closed surface, and a primitive generation step of generating a primitive that is a set of points belonging to the inside of the closed surface; a storage step of storing CSG data representing a solid model in a storage unit according to a tree structure of a set operation of the primitives; a display processing step of obtaining an intersection point between the solid model and a ray from an intersection point between the closed surface of the primitive and the ray by a set operation based on the CSG data, and calculating a reflection position and a reflection direction of the ray in the solid model A 3D CAD method having.
13. A set of differential polyhedra including the three-dimensional coordinate values of the triangle vertices, the normal vectors of the triangle vertices, and the curve elements composed of the start and end points consisting of the triangle vertices and the tangent vectors of the start and end points. Using a differential polyhedron model including a triangle mesh model, connecting the sides of the differential polyhedra to form a surface, connecting the surfaces with a surface boundary line to form a closed surface, and a primitive generation step of generating a primitive which is a set of points belonging to the inside of the closed surface. A storage step of storing CSG data representing a solid model in a storage unit in a tree structure of the set operation of the primitive. A display processing step of obtaining the intersection point between the solid model and the ray from the intersection point between the closed surface of the primitive and the ray by a set operation based on the CSG data, and calculating the reflection position and reflection direction of the ray in the solid model. A 3D CAD program for causing a computer to execute.
Citation Information
Patent Citations
Device and method for processing curved surface image
JP2004178576A
Level set surface editing operators
US20040170302A1