#include <TopTools_SequenceOfShape.hxx>
-#define _DEVDEBUG_
+//#define _DEVDEBUG_
#include "HYDRO_trace.hxx"
#include <QColor>
bool anIsSectionClosed = aPolylineXY->IsClosedSection( 0 );
HYDROData_IPolyline::SectionType aSectionType = aPolylineXY->GetSectionType( 0 );
- NCollection_Sequence<Polyline3DPoint> aResPoints = GetProfilePoints3D();
+ NCollection_Sequence<Polyline3DPoint> aResPoints = GetProfilePoints3D(false);
TopoDS_Wire aResWire = HYDROData_PolylineXY::BuildWire( aSectionType, anIsSectionClosed, aResPoints );
SetTopShape( aResWire );
SetShape3D( aResWire );
}
-HYDROData_Polyline3D::Polyline3DPoints HYDROData_Polyline3D::GetProfilePoints3D()
+HYDROData_Polyline3D::Polyline3DPoints HYDROData_Polyline3D::GetProfilePoints3D(bool IsConvertToGlobal)
{
Handle(HYDROData_PolylineXY) aPolylineXY = GetPolylineXY();
if ( aPolylineXY.IsNull() )
// Add last point as is
aResPoints.Append( Polyline3DPoint( aLastPoint.X(), aLastPoint.Y(), aLastParPoint.Y() ) );
+ if (IsConvertToGlobal)
+ {
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
+ for (int i=1;i<=aResPoints.Size();i++)
+ {
+ gp_XYZ& point = aResPoints.ChangeValue(i);
+ aDoc->Transform( point, false );
+ }
+ }
return aResPoints;
}
if ( !theIsCreate || !aProfileUZ.IsNull() )
return aProfileUZ;
- Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
+ Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
if ( aDocument.IsNull() )
return aProfileUZ;