mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-25 17:00:35 +05:00
IPAL52828: No Creation Info available for a GEOM object imported from XAO file
This commit is contained in:
parent
73a0114391
commit
28c8e9fe42
@ -114,6 +114,7 @@ SET( _res_files
|
|||||||
fuse_collinear_edges.png
|
fuse_collinear_edges.png
|
||||||
geometry.png
|
geometry.png
|
||||||
import_picture.png
|
import_picture.png
|
||||||
|
import.png
|
||||||
limit_tolerance.png
|
limit_tolerance.png
|
||||||
line.png
|
line.png
|
||||||
line2points.png
|
line2points.png
|
||||||
|
BIN
resources/import.png
Normal file
BIN
resources/import.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -124,7 +124,10 @@ void GEOMGUI_CreationInfoWdg::setInfo( GEOM::CreationInformationSeq& info )
|
|||||||
}
|
}
|
||||||
// get icon
|
// get icon
|
||||||
QString prefix = plugin_name.isEmpty() ? "GEOM" : plugin_name;
|
QString prefix = plugin_name.isEmpty() ? "GEOM" : plugin_name;
|
||||||
icon = resMgr->loadPixmap( prefix, tr( ("ICO_"+name).toLatin1().constData() ), false );
|
if ( name.startsWith( "Import"))
|
||||||
|
icon = resMgr->loadPixmap( "GEOM", tr("ICO_IMPORT_SHAPE"), true );
|
||||||
|
else
|
||||||
|
icon = resMgr->loadPixmap( prefix, tr( ("ICO_"+name).toLatin1().constData() ), false );
|
||||||
|
|
||||||
// translate operation name
|
// translate operation name
|
||||||
operationName = tr( ("MEN_"+name).toLatin1().constData() );
|
operationName = tr( ("MEN_"+name).toLatin1().constData() );
|
||||||
|
@ -1387,6 +1387,10 @@
|
|||||||
<source>ICO_TRANSFER_DATA</source>
|
<source>ICO_TRANSFER_DATA</source>
|
||||||
<translation>transfer_data.png</translation>
|
<translation>transfer_data.png</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>ICO_IMPORT_SHAPE</source>
|
||||||
|
<translation>import.png</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>ICON_DLG_POINT_FACE</source>
|
<source>ICON_DLG_POINT_FACE</source>
|
||||||
<translation>pointonface.png</translation>
|
<translation>pointonface.png</translation>
|
||||||
|
@ -100,6 +100,23 @@ Standard_Integer XAOPlugin_Driver::Execute(TFunction_Logbook& log) const
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPLEMENT_STANDARD_HANDLE (XAOPlugin_Driver, TFunction_Driver);
|
//=======================================================================
|
||||||
IMPLEMENT_STANDARD_RTTIEXT(XAOPlugin_Driver, TFunction_Driver);
|
//function : GetCreationInformation
|
||||||
|
//purpose : Returns a name of creation operation and names and values of
|
||||||
|
// creation parameters
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
bool XAOPlugin_Driver::GetCreationInformation(std::string& theOperationName,
|
||||||
|
std::vector<GEOM_Param>& theParams)
|
||||||
|
{
|
||||||
|
if (Label().IsNull()) return false;
|
||||||
|
Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
|
||||||
|
|
||||||
|
theOperationName = "ImportXAO";
|
||||||
|
AddParam( theParams, "File name", function->GetString( GetFileNameTag() ));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_HANDLE (XAOPlugin_Driver, GEOM_BaseDriver);
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(XAOPlugin_Driver, GEOM_BaseDriver);
|
||||||
|
|
||||||
|
@ -23,12 +23,11 @@
|
|||||||
#ifndef _XAOPlugin_Driver_HXX
|
#ifndef _XAOPlugin_Driver_HXX
|
||||||
#define _XAOPlugin_Driver_HXX
|
#define _XAOPlugin_Driver_HXX
|
||||||
|
|
||||||
// OCCT includes
|
#include "GEOM_BaseDriver.hxx"
|
||||||
#include <TFunction_Driver.hxx>
|
|
||||||
|
|
||||||
DEFINE_STANDARD_HANDLE(XAOPlugin_Driver, TFunction_Driver);
|
DEFINE_STANDARD_HANDLE(XAOPlugin_Driver, GEOM_BaseDriver);
|
||||||
|
|
||||||
class XAOPlugin_Driver: public TFunction_Driver
|
class XAOPlugin_Driver: public GEOM_BaseDriver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
XAOPlugin_Driver();
|
XAOPlugin_Driver();
|
||||||
@ -39,7 +38,12 @@ public:
|
|||||||
Standard_Boolean MustExecute(const TFunction_Logbook&) const;
|
Standard_Boolean MustExecute(const TFunction_Logbook&) const;
|
||||||
virtual void Validate(TFunction_Logbook&) const {}
|
virtual void Validate(TFunction_Logbook&) const {}
|
||||||
|
|
||||||
DEFINE_STANDARD_RTTI(XAOPlugin_Driver)
|
virtual bool GetCreationInformation(std::string& theOperationName,
|
||||||
|
std::vector<GEOM_Param>& theParams);
|
||||||
|
|
||||||
|
static int GetFileNameTag() { return 1; } // where to store file name in GEOM_Function
|
||||||
|
|
||||||
|
DEFINE_STANDARD_RTTI(XAOPlugin_Driver)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _XAOPlugin_Driver_HXX
|
#endif // _XAOPlugin_Driver_HXX
|
||||||
|
@ -470,6 +470,8 @@ bool XAOPlugin_IOperations::ImportXAO( const char* fileName,
|
|||||||
if (function.IsNull()) return false;
|
if (function.IsNull()) return false;
|
||||||
if (function->GetDriverGUID() != XAOPlugin_Driver::GetID()) return false;
|
if (function->GetDriverGUID() != XAOPlugin_Driver::GetID()) return false;
|
||||||
|
|
||||||
|
function->SetString( XAOPlugin_Driver::GetFileNameTag(), fileName );
|
||||||
|
|
||||||
// set the geometry
|
// set the geometry
|
||||||
if (xaoGeometry->getFormat() == XAO::BREP)
|
if (xaoGeometry->getFormat() == XAO::BREP)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user