return getShape3D();
}
-bool HYDROData_Channel::CreatePresentaions( const Handle(HYDROData_Polyline3D)& theGuideLine,
+bool HYDROData_Channel::CreatePresentations( const Handle(HYDROData_Polyline3D)& theGuideLine,
const Handle(HYDROData_Profile)& theProfile,
PrsDefinition& thePrs )
{
Handle(HYDROData_Profile) aProfile = GetProfile();
PrsDefinition aResultPrs;
- if ( !CreatePresentaions( aGuideLine, aProfile, aResultPrs ) )
+ if ( !CreatePresentations( aGuideLine, aProfile, aResultPrs ) )
return;
SetShape3D( aResultPrs.myPrs3D );
public:
/**
- * Creates the presentation by given guide line and profile.
+ * Creates the presentations(2D and 3D) by given guide line and profile.
*/
- HYDRODATA_EXPORT static bool CreatePresentaions( const Handle(HYDROData_Polyline3D)& theGuideLine,
- const Handle(HYDROData_Profile)& theProfile,
- PrsDefinition& thePrs );
+ HYDRODATA_EXPORT static bool CreatePresentations( const Handle(HYDROData_Polyline3D)& theGuideLine,
+ const Handle(HYDROData_Profile)& theProfile,
+ PrsDefinition& thePrs );
public:
return false;
}
- if( !myIsEdit || ( !myEditedObject.IsNull() && myEditedObject->GetName() != anObjectName ) )
+ if ( !myIsEdit || ( !myEditedObject.IsNull() && myEditedObject->GetName() != anObjectName ) )
{
// check that there are no other objects with the same name in the document
Handle(HYDROData_Entity) anObject = HYDROGUI_Tool::FindObjectByName( module(), anObjectName );
{
Handle(AIS_InteractiveContext) aCtx = aViewer->getAISContext();
if ( !aCtx.IsNull() )
+ {
myPreviewPrs = new HYDROGUI_Shape( aCtx, NULL, getPreviewZLayer() );
+
+ QColor aFillingColor = getDefaultFillingColor();
+ QColor aBorderColor = getDefaultBorderColor();
+ if ( !myEditedObject.IsNull() )
+ {
+ aFillingColor = myEditedObject->GetFillingColor();
+ aBorderColor = myEditedObject->GetBorderColor();
+ }
+
+ myPreviewPrs->setFillingColor( aFillingColor, false, false );
+ myPreviewPrs->setBorderColor( aBorderColor, false, false );
+ }
}
}
HYDROGUI_Tool::FindObjectByName( module(), aProfileName, KIND_PROFILE ) );
HYDROData_Channel::PrsDefinition aPrsDef;
- if ( !HYDROData_Channel::CreatePresentaions( aGuideLine, aProfile, aPrsDef ) )
+ if ( !HYDROData_Channel::CreatePresentations( aGuideLine, aProfile, aPrsDef ) )
{
erasePreview();
return;
}
- QColor aFillingColor = getDefaultFillingColor();
- QColor aBorderColor = getDefaultBorderColor();
- if ( !myEditedObject.IsNull() )
- {
- aFillingColor = myEditedObject->GetFillingColor();
- aBorderColor = myEditedObject->GetBorderColor();
- }
-
- myPreviewPrs->setFillingColor( aFillingColor, false, false );
- myPreviewPrs->setBorderColor( aBorderColor, false, false );
-
myPreviewPrs->setShape( aPrsDef.myPrs2D );
}