Navigation

Main Page
Download
Support
Installation
Tutorial
Examples
Reference Manual
   Version 1.0.6dev
      Class Index
      File List
   Version 1.0.6
   Version 1.0.5new_solver
   Version 1.0.5dev
   Version 1.0.5b
   Version 1.0.4dev
   Version 1.0.4
Publications


Hosted by Get Ion Beam Simulator at SourceForge.net. Fast, secure and Free Open Source software downloads

MyDXFFile solid class. More...

#include <dxf_solid.hpp>

Inheritance diagram for DXFSolid:
Solid

Public Member Functions

 DXFSolid (MyDXFFile *dxffile, const std::string &layername)
 Constructor for making a solid from a DXF-file layer. More...
 
 DXFSolid (MyDXFFile *dxffile, MyDXFEntities *ent)
 Constructor for making a solid from entities in a MyDXFEntities object ent. More...
 
 DXFSolid (std::istream &is)
 Constructor for loading solid data from stream is. More...
 
virtual ~DXFSolid ()
 Destructor. More...
 
virtual bool inside (const Vec3D &x) const
 Return if 3D point x in simulation space is inside solid. More...
 
void debug_print (std::ostream &os) const
 Print debugging information to stream os. More...
 
void define_2x3_mapping (Vec3D(*func)(const Vec3D &))
 Define mapping from 3D space to 2D space. More...
 
virtual void save (std::ostream &os) const
 Saves solid data to stream os. More...
 
- Public Member Functions inherited from Solid
virtual ~Solid ()
 Virtual destructor. More...
 
void reset_transformation (void)
 Set transformation to unity. More...
 
void set_transformation (const Transformation &T)
 Set transformation. More...
 
void translate (const Vec3D &dx)
 Translate solid. More...
 
void scale (double sx)
 Scale solid. More...
 
void scale (const Vec3D &sx)
 Scale solid. More...
 
void rotate_x (double a)
 Rotate solid around x-axis. More...
 
void rotate_y (double a)
 Rotate solid around y-axis. More...
 
void rotate_z (double a)
 Rotate solid around z-axis. More...
 

Static Public Member Functions

static Vec3D unity (const Vec3D &x)
 Unity transformation. More...
 
static Vec3D rotx (const Vec3D &x)
 Solid of revolution around x-axis. More...
 
static Vec3D roty (const Vec3D &x)
 Solid of revolution around y-axis. More...
 
static Vec3D rotz (const Vec3D &x)
 Solid of revolution around z-axis. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Solid
 Solid ()
 Constructor. More...
 
- Protected Attributes inherited from Solid
Transformation _T
 

Detailed Description

MyDXFFile solid class.

DXFSolid is an implementation of Solid using MyDXFFile entities. The solid is built from a two dimensional area defined by enclosing the area with dxf path objects in one layer. The solid volume in (three dimensional) simulation space is defined using a combination of two transformations. The first transformation is from simulation space to intermediate 3D space and it is made using the Transformation class. These intermediate 3D space points are then mapped to two dimensional dxf space using an optional user defined function. The Transformation defaults to unity matrix and if the user defined function is left undefined it defaults to $ (x,y,z) \Rightarrow (x,y) $.

Constructor & Destructor Documentation

◆ DXFSolid() [1/3]

DXFSolid::DXFSolid ( MyDXFFile dxffile,
const std::string &  layername 
)

Constructor for making a solid from a DXF-file layer.

The entities from the DXF-file layer layername are copied to DXFSolid object. No dependency stays between dxffile and the object constructed. The transformations are initialized to unity.

◆ DXFSolid() [2/3]

DXFSolid::DXFSolid ( MyDXFFile dxffile,
MyDXFEntities ent 
)

Constructor for making a solid from entities in a MyDXFEntities object ent.

Entities from ent are copied to DXFSolid object. The entities are from dxffile. An internal copy of the entities object is made. The transformations are initialized to unity.

◆ DXFSolid() [3/3]

DXFSolid::DXFSolid ( std::istream &  is)

Constructor for loading solid data from stream is.

◆ ~DXFSolid()

DXFSolid::~DXFSolid ( )
virtual

Destructor.

Member Function Documentation

◆ debug_print()

void DXFSolid::debug_print ( std::ostream &  os) const
virtual

Print debugging information to stream os.

Implements Solid.

◆ define_2x3_mapping()

void DXFSolid::define_2x3_mapping ( Vec3D(*)(const Vec3D &)  func)

Define mapping from 3D space to 2D space.

The mapping function can be user defined or one of the predefined functions: unity(), rotx(), roty() or rotz(). The mapping function can return a vector with NaN components for guaranteed inside solid result. Similarly infinity is guaranteed to give free space result.

◆ inside()

bool DXFSolid::inside ( const Vec3D x) const
virtual

Return if 3D point x in simulation space is inside solid.

Implements Solid.

◆ rotx()

Vec3D DXFSolid::rotx ( const Vec3D x)
static

Solid of revolution around x-axis.

Tranformation: $ (x,y,z) \Rightarrow (x,\sqrt(y^2+z^2)) $.

◆ roty()

Vec3D DXFSolid::roty ( const Vec3D x)
static

Solid of revolution around y-axis.

Tranformation: $ (x,y,z) \Rightarrow (y,\sqrt(x^2+z^2)) $.

◆ rotz()

Vec3D DXFSolid::rotz ( const Vec3D x)
static

Solid of revolution around z-axis.

Tranformation: $ (x,y,z) \Rightarrow (z,\sqrt(x^2+y^2)) $.

◆ save()

void DXFSolid::save ( std::ostream &  os) const
virtual

Saves solid data to stream os.

Implements Solid.

◆ unity()

Vec3D DXFSolid::unity ( const Vec3D x)
static

Unity transformation.

Default tranformation: $ (x,y,z) \Rightarrow (x,y) $.


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


Reference manual for Ion Beam Simulator 1.0.6dev
Generated by Doxygen 1.9.1 on Thu Sep 11 2025 09:37:24.