Add persistance dimensions : fix compilation errors on linux.

This commit is contained in:
rnv 2014-01-21 13:55:45 +00:00
parent c45960d4f9
commit b351ee9fc2
2 changed files with 15 additions and 13 deletions

View File

@ -76,6 +76,20 @@
#include <TColgp_SequenceOfDir.hxx> #include <TColgp_SequenceOfDir.hxx>
#include <V3d_View.hxx> #include <V3d_View.hxx>
// plane associated with custom data
struct PlaneAndSegment
{
PlaneAndSegment() {}
PlaneAndSegment(const gp_Pln& thePlane, const MeasureGUI_DimensionCreateTool::Segment& theSegment) : pln(thePlane), seg(theSegment) {}
operator gp_Pln () const { return pln; }
operator MeasureGUI_DimensionCreateTool::Segment () const { return seg; }
gp_Pln pln;
MeasureGUI_DimensionCreateTool::Segment seg;
};
typedef NCollection_Sequence<PlaneAndSegment> SeqOfPlnsAndSegments;
//================================================================================= //=================================================================================
// function : Constructor // function : Constructor
// purpose : // purpose :
@ -915,18 +929,6 @@ void MeasureGUI_DimensionCreateTool::PositionDiameter( const Bnd_Box& theBnd,
gp_Pnt& thePnt2, gp_Pnt& thePnt2,
gp_Pln& thePln ) const gp_Pln& thePln ) const
{ {
// plane associated with custom data
struct PlaneAndSegment
{
PlaneAndSegment() {}
PlaneAndSegment(const gp_Pln& thePlane, const Segment& theSegment) : pln(thePlane), seg(theSegment) {}
operator gp_Pln () const { return pln; }
operator Segment () const { return seg; }
gp_Pln pln;
Segment seg;
};
typedef NCollection_Sequence<PlaneAndSegment> SeqOfPlnsAndSegments;
// select list of measured segments aligned to projection planes // select list of measured segments aligned to projection planes
SeqOfDirs aProjectionDirs; SeqOfDirs aProjectionDirs;
aProjectionDirs.Append( gp::DX() ); aProjectionDirs.Append( gp::DX() );

View File

@ -47,6 +47,7 @@
//================================================================================= //=================================================================================
class MeasureGUI_DimensionCreateTool class MeasureGUI_DimensionCreateTool
{ {
public:
struct Segment struct Segment
{ {
gp_Pnt First; gp_Pnt First;
@ -56,7 +57,6 @@ class MeasureGUI_DimensionCreateTool
typedef NCollection_Sequence<gp_Pln> SeqOfPlanes; typedef NCollection_Sequence<gp_Pln> SeqOfPlanes;
typedef NCollection_Sequence<Segment> SeqOfSegments; typedef NCollection_Sequence<Segment> SeqOfSegments;
public:
MeasureGUI_DimensionCreateTool(); MeasureGUI_DimensionCreateTool();
struct struct