return aResList;
}
-}
+
+ TopoDS_Shape HYDROData_LandCoverMap::RemoveInternal(const TopoDS_Shape& InSh)
+ {
+ //Shape must be topologically correct
+ TopExp_Explorer anExp(InSh, TopAbs_EDGE);
+ TopTools_ListOfShape anEdgesToRemove;
+
+ for(; anExp.More(); anExp.Next() )
+ {
+ TopoDS_Edge CurEdge = TopoDS::Edge(anExp.Current());
+ if (CurEdge.Orientation() == TopAbs_INTERNAL)
+ anEdgesToRemove.Append(CurEdge);
+ }
+
+ Handle_ShapeBuild_ReShape aReshape = new ShapeBuild_ReShape();
+ TopoDS_Shape OutSh = aReshape->Apply(InSh);
+ TopTools_ListIteratorOfListOfShape aIt(anEdgesToRemove);
+ for (; aIt.More(); aIt.Next())
+ aReshape->Remove(aIt.Value());
+ OutSh = aReshape->Apply(InSh);
+
+ Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape;
+ sfs->Init(OutSh);
+ sfs->Perform();
+ return sfs->Shape();
+
+ }
+
+ void HYDROData_LandCoverMap::SetTransparency( double theTransparency )
+ {
+ Handle(TDataStd_Real) anAttr;
+ TDF_Label aLabel = myLab.FindChild( DataTag_Transparency );
+ if( !aLabel.FindAttribute( TDataStd_Real::GetID(), anAttr ) )
+ aLabel.AddAttribute( anAttr = new TDataStd_Real() );
+ anAttr->Set( theTransparency );
+ }
+
+ double HYDROData_LandCoverMap::GetTransparency() const
+ {
+ Handle(TDataStd_Real) anAttr;
+ TDF_Label aLabel = myLab.FindChild( DataTag_Transparency );
+ if( !aLabel.FindAttribute( TDataStd_Real::GetID(), anAttr ) )
+ return 0.5;
+
+ return anAttr->Get();
+
++}
HYDRODATA_EXPORT void StoreLandCovers( const HYDROData_MapOfFaceToStricklerType& );
- /**
- * Checks that object has 2D presentation. Reimlemented to retun true.
- */
+ HYDRODATA_EXPORT virtual bool IsHas2dPrs() const;
+
+ HYDRODATA_EXPORT void SetTransparency( double );
+ HYDRODATA_EXPORT double GetTransparency() const;
+
+ HYDRODATA_EXPORT TopoDS_Shape RemoveInternal(const TopoDS_Shape& InSh);
+
protected:
void SetShape( const TopoDS_Shape& );