return getPolylineShape();
}
+bool HYDROData_PolylineXY::SetShape( const TopoDS_Shape& theShape )
+{
+ setPolylineShape( theShape );
+ return true;
+}
+
bool convertEdgeToSection( const TopoDS_Edge& theEdge,
NCollection_Sequence<TCollection_AsciiString>& theSectNames,
NCollection_Sequence<HYDROData_PolylineXY::SectionType>& theSectTypes,
NCollection_Sequence<bool> aSectClosures;
GetSections( aSectNames, aSectTypes, aSectClosures );
- BRepBuilderAPI_MakeWire aMakeWire;
+ //BRepBuilderAPI_MakeWire aMakeWire;
TopTools_ListOfShape aSectionWiresList;
TopoDS_Wire aSectionWire = BuildWire( aSectionType, anIsSectionClosed, aPoints );
if ( !aSectionWire.IsNull() ) {
aSectionWiresList.Append( aSectionWire );
- aMakeWire.Add( aSectionWire );
+ //aMakeWire.Add( aSectionWire );
}
}
// all input wires in the <aSectionWiresList>
{
PointsList aResList;
+ if( IsCustom() )
+ {
+ //TODO: make interpolation to fill the list
+ }
+
Handle(TDataStd_RealList) aListX, aListY;
getPointsLists( theSectionIndex, aListX, aListY, false );
if ( aListX.IsNull() || aListY.IsNull() || aListX->IsEmpty() )
Update();
}
+bool HYDROData_PolylineXY::IsCustom() const
+{
+ bool isNull = getPolylineShape().IsNull();
+ int aNbPoints = 0;
+
+ //TODO: to check if there is no points
+ //for( int i=0, n=NbSections(); i<n; i++ )
+ // aNbPoints += NbPoints( i );
+
+ return !isNull && aNbPoints == 0;
+}