#include <BRepCheck_Shell.hxx>
#include <BRepCheck_ListOfStatus.hxx>
#include <TopTools_SequenceOfShape.hxx>
-#include <Handle_Geom_Curve.hxx>
-#include <Handle_Geom_Line.hxx>
-#include <Handle_Geom_TrimmedCurve.hxx>
+#include <Geom_Curve.hxx>
+#include <Geom_Line.hxx>
+#include <Geom_TrimmedCurve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#include <NCollection_DoubleMap.hxx>
const int TELEMAC_PRECISION = 3;
-IMPLEMENT_STANDARD_HANDLE(HYDROData_LandCoverMap, HYDROData_Entity)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_LandCoverMap, HYDROData_Entity)
/**
void Dump( const QString& theName, const QStringList& theList, QStringList& theLines )
{
- theLines.append( QString( "%1 = QStringList()" ).arg( theName ) );
+ theLines.append( QString( "%1 = []" ).arg( theName ) );
foreach( QString anItem, theList )
theLines.append( QString( "%1.append( u\"%2\" )" ).arg( theName ).arg( anItem ) );
}
HYDROData_Document::Document( myLab )->CollectQGISValues( anAttr, anAttrValues, aTypes );
ExportDBF( aDbfFileName, anAttr, anAttrValues, aTypes );
- aResList << QString( "%1.ImportSHP( '%2' )" ).
+ aResList << QString( "if not(%1.ImportSHP( '%2' )):" ).
arg( aName ).arg( QFileInfo( aShpFileName ).fileName() );
+ aResList << QString( " raise ValueError('problem while loading LandCoverMap shape')" );
Dump( "attr_values", anAttrValues, aResList );
Dump( "types", aTypes, aResList );
- aResList << QString( "%1.ImportDBF( '%2', '%3', attr_values, types )" ).
+ aResList << QString( "if (%1.ImportDBF( '%2', '%3', attr_values, types ) != %1.DBFStatus_OK):" ).
arg( aName ).arg( QFileInfo( aDbfFileName ).fileName() ).arg( anAttr );
+ aResList << QString( " raise ValueError('problem while loading LandCoverMap data base')" );
return aResList;
}
//
if (!anEdgesToRemove.IsEmpty())
{
- Handle_ShapeBuild_ReShape aReshape = new ShapeBuild_ReShape();
+ Handle(ShapeBuild_ReShape) aReshape = new ShapeBuild_ReShape();
TopoDS_Shape OutF = aReshape->Apply(CurFace);
TopTools_ListIteratorOfListOfShape aIt(anEdgesToRemove);
for (; aIt.More(); aIt.Next())
}
}
//
- Handle_ShapeBuild_ReShape anExtReshape = new ShapeBuild_ReShape();
+ Handle(ShapeBuild_ReShape) anExtReshape = new ShapeBuild_ReShape();
for (int i = 1; i <= aF2FReplace->Extent(); i++)
{
TopoDS_Face aFK = aF2FReplace->FindKey(i);
double HYDROData_LandCoverMap::GetTransparency() const
{
- return GetDouble( DataTag_Transparency, 0.5 );
+ return GetDouble( DataTag_Transparency, 0.25 );
}
bool HYDROData_LandCoverMap::ImportSHP( const QString& theSHPFileName,
{
TopoDS_Edge E = TopoDS::Edge(anEdgeEx.Current());
double aFP, aLP;
- Handle_Geom_Curve aCur = BRep_Tool::Curve(E, aFP, aLP);
+ Handle(Geom_Curve) aCur = BRep_Tool::Curve(E, aFP, aLP);
Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast(aCur);
if (aLine.IsNull())
{