BREP File Format
The BREP format is very simple. The file is a list of convex polygons, where each polygon is a list of vertices. The header indicates whether a particular type of information is included. "Texture" means there are may be texture coordinates while "NoTexture" means there are none, and "MaybeTexture" indicates that the presence of texture coordinates is on a per polygon basis. "Colors" means that each polygon has a rgb color specified and "NoColors" means no polygons has rgb information. "Normals" mean each vertex has its own normal where as "NoNormals" means that no vertices have normals. "MaybeNormals" makes this on a per polygon basis. Here is a BNF description:
<1.0 file> ::=
::= 1.0 ASCII BREP
{ Texture | NoTexture | MaybeTexture } { Colors | NoColors }
{ Normals | NoNormals | MaybeNormals }
::= | EOF
::=
::= a b c -1 d /* |N| = 1 */
::= * *
::= has_vertex_normals ? 2 : 1
::= has_vertex_colors ? 3 : 1
::= has_texture_coors ? 5 : 1
::=
::= -2
::= r g b -3 |
::= |
::=
::= 0
::= a b c -4 |
::= x y z
::= u v |
The BREP format from princeton.edu has nothing common with OCC's BREP. It seems there is no documentation on OCC's one. But you can look deeply in source code of BRepTools::Read and Write methods to learn how they does.
hello, I have a question. Now I only have a brep file. I must to completely understand the program, to continue the work. Could you explain to me what the numbers. A part of program is the following:
Actually, there is no need to understand the BRep format itself, as you can just load your file and then make a dump with BRepTools::Dump which will give you a more readable form of the file. I have made a survey of what the abbreviations mean, but unfortunately, this file is written in German.
Hello, thanks a lot. I got the File from a 3D software for Mikrostructure -Digimat. First, i unstand the Brep file, come to coordinate the various objects or the distance between two objects. Then, using Matlab program to extract this information.
Can you tell me how to make a dump with BRepTools in the Open Cascade?
Wed, 12/26/2007 - 20:37
Did you find any link for it? I also want to know this info. Please share with me if you have!
thanks and happy holidays!
Wed, 12/26/2007 - 21:00
BREP File Format
The BREP format is very simple. The file is a list of convex polygons, where each polygon is a list of vertices. The header indicates whether a particular type of information is included. "Texture" means there are may be texture coordinates while "NoTexture" means there are none, and "MaybeTexture" indicates that the presence of texture coordinates is on a per polygon basis. "Colors" means that each polygon has a rgb color specified and "NoColors" means no polygons has rgb information. "Normals" mean each vertex has its own normal where as "NoNormals" means that no vertices have normals. "MaybeNormals" makes this on a per polygon basis. Here is a BNF description:
<1.0 file> ::=
::= 1.0 ASCII BREP
{ Texture | NoTexture | MaybeTexture } { Colors | NoColors }
{ Normals | NoNormals | MaybeNormals }
::= | EOF
::=
::= a b c -1 d /* |N| = 1 */
::= * *
::= has_vertex_normals ? 2 : 1
::= has_vertex_colors ? 3 : 1
::= has_texture_coors ? 5 : 1
::=
::= -2
::= r g b -3 |
::= |
::=
::= 0
::= a b c -4 |
::= x y z
::= u v |
More info from: http://www.cs.princeton.edu/courses/archive/spr98/cs598d/programs/bsps.html
Fri, 12/28/2007 - 09:39
The BREP format from princeton.edu has nothing common with OCC's BREP. It seems there is no documentation on OCC's one. But you can look deeply in source code of BRepTools::Read and Write methods to learn how they does.
Thu, 11/18/2010 - 17:25
hello, I have a question. Now I only have a brep file. I must to completely understand the program, to continue the work. Could you explain to me what the numbers. A part of program is the following:
CASCADE Topology V1, (c) Matra-Datavision
Locations 4
1
1.23259516440783e-032 -1 1.11022302462516e-016 0
1.11022302462516e-016 1.11022302462516e-016 1 0
-1 0 1.11022302462516e-016 0
1
1 0 0 0.0448072012923791
0 1 0 -0.0182959774289737
0 0 1 0.107038002136871
2 1 1 2 1 0
2 2 -1 1 -1 0
Curve2ds 8
1 0 0.125 1 0
2 0 0 1 0 -0 1 0.0062500000000000003
1 6.2831853071795862 -0 0 1
1 0 -0 0 1
2 0.10703800213687077 0.044807201292379098 0 -1 1 0 0.0062500000000000003
1 1.5707963267948966 0.080795977428973653 1 0
2 0.10703800213687077 0.044807201292379098 0 -1 1 0 0.0062500000000000003
1 -4.7123889803846897 0.080795977428973653 1 0
Curves 4
2 0 0 0.0625 0 0 1 1 0 -0 -0 1 0 0.0062500000000000003
1 0.0062500000000000003 -1.5308084989341916e-018 -0.0625 0 0 1
2 0.044807201292379098 0 0.10703800213687077 1.1102230246251565e-016 1 1.1102230246251565e-016 -1 1.1102230246251565e-016 0 -1.2325951644078309e-032 -1.1102230246251565e-016 1 0.0062500000000000003
2 0.044807201292379098 0 0.10703800213687077 1.1102230246251565e-016 1 1.1102230246251565e-016 -1 1.1102230246251565e-016 0 -1.2325951644078309e-032 -1.1102230246251565e-016 1 0.0062500000000000003
Polygon3D 0
PolygonOnTriangulations 0
Surfaces 3
1 0 0 0.0625 0 0 1 1 0 -0 -0 1 0
2 0 0 -0.0625 0 0 1 1 0 -0 -0 1 0 0.0062500000000000003
1 0 0 0 -0 1 0 0 0 1 1 0 -0
Triangulations 0
TShapes 16
Ve
1e-007
0.00625 -1.53080849893419e-018 0.0625
0 0
0101101
*
Ed
1e-007 1 1 0
1 1 0 0 6.28318530717959
2 1 2 0 0 6.28318530717959
2 2 1 0 0 6.28318530717959
0
0101100
+16 0 -16 0 *
Wi
0101000
+15 0 *
Fa
0 1e-007 1 0
0111000
+14 0 *
Thanks so much!
Fri, 11/19/2010 - 11:38
Actually, there is no need to understand the BRep format itself, as you can just load your file and then make a dump with BRepTools::Dump which will give you a more readable form of the file. I have made a survey of what the abbreviations mean, but unfortunately, this file is written in German.
Fri, 11/19/2010 - 17:09
Hello, thanks a lot. I got the File from a 3D software for Mikrostructure -Digimat. First, i unstand the Brep file, come to coordinate the various objects or the distance between two objects. Then, using Matlab program to extract this information.
Can you tell me how to make a dump with BRepTools in the Open Cascade?
Thanks so mauch! :-)