setPythonReferenceObject( theTreatedObjects, aResList, aProfile, "AddProfile" );
}
- // Create bottom polyline if exists
+ // Set bottom polyline if exists
const Handle(HYDROData_Polyline3D) aBottomPolyline = GetBottomPolyline();
if ( !aBottomPolyline.IsNull() ) {
- aResList << QString( "%1.GenerateBottomPolyline();" ).arg( aName );
+ setPythonReferenceObject( theTreatedObjects, aResList, aBottomPolyline, "SetBottomPolyline" );
}
aResList << QString( "" );
GetReferenceObject( DataTag_BottomPolyline ) );
}
+bool HYDROData_Stream::SetBottomPolyline( const Handle(HYDROData_Polyline3D)& theBottom )
+{
+ if ( theBottom.IsNull() ) {
+ return false;
+ }
+
+ SetReferenceObject( theBottom, DataTag_BottomPolyline );
+
+ return true;
+}
+
bool HYDROData_Stream::Interpolate( HYDROData_IProfilesInterpolator* theInterpolator )
{
// Get the document
* Returns reference bottom polyline object of stream.
*/
HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline3D) GetBottomPolyline() const;
+
+ /**
+ * Sets reference bottom polyline object for stream.
+ * \param theBottom the polyline 3D
+ * \return true in case of success
+ */
+ HYDRODATA_EXPORT virtual bool SetBottomPolyline( const Handle(HYDROData_Polyline3D)& theBottom );
/**
* Add interpolated profiles into the stream.
sipRes = (HYDROData_Polyline3D*)createPointer( aRef );
%End
+ /**
+ * Sets reference bottom polyline object for stream.
+ */
+ bool SetBottomPolyline( HYDROData_Polyline3D theBottom )
+ [bool ( const Handle_HYDROData_Polyline3D& )];
+ %MethodCode
+ Handle(HYDROData_Polyline3D) aRef =
+ Handle(HYDROData_Polyline3D)::DownCast( createHandle( a0 ) );
+ if ( !aRef.IsNull() )
+ {
+ Py_BEGIN_ALLOW_THREADS
+ sipRes = sipSelfWasArg ? sipCpp->HYDROData_Stream::SetBottomPolyline( aRef ):
+ sipCpp->SetBottomPolyline( aRef );
+ Py_END_ALLOW_THREADS
+ }
+ %End
+
protected:
/**
* Creates new object in the internal data structure. Use higher level objects