diff --git a/src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx b/src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx index 087e3e810..9b3379f91 100644 --- a/src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx +++ b/src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx @@ -76,6 +76,20 @@ #include #include + +// 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 SeqOfPlnsAndSegments; + //================================================================================= // function : Constructor // purpose : @@ -915,18 +929,6 @@ void MeasureGUI_DimensionCreateTool::PositionDiameter( const Bnd_Box& theBnd, gp_Pnt& thePnt2, 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 SeqOfPlnsAndSegments; - // select list of measured segments aligned to projection planes SeqOfDirs aProjectionDirs; aProjectionDirs.Append( gp::DX() ); diff --git a/src/MeasureGUI/MeasureGUI_DimensionCreateTool.h b/src/MeasureGUI/MeasureGUI_DimensionCreateTool.h index 8a396786c..c470e53e1 100644 --- a/src/MeasureGUI/MeasureGUI_DimensionCreateTool.h +++ b/src/MeasureGUI/MeasureGUI_DimensionCreateTool.h @@ -47,6 +47,7 @@ //================================================================================= class MeasureGUI_DimensionCreateTool { + public: struct Segment { gp_Pnt First; @@ -56,7 +57,6 @@ class MeasureGUI_DimensionCreateTool typedef NCollection_Sequence SeqOfPlanes; typedef NCollection_Sequence SeqOfSegments; -public: MeasureGUI_DimensionCreateTool(); struct