AMCAX Kernel 1.0.0.0
A Sample of Importing and Exporting OCCT BREP files

Overview

This tutorial provides the basic usage of AMCAX OCCTIO module to import or export an OCCT BREP file. The interface includes several ways of import and export. Users can import or export shapes by setting the filename or i/o stream. The shapes can be exported to a BREP file by setting different versions of the BREP file, and exporting with or without meshes.

Usage

Import BREP files

A BREP file can be imported by the following code:

TopoShape shape;
AMCAX::OCCTIO::OCCTTool::Read(shape, "importshape.brep");
static AMCAX_API bool Read(TopoShape &s, std::istream &is)
Read a shape from a stream.

Export BREP files

A shape can be exported to a BREP file by the following code:

AMCAX::OCCTIO::OCCTTool::Write(shape, "exportshape.brep");
static AMCAX_API bool Write(const TopoShape &s, std::ostream &os, int format=3)
Write a shape to a stream.