mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-16 10:08:36 +03:00
Corrections afer rebasing on V 7.2.0
This commit is contained in:
parent
78dbfeb083
commit
c31c7ae3ba
@ -298,7 +298,7 @@ void OpenGl_CappingRenderer::renderOne (const Handle(OpenGl_Workspace)& theWo
|
|||||||
aViewScale = static_cast<Standard_ShortReal> (aViewDim.Y() / aContext->Viewport()[3]);
|
aViewScale = static_cast<Standard_ShortReal> (aViewDim.Y() / aContext->Viewport()[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
aHatchScale = 1.0f / (aViewScale * anAspectHatching->TextureRes (aContext)->SizeY());
|
aHatchScale = 1.0f / (aViewScale * anAspectHatching->TextureSet (aContext)->First()->SizeY());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ void OpenGl_CappingRenderer::renderSection (const Handle(OpenGl_Workspace)& theW
|
|||||||
|
|
||||||
if (theHatchScale != 1.0 || theHatchRotate != 0.0)
|
if (theHatchScale != 1.0 || theHatchRotate != 0.0)
|
||||||
{
|
{
|
||||||
const Handle(Graphic3d_TextureParams)& aTexParams = theHatchAspect->TextureParams();
|
const Handle(Graphic3d_TextureParams)& aTexParams = theHatchAspect->TextureSet(aContext)->First()->Sampler()->Parameters();
|
||||||
|
|
||||||
aPrevScale = aTexParams->Scale();
|
aPrevScale = aTexParams->Scale();
|
||||||
aPrevRotate = aTexParams->Rotation();
|
aPrevRotate = aTexParams->Rotation();
|
||||||
@ -381,7 +381,7 @@ void OpenGl_CappingRenderer::renderSection (const Handle(OpenGl_Workspace)& theW
|
|||||||
|
|
||||||
if (theHatchScale != 1.0 || theHatchRotate != 0.0)
|
if (theHatchScale != 1.0 || theHatchRotate != 0.0)
|
||||||
{
|
{
|
||||||
const Handle(Graphic3d_TextureParams)& aTexParams = theHatchAspect->TextureParams();
|
const Handle(Graphic3d_TextureParams)& aTexParams = theHatchAspect->TextureSet(aContext)->First()->Sampler()->Parameters();
|
||||||
|
|
||||||
aTexParams->SetScale (aPrevScale);
|
aTexParams->SetScale (aPrevScale);
|
||||||
aTexParams->SetRotation (aPrevRotate);
|
aTexParams->SetRotation (aPrevRotate);
|
||||||
|
@ -1243,8 +1243,8 @@ Standard_Boolean OpenGl_ShaderManager::prepareStdProgramFboBlit()
|
|||||||
}
|
}
|
||||||
|
|
||||||
myContext->BindProgram (myBlitProgram);
|
myContext->BindProgram (myBlitProgram);
|
||||||
myBlitProgram->SetSampler (myContext, "uColorSampler", 0);
|
myBlitProgram->SetSampler(myContext, "uColorSampler", Graphic3d_TextureUnit_0);
|
||||||
myBlitProgram->SetSampler (myContext, "uDepthSampler", 1);
|
myBlitProgram->SetSampler(myContext, "uDepthSampler", Graphic3d_TextureUnit_1);
|
||||||
myContext->BindProgram (NULL);
|
myContext->BindProgram (NULL);
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
@ -1331,8 +1331,8 @@ Standard_Boolean OpenGl_ShaderManager::prepareStdProgramOitCompositing (const St
|
|||||||
}
|
}
|
||||||
|
|
||||||
myContext->BindProgram (aProgram);
|
myContext->BindProgram (aProgram);
|
||||||
aProgram->SetSampler (myContext, "uAccumTexture", 0);
|
aProgram->SetSampler(myContext, "uAccumTexture", Graphic3d_TextureUnit_0);
|
||||||
aProgram->SetSampler (myContext, "uWeightTexture", 1);
|
aProgram->SetSampler(myContext, "uWeightTexture", Graphic3d_TextureUnit_1);
|
||||||
myContext->BindProgram (Handle(OpenGl_ShaderProgram)());
|
myContext->BindProgram (Handle(OpenGl_ShaderProgram)());
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
@ -2203,8 +2203,8 @@ Standard_Boolean OpenGl_ShaderManager::prepareStdProgramStereo (Handle(OpenGl_Sh
|
|||||||
}
|
}
|
||||||
|
|
||||||
myContext->BindProgram (theProgram);
|
myContext->BindProgram (theProgram);
|
||||||
theProgram->SetSampler (myContext, "uLeftSampler", 0);
|
theProgram->SetSampler(myContext, "uLeftSampler", Graphic3d_TextureUnit_0);
|
||||||
theProgram->SetSampler (myContext, "uRightSampler", 1);
|
theProgram->SetSampler(myContext, "uRightSampler", Graphic3d_TextureUnit_1);
|
||||||
myContext->BindProgram (NULL);
|
myContext->BindProgram (NULL);
|
||||||
return Standard_True;
|
return Standard_True;
|
||||||
}
|
}
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <TopoDS.hxx>
|
#include <TopoDS.hxx>
|
||||||
#include <BRepBuilderAPI_CellFilter.hxx>
|
#include <BRepBuilderAPI_CellFilter.hxx>
|
||||||
#include <StlMesh_Mesh.hxx>
|
//#include <StlMesh_Mesh.hxx>
|
||||||
#include <StlMesh_MeshExplorer.hxx>
|
//#include <StlMesh_MeshExplorer.hxx>
|
||||||
#include <BRepBuilderAPI_MakeVertex.hxx>
|
#include <BRepBuilderAPI_MakeVertex.hxx>
|
||||||
#include <BRepBuilderAPI_MakePolygon.hxx>
|
#include <BRepBuilderAPI_MakePolygon.hxx>
|
||||||
#include <BRepBuilderAPI_MakeFace.hxx>
|
#include <BRepBuilderAPI_MakeFace.hxx>
|
||||||
@ -56,240 +56,240 @@ IMPLEMENT_STANDARD_RTTIEXT(VrmlData_IndexedFaceSet,VrmlData_Faceted)
|
|||||||
#pragma warning (disable:4996)
|
#pragma warning (disable:4996)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Auxiliary tools
|
//// Auxiliary tools
|
||||||
namespace
|
//namespace
|
||||||
{
|
//{
|
||||||
// Tool to get triangles from triangulation taking into account face
|
// // Tool to get triangles from triangulation taking into account face
|
||||||
// orientation and location
|
// // orientation and location
|
||||||
class TriangleAccessor
|
// class TriangleAccessor
|
||||||
{
|
// {
|
||||||
public:
|
// public:
|
||||||
TriangleAccessor (const TopoDS_Face& aFace)
|
// TriangleAccessor (const TopoDS_Face& aFace)
|
||||||
{
|
// {
|
||||||
TopLoc_Location aLoc;
|
// TopLoc_Location aLoc;
|
||||||
myPoly = BRep_Tool::Triangulation (aFace, aLoc);
|
// myPoly = BRep_Tool::Triangulation (aFace, aLoc);
|
||||||
myTrsf = aLoc.Transformation();
|
// myTrsf = aLoc.Transformation();
|
||||||
myNbTriangles = (myPoly.IsNull() ? 0 : myPoly->Triangles().Length());
|
// myNbTriangles = (myPoly.IsNull() ? 0 : myPoly->Triangles().Length());
|
||||||
myInvert = (aFace.Orientation() == TopAbs_REVERSED);
|
// myInvert = (aFace.Orientation() == TopAbs_REVERSED);
|
||||||
if (myTrsf.IsNegative())
|
// if (myTrsf.IsNegative())
|
||||||
myInvert = ! myInvert;
|
// myInvert = ! myInvert;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
int NbTriangles () const { return myNbTriangles; }
|
// int NbTriangles () const { return myNbTriangles; }
|
||||||
|
//
|
||||||
// get i-th triangle and outward normal
|
// // get i-th triangle and outward normal
|
||||||
void GetTriangle (int iTri, gp_Vec &theNormal, gp_Pnt &thePnt1, gp_Pnt &thePnt2, gp_Pnt &thePnt3)
|
// void GetTriangle (int iTri, gp_Vec &theNormal, gp_Pnt &thePnt1, gp_Pnt &thePnt2, gp_Pnt &thePnt3)
|
||||||
{
|
// {
|
||||||
// get positions of nodes
|
// // get positions of nodes
|
||||||
int iNode1, iNode2, iNode3;
|
// int iNode1, iNode2, iNode3;
|
||||||
myPoly->Triangles()(iTri).Get (iNode1, iNode2, iNode3);
|
// myPoly->Triangles()(iTri).Get (iNode1, iNode2, iNode3);
|
||||||
thePnt1 = myPoly->Nodes()(iNode1);
|
// thePnt1 = myPoly->Nodes()(iNode1);
|
||||||
thePnt2 = myPoly->Nodes()(myInvert ? iNode3 : iNode2);
|
// thePnt2 = myPoly->Nodes()(myInvert ? iNode3 : iNode2);
|
||||||
thePnt3 = myPoly->Nodes()(myInvert ? iNode2 : iNode3);
|
// thePnt3 = myPoly->Nodes()(myInvert ? iNode2 : iNode3);
|
||||||
|
//
|
||||||
// apply transormation if not identity
|
// // apply transormation if not identity
|
||||||
if (myTrsf.Form() != gp_Identity)
|
// if (myTrsf.Form() != gp_Identity)
|
||||||
{
|
// {
|
||||||
thePnt1.Transform (myTrsf);
|
// thePnt1.Transform (myTrsf);
|
||||||
thePnt2.Transform (myTrsf);
|
// thePnt2.Transform (myTrsf);
|
||||||
thePnt3.Transform (myTrsf);
|
// thePnt3.Transform (myTrsf);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
// calculate normal
|
// // calculate normal
|
||||||
theNormal = (thePnt2.XYZ() - thePnt1.XYZ()) ^ (thePnt3.XYZ() - thePnt1.XYZ());
|
// theNormal = (thePnt2.XYZ() - thePnt1.XYZ()) ^ (thePnt3.XYZ() - thePnt1.XYZ());
|
||||||
Standard_Real aNorm = theNormal.Magnitude();
|
// Standard_Real aNorm = theNormal.Magnitude();
|
||||||
if (aNorm > gp::Resolution())
|
// if (aNorm > gp::Resolution())
|
||||||
theNormal /= aNorm;
|
// theNormal /= aNorm;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
private:
|
// private:
|
||||||
Handle(Poly_Triangulation) myPoly;
|
// Handle(Poly_Triangulation) myPoly;
|
||||||
gp_Trsf myTrsf;
|
// gp_Trsf myTrsf;
|
||||||
int myNbTriangles;
|
// int myNbTriangles;
|
||||||
bool myInvert;
|
// bool myInvert;
|
||||||
};
|
// };
|
||||||
|
//
|
||||||
// convert to float and, on big-endian platform, to little-endian representation
|
// // convert to float and, on big-endian platform, to little-endian representation
|
||||||
inline float convertFloat (Standard_Real aValue)
|
// inline float convertFloat (Standard_Real aValue)
|
||||||
{
|
// {
|
||||||
#ifdef OCCT_BINARY_FILE_DO_INVERSE
|
//#ifdef OCCT_BINARY_FILE_DO_INVERSE
|
||||||
return OSD_BinaryFile::InverseShortReal ((float)aValue);
|
// return OSD_BinaryFile::InverseShortReal ((float)aValue);
|
||||||
#else
|
//#else
|
||||||
return (float)aValue;
|
// return (float)aValue;
|
||||||
#endif
|
//#endif
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
// A static method adding nodes to a mesh and keeping coincident (sharing) nodes.
|
// // A static method adding nodes to a mesh and keeping coincident (sharing) nodes.
|
||||||
static Standard_Integer AddVertex(Handle(StlMesh_Mesh)& mesh,
|
// static Standard_Integer AddVertex(Handle(StlMesh_Mesh)& mesh,
|
||||||
BRepBuilderAPI_CellFilter& filter,
|
// BRepBuilderAPI_CellFilter& filter,
|
||||||
BRepBuilderAPI_VertexInspector& inspector,
|
// BRepBuilderAPI_VertexInspector& inspector,
|
||||||
const gp_XYZ& p)
|
// const gp_XYZ& p)
|
||||||
{
|
// {
|
||||||
Standard_Integer index;
|
// Standard_Integer index;
|
||||||
inspector.SetCurrent(p);
|
// inspector.SetCurrent(p);
|
||||||
gp_XYZ minp = inspector.Shift(p, -Precision::Confusion());
|
// gp_XYZ minp = inspector.Shift(p, -Precision::Confusion());
|
||||||
gp_XYZ maxp = inspector.Shift(p, +Precision::Confusion());
|
// gp_XYZ maxp = inspector.Shift(p, +Precision::Confusion());
|
||||||
filter.Inspect(minp, maxp, inspector);
|
// filter.Inspect(minp, maxp, inspector);
|
||||||
const TColStd_ListOfInteger& indices = inspector.ResInd();
|
// else
|
||||||
if (indices.IsEmpty() == Standard_False)
|
// const TColStd_ListOfInteger& indices = inspector.ResInd();
|
||||||
{
|
// if (indices.IsEmpty() == Standard_False)
|
||||||
index = indices.First(); // it should be only one
|
// {
|
||||||
inspector.ClearResList();
|
// index = indices.First(); // it should be only one
|
||||||
}
|
// inspector.ClearResList();
|
||||||
else
|
// }
|
||||||
{
|
// {
|
||||||
index = mesh->AddVertex(p.X(), p.Y(), p.Z());
|
// index = mesh->AddVertex(p.X(), p.Y(), p.Z());
|
||||||
filter.Add(index, p);
|
// filter.Add(index, p);
|
||||||
inspector.Add(p);
|
// inspector.Add(p);
|
||||||
}
|
// }
|
||||||
return index;
|
// return index;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
void createFromMesh(Handle(TopoDS_TShape)& theShapeWithMesh)
|
// void createFromMesh(Handle(TopoDS_TShape)& theShapeWithMesh)
|
||||||
{
|
// {
|
||||||
TopoDS_Shape aShape;
|
// TopoDS_Shape aShape;
|
||||||
//aShape.Orientation(TopAbs_FORWARD);
|
// //aShape.Orientation(TopAbs_FORWARD);
|
||||||
|
//
|
||||||
aShape.TShape(theShapeWithMesh);
|
// aShape.TShape(theShapeWithMesh);
|
||||||
if (aShape.IsNull())
|
// if (aShape.IsNull())
|
||||||
return;
|
// return;
|
||||||
|
//
|
||||||
// Write to STL and then read again to get BRep model (vrml fills only triangulation)
|
// // Write to STL and then read again to get BRep model (vrml fills only triangulation)
|
||||||
//StlAPI::Write(aShape, "D:/Temp/tempfile");
|
// //StlAPI::Write(aShape, "D:/Temp/tempfile");
|
||||||
//StlAPI::Read(aShape, "D:/Temp/tempfile");
|
// //StlAPI::Read(aShape, "D:/Temp/tempfile");
|
||||||
|
//
|
||||||
gp_XYZ p1, p2, p3;
|
// gp_XYZ p1, p2, p3;
|
||||||
TopoDS_Vertex Vertex1, Vertex2, Vertex3;
|
// TopoDS_Vertex Vertex1, Vertex2, Vertex3;
|
||||||
TopoDS_Face AktFace;
|
// TopoDS_Face AktFace;
|
||||||
TopoDS_Wire AktWire;
|
// TopoDS_Wire AktWire;
|
||||||
BRepBuilderAPI_Sewing aSewingTool;
|
// BRepBuilderAPI_Sewing aSewingTool;
|
||||||
Standard_Real x1, y1, z1;
|
// Standard_Real x1, y1, z1;
|
||||||
Standard_Real x2, y2, z2;
|
// Standard_Real x2, y2, z2;
|
||||||
Standard_Real x3, y3, z3;
|
// Standard_Real x3, y3, z3;
|
||||||
Standard_Integer i1,i2,i3;
|
// Standard_Integer i1,i2,i3;
|
||||||
|
//
|
||||||
aSewingTool.Init(1.0e-06,Standard_True);
|
// aSewingTool.Init(1.0e-06,Standard_True);
|
||||||
|
//
|
||||||
TopoDS_Compound aComp;
|
// TopoDS_Compound aComp;
|
||||||
BRep_Builder BuildTool;
|
// BRep_Builder BuildTool;
|
||||||
BuildTool.MakeCompound( aComp );
|
// BuildTool.MakeCompound( aComp );
|
||||||
|
//
|
||||||
Handle(StlMesh_Mesh) aSTLMesh = new StlMesh_Mesh();
|
// Handle(StlMesh_Mesh) aSTLMesh = new StlMesh_Mesh();
|
||||||
aSTLMesh->AddDomain();
|
// aSTLMesh->AddDomain();
|
||||||
|
//
|
||||||
// Filter unique vertices to share the nodes of the mesh.
|
// // Filter unique vertices to share the nodes of the mesh.
|
||||||
BRepBuilderAPI_CellFilter uniqueVertices(Precision::Confusion());
|
// BRepBuilderAPI_CellFilter uniqueVertices(Precision::Confusion());
|
||||||
BRepBuilderAPI_VertexInspector inspector(Precision::Confusion());
|
// BRepBuilderAPI_VertexInspector inspector(Precision::Confusion());
|
||||||
|
//
|
||||||
// Read mesh
|
// // Read mesh
|
||||||
for (TopExp_Explorer exp (aShape, TopAbs_FACE); exp.More(); exp.Next())
|
// for (TopExp_Explorer exp (aShape, TopAbs_FACE); exp.More(); exp.Next())
|
||||||
{
|
// {
|
||||||
TriangleAccessor aTool (TopoDS::Face (exp.Current()));
|
// TriangleAccessor aTool (TopoDS::Face (exp.Current()));
|
||||||
for (int iTri = 1; iTri <= aTool.NbTriangles(); iTri++)
|
// for (int iTri = 1; iTri <= aTool.NbTriangles(); iTri++)
|
||||||
{
|
// {
|
||||||
gp_Vec aNorm;
|
// gp_Vec aNorm;
|
||||||
gp_Pnt aPnt1, aPnt2, aPnt3;
|
// gp_Pnt aPnt1, aPnt2, aPnt3;
|
||||||
aTool.GetTriangle(iTri, aNorm, aPnt1, aPnt2, aPnt3);
|
// aTool.GetTriangle(iTri, aNorm, aPnt1, aPnt2, aPnt3);
|
||||||
|
//
|
||||||
i1 = AddVertex(aSTLMesh, uniqueVertices, inspector, aPnt1.XYZ());
|
// i1 = AddVertex(aSTLMesh, uniqueVertices, inspector, aPnt1.XYZ());
|
||||||
i2 = AddVertex(aSTLMesh, uniqueVertices, inspector, aPnt2.XYZ());
|
// i2 = AddVertex(aSTLMesh, uniqueVertices, inspector, aPnt2.XYZ());
|
||||||
i3 = AddVertex(aSTLMesh, uniqueVertices, inspector, aPnt3.XYZ());
|
// i3 = AddVertex(aSTLMesh, uniqueVertices, inspector, aPnt3.XYZ());
|
||||||
aSTLMesh->AddTriangle(i1, i2, i3, aNorm.X(), aNorm.Y(), aNorm.Z());
|
// aSTLMesh->AddTriangle(i1, i2, i3, aNorm.X(), aNorm.Y(), aNorm.Z());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
StlMesh_MeshExplorer aMExp (aSTLMesh);
|
// StlMesh_MeshExplorer aMExp (aSTLMesh);
|
||||||
Standard_Integer NumberDomains = aSTLMesh->NbDomains();
|
// Standard_Integer NumberDomains = aSTLMesh->NbDomains();
|
||||||
Standard_Integer iND;
|
// Standard_Integer iND;
|
||||||
for (iND=1;iND<=NumberDomains;iND++)
|
// for (iND=1;iND<=NumberDomains;iND++)
|
||||||
{
|
// {
|
||||||
for (aMExp.InitTriangle (iND); aMExp.MoreTriangle (); aMExp.NextTriangle ())
|
// for (aMExp.InitTriangle (iND); aMExp.MoreTriangle (); aMExp.NextTriangle ())
|
||||||
{
|
// {
|
||||||
aMExp.TriangleVertices (x1,y1,z1,x2,y2,z2,x3,y3,z3);
|
// aMExp.TriangleVertices (x1,y1,z1,x2,y2,z2,x3,y3,z3);
|
||||||
p1.SetCoord(x1,y1,z1);
|
// p1.SetCoord(x1,y1,z1);
|
||||||
p2.SetCoord(x2,y2,z2);
|
// p2.SetCoord(x2,y2,z2);
|
||||||
p3.SetCoord(x3,y3,z3);
|
// p3.SetCoord(x3,y3,z3);
|
||||||
|
//
|
||||||
if ((!(p1.IsEqual(p2,0.0))) && (!(p1.IsEqual(p3,0.0))))
|
// if ((!(p1.IsEqual(p2,0.0))) && (!(p1.IsEqual(p3,0.0))))
|
||||||
{
|
// {
|
||||||
Vertex1 = BRepBuilderAPI_MakeVertex(p1);
|
// Vertex1 = BRepBuilderAPI_MakeVertex(p1);
|
||||||
Vertex2 = BRepBuilderAPI_MakeVertex(p2);
|
// Vertex2 = BRepBuilderAPI_MakeVertex(p2);
|
||||||
Vertex3 = BRepBuilderAPI_MakeVertex(p3);
|
// Vertex3 = BRepBuilderAPI_MakeVertex(p3);
|
||||||
|
//
|
||||||
AktWire = BRepBuilderAPI_MakePolygon( Vertex1, Vertex2, Vertex3, Standard_True);
|
// AktWire = BRepBuilderAPI_MakePolygon( Vertex1, Vertex2, Vertex3, Standard_True);
|
||||||
|
//
|
||||||
if( !AktWire.IsNull())
|
// if( !AktWire.IsNull())
|
||||||
{
|
// {
|
||||||
AktFace = BRepBuilderAPI_MakeFace( AktWire);
|
// AktFace = BRepBuilderAPI_MakeFace( AktWire);
|
||||||
if(!AktFace.IsNull())
|
// if(!AktFace.IsNull())
|
||||||
BuildTool.Add( aComp, AktFace );
|
// BuildTool.Add( aComp, AktFace );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
aSTLMesh->Clear();
|
// aSTLMesh->Clear();
|
||||||
|
//
|
||||||
aSewingTool.Init();
|
// aSewingTool.Init();
|
||||||
aSewingTool.Load( aComp );
|
// aSewingTool.Load( aComp );
|
||||||
aSewingTool.Perform();
|
// aSewingTool.Perform();
|
||||||
aShape = aSewingTool.SewedShape();
|
// aShape = aSewingTool.SewedShape();
|
||||||
if ( aShape.IsNull() )
|
// if ( aShape.IsNull() )
|
||||||
aShape = aComp;
|
// aShape = aComp;
|
||||||
|
//
|
||||||
ShapeUpgrade_UnifySameDomain anUSD(aShape);
|
// ShapeUpgrade_UnifySameDomain anUSD(aShape);
|
||||||
anUSD.SetLinearTolerance(1e-5);
|
// anUSD.SetLinearTolerance(1e-5);
|
||||||
anUSD.Build();
|
// anUSD.Build();
|
||||||
aShape = anUSD.Shape();
|
// aShape = anUSD.Shape();
|
||||||
|
//
|
||||||
if (aShape.ShapeType() == TopAbs_SHELL && TopoDS::Shell(aShape).Closed())
|
// if (aShape.ShapeType() == TopAbs_SHELL && TopoDS::Shell(aShape).Closed())
|
||||||
{
|
// {
|
||||||
TopoDS_Solid aSolid;
|
// TopoDS_Solid aSolid;
|
||||||
TopoDS_Shell aShell = TopoDS::Shell (aShape);
|
// TopoDS_Shell aShell = TopoDS::Shell (aShape);
|
||||||
if (!aShell.Free ()) {
|
// if (!aShell.Free ()) {
|
||||||
aShell.Free(Standard_True);
|
// aShell.Free(Standard_True);
|
||||||
}
|
// }
|
||||||
BRep_Builder aBuilder;
|
// BRep_Builder aBuilder;
|
||||||
aBuilder.MakeSolid (aSolid);
|
// aBuilder.MakeSolid (aSolid);
|
||||||
aBuilder.Add (aSolid, aShell);
|
// aBuilder.Add (aSolid, aShell);
|
||||||
|
//
|
||||||
Standard_Boolean isOk = Standard_True;
|
// Standard_Boolean isOk = Standard_True;
|
||||||
try {
|
// try {
|
||||||
OCC_CATCH_SIGNALS
|
// OCC_CATCH_SIGNALS
|
||||||
BRepClass3d_SolidClassifier bsc3d (aSolid);
|
// BRepClass3d_SolidClassifier bsc3d (aSolid);
|
||||||
Standard_Real t = Precision::Confusion();
|
// Standard_Real t = Precision::Confusion();
|
||||||
bsc3d.PerformInfinitePoint(t);
|
// bsc3d.PerformInfinitePoint(t);
|
||||||
|
//
|
||||||
if (bsc3d.State() == TopAbs_IN) {
|
// if (bsc3d.State() == TopAbs_IN) {
|
||||||
TopoDS_Solid aSolid2;
|
// TopoDS_Solid aSolid2;
|
||||||
aBuilder.MakeSolid (aSolid2);
|
// aBuilder.MakeSolid (aSolid2);
|
||||||
aShell.Reverse();
|
// aShell.Reverse();
|
||||||
aBuilder.Add (aSolid2, aShell);
|
// aBuilder.Add (aSolid2, aShell);
|
||||||
aSolid = aSolid2;
|
// aSolid = aSolid2;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
catch (Standard_Failure) { isOk = Standard_False; }
|
// catch (Standard_Failure) { isOk = Standard_False; }
|
||||||
if (isOk) aShape = aSolid;
|
// if (isOk) aShape = aSolid;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
// Trying to apply "Combine to Cylinder"
|
// // Trying to apply "Combine to Cylinder"
|
||||||
|
//
|
||||||
//ShapeUpgrade_CombineToCylinder cmb2Cyl;
|
// //ShapeUpgrade_CombineToCylinder cmb2Cyl;
|
||||||
//Standard_Boolean isOk = Standard_True;
|
// //Standard_Boolean isOk = Standard_True;
|
||||||
//try {
|
// //try {
|
||||||
// OCC_CATCH_SIGNALS
|
// // OCC_CATCH_SIGNALS
|
||||||
// cmb2Cyl.SetShape(aShape);
|
// // cmb2Cyl.SetShape(aShape);
|
||||||
// cmb2Cyl.SetAngularTolerance(20);
|
// // cmb2Cyl.SetAngularTolerance(20);
|
||||||
// cmb2Cyl.SetLinearTolerance(3);
|
// // cmb2Cyl.SetLinearTolerance(3);
|
||||||
// cmb2Cyl.Build();
|
// // cmb2Cyl.Build();
|
||||||
//}
|
// //}
|
||||||
//catch (Standard_Failure) { isOk = Standard_False; }
|
// //catch (Standard_Failure) { isOk = Standard_False; }
|
||||||
//if (isOk && cmb2Cyl.IsDone())
|
// //if (isOk && cmb2Cyl.IsDone())
|
||||||
// aShape = cmb2Cyl.Shape();
|
// // aShape = cmb2Cyl.Shape();
|
||||||
|
//
|
||||||
theShapeWithMesh = aShape.TShape();
|
// theShapeWithMesh = aShape.TShape();
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : readData
|
//function : readData
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -277,17 +277,6 @@ Standard_GUID XCAFDoc::ViewRefEnabledShapesGUID()
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
Standard_GUID XCAFDoc::ViewRefNoteGUID()
|
|
||||||
{
|
|
||||||
static Standard_GUID ID("C814ACC6-43AC-4812-9B2A-4E9A2A549354");
|
|
||||||
return ID;
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
|
||||||
//function : ViewRefPlaneGUID
|
|
||||||
//purpose :
|
|
||||||
//=======================================================================
|
|
||||||
|
|
||||||
Standard_GUID XCAFDoc::ViewRefAnnotationGUID()
|
Standard_GUID XCAFDoc::ViewRefAnnotationGUID()
|
||||||
{
|
{
|
||||||
static Standard_GUID ID("A2B5BA42-DD00-43f5-8882-4B5F8E76B9D2");
|
static Standard_GUID ID("A2B5BA42-DD00-43f5-8882-4B5F8E76B9D2");
|
||||||
|
@ -134,7 +134,6 @@ public:
|
|||||||
Standard_EXPORT static Standard_GUID ClipPlaneVisibleRefGUID();
|
Standard_EXPORT static Standard_GUID ClipPlaneVisibleRefGUID();
|
||||||
|
|
||||||
//! Return GUIDs for GraphNode representing specified types of View
|
//! Return GUIDs for GraphNode representing specified types of View
|
||||||
Standard_EXPORT static Standard_GUID ViewRefNoteGUID();
|
|
||||||
Standard_EXPORT static Standard_GUID ViewRefAnnotationGUID();
|
Standard_EXPORT static Standard_GUID ViewRefAnnotationGUID();
|
||||||
|
|
||||||
//! Returns GUID for UAttribute identifying lock flag
|
//! Returns GUID for UAttribute identifying lock flag
|
||||||
|
@ -51,7 +51,7 @@ XCAFDoc_AssemblyItemRef::Get(const TDF_Label& theLabel)
|
|||||||
|
|
||||||
Handle(XCAFDoc_AssemblyItemRef)
|
Handle(XCAFDoc_AssemblyItemRef)
|
||||||
XCAFDoc_AssemblyItemRef::Set(const TDF_Label& theLabel,
|
XCAFDoc_AssemblyItemRef::Set(const TDF_Label& theLabel,
|
||||||
const XCAFDoc_AssemblyItemId& theItemId)
|
const XCAFDoc_AssemblyItemId& theItemId)
|
||||||
{
|
{
|
||||||
Handle(XCAFDoc_AssemblyItemRef) aThis;
|
Handle(XCAFDoc_AssemblyItemRef) aThis;
|
||||||
if (!theLabel.IsNull() && !theLabel.FindAttribute(XCAFDoc_AssemblyItemRef::GetID(), aThis))
|
if (!theLabel.IsNull() && !theLabel.FindAttribute(XCAFDoc_AssemblyItemRef::GetID(), aThis))
|
||||||
@ -65,8 +65,8 @@ XCAFDoc_AssemblyItemRef::Set(const TDF_Label& theLabel,
|
|||||||
|
|
||||||
Handle(XCAFDoc_AssemblyItemRef)
|
Handle(XCAFDoc_AssemblyItemRef)
|
||||||
XCAFDoc_AssemblyItemRef::Set(const TDF_Label& theLabel,
|
XCAFDoc_AssemblyItemRef::Set(const TDF_Label& theLabel,
|
||||||
const XCAFDoc_AssemblyItemId& theItemId,
|
const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
const Standard_GUID& theAttrGUID)
|
const Standard_GUID& theAttrGUID)
|
||||||
{
|
{
|
||||||
Handle(XCAFDoc_AssemblyItemRef) aThis;
|
Handle(XCAFDoc_AssemblyItemRef) aThis;
|
||||||
if (!theLabel.IsNull() && !theLabel.FindAttribute(XCAFDoc_AssemblyItemRef::GetID(), aThis))
|
if (!theLabel.IsNull() && !theLabel.FindAttribute(XCAFDoc_AssemblyItemRef::GetID(), aThis))
|
||||||
@ -81,8 +81,8 @@ XCAFDoc_AssemblyItemRef::Set(const TDF_Label& theLabel,
|
|||||||
|
|
||||||
Handle(XCAFDoc_AssemblyItemRef)
|
Handle(XCAFDoc_AssemblyItemRef)
|
||||||
XCAFDoc_AssemblyItemRef::Set(const TDF_Label& theLabel,
|
XCAFDoc_AssemblyItemRef::Set(const TDF_Label& theLabel,
|
||||||
const XCAFDoc_AssemblyItemId& theItemId,
|
const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
const Standard_Integer theShapeIndex)
|
const Standard_Integer theShapeIndex)
|
||||||
{
|
{
|
||||||
Handle(XCAFDoc_AssemblyItemRef) aThis;
|
Handle(XCAFDoc_AssemblyItemRef) aThis;
|
||||||
if (!theLabel.IsNull() && !theLabel.FindAttribute(XCAFDoc_AssemblyItemRef::GetID(), aThis))
|
if (!theLabel.IsNull() && !theLabel.FindAttribute(XCAFDoc_AssemblyItemRef::GetID(), aThis))
|
||||||
@ -246,48 +246,6 @@ XCAFDoc_AssemblyItemRef::ClearExtraRef()
|
|||||||
myExtraId.Clear();
|
myExtraId.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
XCAFDoc_AssemblyItemRef::SetItem(const TColStd_ListOfAsciiString& thePath)
|
|
||||||
{
|
|
||||||
Backup();
|
|
||||||
myItemId.Init(thePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
XCAFDoc_AssemblyItemRef::SetItem(const TCollection_AsciiString& theString)
|
|
||||||
{
|
|
||||||
Backup();
|
|
||||||
myItemId.Init(theString);
|
|
||||||
}
|
|
||||||
|
|
||||||
void XCAFDoc_AssemblyItemRef::SetGUID(const Standard_GUID& theAttrGUID)
|
|
||||||
{
|
|
||||||
Backup();
|
|
||||||
myExtraRef = ExtraRef_AttrGUID;
|
|
||||||
Standard_Character aGUIDStr[Standard_GUID_SIZE + 1];
|
|
||||||
theAttrGUID.ToCString(aGUIDStr);
|
|
||||||
aGUIDStr[Standard_GUID_SIZE] = '\0';
|
|
||||||
myExtraId.Clear();
|
|
||||||
myExtraId.AssignCat(aGUIDStr);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
XCAFDoc_AssemblyItemRef::SetSubshapeIndex(Standard_Integer theSubshapeIndex)
|
|
||||||
{
|
|
||||||
Backup();
|
|
||||||
myExtraRef = ExtraRef_SubshapeIndex;
|
|
||||||
myExtraId.Clear();
|
|
||||||
myExtraId.AssignCat(theSubshapeIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
XCAFDoc_AssemblyItemRef::ClearExtraRef()
|
|
||||||
{
|
|
||||||
Backup();
|
|
||||||
myExtraRef = ExtraRef_None;
|
|
||||||
myExtraId.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
const Standard_GUID&
|
const Standard_GUID&
|
||||||
XCAFDoc_AssemblyItemRef::ID() const
|
XCAFDoc_AssemblyItemRef::ID() const
|
||||||
{
|
{
|
||||||
@ -314,7 +272,7 @@ XCAFDoc_AssemblyItemRef::Restore(const Handle(TDF_Attribute)& theAttrFrom)
|
|||||||
|
|
||||||
void
|
void
|
||||||
XCAFDoc_AssemblyItemRef::Paste(const Handle(TDF_Attribute)& theAttrInto,
|
XCAFDoc_AssemblyItemRef::Paste(const Handle(TDF_Attribute)& theAttrInto,
|
||||||
const Handle(TDF_RelocationTable)& /*theRT*/) const
|
const Handle(TDF_RelocationTable)& /*theRT*/) const
|
||||||
{
|
{
|
||||||
Handle(XCAFDoc_AssemblyItemRef) anOther = Handle(XCAFDoc_AssemblyItemRef)::DownCast(theAttrInto);
|
Handle(XCAFDoc_AssemblyItemRef) anOther = Handle(XCAFDoc_AssemblyItemRef)::DownCast(theAttrInto);
|
||||||
if (!anOther.IsNull())
|
if (!anOther.IsNull())
|
||||||
|
@ -84,7 +84,7 @@ public:
|
|||||||
|
|
||||||
DEFINE_STANDARD_RTTIEXT(XCAFDoc_NotesTool, TDF_Attribute)
|
DEFINE_STANDARD_RTTIEXT(XCAFDoc_NotesTool, TDF_Attribute)
|
||||||
|
|
||||||
Standard_EXPORT static const Standard_GUID& GetID();
|
Standard_EXPORT static const Standard_GUID& GetID();
|
||||||
|
|
||||||
//! Create (if not exist) a notes tool from XCAFDoc on theLabel.
|
//! Create (if not exist) a notes tool from XCAFDoc on theLabel.
|
||||||
Standard_EXPORT static Handle(XCAFDoc_NotesTool) Set(const TDF_Label& theLabel);
|
Standard_EXPORT static Handle(XCAFDoc_NotesTool) Set(const TDF_Label& theLabel);
|
||||||
@ -131,10 +131,6 @@ public:
|
|||||||
//! \param [in] theItemId - assembly item ID.
|
//! \param [in] theItemId - assembly item ID.
|
||||||
//! \return annotated item label if it is found, otherwise - null label.
|
//! \return annotated item label if it is found, otherwise - null label.
|
||||||
Standard_EXPORT TDF_Label FindAnnotatedItem(const XCAFDoc_AssemblyItemId& theItemId) const;
|
Standard_EXPORT TDF_Label FindAnnotatedItem(const XCAFDoc_AssemblyItemId& theItemId) const;
|
||||||
Standard_EXPORT TDF_Label FindAnnotatedItemAttr(const XCAFDoc_AssemblyItemId& theItemId,
|
|
||||||
const Standard_GUID& theGUID) const;
|
|
||||||
Standard_EXPORT TDF_Label FindAnnotatedItemSubshape(const XCAFDoc_AssemblyItemId& theItemId,
|
|
||||||
Standard_Integer theSubshapeIndex) const;
|
|
||||||
|
|
||||||
//! Finds a label of the given labeled item in the annotated items hive.
|
//! Finds a label of the given labeled item in the annotated items hive.
|
||||||
//! \param [in] theItemLabel - item label.
|
//! \param [in] theItemLabel - item label.
|
||||||
@ -146,28 +142,28 @@ public:
|
|||||||
//! \param [in] theGUID - assembly item's attribute GUID.
|
//! \param [in] theGUID - assembly item's attribute GUID.
|
||||||
//! \return annotated item label if it is found, otherwise - null label.
|
//! \return annotated item label if it is found, otherwise - null label.
|
||||||
Standard_EXPORT TDF_Label FindAnnotatedItemAttr(const XCAFDoc_AssemblyItemId& theItemId,
|
Standard_EXPORT TDF_Label FindAnnotatedItemAttr(const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
const Standard_GUID& theGUID) const;
|
const Standard_GUID& theGUID) const;
|
||||||
|
|
||||||
//! Finds a label of the given labeled item's attribute in the annotated items hive.
|
//! Finds a label of the given labeled item's attribute in the annotated items hive.
|
||||||
//! \param [in] theItemLabel - item label.
|
//! \param [in] theItemLabel - item label.
|
||||||
//! \param [in] theGUID - item's attribute GUID.
|
//! \param [in] theGUID - item's attribute GUID.
|
||||||
//! \return annotated item label if it is found, otherwise - null label.
|
//! \return annotated item label if it is found, otherwise - null label.
|
||||||
Standard_EXPORT TDF_Label FindAnnotatedItemAttr(const TDF_Label& theItemLabel,
|
Standard_EXPORT TDF_Label FindAnnotatedItemAttr(const TDF_Label& theItemLabel,
|
||||||
const Standard_GUID& theGUID) const;
|
const Standard_GUID& theGUID) const;
|
||||||
|
|
||||||
//! Finds a label of the given assembly item's subshape in the annotated items hive.
|
//! Finds a label of the given assembly item's subshape in the annotated items hive.
|
||||||
//! \param [in] theItemId - assembly item ID.
|
//! \param [in] theItemId - assembly item ID.
|
||||||
//! \param [in] theSubshapeIndex - assembly item's subshape index.
|
//! \param [in] theSubshapeIndex - assembly item's subshape index.
|
||||||
//! \return annotated item label if it is found, otherwise - null label.
|
//! \return annotated item label if it is found, otherwise - null label.
|
||||||
Standard_EXPORT TDF_Label FindAnnotatedItemSubshape(const XCAFDoc_AssemblyItemId& theItemId,
|
Standard_EXPORT TDF_Label FindAnnotatedItemSubshape(const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
Standard_Integer theSubshapeIndex) const;
|
Standard_Integer theSubshapeIndex) const;
|
||||||
|
|
||||||
//! Finds a label of the given labeled item's subshape in the annotated items hive.
|
//! Finds a label of the given labeled item's subshape in the annotated items hive.
|
||||||
//! \param [in] theItemLabel - item label.
|
//! \param [in] theItemLabel - item label.
|
||||||
//! \param [in] theSubshapeIndex - labeled item's subshape index.
|
//! \param [in] theSubshapeIndex - labeled item's subshape index.
|
||||||
//! \return annotated item label if it is found, otherwise - null label.
|
//! \return annotated item label if it is found, otherwise - null label.
|
||||||
Standard_EXPORT TDF_Label FindAnnotatedItemSubshape(const TDF_Label& theItemLabel,
|
Standard_EXPORT TDF_Label FindAnnotatedItemSubshape(const TDF_Label& theItemLabel,
|
||||||
Standard_Integer theSubshapeIndex) const;
|
Standard_Integer theSubshapeIndex) const;
|
||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
@ -182,8 +178,8 @@ public:
|
|||||||
//! \param [in] theComment - textual comment.
|
//! \param [in] theComment - textual comment.
|
||||||
//! \return a handle to the base note attribute.
|
//! \return a handle to the base note attribute.
|
||||||
Standard_EXPORT Handle(XCAFDoc_Note) CreateComment(const TCollection_ExtendedString& theUserName,
|
Standard_EXPORT Handle(XCAFDoc_Note) CreateComment(const TCollection_ExtendedString& theUserName,
|
||||||
const TCollection_ExtendedString& theTimeStamp,
|
const TCollection_ExtendedString& theTimeStamp,
|
||||||
const TCollection_ExtendedString& theComment);
|
const TCollection_ExtendedString& theComment);
|
||||||
|
|
||||||
//! Create a new 'balloon' note.
|
//! Create a new 'balloon' note.
|
||||||
//! Creates a new label under the notes hive and attaches \ref XCAFDoc_NoteBalloon
|
//! Creates a new label under the notes hive and attaches \ref XCAFDoc_NoteBalloon
|
||||||
@ -193,8 +189,8 @@ public:
|
|||||||
//! \param [in] theComment - textual comment.
|
//! \param [in] theComment - textual comment.
|
||||||
//! \return a handle to the base note attribute.
|
//! \return a handle to the base note attribute.
|
||||||
Standard_EXPORT Handle(XCAFDoc_Note) CreateBalloon(const TCollection_ExtendedString& theUserName,
|
Standard_EXPORT Handle(XCAFDoc_Note) CreateBalloon(const TCollection_ExtendedString& theUserName,
|
||||||
const TCollection_ExtendedString& theTimeStamp,
|
const TCollection_ExtendedString& theTimeStamp,
|
||||||
const TCollection_ExtendedString& theComment);
|
const TCollection_ExtendedString& theComment);
|
||||||
|
|
||||||
//! Create a new note with data loaded from a binary file.
|
//! Create a new note with data loaded from a binary file.
|
||||||
//! Creates a new label under the notes hive and attaches \ref XCAFDoc_NoteComment
|
//! Creates a new label under the notes hive and attaches \ref XCAFDoc_NoteComment
|
||||||
@ -206,10 +202,10 @@ public:
|
|||||||
//! \param [in] theFile - input binary file.
|
//! \param [in] theFile - input binary file.
|
||||||
//! \return a handle to the base note attribute.
|
//! \return a handle to the base note attribute.
|
||||||
Standard_EXPORT Handle(XCAFDoc_Note) CreateBinData(const TCollection_ExtendedString& theUserName,
|
Standard_EXPORT Handle(XCAFDoc_Note) CreateBinData(const TCollection_ExtendedString& theUserName,
|
||||||
const TCollection_ExtendedString& theTimeStamp,
|
const TCollection_ExtendedString& theTimeStamp,
|
||||||
const TCollection_ExtendedString& theTitle,
|
const TCollection_ExtendedString& theTitle,
|
||||||
const TCollection_AsciiString& theMIMEtype,
|
const TCollection_AsciiString& theMIMEtype,
|
||||||
OSD_File& theFile);
|
OSD_File& theFile);
|
||||||
|
|
||||||
//! Create a new note with data loaded from a byte data array.
|
//! Create a new note with data loaded from a byte data array.
|
||||||
//! Creates a new label under the notes hive and attaches \ref XCAFDoc_NoteComment
|
//! Creates a new label under the notes hive and attaches \ref XCAFDoc_NoteComment
|
||||||
@ -221,10 +217,10 @@ public:
|
|||||||
//! \param [in] theData - byte data array.
|
//! \param [in] theData - byte data array.
|
||||||
//! \return a handle to the base note attribute.
|
//! \return a handle to the base note attribute.
|
||||||
Standard_EXPORT Handle(XCAFDoc_Note) CreateBinData(const TCollection_ExtendedString& theUserName,
|
Standard_EXPORT Handle(XCAFDoc_Note) CreateBinData(const TCollection_ExtendedString& theUserName,
|
||||||
const TCollection_ExtendedString& theTimeStamp,
|
const TCollection_ExtendedString& theTimeStamp,
|
||||||
const TCollection_ExtendedString& theTitle,
|
const TCollection_ExtendedString& theTitle,
|
||||||
const TCollection_AsciiString& theMIMEtype,
|
const TCollection_AsciiString& theMIMEtype,
|
||||||
const Handle(TColStd_HArray1OfByte)& theData);
|
const Handle(TColStd_HArray1OfByte)& theData);
|
||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
@ -238,13 +234,7 @@ public:
|
|||||||
//! \param [out] theNoteLabels - sequence of labels.
|
//! \param [out] theNoteLabels - sequence of labels.
|
||||||
//! \return number of added labels.
|
//! \return number of added labels.
|
||||||
Standard_EXPORT Standard_Integer GetNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
Standard_EXPORT Standard_Integer GetNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
TDF_LabelSequence& theNoteLabels) const;
|
TDF_LabelSequence& theNoteLabels) const;
|
||||||
Standard_EXPORT Standard_Integer GetAttrNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
|
||||||
const Standard_GUID& theGUID,
|
|
||||||
TDF_LabelSequence& theNoteLabels) const;
|
|
||||||
Standard_EXPORT Standard_Integer GetSubshapeNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
|
||||||
Standard_Integer theSubshapeIndex,
|
|
||||||
TDF_LabelSequence& theNoteLabels) const;
|
|
||||||
|
|
||||||
//! Gets all note labels of the labeled item.
|
//! Gets all note labels of the labeled item.
|
||||||
//! Notes linked to item's attributes aren't
|
//! Notes linked to item's attributes aren't
|
||||||
@ -253,7 +243,7 @@ public:
|
|||||||
//! \param [out] theNoteLabels - sequence of labels.
|
//! \param [out] theNoteLabels - sequence of labels.
|
||||||
//! \return number of added labels.
|
//! \return number of added labels.
|
||||||
Standard_EXPORT Standard_Integer GetNotes(const TDF_Label& theItemLabel,
|
Standard_EXPORT Standard_Integer GetNotes(const TDF_Label& theItemLabel,
|
||||||
TDF_LabelSequence& theNoteLabels) const;
|
TDF_LabelSequence& theNoteLabels) const;
|
||||||
|
|
||||||
//! Gets all note labels of the assembly item's attribute.
|
//! Gets all note labels of the assembly item's attribute.
|
||||||
//! Notes linked to the item itself or to item's subshapes
|
//! Notes linked to the item itself or to item's subshapes
|
||||||
@ -263,8 +253,8 @@ public:
|
|||||||
//! \param [out] theNoteLabels - sequence of labels.
|
//! \param [out] theNoteLabels - sequence of labels.
|
||||||
//! \return number of added labels.
|
//! \return number of added labels.
|
||||||
Standard_EXPORT Standard_Integer GetAttrNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
Standard_EXPORT Standard_Integer GetAttrNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
const Standard_GUID& theGUID,
|
const Standard_GUID& theGUID,
|
||||||
TDF_LabelSequence& theNoteLabels) const;
|
TDF_LabelSequence& theNoteLabels) const;
|
||||||
|
|
||||||
//! Gets all note labels of the labeled item's attribute.
|
//! Gets all note labels of the labeled item's attribute.
|
||||||
//! Notes linked to the item itself or to item's subshapes
|
//! Notes linked to the item itself or to item's subshapes
|
||||||
@ -274,8 +264,8 @@ public:
|
|||||||
//! \param [out] theNoteLabels - sequence of labels.
|
//! \param [out] theNoteLabels - sequence of labels.
|
||||||
//! \return number of added labels.
|
//! \return number of added labels.
|
||||||
Standard_EXPORT Standard_Integer GetAttrNotes(const TDF_Label& theItemLabel,
|
Standard_EXPORT Standard_Integer GetAttrNotes(const TDF_Label& theItemLabel,
|
||||||
const Standard_GUID& theGUID,
|
const Standard_GUID& theGUID,
|
||||||
TDF_LabelSequence& theNoteLabels) const;
|
TDF_LabelSequence& theNoteLabels) const;
|
||||||
|
|
||||||
//! Gets all note labels of the annotated item.
|
//! Gets all note labels of the annotated item.
|
||||||
//! Notes linked to the item itself or to item's attributes
|
//! Notes linked to the item itself or to item's attributes
|
||||||
@ -285,8 +275,8 @@ public:
|
|||||||
//! \param [out] theNoteLabels - sequence of labels.
|
//! \param [out] theNoteLabels - sequence of labels.
|
||||||
//! \return number of added labels.
|
//! \return number of added labels.
|
||||||
Standard_EXPORT Standard_Integer GetSubshapeNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
Standard_EXPORT Standard_Integer GetSubshapeNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
Standard_Integer theSubshapeIndex,
|
Standard_Integer theSubshapeIndex,
|
||||||
TDF_LabelSequence& theNoteLabels) const;
|
TDF_LabelSequence& theNoteLabels) const;
|
||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
@ -298,20 +288,14 @@ public:
|
|||||||
//! \param [in] theItemId - assembly item ID.
|
//! \param [in] theItemId - assembly item ID.
|
||||||
//! \return a handle to the assembly reference attribute.
|
//! \return a handle to the assembly reference attribute.
|
||||||
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNote(const TDF_Label& theNoteLabel,
|
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNote(const TDF_Label& theNoteLabel,
|
||||||
const XCAFDoc_AssemblyItemId& theItemId);
|
const XCAFDoc_AssemblyItemId& theItemId);
|
||||||
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToAttr(const TDF_Label& theNoteLabel,
|
|
||||||
const XCAFDoc_AssemblyItemId& theItemId,
|
|
||||||
const Standard_GUID& theGUID);
|
|
||||||
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToSubshape(const TDF_Label& theNoteLabel,
|
|
||||||
const XCAFDoc_AssemblyItemId& theItemId,
|
|
||||||
Standard_Integer theSubshapeIndex);
|
|
||||||
|
|
||||||
//! Adds the given note to the labeled item.
|
//! Adds the given note to the labeled item.
|
||||||
//! \param [in] theNoteLabel - note label.
|
//! \param [in] theNoteLabel - note label.
|
||||||
//! \param [in] theItemLabel - item label.
|
//! \param [in] theItemLabel - item label.
|
||||||
//! \return a handle to the assembly reference attribute.
|
//! \return a handle to the assembly reference attribute.
|
||||||
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNote(const TDF_Label& theNoteLabel,
|
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNote(const TDF_Label& theNoteLabel,
|
||||||
const TDF_Label& theItemLabel);
|
const TDF_Label& theItemLabel);
|
||||||
|
|
||||||
//! Adds the given note to the assembly item's attribute.
|
//! Adds the given note to the assembly item's attribute.
|
||||||
//! \param [in] theNoteLabel - note label.
|
//! \param [in] theNoteLabel - note label.
|
||||||
@ -319,8 +303,8 @@ public:
|
|||||||
//! \param [in] theGUID - assembly item's attribute GUID.
|
//! \param [in] theGUID - assembly item's attribute GUID.
|
||||||
//! \return a handle to the assembly reference attribute.
|
//! \return a handle to the assembly reference attribute.
|
||||||
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToAttr(const TDF_Label& theNoteLabel,
|
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToAttr(const TDF_Label& theNoteLabel,
|
||||||
const XCAFDoc_AssemblyItemId& theItemId,
|
const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
const Standard_GUID& theGUID);
|
const Standard_GUID& theGUID);
|
||||||
|
|
||||||
//! Adds the given note to the labeled item's attribute.
|
//! Adds the given note to the labeled item's attribute.
|
||||||
//! \param [in] theNoteLabel - note label.
|
//! \param [in] theNoteLabel - note label.
|
||||||
@ -328,8 +312,8 @@ public:
|
|||||||
//! \param [in] theGUID - assembly item's attribute GUID.
|
//! \param [in] theGUID - assembly item's attribute GUID.
|
||||||
//! \return a handle to the assembly reference attribute.
|
//! \return a handle to the assembly reference attribute.
|
||||||
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToAttr(const TDF_Label& theNoteLabel,
|
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToAttr(const TDF_Label& theNoteLabel,
|
||||||
const TDF_Label& theItemLabel,
|
const TDF_Label& theItemLabel,
|
||||||
const Standard_GUID& theGUID);
|
const Standard_GUID& theGUID);
|
||||||
|
|
||||||
//! Adds the given note to the assembly item's subshape.
|
//! Adds the given note to the assembly item's subshape.
|
||||||
//! \param [in] theNoteLabel - note label.
|
//! \param [in] theNoteLabel - note label.
|
||||||
@ -337,8 +321,8 @@ public:
|
|||||||
//! \param [in] theSubshapeIndex - assembly item's subshape index.
|
//! \param [in] theSubshapeIndex - assembly item's subshape index.
|
||||||
//! \return a handle to the assembly reference attribute.
|
//! \return a handle to the assembly reference attribute.
|
||||||
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToSubshape(const TDF_Label& theNoteLabel,
|
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToSubshape(const TDF_Label& theNoteLabel,
|
||||||
const XCAFDoc_AssemblyItemId& theItemId,
|
const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
Standard_Integer theSubshapeIndex);
|
Standard_Integer theSubshapeIndex);
|
||||||
|
|
||||||
//! Adds the given note to the labeled item's subshape.
|
//! Adds the given note to the labeled item's subshape.
|
||||||
//! \param [in] theNoteLabel - note label.
|
//! \param [in] theNoteLabel - note label.
|
||||||
@ -346,8 +330,8 @@ public:
|
|||||||
//! \param [in] theSubshapeIndex - assembly item's subshape index.
|
//! \param [in] theSubshapeIndex - assembly item's subshape index.
|
||||||
//! \return a handle to the assembly reference attribute.
|
//! \return a handle to the assembly reference attribute.
|
||||||
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToSubshape(const TDF_Label& theNoteLabel,
|
Standard_EXPORT Handle(XCAFDoc_AssemblyItemRef) AddNoteToSubshape(const TDF_Label& theNoteLabel,
|
||||||
const TDF_Label& theItemLabel,
|
const TDF_Label& theItemLabel,
|
||||||
Standard_Integer theSubshapeIndex);
|
Standard_Integer theSubshapeIndex);
|
||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
@ -362,8 +346,8 @@ public:
|
|||||||
//! linked with the note.
|
//! linked with the note.
|
||||||
//! \return true if the note is removed, otherwise - false.
|
//! \return true if the note is removed, otherwise - false.
|
||||||
Standard_EXPORT Standard_Boolean RemoveNote(const TDF_Label& theNoteLabel,
|
Standard_EXPORT Standard_Boolean RemoveNote(const TDF_Label& theNoteLabel,
|
||||||
const XCAFDoc_AssemblyItemId& theItemId,
|
const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
Standard_Boolean theDelIfOrphan = Standard_False);
|
Standard_Boolean theDelIfOrphan = Standard_False);
|
||||||
|
|
||||||
//! Removes the given note from the labeled item.
|
//! Removes the given note from the labeled item.
|
||||||
//! \param [in] theNoteLabel - note label.
|
//! \param [in] theNoteLabel - note label.
|
||||||
@ -373,8 +357,8 @@ public:
|
|||||||
//! linked with the note.
|
//! linked with the note.
|
||||||
//! \return true if the note is removed, otherwise - false.
|
//! \return true if the note is removed, otherwise - false.
|
||||||
Standard_EXPORT Standard_Boolean RemoveNote(const TDF_Label& theNoteLabel,
|
Standard_EXPORT Standard_Boolean RemoveNote(const TDF_Label& theNoteLabel,
|
||||||
const TDF_Label& theItemLabel,
|
const TDF_Label& theItemLabel,
|
||||||
Standard_Boolean theDelIfOrphan = Standard_False);
|
Standard_Boolean theDelIfOrphan = Standard_False);
|
||||||
|
|
||||||
//! Removes the given note from the assembly item's subshape.
|
//! Removes the given note from the assembly item's subshape.
|
||||||
//! \param [in] theNoteLabel - note label.
|
//! \param [in] theNoteLabel - note label.
|
||||||
@ -385,9 +369,9 @@ public:
|
|||||||
//! subshape linked with the note.
|
//! subshape linked with the note.
|
||||||
//! \return true if the note is removed, otherwise - false.
|
//! \return true if the note is removed, otherwise - false.
|
||||||
Standard_EXPORT Standard_Boolean RemoveSubshapeNote(const TDF_Label& theNoteLabel,
|
Standard_EXPORT Standard_Boolean RemoveSubshapeNote(const TDF_Label& theNoteLabel,
|
||||||
const XCAFDoc_AssemblyItemId& theItemId,
|
const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
Standard_Integer theSubshapeIndex,
|
Standard_Integer theSubshapeIndex,
|
||||||
Standard_Boolean theDelIfOrphan = Standard_False);
|
Standard_Boolean theDelIfOrphan = Standard_False);
|
||||||
|
|
||||||
//! Removes the given note from the labeled item's subshape.
|
//! Removes the given note from the labeled item's subshape.
|
||||||
//! \param [in] theNoteLabel - note label.
|
//! \param [in] theNoteLabel - note label.
|
||||||
@ -398,9 +382,9 @@ public:
|
|||||||
//! subshape linked with the note.
|
//! subshape linked with the note.
|
||||||
//! \return true if the note is removed, otherwise - false.
|
//! \return true if the note is removed, otherwise - false.
|
||||||
Standard_EXPORT Standard_Boolean RemoveSubshapeNote(const TDF_Label& theNoteLabel,
|
Standard_EXPORT Standard_Boolean RemoveSubshapeNote(const TDF_Label& theNoteLabel,
|
||||||
const TDF_Label& theItemLabel,
|
const TDF_Label& theItemLabel,
|
||||||
Standard_Integer theSubshapeIndex,
|
Standard_Integer theSubshapeIndex,
|
||||||
Standard_Boolean theDelIfOrphan = Standard_False);
|
Standard_Boolean theDelIfOrphan = Standard_False);
|
||||||
|
|
||||||
//! Removes a note from the assembly item's attribute.
|
//! Removes a note from the assembly item's attribute.
|
||||||
//! \param [in] theNoteLabel - note label.
|
//! \param [in] theNoteLabel - note label.
|
||||||
@ -411,9 +395,9 @@ public:
|
|||||||
//! attribute linked with the note.
|
//! attribute linked with the note.
|
||||||
//! \return true if the note is removed, otherwise - false.
|
//! \return true if the note is removed, otherwise - false.
|
||||||
Standard_EXPORT Standard_Boolean RemoveAttrNote(const TDF_Label& theNoteLabel,
|
Standard_EXPORT Standard_Boolean RemoveAttrNote(const TDF_Label& theNoteLabel,
|
||||||
const XCAFDoc_AssemblyItemId& theItemId,
|
const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
const Standard_GUID& theGUID,
|
const Standard_GUID& theGUID,
|
||||||
Standard_Boolean theDelIfOrphan = Standard_False);
|
Standard_Boolean theDelIfOrphan = Standard_False);
|
||||||
|
|
||||||
//! Removes a note from the labeled item's attribute.
|
//! Removes a note from the labeled item's attribute.
|
||||||
//! \param [in] theNoteLabel - note label.
|
//! \param [in] theNoteLabel - note label.
|
||||||
@ -424,9 +408,9 @@ public:
|
|||||||
//! attribute linked with the note.
|
//! attribute linked with the note.
|
||||||
//! \return true if the note is removed, otherwise - false.
|
//! \return true if the note is removed, otherwise - false.
|
||||||
Standard_EXPORT Standard_Boolean RemoveAttrNote(const TDF_Label& theNoteLabel,
|
Standard_EXPORT Standard_Boolean RemoveAttrNote(const TDF_Label& theNoteLabel,
|
||||||
const TDF_Label& theItemLabel,
|
const TDF_Label& theItemLabel,
|
||||||
const Standard_GUID& theGUID,
|
const Standard_GUID& theGUID,
|
||||||
Standard_Boolean theDelIfOrphan = Standard_False);
|
Standard_Boolean theDelIfOrphan = Standard_False);
|
||||||
|
|
||||||
//! Removes all notes from the assembly item.
|
//! Removes all notes from the assembly item.
|
||||||
//! \param [in] theItemId - assembly item ID.
|
//! \param [in] theItemId - assembly item ID.
|
||||||
@ -435,7 +419,7 @@ public:
|
|||||||
//! linked with the notes.
|
//! linked with the notes.
|
||||||
//! \return true if the notes are removed, otherwise - false.
|
//! \return true if the notes are removed, otherwise - false.
|
||||||
Standard_EXPORT Standard_Boolean RemoveAllNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
Standard_EXPORT Standard_Boolean RemoveAllNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
Standard_Boolean theDelIfOrphan = Standard_False);
|
Standard_Boolean theDelIfOrphan = Standard_False);
|
||||||
|
|
||||||
//! Removes all notes from the labeled item.
|
//! Removes all notes from the labeled item.
|
||||||
//! \param [in] theItemLabel - item label.
|
//! \param [in] theItemLabel - item label.
|
||||||
@ -444,7 +428,7 @@ public:
|
|||||||
//! linked with the notes.
|
//! linked with the notes.
|
||||||
//! \return true if the notes are removed, otherwise - false.
|
//! \return true if the notes are removed, otherwise - false.
|
||||||
Standard_EXPORT Standard_Boolean RemoveAllNotes(const TDF_Label& theItemLabel,
|
Standard_EXPORT Standard_Boolean RemoveAllNotes(const TDF_Label& theItemLabel,
|
||||||
Standard_Boolean theDelIfOrphan = Standard_False);
|
Standard_Boolean theDelIfOrphan = Standard_False);
|
||||||
|
|
||||||
//! Removes all notes from the assembly item's subshape.
|
//! Removes all notes from the assembly item's subshape.
|
||||||
//! \param [in] theItemId - assembly item ID.
|
//! \param [in] theItemId - assembly item ID.
|
||||||
@ -454,8 +438,8 @@ public:
|
|||||||
//! linked with the notes.
|
//! linked with the notes.
|
||||||
//! \return true if the notes are removed, otherwise - false.
|
//! \return true if the notes are removed, otherwise - false.
|
||||||
Standard_EXPORT Standard_Boolean RemoveAllSubshapeNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
Standard_EXPORT Standard_Boolean RemoveAllSubshapeNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
Standard_Integer theSubshapeIndex,
|
Standard_Integer theSubshapeIndex,
|
||||||
Standard_Boolean theDelIfOrphan = Standard_False);
|
Standard_Boolean theDelIfOrphan = Standard_False);
|
||||||
|
|
||||||
//! Removes all notes from the assembly item's attribute.
|
//! Removes all notes from the assembly item's attribute.
|
||||||
//! \param [in] theItemId - assembly item ID.
|
//! \param [in] theItemId - assembly item ID.
|
||||||
@ -465,8 +449,8 @@ public:
|
|||||||
//! linked with the notes.
|
//! linked with the notes.
|
||||||
//! \return true if the notes are removed, otherwise - false.
|
//! \return true if the notes are removed, otherwise - false.
|
||||||
Standard_EXPORT Standard_Boolean RemoveAllAttrNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
Standard_EXPORT Standard_Boolean RemoveAllAttrNotes(const XCAFDoc_AssemblyItemId& theItemId,
|
||||||
const Standard_GUID& theGUID,
|
const Standard_GUID& theGUID,
|
||||||
Standard_Boolean theDelIfOrphan = Standard_False);
|
Standard_Boolean theDelIfOrphan = Standard_False);
|
||||||
|
|
||||||
//! Removes all notes from the labeled item's attribute.
|
//! Removes all notes from the labeled item's attribute.
|
||||||
//! \param [in] theItemLabel - item label.
|
//! \param [in] theItemLabel - item label.
|
||||||
@ -476,8 +460,8 @@ public:
|
|||||||
//! linked with the notes.
|
//! linked with the notes.
|
||||||
//! \return true if the notes are removed, otherwise - false.
|
//! \return true if the notes are removed, otherwise - false.
|
||||||
Standard_EXPORT Standard_Boolean RemoveAllAttrNotes(const TDF_Label& theItemLabel,
|
Standard_EXPORT Standard_Boolean RemoveAllAttrNotes(const TDF_Label& theItemLabel,
|
||||||
const Standard_GUID& theGUID,
|
const Standard_GUID& theGUID,
|
||||||
Standard_Boolean theDelIfOrphan = Standard_False);
|
Standard_Boolean theDelIfOrphan = Standard_False);
|
||||||
|
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
@ -527,7 +511,7 @@ public:
|
|||||||
Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
|
Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
|
||||||
Standard_EXPORT void Restore(const Handle(TDF_Attribute)& theAttrFrom) Standard_OVERRIDE;
|
Standard_EXPORT void Restore(const Handle(TDF_Attribute)& theAttrFrom) Standard_OVERRIDE;
|
||||||
Standard_EXPORT void Paste(const Handle(TDF_Attribute)& theAttrInto,
|
Standard_EXPORT void Paste(const Handle(TDF_Attribute)& theAttrInto,
|
||||||
const Handle(TDF_RelocationTable)& theRT) const Standard_OVERRIDE;
|
const Handle(TDF_RelocationTable)& theRT) const Standard_OVERRIDE;
|
||||||
Standard_EXPORT Standard_OStream& Dump(Standard_OStream& theOS) const Standard_OVERRIDE;
|
Standard_EXPORT Standard_OStream& Dump(Standard_OStream& theOS) const Standard_OVERRIDE;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -114,9 +114,6 @@ public:
|
|||||||
//! Returns all View labels defined for label Shapes transparency
|
//! Returns all View labels defined for label Shapes transparency
|
||||||
Standard_EXPORT Standard_Boolean GetViewLabelsForEnabledShapesLabel(const TDF_Label& theShapesTransparencyL, TDF_LabelSequence& theViews) const;
|
Standard_EXPORT Standard_Boolean GetViewLabelsForEnabledShapesLabel(const TDF_Label& theShapesTransparencyL, TDF_LabelSequence& theViews) const;
|
||||||
|
|
||||||
//! Returns all View labels defined for label NotesL
|
|
||||||
Standard_EXPORT Standard_Boolean GetViewLabelsForNote(const TDF_Label& theNoteL, TDF_LabelSequence& theViews) const;
|
|
||||||
|
|
||||||
//! Adds a view definition to a View table and returns its label
|
//! Adds a view definition to a View table and returns its label
|
||||||
Standard_EXPORT TDF_Label AddView() ;
|
Standard_EXPORT TDF_Label AddView() ;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user