Up Title 

  Overview Creating  Editing  Special Commands  File Format  Control Points  Field

brep - File Format

Text file format

Example:

{ brep
    model filename;

 }

filename - name of the file, but in the same directory of the scene.
 

Binary file Format

Not allowed.

brep object are described in brp file format.

brp file format
The description of a simple file .brp:

 

{ pbrep

 vertices

 3

 0 0 0

1 0 0

 1 1 0

 0 1 0

 

faces

 1

 { 1 { 4 0 1 2 3 } }

 }

 

This is a simple object. It is a square in the plane x-y with edge of 1.

 Remember this is an open brep, you cannot assume it will be a transparent object.

 There are definite four vertices, which we call A for (0,0,0) , B for ( 1,0,0) , C for (1,1,0) , D for (0,1,0) . It is definite one face with one contour. A face can have more than a contour; in this case the first contour is the external contour, while the others are holes in the face.

 Every face has a normal versor, which describes the external side of a face. We can tell this to the program with the order we put the vertices in the contour description:

 

x exit

 . enter

 

ABCD anticlockwise

 

 ADCB clockwise

 

If you have a hole, the order of the hole contour must be opposite to the external.

 

defbrep_name

name of the file .brp which describes the geometric model of the object. The file .brp will have name defbrep_name + ".brp" and will be in the directory where are all the models.
defbrep_costr

value for the hierarchy of the object. If the value is equal to zero, no hierarchy will be used. Se the value is different from zero and a previus hierarchy of the object already exist, this will be used ( also if it has been created with a different value). If the hierarchy doesn' t exist, the program will create a new with compactness value equal to the value.
File .brp

Definition of a geometric model of type Boundary Representation.

 

A face is defined by some contours. The first contour is the extern contour, which must be always included; the other contours describe the holes in the face.

A contour of a face is defined by the values of vertex indexes which limit it.

You must verificate the condition that all vertices of all contours in a face are complanar.

 



Up Title