RobWorkProject  23.9.11-
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CSGModel Class Reference

A CSG (Constructive Solid Geometry) model representation. More...

#include <CSGModel.hpp>

Public Types

typedef rw::core::Ptr< CSGModelPtr
 Smart pointer type for CSGModel.
 

Public Member Functions

 CSGModel ()
 Constructor.
 
virtual ~CSGModel ()
 Destructor.
 
 CSGModel (const CSGModel &csgmodel)
 Copy constructor. More...
 
 CSGModel (const rw::geometry::TriMesh &trimesh)
 Constructs CSGModel from TriMesh.
 
void translate (float x, float y, float z)
 Translates the model.
 
void rotate (float r, float p, float y)
 Rotates the model.
 
void transform (const rw::math::Transform3D<> &T)
 Applies RobWork transformation to the model.
 
void add (CSGModel::Ptr model)
 Adds a volume.
 
void subtract (CSGModel::Ptr model)
 Subtracts a volume.
 
void intersect (CSGModel::Ptr model)
 Intersects volumes.
 
rw::geometry::TriMesh::Ptr getTriMesh ()
 Returns RobWork geometry representation.
 
void saveToStl (const std::string &filename)
 Saves the CSGModel in Stl format.
 

Protected Member Functions

void _convertToTriMesh ()
 Converts internal csgjs geometry representation to TriMesh.
 

Protected Attributes

bool _needsConversion
 
rw::core::Ptr< csgjs_model > _model
 
rw::geometry::TriMesh::Ptr _mesh
 

Detailed Description

A CSG (Constructive Solid Geometry) model representation.

Defines operators to perform addition, difference, and intersection operations on solids, as well as utility functions to construct geometry based on primitives, translate and rotate models, and convert them to and from RobWork represntations.

Constructor & Destructor Documentation

◆ CSGModel()

CSGModel ( const CSGModel csgmodel)

Copy constructor.

Parameters
csgmodel[in] other CSGModel to copy.

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