-
- static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
- if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
- static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
- if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
- static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
- if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-
- static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
- static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_OffsetDriver",
- sizeof(GEOMImpl_OffsetDriver),
- 1,
- (Standard_Address)_Ancestors,
- (Standard_Address)NULL);
-
- return _aType;
-}
-
-//=======================================================================
-//function : DownCast
-//purpose :
-//=======================================================================
-const Handle(GEOMImpl_OffsetDriver) Handle(GEOMImpl_OffsetDriver)::DownCast(const Handle(Standard_Transient)& AnObject)
-{
- Handle(GEOMImpl_OffsetDriver) _anOtherObject;
-
- if (!AnObject.IsNull()) {
- if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_OffsetDriver))) {
- _anOtherObject = Handle(GEOMImpl_OffsetDriver)((Handle(GEOMImpl_OffsetDriver)&)AnObject);
- }
+ if (Label().IsNull()) return 0;
+ Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
+
+ GEOMImpl_IOffset aCI( function );
+ Standard_Integer aType = function->GetType();
+
+ switch ( aType ) {
+ case OFFSET_SHAPE:
+ case OFFSET_SHAPE_COPY:
+ theOperationName = "OFFSET";
+ AddParam( theParams, "Object", aCI.GetShape() );
+ AddParam( theParams, "Offset", aCI.GetValue() );
+ break;
+ case OFFSET_THICKENING:
+ case OFFSET_THICKENING_COPY:
+ theOperationName = "MakeThickening";
+ AddParam( theParams, "Object", aCI.GetShape() );
+ AddParam( theParams, "Offset", aCI.GetValue() );
+ break;
+ default:
+ return false;