mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-01 10:26:12 +03:00
Fix
This commit is contained in:
parent
4556fae98d
commit
124a9bd915
@ -179,10 +179,10 @@ public:
|
|||||||
Standard_Integer NbColumns() const { return myUpperCol - myLowerCol + 1; }
|
Standard_Integer NbColumns() const { return myUpperCol - myLowerCol + 1; }
|
||||||
|
|
||||||
//! Returns length of the row, i.e. number of columns
|
//! Returns length of the row, i.e. number of columns
|
||||||
Standard_Integer RowLength() const { return NbRows(); }
|
Standard_Integer RowLength() const { return NbColumns(); }
|
||||||
|
|
||||||
//! Returns length of the column, i.e. number of rows
|
//! Returns length of the column, i.e. number of rows
|
||||||
Standard_Integer ColLength() const { return NbColumns(); }
|
Standard_Integer ColLength() const { return NbRows(); }
|
||||||
|
|
||||||
//! LowerRow
|
//! LowerRow
|
||||||
Standard_Integer LowerRow (void) const
|
Standard_Integer LowerRow (void) const
|
||||||
|
@ -370,6 +370,16 @@ Standard_Boolean RWMesh_CafReader::addShapeIntoDoc (CafDocumentTools& theTools,
|
|||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (toMakeAssembly)
|
||||||
|
{
|
||||||
|
TDF_Label aRefLabel;
|
||||||
|
theTools.ShapeTool->GetReferredShape(aNewLabel, aRefLabel);
|
||||||
|
if (!aRefLabel.IsNull())
|
||||||
|
{
|
||||||
|
theTools.OriginalShapeMap.Bind(theShape, aRefLabel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if new label is a reference get referred shape
|
// if new label is a reference get referred shape
|
||||||
TDF_Label aNewRefLabel = aNewLabel;
|
TDF_Label aNewRefLabel = aNewLabel;
|
||||||
theTools.ShapeTool->GetReferredShape (aNewLabel, aNewRefLabel);
|
theTools.ShapeTool->GetReferredShape (aNewLabel, aNewRefLabel);
|
||||||
|
@ -56,6 +56,7 @@ public:
|
|||||||
Handle(XCAFDoc_ColorTool) ColorTool;
|
Handle(XCAFDoc_ColorTool) ColorTool;
|
||||||
Handle(XCAFDoc_VisMaterialTool) VisMaterialTool;
|
Handle(XCAFDoc_VisMaterialTool) VisMaterialTool;
|
||||||
NCollection_DataMap<TopoDS_Shape, TDF_Label, TopTools_ShapeMapHasher> ComponentMap;
|
NCollection_DataMap<TopoDS_Shape, TDF_Label, TopTools_ShapeMapHasher> ComponentMap;
|
||||||
|
NCollection_DataMap<TopoDS_Shape, TDF_Label, TopTools_ShapeMapHasher> OriginalShapeMap;
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -347,7 +347,7 @@ Handle(XCAFAnimObjects_AnimObject) XCAFDoc_Animation::GetObject() const
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
NCollection_Array2<double> aValuesArr(1, aDimAtrArr->Value(1), 1, aDimAtrArr->Value(2));
|
NCollection_Array2<double> aValuesArr(1, aDimAtrArr->Value(2), 1, aDimAtrArr->Value(1));
|
||||||
int aValuesInd = 1;
|
int aValuesInd = 1;
|
||||||
for (NCollection_Array2<double>::Iterator aOperValIter(aValuesArr);
|
for (NCollection_Array2<double>::Iterator aOperValIter(aValuesArr);
|
||||||
aOperValIter.More(); aOperValIter.Next(), aValuesInd++)
|
aOperValIter.More(); aOperValIter.Next(), aValuesInd++)
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include <XCAFDoc_AnimationTool.hxx>
|
#include <XCAFDoc_AnimationTool.hxx>
|
||||||
|
|
||||||
#include <Standard_GUID.hxx>
|
#include <Standard_GUID.hxx>
|
||||||
|
#include <TDataStd_AsciiString.hxx>
|
||||||
#include <TDataStd_Name.hxx>
|
#include <TDataStd_Name.hxx>
|
||||||
#include <TDataStd_Real.hxx>
|
#include <TDataStd_Real.hxx>
|
||||||
#include <TDataStd_TreeNode.hxx>
|
#include <TDataStd_TreeNode.hxx>
|
||||||
@ -56,6 +57,26 @@ namespace
|
|||||||
static Standard_GUID aEndTimeCodeGUID("EF5305A3-961D-48AE-9A78-AC744A110A26");
|
static Standard_GUID aEndTimeCodeGUID("EF5305A3-961D-48AE-9A78-AC744A110A26");
|
||||||
return aEndTimeCodeGUID;
|
return aEndTimeCodeGUID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetFileLengthUnitGUID
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
const Standard_GUID& GetFileLengthUnitGUID()
|
||||||
|
{
|
||||||
|
static Standard_GUID aFileLengthUnitGUID("492f5372-9a28-4611-a663-d8394f98df00");
|
||||||
|
return aFileLengthUnitGUID;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetFileLengthUnitGUID
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
const Standard_GUID& GetUpAxisGUID()
|
||||||
|
{
|
||||||
|
static Standard_GUID anUpAxisGUID("05d55dd9-7175-44a7-97aa-43909ad6f9c7");
|
||||||
|
return anUpAxisGUID;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -227,6 +248,66 @@ void XCAFDoc_AnimationTool::SetEndTimeCode(const double theCode) const
|
|||||||
TDataStd_Real::Set(BaseLabel(), GetEndTimeCodeGUID(), theCode);
|
TDataStd_Real::Set(BaseLabel(), GetEndTimeCodeGUID(), theCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetFileLengthUnit
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
bool XCAFDoc_AnimationTool::GetFileLengthUnit(double& theLengthUnit) const
|
||||||
|
{
|
||||||
|
Handle(TDataStd_Real) aLengthUnitAttr;
|
||||||
|
if (BaseLabel().FindAttribute(GetFileLengthUnitGUID(), aLengthUnitAttr))
|
||||||
|
{
|
||||||
|
theLengthUnit = aLengthUnitAttr->Get();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : SetFileLengthUnit
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void XCAFDoc_AnimationTool::SetFileLengthUnit(const double theLengthUnit) const
|
||||||
|
{
|
||||||
|
Handle(TDataStd_Real) aLengthUnitAttr;
|
||||||
|
if (BaseLabel().FindAttribute(GetFileLengthUnitGUID(), aLengthUnitAttr))
|
||||||
|
{
|
||||||
|
aLengthUnitAttr->Set(theLengthUnit);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
TDataStd_Real::Set(BaseLabel(), GetFileLengthUnitGUID(), theLengthUnit);
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetUpAxis
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
bool XCAFDoc_AnimationTool::GetUpAxis(TCollection_AsciiString& theAxis) const
|
||||||
|
{
|
||||||
|
Handle(TDataStd_AsciiString) anAxisAttr;
|
||||||
|
if (BaseLabel().FindAttribute(GetUpAxisGUID(), anAxisAttr))
|
||||||
|
{
|
||||||
|
theAxis = anAxisAttr->Get();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : SetUpAxis
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
void XCAFDoc_AnimationTool::SetUpAxis(const TCollection_AsciiString theAxis) const
|
||||||
|
{
|
||||||
|
Handle(TDataStd_AsciiString) anAxisAttr;
|
||||||
|
if (BaseLabel().FindAttribute(GetUpAxisGUID(), anAxisAttr))
|
||||||
|
{
|
||||||
|
anAxisAttr->Set(theAxis);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
TDataStd_AsciiString::Set(BaseLabel(), GetUpAxisGUID(), theAxis);
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GetAnimationLabels
|
//function : GetAnimationLabels
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -76,6 +76,18 @@ public:
|
|||||||
//!
|
//!
|
||||||
Standard_EXPORT void SetEndTimeCode(const double theCode) const;
|
Standard_EXPORT void SetEndTimeCode(const double theCode) const;
|
||||||
|
|
||||||
|
//!
|
||||||
|
Standard_EXPORT bool GetFileLengthUnit(double& theLengthUnit) const;
|
||||||
|
|
||||||
|
//!
|
||||||
|
Standard_EXPORT void SetFileLengthUnit(const double theLengthUnit) const;
|
||||||
|
|
||||||
|
//!
|
||||||
|
Standard_EXPORT bool GetUpAxis(TCollection_AsciiString& theAxis) const;
|
||||||
|
|
||||||
|
//!
|
||||||
|
Standard_EXPORT void SetUpAxis(const TCollection_AsciiString theAxis) const;
|
||||||
|
|
||||||
//! Returns a sequence of Animation labels currently stored
|
//! Returns a sequence of Animation labels currently stored
|
||||||
//! in the Animation table.
|
//! in the Animation table.
|
||||||
Standard_EXPORT void GetAnimationLabels(TDF_LabelSequence& theLabels) const;
|
Standard_EXPORT void GetAnimationLabels(TDF_LabelSequence& theLabels) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user