Overview
This tutorial introduces the basic usage of the AMCAX IGES module.
Iges example 1
Import the header files
Read TopoShape from iges/igs file
static AMCAX_API bool Read(TopoShape &s, const std::string &file)
Read a shape from a file.
Base class of shape, containing an underlying shape with a location and an orientation.
Definition TopoShape.hpp:15
Write TopoShape to iges/igs file
static AMCAX_API bool Write(const TopoShape &s, const std::string &file, int format=0)
Write a file from TopoShape.
Appendix
The complete code of this sample is listed here:
void test_all()
{
}
int main()
{
test_all();
}
AMCAX_API bool IsNull() const noexcept
Is the shape null.
Iges example 2
Import the header files
Read Label from iges/igs file
Currently only supports parsing Name attributes with length <= 8 bytes. Any excess portion will be truncated.
The class of Label.
Definition Label.hpp:27
Also supports input data streams.
std::ifstream file("./iges/test.igs");
Appendix
The complete code of this sample is listed here:
void demo1()
{
{
std::cout << "File reading failed or the label is null" << std::endl;
}
}
void demo2(std::istream& ist)
{
{
std::cout << "File reading failed or the label is null" << std::endl;
}
}
int main()
{
demo1();
std::ifstream file("./iges/test.igs");
demo2(file);
}
AMCAX_API bool IsNull() const noexcept
Check if the label is null.