AMCAX Kernel
Geometry kernel for CAD/CAE/CAM
九韶内核 1.0.0.0
载入中...
搜索中...
未找到
IGES 文件读写示例

概述

本教程介绍 AMCAX IGES 模块的基本用法。

使用方式

引入头文件

#include <iges/IgesIO.hpp>
IgesIO 类

从 iges/igs 文件中读取 TopoShape

AMCAX::IGES::IgesIO::Read(ts, "./iges/test.igs");
static AMCAX_API bool Read(TopoShape &s, const std::string &file)
从文件中读取形状
Base class of shape, containing an underlying shape with a location and an orientation
定义 TopoShape.hpp:15

将 TopoShape 写入 iges/igs 文件

AMCAX::IGES::IgesIO::Write(ts, "./iges/test1.igs");
static AMCAX_API bool Write(const TopoShape &s, const std::string &file, int format=0)
将形状写入文件

附录

下面列出了此示例的完整代码:

#include <iges/IgesIO.hpp>
void test_all()
{
if (AMCAX::IGES::IgesIO::Read(ts, "./iges/test.igs"))
if (!ts.IsNull())
AMCAX::IGES::IgesIO::Write(ts, "./iges/test1.igs");
}
AMCAX_API bool IsNull() const
Is the shape null