AMCAX Kernel
Geometry kernel for CAD/CAE/CAM
AMCAX Kernel 1.0.0.0
Loading...
Searching...
No Matches
AMCAX::STEP::Step2Mesh< Traits > Class Template Reference

Class for reading STEP file and convert it to mesh. More...

#include <step/Step2Mesh.hpp>

Collaboration diagram for AMCAX::STEP::Step2Mesh< Traits >:

Classes

struct  SolidInfo
 

Public Types

using PointT = typename Traits::PointT
 Point type.
 
using NormalT = typename Traits::NormalT
 Vector type.
 
using Triangle = typename Traits::Triangle
 triangle.
 
using Points = typename Traits::Points
 An array that stores points for vertices. E.g., std::vector<PointT> or Eigen::VectorX<PointT>.
 
using Normals = typename Traits::Normals
 An array that stores normals. E.g., std::vector<NormalT> or Eigen::VectorX<NormalT>.
 
using Triangles = typename Traits::Triangles
 An array that stores indices of three vertices for all faces. E.g., std::vector<std::array<index_t,3>> or Eigen::VectorX<Eigen::Vector3i>.
 
using pn_t = std::remove_reference_t<decltype(std::declval<PointT>()[0])>
 
using nn_t = std::remove_reference_t<decltype(std::declval<NormalT>()[0])>
 
using ti_t = std::remove_reference_t<decltype(std::declval<Triangle>()[0])>
 

Public Member Functions

AMCAX_API Step2Mesh ()
 Default constructor.
 
AMCAX_API ~Step2Mesh () noexcept
 Default destructor.
 
AMCAX_API bool read (const std::string &filename, double linDeflection=1e-2, bool isRelative=true)
 Read triangle soup from the file. results will be stored in member variables of reader, e.g., points, triangles.
 
AMCAX_API bool read (const std::string &filename, double linDeflection, bool isRelative, double angDeflection)
 Read triangle soup from the file. results will be stored in member variables of reader, e.g., points, triangles.
 
AMCAX_API bool read (const TopoShape &shape, double linDeflection=1e-2, bool isRelative=true)
 Read triangle soup from the file. results will be stored in member variables of reader, e.g., points, triangles.
 
AMCAX_API bool read (const TopoShape &shape, double linDeflection, bool isRelative, double angDeflection)
 Read triangle soup from the file. results will be stored in member variables of reader, e.g., points, triangles.
 

Public Attributes

Points m_points
 point position
 
Normals m_normals
 point normal
 
Triangles m_triangles
 triangle faces
 
std::vector< SolidInfom_solids
 

Detailed Description

template<typename Traits>
class AMCAX::STEP::Step2Mesh< Traits >

Class for reading STEP file and convert it to mesh.

Template Parameters
TraitsThe traits class that defines the types of points, normals, and triangles.
Deprecated
This class is deprecated and will be removed in the future. Use <step/mesh/StepMeshDataTool.hpp> instead.

Member Function Documentation

◆ read() [1/4]

template<typename Traits>
AMCAX_API bool AMCAX::STEP::Step2Mesh< Traits >::read ( const std::string & filename,
double linDeflection,
bool isRelative,
double angDeflection )

Read triangle soup from the file. results will be stored in member variables of reader, e.g., points, triangles.

Parameters
[in]filenamepath/name of the file.
[in]linDeflectionThe linear deflection.
[in]isRelativeDetermine whether the deflection is computed relatively
[in]angDeflectionThe angle deflection
Returns
true if succeed to read the file.

◆ read() [2/4]

template<typename Traits>
AMCAX_API bool AMCAX::STEP::Step2Mesh< Traits >::read ( const std::string & filename,
double linDeflection = 1e-2,
bool isRelative = true )

Read triangle soup from the file. results will be stored in member variables of reader, e.g., points, triangles.

Parameters
[in]filenamepath/name of the file.
[in]linDeflectionThe linear deflection.
[in]isRelativeDetermine whether the deflection is computed relatively
Returns
true if succeed to read the file.

◆ read() [3/4]

template<typename Traits>
AMCAX_API bool AMCAX::STEP::Step2Mesh< Traits >::read ( const TopoShape & shape,
double linDeflection,
bool isRelative,
double angDeflection )

Read triangle soup from the file. results will be stored in member variables of reader, e.g., points, triangles.

Parameters
[in]filenamepath/name of the file.
[in]linDeflectionThe linear deflection.
[in]isRelativeDetermine whether the deflection is computed relatively
[in]angDeflectionThe angle deflection
Returns
true if succeed to read the file.

◆ read() [4/4]

template<typename Traits>
AMCAX_API bool AMCAX::STEP::Step2Mesh< Traits >::read ( const TopoShape & shape,
double linDeflection = 1e-2,
bool isRelative = true )

Read triangle soup from the file. results will be stored in member variables of reader, e.g., points, triangles.

Parameters
[in]filenamepath/name of the file.
[in]linDeflectionThe linear deflection.
[in]isRelativeDetermine whether the deflection is computed relatively
Returns
true if succeed to read the file.

The documentation for this class was generated from the following file: