mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Compare commits
19 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
bd2a789f15 | ||
|
a4e91f855b | ||
|
9efc032b9a | ||
|
44cbb3d8e7 | ||
|
392377a331 | ||
|
6635f53848 | ||
|
f7f32bf33e | ||
|
c1620d29fa | ||
|
92e70f93d0 | ||
|
54754bccab | ||
|
33a5691ef1 | ||
|
689b59692e | ||
|
c7fd6ca63b | ||
|
9704e22131 | ||
|
f3f713569a | ||
|
db976e0a59 | ||
|
ee8f2ea3c2 | ||
|
58393b24b6 | ||
|
b896c6f4af |
@@ -475,7 +475,7 @@ Modify this parameter with:
|
||||
if(!Interface_Static::SetIVal("read.step.tessellated",1))
|
||||
.. error ..
|
||||
~~~~
|
||||
Default value is 0 (On).
|
||||
Default value is 1 (On).
|
||||
|
||||
@subsubsection occt_step_2_3_4 Performing the STEP file translation
|
||||
|
||||
|
@@ -808,8 +808,11 @@ void Approx_BSplComputeLine::Parameters(const MultiLine& Line,
|
||||
const Standard_Integer aNbp = lastP - firstP + 1;
|
||||
|
||||
|
||||
// The first parameter should always be zero according to all the logic below,
|
||||
// so division by any value will give zero anyway, so it should never be scaled
|
||||
// to avoid case when there is only one parameter in the array thus division by zero happens.
|
||||
TheParameters(firstP) = 0.0;
|
||||
if (aNbp == 2) {
|
||||
TheParameters(firstP) = 0.0;
|
||||
TheParameters(lastP) = 1.0;
|
||||
}
|
||||
else if (Par == Approx_ChordLength || Par == Approx_Centripetal)
|
||||
@@ -820,7 +823,6 @@ void Approx_BSplComputeLine::Parameters(const MultiLine& Line,
|
||||
if (nbP3d == 0) mynbP3d = 1;
|
||||
if (nbP2d == 0) mynbP2d = 1;
|
||||
|
||||
TheParameters(firstP) = 0.0;
|
||||
dist = 0.0;
|
||||
TColgp_Array1OfPnt tabP(1, mynbP3d);
|
||||
TColgp_Array1OfPnt tabPP(1, mynbP3d);
|
||||
@@ -861,10 +863,10 @@ void Approx_BSplComputeLine::Parameters(const MultiLine& Line,
|
||||
TheParameters(i) = TheParameters(i - 1) + Sqrt(dist);
|
||||
}
|
||||
}
|
||||
for (i = firstP; i <= lastP; i++) TheParameters(i) /= TheParameters(lastP);
|
||||
for (i = firstP + 1; i <= lastP; i++) TheParameters(i) /= TheParameters(lastP);
|
||||
}
|
||||
else {
|
||||
for (i = firstP; i <= lastP; i++) {
|
||||
for (i = firstP + 1; i <= lastP; i++) {
|
||||
TheParameters(i) = (Standard_Real(i) - firstP) /
|
||||
(Standard_Real(lastP - Standard_Real(firstP)));
|
||||
}
|
||||
|
@@ -103,7 +103,7 @@ static Standard_Boolean ChangePCurve (TopoDS_Edge& E,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
static void ProjCurve3d (TopoDS_Edge& E,
|
||||
static bool ProjCurve3d (TopoDS_Edge& E,
|
||||
const Handle(Geom_Surface)& S,
|
||||
TopLoc_Location& L)
|
||||
{
|
||||
@@ -111,6 +111,10 @@ static void ProjCurve3d (TopoDS_Edge& E,
|
||||
TopLoc_Location LE;
|
||||
Standard_Real f,l;
|
||||
Handle(Geom_Curve) C = BRep_Tool::Curve(E,LE,f,l);
|
||||
if (C.IsNull())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Handle(Geom_TrimmedCurve) CT = new Geom_TrimmedCurve(C,f,l);
|
||||
|
||||
TopLoc_Location LL = L.Inverted().Multiplied(LE);
|
||||
@@ -118,6 +122,7 @@ static void ProjCurve3d (TopoDS_Edge& E,
|
||||
|
||||
Handle(Geom2d_Curve) C2 = GeomProjLib::Curve2d (CT,S);
|
||||
BB.UpdateEdge(E,C2,S,L,Precision::Confusion());
|
||||
return true;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -165,13 +170,19 @@ void BRepAlgo_FaceRestrictor::Perform()
|
||||
// no pcurve on the reference surface.
|
||||
if (modeProj) {
|
||||
// Projection of the 3D curve on surface.
|
||||
ProjCurve3d ( E, S, L);
|
||||
if (!ProjCurve3d(E, S, L))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// return the first pcurve glued on <S>
|
||||
Standard_Boolean YaPCurve = ChangePCurve (E, S, L);
|
||||
if (!YaPCurve) {
|
||||
ProjCurve3d (E, S, L);
|
||||
if (!ProjCurve3d(E, S, L))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -333,7 +333,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
|
||||
Only2d = Standard_True;
|
||||
|
||||
if(Only2d && Only3d) {
|
||||
BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(hcur->Curve()),
|
||||
BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(*hcur),
|
||||
Udeb, Ufin);
|
||||
prj = MKed.Edge();
|
||||
BB.UpdateEdge(TopoDS::Edge(prj),
|
||||
@@ -369,7 +369,7 @@ void BRepAlgo_NormalProjection::SetDefaultParams()
|
||||
|
||||
if(!Only3d) PCur2d = appr.Curve2d();
|
||||
if(Only2d) {
|
||||
BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(hcur->Curve()),
|
||||
BRepLib_MakeEdge MKed(GeomAdaptor::MakeCurve(*hcur),
|
||||
Udeb, Ufin);
|
||||
prj = MKed.Edge();
|
||||
}
|
||||
|
@@ -231,55 +231,8 @@ private:
|
||||
aNodesInfo[1].Point2d +
|
||||
aNodesInfo[2].Point2d) / 3.;
|
||||
|
||||
const gp_XY aCenter2dLink1 = (aNodesInfo[0].Point2d + aNodesInfo[1].Point2d) / 2.;
|
||||
const gp_XY aCenter2dLink2 = (aNodesInfo[1].Point2d + aNodesInfo[2].Point2d) / 2.;
|
||||
const gp_XY aCenter2dLink3 = (aNodesInfo[2].Point2d + aNodesInfo[0].Point2d) / 2.;
|
||||
|
||||
const gp_Pnt aCenter3dLink1 = getPoint3d(aCenter2dLink1);
|
||||
const gp_Pnt aCenter3dLink2 = getPoint3d(aCenter2dLink2);
|
||||
const gp_Pnt aCenter3dLink3 = getPoint3d(aCenter2dLink3);
|
||||
|
||||
std::vector<gp_XY> aCenters;
|
||||
aCenters.push_back(aCenter2d);
|
||||
aCenters.push_back(aCenter2dLink1);
|
||||
aCenters.push_back(aCenter2dLink2);
|
||||
aCenters.push_back(aCenter2dLink3);
|
||||
|
||||
const gp_Pnt aCenter3d = getPoint3d(aCenter2d);
|
||||
//Standard_Real aMaxDeviation = NormalDeviation(aNodesInfo[0].Point, aNormal).SquareDeviation(aCenter3d);
|
||||
std::vector<Standard_Real> aDevs;
|
||||
aDevs.push_back(NormalDeviation(aNodesInfo[0].Point, aNormal).SquareDeviation(aCenter3d));
|
||||
aDevs.push_back(NormalDeviation(aNodesInfo[0].Point, aNormal).SquareDeviation(aCenter3dLink1));
|
||||
aDevs.push_back(NormalDeviation(aNodesInfo[0].Point, aNormal).SquareDeviation(aCenter3dLink2));
|
||||
aDevs.push_back(NormalDeviation(aNodesInfo[0].Point, aNormal).SquareDeviation(aCenter3dLink3));
|
||||
|
||||
Standard_Real aMaxDeviation = aDevs[0];
|
||||
int a = 0;
|
||||
if (!checkDeflectionOfPointAndUpdateCache(aCenter2d, aCenter3d, aMaxDeviation))
|
||||
{
|
||||
for (int i = 1; i < 4; i++)
|
||||
{
|
||||
if (aMaxDeviation < aDevs[i])
|
||||
{
|
||||
a = i;
|
||||
aMaxDeviation = aDevs[i];
|
||||
}
|
||||
}
|
||||
myControlNodes->Append(aCenters[a]);
|
||||
//splitLinks(aNodesInfo, aNodexIndices);
|
||||
}
|
||||
else
|
||||
{
|
||||
splitLinks(aNodesInfo, aNodexIndices);
|
||||
}
|
||||
//splitLinks(aNodesInfo, aNodexIndices);
|
||||
|
||||
/*if (usePoint(aCenter2d, NormalDeviation(aNodesInfo[0].Point, aNormal)))
|
||||
{
|
||||
splitLinks(aNodesInfo, aNodexIndices);
|
||||
}*/
|
||||
/*usePoint(aCenter2d, NormalDeviation(aNodesInfo[0].Point, aNormal));
|
||||
splitLinks(aNodesInfo, aNodexIndices);*/
|
||||
usePoint(aCenter2d, NormalDeviation(aNodesInfo[0].Point, aNormal));
|
||||
splitLinks(aNodesInfo, aNodexIndices);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1292,11 +1292,10 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_IndexedMapOfShape& Conte
|
||||
for ( ;exp2.More(); exp2.Next()) {
|
||||
LOE.Append(exp2.Current());
|
||||
}
|
||||
BRepOffset_Tool::TryProject(CF,OF1,LOE,LInt1,LInt2,mySide,myTol);
|
||||
//-------------------------------------------------------
|
||||
// If no trace try intersection.
|
||||
//-------------------------------------------------------
|
||||
if (LInt1.IsEmpty()) {
|
||||
if (!BRepOffset_Tool::TryProject(CF, OF1, LOE, LInt1, LInt2, mySide, myTol) || LInt1.IsEmpty()) {
|
||||
BRepOffset_Tool::Inter3D (CF,OF1,LInt1,LInt2,mySide,NullEdge,NullFace,NullFace);
|
||||
}
|
||||
Store (CF,OF1,LInt1,LInt2);
|
||||
|
@@ -1175,12 +1175,16 @@ void BRepOffset_MakeOffset::MakeThickSolid(const Message_ProgressRange& theRange
|
||||
{
|
||||
NbOF++;
|
||||
}
|
||||
if (NbOF <= NbF)
|
||||
if (NbOF < NbF)
|
||||
{
|
||||
myDone = Standard_False;
|
||||
myError = BRepOffset_UnknownError;
|
||||
return;
|
||||
}
|
||||
if (NbOF == NbF)
|
||||
{
|
||||
myOffset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (myOffset > 0 ) myOffsetShape.Reverse();
|
||||
|
@@ -1881,6 +1881,10 @@ Standard_Boolean BRepOffset_Tool::TryProject
|
||||
if (C.IsNull()) {
|
||||
BRepLib::BuildCurve3d(CurE,BRep_Tool::Tolerance(CurE));
|
||||
C = BRep_Tool::Curve(CurE,L,f,l);
|
||||
if (C.IsNull())
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
}
|
||||
C = new Geom_TrimmedCurve(C,f,l);
|
||||
if ( !L.IsIdentity()) C->Transform(L);
|
||||
@@ -3519,9 +3523,8 @@ void BRepOffset_Tool::ExtentFace (const TopoDS_Face& F,
|
||||
if (ToBuild.IsBound(E)) {
|
||||
TopTools_ListOfShape LOE;
|
||||
LOE.Append(E);
|
||||
BRepOffset_Tool::TryProject (TopoDS::Face(ToBuild(E)),
|
||||
EF,LOE,LInt2,LInt1,Side,TolConf);
|
||||
if (!LInt1.IsEmpty())
|
||||
if (BRepOffset_Tool::TryProject(TopoDS::Face(ToBuild(E)), EF, LOE, LInt2, LInt1, Side, TolConf)
|
||||
&& !LInt1.IsEmpty())
|
||||
ToBuild.UnBind(E);
|
||||
}
|
||||
}
|
||||
|
@@ -515,8 +515,13 @@ BSplCLib::EvalBsplineBasis
|
||||
//
|
||||
// this should be always invertible if ii is correctly computed
|
||||
//
|
||||
Factor = (Parameter - FlatKnots(ii - qq + pp + 1))
|
||||
/ (FlatKnots(ii + pp) - FlatKnots(ii - qq + pp + 1)) ;
|
||||
const Standard_Real aScale = (FlatKnots(ii + pp) - FlatKnots(ii - qq + pp + 1));
|
||||
if (Abs (aScale) < gp::Resolution())
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
Factor = (Parameter - FlatKnots(ii - qq + pp + 1)) / aScale;
|
||||
Saved = Factor * BsplineBasis(1,pp) ;
|
||||
BsplineBasis(1,pp) *= (1.0e0 - Factor) ;
|
||||
BsplineBasis(1,pp) += BsplineBasis(1,qq) ;
|
||||
@@ -536,7 +541,13 @@ BSplCLib::EvalBsplineBasis
|
||||
}
|
||||
|
||||
for (pp = 1 ; pp <= qq - 1 ; pp++) {
|
||||
Inverse = 1.0e0 / (FlatKnots(ii + pp) - FlatKnots(ii - qq + pp + 1)) ;
|
||||
const Standard_Real aScale = (FlatKnots(ii + pp) - FlatKnots(ii - qq + pp + 1));
|
||||
if (Abs (aScale) < gp::Resolution())
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
Inverse = 1.0e0 / aScale;
|
||||
Factor = (Parameter - FlatKnots(ii - qq + pp + 1)) * Inverse ;
|
||||
Saved = Factor * BsplineBasis(1,pp) ;
|
||||
BsplineBasis(1,pp) *= (1.0e0 - Factor) ;
|
||||
|
@@ -20,10 +20,10 @@
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
#include <StepData_Factors.hxx>
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_Axis1Placement;
|
||||
class gp_Ax1;
|
||||
class gp_Ax2d;
|
||||
@@ -43,16 +43,16 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeAxis1Placement(const gp_Ax1& A,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeAxis1Placement(const gp_Ax2d& A,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeAxis1Placement(const Handle(Geom_Axis1Placement)& A,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeAxis1Placement(const Handle(Geom2d_AxisPlacement)& A,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Axis1Placement)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_Axis2Placement2d;
|
||||
class gp_Ax2;
|
||||
class gp_Ax22d;
|
||||
@@ -40,10 +41,10 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeAxis2Placement2d(const gp_Ax2& A,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeAxis2Placement2d(const gp_Ax22d& A,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Axis2Placement2d)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
#include <StepData_StepModel.hxx>
|
||||
class StepData_Factors;
|
||||
class StepGeom_Axis2Placement3d;
|
||||
class gp_Ax2;
|
||||
class gp_Ax3;
|
||||
@@ -41,19 +42,19 @@ public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Ax2& A,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Ax3& A,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const gp_Trsf& T,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeAxis2Placement3d(const Handle(Geom_Axis2Placement)& A,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Axis2Placement3d)& Value() const;
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <GeomToStep_Root.hxx>
|
||||
class Geom_BSplineCurve;
|
||||
class Geom2d_BSplineCurve;
|
||||
class StepData_Factors;
|
||||
class StepGeom_BSplineCurveWithKnots;
|
||||
|
||||
|
||||
@@ -40,10 +41,10 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnots(const Handle(Geom_BSplineCurve)& Bsplin,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnots(const Handle(Geom2d_BSplineCurve)& Bsplin,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_BSplineCurveWithKnots)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve;
|
||||
class Geom_BSplineCurve;
|
||||
class Geom2d_BSplineCurve;
|
||||
@@ -41,10 +42,10 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve(const Handle(Geom_BSplineCurve)& Bsplin,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeBSplineCurveWithKnotsAndRationalBSplineCurve(const Handle(Geom2d_BSplineCurve)& Bsplin,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve)& Value() const;
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
class StepData_Factors;
|
||||
class StepGeom_BSplineSurfaceWithKnots;
|
||||
class Geom_BSplineSurface;
|
||||
|
||||
@@ -39,7 +40,7 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeBSplineSurfaceWithKnots(const Handle(Geom_BSplineSurface)& Bsplin,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_BSplineSurfaceWithKnots)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface;
|
||||
class Geom_BSplineSurface;
|
||||
|
||||
@@ -40,7 +41,7 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeBSplineSurfaceWithKnotsAndRationalBSplineSurface(const Handle(Geom_BSplineSurface)& Bsplin,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_BoundedCurve;
|
||||
class Geom_BoundedCurve;
|
||||
class Geom2d_BoundedCurve;
|
||||
@@ -41,10 +42,10 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeBoundedCurve(const Handle(Geom_BoundedCurve)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeBoundedCurve(const Handle(Geom2d_BoundedCurve)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_BoundedCurve)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_BoundedSurface;
|
||||
class Geom_BoundedSurface;
|
||||
|
||||
@@ -40,7 +41,7 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeBoundedSurface(const Handle(Geom_BoundedSurface)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_BoundedSurface)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_Circle;
|
||||
class gp_Circ;
|
||||
class Geom_Circle;
|
||||
@@ -41,13 +42,13 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeCircle(const gp_Circ& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeCircle(const Handle(Geom_Circle)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeCircle(const Handle(Geom2d_Circle)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Circle)& Value() const;
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
class StepGeom_Conic;
|
||||
class Geom_Conic;
|
||||
class Geom2d_Conic;
|
||||
class StepData_Factors;
|
||||
|
||||
|
||||
//! This class implements the mapping between classes
|
||||
@@ -39,10 +40,10 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeConic(const Handle(Geom_Conic)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeConic(const Handle(Geom2d_Conic)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Conic)& Value() const;
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <GeomToStep_Root.hxx>
|
||||
class StepGeom_ConicalSurface;
|
||||
class Geom_ConicalSurface;
|
||||
class StepData_Factors;
|
||||
|
||||
|
||||
//! This class implements the mapping between class
|
||||
@@ -38,7 +39,7 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeConicalSurface(const Handle(Geom_ConicalSurface)& CSurf,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_ConicalSurface)& Value() const;
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
class StepData_Factors;
|
||||
class StepGeom_Curve;
|
||||
class Geom_Curve;
|
||||
class Geom2d_Curve;
|
||||
@@ -39,10 +40,10 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeCurve(const Handle(Geom_Curve)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeCurve(const Handle(Geom2d_Curve)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Curve)& Value() const;
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <GeomToStep_Root.hxx>
|
||||
class StepGeom_CylindricalSurface;
|
||||
class Geom_CylindricalSurface;
|
||||
class StepData_Factors;
|
||||
|
||||
|
||||
//! This class implements the mapping between class
|
||||
@@ -38,7 +39,7 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeCylindricalSurface(const Handle(Geom_CylindricalSurface)& CSurf,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_CylindricalSurface)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_ElementarySurface;
|
||||
class Geom_ElementarySurface;
|
||||
|
||||
@@ -40,7 +41,7 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeElementarySurface(const Handle(Geom_ElementarySurface)& S,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_ElementarySurface)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_Ellipse;
|
||||
class gp_Elips;
|
||||
class Geom_Ellipse;
|
||||
@@ -41,13 +42,13 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeEllipse(const gp_Elips& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeEllipse(const Handle(Geom_Ellipse)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeEllipse(const Handle(Geom2d_Ellipse)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Ellipse)& Value() const;
|
||||
|
||||
|
@@ -38,10 +38,10 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeHyperbola(const Handle(Geom2d_Hyperbola)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeHyperbola(const Handle(Geom_Hyperbola)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Hyperbola)& Value() const;
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
class StepData_Factors;
|
||||
class StepGeom_Line;
|
||||
class gp_Lin;
|
||||
class gp_Lin2d;
|
||||
@@ -41,16 +42,16 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeLine(const gp_Lin& L,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeLine(const gp_Lin2d& L,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeLine(const Handle(Geom_Line)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeLine(const Handle(Geom2d_Line)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Line)& Value() const;
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
class StepGeom_Parabola;
|
||||
class Geom2d_Parabola;
|
||||
class Geom_Parabola;
|
||||
class StepData_Factors;
|
||||
|
||||
|
||||
//! This class implements the mapping between the class
|
||||
@@ -38,10 +39,10 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeParabola(const Handle(Geom2d_Parabola)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeParabola(const Handle(Geom_Parabola)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Parabola)& Value() const;
|
||||
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
class StepData_Factors;
|
||||
class StepGeom_Plane;
|
||||
class gp_Pln;
|
||||
class Geom_Plane;
|
||||
@@ -39,10 +40,10 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakePlane(const gp_Pln& P,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakePlane(const Handle(Geom_Plane)& P,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Plane)& Value() const;
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_Polyline;
|
||||
|
||||
|
||||
@@ -38,10 +39,10 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakePolyline(const TColgp_Array1OfPnt& P,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakePolyline(const TColgp_Array1OfPnt2d& P,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Polyline)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_RectangularTrimmedSurface;
|
||||
class Geom_RectangularTrimmedSurface;
|
||||
|
||||
@@ -40,7 +41,7 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeRectangularTrimmedSurface(const Handle(Geom_RectangularTrimmedSurface)& RTSurf,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_RectangularTrimmedSurface)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_SphericalSurface;
|
||||
class Geom_SphericalSurface;
|
||||
|
||||
@@ -39,7 +40,7 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeSphericalSurface(const Handle(Geom_SphericalSurface)& CSurf,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_SphericalSurface)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_Surface;
|
||||
class Geom_Surface;
|
||||
|
||||
@@ -39,7 +40,7 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeSurface(const Handle(Geom_Surface)& C,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Surface)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_SurfaceOfLinearExtrusion;
|
||||
class Geom_SurfaceOfLinearExtrusion;
|
||||
|
||||
@@ -39,7 +40,7 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeSurfaceOfLinearExtrusion(const Handle(Geom_SurfaceOfLinearExtrusion)& CSurf,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_SurfaceOfLinearExtrusion)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_SurfaceOfRevolution;
|
||||
class Geom_SurfaceOfRevolution;
|
||||
|
||||
@@ -39,7 +40,7 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeSurfaceOfRevolution(const Handle(Geom_SurfaceOfRevolution)& RevSurf,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_SurfaceOfRevolution)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_SweptSurface;
|
||||
class Geom_SweptSurface;
|
||||
|
||||
@@ -40,7 +41,7 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeSweptSurface(const Handle(Geom_SweptSurface)& S,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_SweptSurface)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_ToroidalSurface;
|
||||
class Geom_ToroidalSurface;
|
||||
|
||||
@@ -39,7 +40,7 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeToroidalSurface(const Handle(Geom_ToroidalSurface)& TorSurf,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_ToroidalSurface)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <GeomToStep_Root.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_Vector;
|
||||
class gp_Vec;
|
||||
class gp_Vec2d;
|
||||
@@ -42,16 +43,16 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeVector(const gp_Vec& V,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeVector(const gp_Vec2d& V,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeVector(const Handle(Geom_Vector)& V,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT GeomToStep_MakeVector(const Handle(Geom2d_Vector)& V,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepGeom_Vector)& Value() const;
|
||||
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
#include <StepData_Factors.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
|
||||
|
@@ -25,15 +25,8 @@ enum Graphic3d_TransModeFlags
|
||||
Graphic3d_TMF_TriedronPers = 0x0020, //!< object behaves like trihedron - it is fixed at the corner of view and does not resizing (but rotating)
|
||||
Graphic3d_TMF_2d = 0x0040, //!< object is defined in 2D screen coordinates (pixels) and does not resize, pan and rotate
|
||||
Graphic3d_TMF_CameraPers = 0x0080, //!< object is in front of the camera
|
||||
Graphic3d_TMF_OrthoPers = 0x0100, //!< object is forced to be rendered with orthographic projection.
|
||||
Graphic3d_TMF_ZoomRotatePers = Graphic3d_TMF_ZoomPers
|
||||
| Graphic3d_TMF_RotatePers //!< object doesn't resize and rotate
|
||||
};
|
||||
|
||||
//! Bitwise OR operator for transform persistence mode flags. Be aware that some flags combinations are not valid.
|
||||
inline Graphic3d_TransModeFlags operator| (Graphic3d_TransModeFlags a, Graphic3d_TransModeFlags b)
|
||||
{
|
||||
return static_cast<Graphic3d_TransModeFlags> (static_cast<uint32_t> (a) | static_cast<uint32_t> (b));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -58,12 +58,6 @@ public:
|
||||
return (theMode & (Graphic3d_TMF_TriedronPers | Graphic3d_TMF_2d)) != 0;
|
||||
}
|
||||
|
||||
//! Return true if specified mode is orthographic projection transformation persistence.
|
||||
static Standard_Boolean IsOrthoPers (Graphic3d_TransModeFlags theMode)
|
||||
{
|
||||
return (theMode & Graphic3d_TMF_OrthoPers) != 0;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
//! Set transformation persistence.
|
||||
@@ -116,9 +110,6 @@ public:
|
||||
//! Return true for Graphic3d_TMF_TriedronPers and Graphic3d_TMF_2d modes.
|
||||
Standard_Boolean IsTrihedronOr2d() const { return IsTrihedronOr2d (myMode); }
|
||||
|
||||
//! Return true for Graphic3d_TMF_OrthoPers mode.
|
||||
Standard_Boolean IsOrthoPers () const { return IsOrthoPers (myMode); }
|
||||
|
||||
//! Transformation persistence mode flags.
|
||||
Graphic3d_TransModeFlags Mode() const { return myMode; }
|
||||
|
||||
@@ -306,32 +297,28 @@ public:
|
||||
//! @param theWorldView [in] the world view transformation matrix.
|
||||
//! @param theViewportWidth [in] the width of viewport (for 2d persistence).
|
||||
//! @param theViewportHeight [in] the height of viewport (for 2d persistence).
|
||||
//! @param theToApplyProjPers [in] if should apply projection persistence to matrix (for orthographic persistence).
|
||||
//! @return transformation matrix to be applied to model world transformation of an object.
|
||||
template<class T>
|
||||
NCollection_Mat4<T> Compute (const Handle(Graphic3d_Camera)& theCamera,
|
||||
const NCollection_Mat4<T>& theProjection,
|
||||
const NCollection_Mat4<T>& theWorldView,
|
||||
const Standard_Integer theViewportWidth,
|
||||
const Standard_Integer theViewportHeight,
|
||||
const Standard_Boolean theToApplyProjPers = false) const;
|
||||
const Standard_Integer theViewportHeight) const;
|
||||
|
||||
//! Apply transformation persistence on specified matrices.
|
||||
//! @param theCamera [in] camera definition
|
||||
//! @param theProjection [in] projection matrix to modify
|
||||
//! @param theWorldView [in/out] world-view matrix to modify
|
||||
//! @param theViewportWidth [in] viewport width
|
||||
//! @param theViewportHeight [in] viewport height
|
||||
//! @param theAnchor [in] if not NULL, overrides anchor point
|
||||
//! @param theToApplyProjPers [in] if should apply projection persistence to matrix (for orthographic persistence).
|
||||
//! @param theCamera camera definition
|
||||
//! @param theProjection projection matrix to modify
|
||||
//! @param theWorldView world-view matrix to modify
|
||||
//! @param theViewportWidth viewport width
|
||||
//! @param theViewportHeight viewport height
|
||||
//! @param theAnchor if not NULL, overrides anchor point
|
||||
template<class T>
|
||||
void Apply (const Handle(Graphic3d_Camera)& theCamera,
|
||||
const NCollection_Mat4<T>& theProjection,
|
||||
NCollection_Mat4<T>& theWorldView,
|
||||
const Standard_Integer theViewportWidth,
|
||||
const Standard_Integer theViewportHeight,
|
||||
const gp_Pnt* theAnchor = NULL,
|
||||
const Standard_Boolean theToApplyProjPers = true) const;
|
||||
const gp_Pnt* theAnchor = NULL) const;
|
||||
|
||||
//! Dumps the content of me into the stream
|
||||
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
|
||||
@@ -381,50 +368,41 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
|
||||
NCollection_Mat4<T>& theWorldView,
|
||||
const Standard_Integer theViewportWidth,
|
||||
const Standard_Integer theViewportHeight,
|
||||
const gp_Pnt* theAnchor,
|
||||
const Standard_Boolean theToApplyProjPers) const
|
||||
const gp_Pnt* theAnchor) const
|
||||
{
|
||||
(void )theViewportWidth;
|
||||
(void )theProjection;
|
||||
if (myMode == Graphic3d_TMF_None
|
||||
|| theViewportHeight == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Handle(Graphic3d_Camera) aCamera = theCamera;
|
||||
if (IsOrthoPers() && !aCamera->IsOrthographic())
|
||||
{
|
||||
aCamera = new Graphic3d_Camera(*theCamera); // If OrthoPers, copy camera and set to orthographic projection
|
||||
aCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
|
||||
}
|
||||
|
||||
NCollection_Mat4<Standard_Real> aWorldView = aCamera->OrientationMatrix();
|
||||
|
||||
// use total size when tiling is active
|
||||
const Standard_Integer aVPSizeY = aCamera->Tile().IsValid() ? aCamera->Tile().TotalSize.y() : theViewportHeight;
|
||||
const Standard_Integer aVPSizeY = theCamera->Tile().IsValid() ? theCamera->Tile().TotalSize.y() : theViewportHeight;
|
||||
|
||||
// a small enough jitter compensation offset
|
||||
// to avoid image dragging within single pixel in corner cases
|
||||
const Standard_Real aJitterComp = 0.001;
|
||||
if ((myMode & Graphic3d_TMF_TriedronPers) != 0)
|
||||
if (myMode == Graphic3d_TMF_TriedronPers)
|
||||
{
|
||||
// reset Z focus for trihedron persistence
|
||||
const Standard_Real aFocus = aCamera->IsOrthographic()
|
||||
? aCamera->Distance()
|
||||
: (aCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative
|
||||
? Standard_Real(aCamera->ZFocus() * aCamera->Distance())
|
||||
: Standard_Real(aCamera->ZFocus()));
|
||||
const Standard_Real aFocus = theCamera->IsOrthographic()
|
||||
? theCamera->Distance()
|
||||
: (theCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative
|
||||
? Standard_Real(theCamera->ZFocus() * theCamera->Distance())
|
||||
: Standard_Real(theCamera->ZFocus()));
|
||||
|
||||
// scale factor to pixels
|
||||
const gp_XYZ aViewDim = aCamera->ViewDimensions (aFocus);
|
||||
const gp_XYZ aViewDim = theCamera->ViewDimensions (aFocus);
|
||||
const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY);
|
||||
const gp_Dir aForward = aCamera->Direction();
|
||||
gp_XYZ aCenter = aCamera->Center().XYZ() + aForward.XYZ() * (aFocus - aCamera->Distance());
|
||||
const gp_Dir aForward = theCamera->Direction();
|
||||
gp_XYZ aCenter = theCamera->Center().XYZ() + aForward.XYZ() * (aFocus - theCamera->Distance());
|
||||
if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0)
|
||||
{
|
||||
const Standard_Real anOffsetX = (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale;
|
||||
const gp_Dir aSide = aForward.Crossed (aCamera->Up());
|
||||
const gp_XYZ aDeltaX = aSide.XYZ() * (Abs(aViewDim.X()) * aCamera->NDC2dOffsetX() - anOffsetX);
|
||||
const gp_Dir aSide = aForward.Crossed (theCamera->Up());
|
||||
const gp_XYZ aDeltaX = aSide.XYZ() * (Abs(aViewDim.X()) * theCamera->NDC2dOffsetX() - anOffsetX);
|
||||
if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0)
|
||||
{
|
||||
aCenter += aDeltaX;
|
||||
@@ -437,7 +415,7 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
|
||||
if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0)
|
||||
{
|
||||
const Standard_Real anOffsetY = (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale;
|
||||
const gp_XYZ aDeltaY = aCamera->Up().XYZ() * (Abs(aViewDim.Y()) * aCamera->NDC2dOffsetY() - anOffsetY);
|
||||
const gp_XYZ aDeltaY = theCamera->Up().XYZ() * (Abs(aViewDim.Y()) * theCamera->NDC2dOffsetY() - anOffsetY);
|
||||
if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0)
|
||||
{
|
||||
aCenter += aDeltaY;
|
||||
@@ -448,24 +426,27 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
|
||||
}
|
||||
}
|
||||
|
||||
NCollection_Mat4<Standard_Real> aWorldView = theCamera->OrientationMatrix();
|
||||
Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z());
|
||||
Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale);
|
||||
theWorldView.ConvertFrom (aWorldView);
|
||||
return;
|
||||
}
|
||||
else if ((myMode & Graphic3d_TMF_2d) != 0)
|
||||
else if (myMode == Graphic3d_TMF_2d)
|
||||
{
|
||||
const Standard_Real aFocus = aCamera->IsOrthographic()
|
||||
? aCamera->Distance()
|
||||
: (aCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative
|
||||
? Standard_Real(aCamera->ZFocus() * aCamera->Distance())
|
||||
: Standard_Real(aCamera->ZFocus()));
|
||||
const Standard_Real aFocus = theCamera->IsOrthographic()
|
||||
? theCamera->Distance()
|
||||
: (theCamera->ZFocusType() == Graphic3d_Camera::FocusType_Relative
|
||||
? Standard_Real(theCamera->ZFocus() * theCamera->Distance())
|
||||
: Standard_Real(theCamera->ZFocus()));
|
||||
|
||||
// scale factor to pixels
|
||||
const gp_XYZ aViewDim = aCamera->ViewDimensions (aFocus);
|
||||
const gp_XYZ aViewDim = theCamera->ViewDimensions (aFocus);
|
||||
const Standard_Real aScale = Abs(aViewDim.Y()) / Standard_Real(aVPSizeY);
|
||||
gp_XYZ aCenter (0.0, 0.0, -aFocus);
|
||||
if ((myParams.Params2d.Corner & (Aspect_TOTP_LEFT | Aspect_TOTP_RIGHT)) != 0)
|
||||
{
|
||||
aCenter.SetX (-aViewDim.X() * aCamera->NDC2dOffsetX() + (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale);
|
||||
aCenter.SetX (-aViewDim.X() * theCamera->NDC2dOffsetX() + (Standard_Real(myParams.Params2d.OffsetX) + aJitterComp) * aScale);
|
||||
if ((myParams.Params2d.Corner & Aspect_TOTP_RIGHT) != 0)
|
||||
{
|
||||
aCenter.SetX (-aCenter.X());
|
||||
@@ -473,24 +454,26 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
|
||||
}
|
||||
if ((myParams.Params2d.Corner & (Aspect_TOTP_TOP | Aspect_TOTP_BOTTOM)) != 0)
|
||||
{
|
||||
aCenter.SetY (-aViewDim.Y() * aCamera->NDC2dOffsetY() + (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale);
|
||||
aCenter.SetY (-aViewDim.Y() * theCamera->NDC2dOffsetY() + (Standard_Real(myParams.Params2d.OffsetY) + aJitterComp) * aScale);
|
||||
if ((myParams.Params2d.Corner & Aspect_TOTP_TOP) != 0)
|
||||
{
|
||||
aCenter.SetY (-aCenter.Y());
|
||||
}
|
||||
}
|
||||
|
||||
aWorldView.InitIdentity();
|
||||
Graphic3d_TransformUtils::Translate (aWorldView, aCenter.X(), aCenter.Y(), aCenter.Z());
|
||||
Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale);
|
||||
theWorldView.InitIdentity();
|
||||
Graphic3d_TransformUtils::Translate (theWorldView, T(aCenter.X()), T(aCenter.Y()), T(aCenter.Z()));
|
||||
Graphic3d_TransformUtils::Scale (theWorldView, T(aScale), T(aScale), T(aScale));
|
||||
return;
|
||||
}
|
||||
else if ((myMode & Graphic3d_TMF_CameraPers) != 0)
|
||||
{
|
||||
aWorldView.InitIdentity();
|
||||
theWorldView.InitIdentity();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Compute reference point for transformation in untransformed projection space.
|
||||
NCollection_Mat4<Standard_Real> aWorldView = theCamera->OrientationMatrix();
|
||||
if (theAnchor != NULL)
|
||||
{
|
||||
Graphic3d_TransformUtils::Translate (aWorldView, theAnchor->X(), theAnchor->Y(), theAnchor->Z());
|
||||
@@ -520,19 +503,12 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
|
||||
if ((myMode & Graphic3d_TMF_ZoomPers) != 0)
|
||||
{
|
||||
// lock zooming
|
||||
Standard_Real aScale = persistentScale (aCamera, theViewportWidth, theViewportHeight);
|
||||
Standard_Real aScale = persistentScale (theCamera, theViewportWidth, theViewportHeight);
|
||||
Graphic3d_TransformUtils::Scale (aWorldView, aScale, aScale, aScale);
|
||||
}
|
||||
theWorldView.ConvertFrom (aWorldView);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!theCamera->IsOrthographic() && IsOrthoPers() && theToApplyProjPers)
|
||||
{
|
||||
Graphic3d_Mat4d aProjInv;
|
||||
aProjInv.ConvertFrom (theProjection.Inverted());
|
||||
aWorldView = (aProjInv * aCamera->ProjectionMatrix()) * aWorldView;
|
||||
}
|
||||
|
||||
theWorldView.ConvertFrom (aWorldView);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
@@ -579,7 +555,7 @@ void Graphic3d_TransformPers::Apply (const Handle(Graphic3d_Camera)& theCamera,
|
||||
const Standard_Integer theViewportHeight,
|
||||
BVH_Box<T, 3>& theBoundingBox) const
|
||||
{
|
||||
NCollection_Mat4<T> aTPers = Compute (theCamera, theProjection, theWorldView, theViewportWidth, theViewportHeight, false);
|
||||
NCollection_Mat4<T> aTPers = Compute (theCamera, theProjection, theWorldView, theViewportWidth, theViewportHeight);
|
||||
if (aTPers.IsIdentity()
|
||||
|| !theBoundingBox.IsValid())
|
||||
{
|
||||
@@ -618,8 +594,7 @@ NCollection_Mat4<T> Graphic3d_TransformPers::Compute (const Handle(Graphic3d_Cam
|
||||
const NCollection_Mat4<T>& theProjection,
|
||||
const NCollection_Mat4<T>& theWorldView,
|
||||
const Standard_Integer theViewportWidth,
|
||||
const Standard_Integer theViewportHeight,
|
||||
const Standard_Boolean theToApplyProjPers) const
|
||||
const Standard_Integer theViewportHeight) const
|
||||
{
|
||||
if (myMode == Graphic3d_TMF_None)
|
||||
{
|
||||
@@ -635,7 +610,7 @@ NCollection_Mat4<T> Graphic3d_TransformPers::Compute (const Handle(Graphic3d_Cam
|
||||
|
||||
// compute only world-view matrix difference to avoid floating point instability
|
||||
// caused by projection matrix modifications outside of this algorithm (e.g. by Z-fit)
|
||||
Apply (theCamera, theProjection, aWorldView, theViewportWidth, theViewportHeight, NULL, theToApplyProjPers);
|
||||
Apply (theCamera, theProjection, aWorldView, theViewportWidth, theViewportHeight);
|
||||
return anUnviewMat * aWorldView;
|
||||
}
|
||||
|
||||
|
@@ -1996,7 +1996,7 @@ Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_ComplexTriangulate
|
||||
const Standard_Integer aNbNormals = theTriangulatedSufaceSet->NbNormals();
|
||||
// Number of pairs (Point, Normal). It is possible for one point to have multiple normals. This is
|
||||
// useful when the underlying surface is not C1 continuous.
|
||||
const Standard_Integer aNbPairs = aNbNormals > 1 ? theTriangulatedSufaceSet->NbPnindex() : aNodes->Length();
|
||||
const Standard_Integer aNbPairs = aNbNormals > 1 ? theTriangulatedSufaceSet->Pnmax() : aNodes->Length();
|
||||
const Standard_Boolean aHasNormals = aNbNormals > 0;
|
||||
|
||||
// Counting number of triangles in the triangle strips list.
|
||||
@@ -2021,7 +2021,7 @@ Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_ComplexTriangulate
|
||||
|
||||
for (Standard_Integer j = 1; j <= aNbPairs; ++j)
|
||||
{
|
||||
const gp_XYZ& aPoint = aNodes->Value(aNbNormals > 1 ? theTriangulatedSufaceSet->PnindexValue(j) : j);
|
||||
const gp_XYZ& aPoint = aNodes->Value((aNbNormals > 1 && theTriangulatedSufaceSet->NbPnindex() > 0) ? theTriangulatedSufaceSet->PnindexValue(j) : j);
|
||||
aMesh->SetNode(j, theFact * aPoint);
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,6 @@
|
||||
#define _STEPCAFControl_Reader_HeaderFile
|
||||
|
||||
#include <STEPControl_Reader.hxx>
|
||||
#include <StepData_Factors.hxx>
|
||||
#include <IFSelect_ReturnStatus.hxx>
|
||||
#include <TDF_LabelSequence.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
@@ -39,6 +38,8 @@ class StepShape_ConnectedFaceSet;
|
||||
class StepRepr_NextAssemblyUsageOccurrence;
|
||||
class STEPConstruct_Tool;
|
||||
class StepDimTol_Datum;
|
||||
class StepData_Factors;
|
||||
|
||||
|
||||
//! Provides a tool to read STEP file and put it into
|
||||
//! DECAF document. Besides transfer of shapes (including
|
||||
@@ -233,7 +234,7 @@ protected:
|
||||
Standard_EXPORT Standard_Boolean ReadColors
|
||||
(const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
const StepData_Factors& theLocalFactors) const;
|
||||
|
||||
//! Reads names of parts defined in the STEP model and
|
||||
//! assigns them to corresponding labels in the DECAF document
|
||||
@@ -245,7 +246,7 @@ protected:
|
||||
Standard_EXPORT Standard_Boolean ReadValProps (const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const STEPCAFControl_DataMapOfPDExternFile& PDFileMap,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
const StepData_Factors& theLocalFactors) const;
|
||||
|
||||
//! Reads layers of parts defined in the STEP model and
|
||||
//! set reference between shape and layers in the DECAF document
|
||||
@@ -259,19 +260,19 @@ protected:
|
||||
//! set reference between shape instances from different assemblyes
|
||||
Standard_EXPORT Standard_Boolean ReadGDTs (const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Reads materials for instances defined in the STEP model and
|
||||
//! set reference between shape instances from different assemblyes
|
||||
Standard_EXPORT Standard_Boolean ReadMaterials (const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const Handle(TColStd_HSequenceOfTransient)& SeqPDS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
const StepData_Factors& theLocalFactors) const;
|
||||
|
||||
//! Reads Views for instances defined in the STEP model
|
||||
Standard_EXPORT Standard_Boolean ReadViews(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
const StepData_Factors& theLocalFactors) const;
|
||||
|
||||
//! Populates the sub-Label of the passed TDF Label with shape
|
||||
//! data associated with the given STEP Representation Item,
|
||||
@@ -313,20 +314,20 @@ private:
|
||||
const Standard_Real theModifValue,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const Handle(XSControl_WorkSession)& theWS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Internal method. Read Datums, connected to GeomTolerance theGDTL.
|
||||
Standard_Boolean readDatumsAP242(const Handle(Standard_Transient)& theEnt,
|
||||
const TDF_Label theGDTL,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const Handle(XSControl_WorkSession)& theWS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Internal method. Read Dimension or GeomTolerance.
|
||||
TDF_Label createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const Handle(XSControl_WorkSession)& theWS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Prepares units for transfer
|
||||
void prepareUnits(const Handle(StepData_StepModel)& theModel,
|
||||
|
@@ -983,7 +983,7 @@ static Standard_Integer FindEntities(const Handle(Transfer_FinderProcess)& theFP
|
||||
//Handle(Transfer_TransientListBinder)::DownCast( bnd->Next(Standard_True) );
|
||||
Handle(Transfer_TransientListBinder)::DownCast(aBinder);
|
||||
Standard_Integer aResCount = 0;
|
||||
if (aTransientListBinder.IsNull() && theShape.ShapeType() == TopAbs_COMPOUND)
|
||||
if (aTransientListBinder.IsNull())
|
||||
{
|
||||
for (TopoDS_Iterator anIter(theShape); anIter.More(); anIter.Next())
|
||||
{
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include <STEPControl_Writer.hxx>
|
||||
#include <StepAP242_GeometricItemSpecificUsage.hxx>
|
||||
#include <StepData_ConfParameters.hxx>
|
||||
#include <StepData_Factors.hxx>
|
||||
#include <StepDimTol_Datum.hxx>
|
||||
#include <StepDimTol_GeometricTolerance.hxx>
|
||||
#include <StepDimTol_HArray1OfDatumSystemOrReference.hxx>
|
||||
@@ -40,6 +39,7 @@ class XSControl_WorkSession;
|
||||
class TDocStd_Document;
|
||||
class STEPCAFControl_ExternFile;
|
||||
class TopoDS_Shape;
|
||||
class StepData_Factors;
|
||||
|
||||
//! Provides a tool to write DECAF document to the
|
||||
//! STEP file. Besides transfer of shapes (including
|
||||
@@ -233,7 +233,7 @@ protected:
|
||||
TopoDS_Shape transferExternFiles(const TDF_Label& theLabel,
|
||||
const STEPControl_StepModelType theMode,
|
||||
TDF_LabelSequence& theLabelSeq,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Standard_CString thePrefix = "",
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
@@ -256,7 +256,7 @@ protected:
|
||||
//! Write D>s assigned to specified labels, to STEP model, according AP242
|
||||
Standard_Boolean writeDGTsAP242(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theLabels,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Write materials assigned to specified labels, to STEP model
|
||||
Standard_Boolean writeMaterials(const Handle(XSControl_WorkSession)& theWS,
|
||||
@@ -297,14 +297,14 @@ protected:
|
||||
const gp_Ax2& theAnnotationPlane,
|
||||
const gp_Pnt& theTextPosition,
|
||||
const Handle(Standard_Transient)& theDimension,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Handle(StepDimTol_Datum) writeDatumAP242(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theShapeL,
|
||||
const TDF_Label& theDatumL,
|
||||
const Standard_Boolean isFirstDTarget,
|
||||
const Handle(StepDimTol_Datum)& theWrittenDatum,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
void writeToleranceZone(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject,
|
||||
@@ -316,7 +316,7 @@ protected:
|
||||
const TDF_Label& theGeomTolL,
|
||||
const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem,
|
||||
const Handle(StepRepr_RepresentationContext)& theRC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
private:
|
||||
|
||||
|
@@ -23,8 +23,8 @@
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <StepData_Factors.hxx>
|
||||
#include <StepBasic_SiPrefix.hxx>
|
||||
class StepData_Factors;
|
||||
class StepData_StepModel;
|
||||
class StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx;
|
||||
class StepRepr_GlobalUnitAssignedContext;
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
//! uncertainty equal to Tol3d)
|
||||
Standard_EXPORT void Init (const Standard_Real Tol3d,
|
||||
const Handle(StepData_StepModel)& theModel,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Returns True if Init was called successfully
|
||||
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||
@@ -60,10 +60,10 @@ public:
|
||||
//! Computes the length, plane angle and solid angle conversion
|
||||
//! factor . Returns a status, 0 if OK
|
||||
Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepRepr_GlobalUnitAssignedContext)& aContext,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT Standard_Integer ComputeFactors (const Handle(StepBasic_NamedUnit)& aUnit,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Computes the uncertainty value (for length)
|
||||
Standard_EXPORT Standard_Integer ComputeTolerance (const Handle(StepRepr_GlobalUncertaintyAssignedContext)& aContext);
|
||||
|
@@ -26,6 +26,7 @@
|
||||
#include <Standard_CString.hxx>
|
||||
#include <TColStd_SequenceOfTransient.hxx>
|
||||
class StepBasic_ProductDefinition;
|
||||
class StepData_Factors;
|
||||
class XSControl_WorkSession;
|
||||
class TopoDS_Shape;
|
||||
class StepRepr_RepresentationItem;
|
||||
@@ -114,13 +115,13 @@ public:
|
||||
Standard_EXPORT Standard_Boolean GetPropReal (const Handle(StepRepr_RepresentationItem)& item,
|
||||
Standard_Real& Val,
|
||||
Standard_Boolean& isArea,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
const StepData_Factors& theLocalFactors) const;
|
||||
|
||||
//! Returns value of Centriod property (or False if it is not)
|
||||
Standard_EXPORT Standard_Boolean GetPropPnt (const Handle(StepRepr_RepresentationItem)& item,
|
||||
const Handle(StepRepr_RepresentationContext)& Context,
|
||||
gp_Pnt& Pnt,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
const StepData_Factors& theLocalFactors) const;
|
||||
|
||||
//! Sets current assembly shape SDR (for FindCDSR calls)
|
||||
Standard_EXPORT void SetAssemblyShape (const TopoDS_Shape& shape);
|
||||
|
@@ -580,7 +580,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
|
||||
|
||||
// common progress indicator for translation of own shapes and sub-assemblies
|
||||
Message_ProgressScope PS(theProgress, "Part", nbEnt);
|
||||
Standard_Integer nbComponents=0, nbShapes=0;
|
||||
Standard_Integer nbComponents=0;
|
||||
|
||||
// translate sub-assemblies
|
||||
for ( Standard_Integer nbNauo =1; nbNauo <= listNAUO->Length() && PS.More(); nbNauo++) {
|
||||
@@ -662,7 +662,6 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
|
||||
else
|
||||
B.Add(Cund, theResult);
|
||||
// [END] ssv: OCCT#22436: extra compound in NMSSR case
|
||||
nbShapes++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -670,50 +669,20 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
|
||||
// way of writing hybrid models in AP203 since 1998, and AP209
|
||||
// Note that both AP203 and AP209 allow main representation to be non-empty
|
||||
if ( readSRR && /*theResult.IsNull() &&*/ i <= nbNotAspect) {
|
||||
Interface_EntityIterator subs1 = graph.Sharings(rep);
|
||||
Handle(Standard_Type) tSRR = STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship);
|
||||
for (subs1.Start(); subs1.More(); subs1.Next()) {
|
||||
const Handle(Standard_Transient)& anitem = subs1.Value();
|
||||
if( !anitem->IsKind(STANDARD_TYPE(StepRepr_RepresentationRelationship)))
|
||||
continue;
|
||||
if (anitem->DynamicType() == tSRR)
|
||||
{
|
||||
Handle(StepRepr_ShapeRepresentationRelationship) SRR =
|
||||
Handle(StepRepr_ShapeRepresentationRelationship)::DownCast(anitem);
|
||||
Standard_Integer nbrep = (rep == SRR->Rep1() ? 2 : 1);
|
||||
// SKL for bug 29068: parameter useTrsf is used because if root entity has connection with other
|
||||
// by ShapeRepresentationRelationship then result after such transferring need to transform also.
|
||||
// This case is from test "bugs modalg_7 bug30196"
|
||||
binder = TransferEntity(SRR, TP, theLocalFactors, nbrep, useTrsf, aPS1.Next());
|
||||
if (! binder.IsNull()) {
|
||||
theResult = TransferBRep::ShapeResult (binder);
|
||||
Result1 = theResult;
|
||||
B.Add(Cund, theResult);
|
||||
nbShapes++;
|
||||
}
|
||||
}
|
||||
else if(readConstructiveGeomRR && anitem->IsKind(STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship)))
|
||||
{
|
||||
Handle(StepRepr_ConstructiveGeometryRepresentationRelationship) aCSRR =
|
||||
Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)::DownCast(anitem);
|
||||
binder = TransferEntity(aCSRR, TP, theLocalFactors);
|
||||
if (! binder.IsNull())
|
||||
{
|
||||
Result1 = TransferBRep::ShapeResult (binder);
|
||||
B.Add(Cund, Result1);
|
||||
nbShapes++;
|
||||
}
|
||||
}
|
||||
TopoDS_Shape aNewResult = TransferRelatedSRR(TP, rep, useTrsf, readConstructiveGeomRR, theLocalFactors, Cund, aPS1);
|
||||
if (!aNewResult.IsNull())
|
||||
{
|
||||
Result1 = aNewResult;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// make a warning if both own shape and sub-assemblies are present
|
||||
if ( nbShapes >0 && nbComponents > 0 )
|
||||
if ( (Cund.NbChildren() - nbComponents) > 0 && nbComponents > 0 )
|
||||
TP->AddWarning ( PD, "Product has both sub-assemblies and directly assigned shape" );
|
||||
|
||||
// if only single shape is read, add it as it is; otherwise add compound
|
||||
if( nbShapes == 1 && nbComponents == 0 )
|
||||
if( (Cund.NbChildren() - nbComponents) == 1 && nbComponents == 0 )
|
||||
shbinder = new TransferBRep_ShapeBinder (Result1);
|
||||
else
|
||||
shbinder = new TransferBRep_ShapeBinder (Cund);
|
||||
@@ -1500,7 +1469,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity
|
||||
}
|
||||
else if (start->IsKind(STANDARD_TYPE(StepVisual_TessellatedSurfaceSet)))
|
||||
{
|
||||
myShapeBuilder.Init(GetCasted(StepVisual_TessellatedSurfaceSet, start), TP, aHasGeom, aLocalFactors);
|
||||
myShapeBuilder.Init(GetCasted(StepVisual_TessellatedSurfaceSet, start), TP, aLocalFactors, aHasGeom);
|
||||
found = Standard_True;
|
||||
}
|
||||
}
|
||||
@@ -1555,8 +1524,8 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity
|
||||
const Message_ProgressRange& theProgress)
|
||||
{
|
||||
Handle(TransferBRep_ShapeBinder) shbinder;
|
||||
|
||||
// --------------------------------------------------------------
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// On se trouve ici dans un contexte " d'assemblage geometrique "
|
||||
// - MappedItem
|
||||
// --------------------------------------------------------------
|
||||
@@ -1567,7 +1536,8 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity
|
||||
// La Shape, et la mise en position
|
||||
Handle(StepShape_ShapeRepresentation) maprep = Handle(StepShape_ShapeRepresentation)::
|
||||
DownCast(mapit->MappingSource()->MappedRepresentation());
|
||||
Standard_Boolean isBound = Standard_False;
|
||||
Standard_Boolean isBound = Standard_False;
|
||||
Message_ProgressScope aPSRoot(theProgress, NULL, 2);
|
||||
Handle(Transfer_Binder) binder = TP->Find(maprep);
|
||||
if (binder.IsNull()) binder = TransferEntity(maprep, TP, theLocalFactors, isBound, Standard_False, theProgress);
|
||||
shbinder = Handle(TransferBRep_ShapeBinder)::DownCast(binder);
|
||||
@@ -1575,7 +1545,6 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity
|
||||
else {
|
||||
TopoDS_Shape mappedShape = shbinder->Result();
|
||||
if ( ! mappedShape.IsNull() ) {
|
||||
|
||||
// Positionnement : 2 formules
|
||||
// 1/ Ax2 dans Source et comme Target : passage de Source a Target
|
||||
// 2/ CartesianOperator3d comme Target : on applique
|
||||
@@ -1607,6 +1576,39 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity
|
||||
shbinder = new TransferBRep_ShapeBinder (mappedShape);
|
||||
}
|
||||
}
|
||||
TopoDS_Compound aCund;
|
||||
TopoDS_Shape aResult;
|
||||
BRep_Builder aBuilder;
|
||||
aBuilder.MakeCompound(aCund);
|
||||
if (!shbinder.IsNull())
|
||||
{
|
||||
aResult = TransferBRep::ShapeResult(shbinder);
|
||||
aBuilder.Add(aCund, aResult);
|
||||
}
|
||||
// translate possible shapes related by SRRs, which corresponds to
|
||||
// way of writing hybrid models in AP203 since 1998, and AP209
|
||||
Standard_Integer aReadSRR = Interface_Static::IVal("read.step.shape.relationship");
|
||||
Standard_Integer aReadConstructiveGeomRR = Interface_Static::IVal("read.step.constructivegeom.relationship");
|
||||
if (aReadSRR)
|
||||
{
|
||||
const Interface_Graph& aGraph = TP->Graph();
|
||||
Standard_Integer aSRRnum = 0;
|
||||
for (Interface_EntityIterator aSubsIt(aGraph.Sharings(maprep)); aSubsIt.More(); aSubsIt.Next())
|
||||
++aSRRnum;
|
||||
Message_ProgressScope aPS(aPSRoot.Next(), "Part", aSRRnum);
|
||||
TopoDS_Shape aNewResult = TransferRelatedSRR(TP, maprep, Standard_False, aReadConstructiveGeomRR, theLocalFactors, aCund, aPS);
|
||||
if (!aNewResult.IsNull())
|
||||
{
|
||||
aResult = aNewResult;
|
||||
}
|
||||
// if only single shape is read, add it as it is; otherwise add compound
|
||||
if (aCund.NbChildren() == 1)
|
||||
shbinder = new TransferBRep_ShapeBinder(aResult);
|
||||
else if (aCund.NbChildren() > 1)
|
||||
{
|
||||
shbinder = new TransferBRep_ShapeBinder(aCund);
|
||||
}
|
||||
}
|
||||
TP->Bind(mapit, shbinder);
|
||||
return shbinder;
|
||||
}
|
||||
@@ -2091,3 +2093,47 @@ void STEPControl_ActorRead::SetModel(const Handle(Interface_InterfaceModel)& the
|
||||
{
|
||||
myModel = theModel;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// Method : TransferRelatedSRR
|
||||
// Purpose : Helper method to transfer SRR related to the representation
|
||||
//=======================================================================
|
||||
TopoDS_Shape STEPControl_ActorRead::TransferRelatedSRR(const Handle(Transfer_TransientProcess)& theTP,
|
||||
const Handle(StepShape_ShapeRepresentation)& theRep,
|
||||
const Standard_Boolean theUseTrsf,
|
||||
const Standard_Integer theReadConstructiveGeomRR,
|
||||
const StepData_Factors& theLocalFactors,
|
||||
TopoDS_Compound& theCund,
|
||||
Message_ProgressScope& thePS)
|
||||
{
|
||||
BRep_Builder aBuilder;
|
||||
TopoDS_Shape aResult;
|
||||
const Interface_Graph& aGraph = theTP->Graph();
|
||||
for (Interface_EntityIterator aSubsIt(aGraph.Sharings(theRep)); aSubsIt.More() && thePS.More(); aSubsIt.Next())
|
||||
{
|
||||
Handle(Standard_Transient) anItem = aSubsIt.Value();
|
||||
if (!anItem->IsKind(STANDARD_TYPE(StepRepr_RepresentationRelationship)))
|
||||
continue;
|
||||
Handle(Transfer_Binder) aBinder;
|
||||
if (anItem->DynamicType() == STANDARD_TYPE(StepRepr_ShapeRepresentationRelationship))
|
||||
{
|
||||
Handle(StepRepr_ShapeRepresentationRelationship) aSRR =
|
||||
Handle(StepRepr_ShapeRepresentationRelationship)::DownCast(anItem);
|
||||
Standard_Integer aNbRep = (theRep == aSRR->Rep1() ? 2 : 1);
|
||||
aBinder = TransferEntity(aSRR, theTP, theLocalFactors, aNbRep, theUseTrsf, thePS.Next());
|
||||
}
|
||||
else if (theReadConstructiveGeomRR &&
|
||||
anItem->DynamicType() == STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship))
|
||||
{
|
||||
Handle(StepRepr_ConstructiveGeometryRepresentationRelationship) aCGRR =
|
||||
Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)::DownCast(anItem);
|
||||
aBinder = TransferEntity(aCGRR, theTP, theLocalFactors);
|
||||
}
|
||||
if (!aBinder.IsNull())
|
||||
{
|
||||
aResult = TransferBRep::ShapeResult(aBinder);
|
||||
aBuilder.Add(theCund, aResult);
|
||||
}
|
||||
}
|
||||
return aResult;
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <StepData_Factors.hxx>
|
||||
#include <StepToTopoDS_NMTool.hxx>
|
||||
#include <Transfer_ActorOfTransientProcess.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
@@ -48,6 +47,7 @@ class StepShape_FaceSurface;
|
||||
class TopoDS_Shell;
|
||||
class TopoDS_Compound;
|
||||
class StepRepr_ConstructiveGeometryRepresentationRelationship;
|
||||
class StepData_Factors;
|
||||
class StepData_StepModel;
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
Standard_EXPORT Handle(Transfer_Binder) TransferShape (
|
||||
const Handle(Standard_Transient)& start,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Standard_Boolean isManifold = Standard_True,
|
||||
const Standard_Boolean theUseTrsf = Standard_False,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
@@ -105,14 +105,14 @@ public:
|
||||
const Handle(StepRepr_Representation)& TargContext,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
gp_Trsf& Trsf,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Computes transformation defined by given
|
||||
//! REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION
|
||||
Standard_EXPORT Standard_Boolean ComputeSRRWT (const Handle(StepRepr_RepresentationRelationship)& SRR,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
gp_Trsf& Trsf,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ protected:
|
||||
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity (
|
||||
const Handle(StepBasic_ProductDefinition)& PD,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Standard_Boolean theUseTrsf = Standard_False,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
@@ -135,7 +135,7 @@ protected:
|
||||
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity
|
||||
(const Handle(StepRepr_NextAssemblyUsageOccurrence)& NAUO,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Transfers shape representation entity
|
||||
@@ -152,7 +152,7 @@ protected:
|
||||
Standard_EXPORT Handle(TransferBRep_ShapeBinder) TransferEntity
|
||||
(const Handle(StepShape_ContextDependentShapeRepresentation)& CDSR,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Transfers shape representation relationship entity
|
||||
@@ -189,7 +189,7 @@ protected:
|
||||
|
||||
Handle(TransferBRep_ShapeBinder) TransferEntity( const Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)& theCGRR,
|
||||
const Handle(Transfer_TransientProcess)& theTP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Translates file by old way when CDSR are roots . Acts only if "read.step.product_mode" is equal Off.
|
||||
Standard_EXPORT Handle(TransferBRep_ShapeBinder) OldWay
|
||||
@@ -206,6 +206,14 @@ private:
|
||||
|
||||
Standard_EXPORT void computeIDEASClosings (const TopoDS_Compound& comp, TopTools_IndexedDataMapOfShapeListOfShape& shellClosingMap);
|
||||
|
||||
Standard_EXPORT TopoDS_Shape TransferRelatedSRR(const Handle(Transfer_TransientProcess)& theTP,
|
||||
const Handle(StepShape_ShapeRepresentation)& theRep,
|
||||
const Standard_Boolean theUseTrsf,
|
||||
const Standard_Integer theReadConstructiveGeomRR,
|
||||
const StepData_Factors& theLocalFactors,
|
||||
TopoDS_Compound& theCund,
|
||||
Message_ProgressScope& thePS);
|
||||
|
||||
StepToTopoDS_NMTool myNMTool;
|
||||
Standard_Real myPrecision;
|
||||
Standard_Real myMaxTol;
|
||||
|
@@ -28,6 +28,7 @@
|
||||
class Transfer_Finder;
|
||||
class Transfer_Binder;
|
||||
class Transfer_FinderProcess;
|
||||
class StepData_Factors;
|
||||
class StepShape_ShapeDefinitionRepresentation;
|
||||
class StepGeom_Axis2Placement3d;
|
||||
class TopoDS_Shape;
|
||||
@@ -59,7 +60,7 @@ public:
|
||||
const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
|
||||
Handle(StepGeom_Axis2Placement3d)& AX1,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL,
|
||||
const Standard_Boolean isManifold = Standard_True,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
@@ -68,7 +69,7 @@ public:
|
||||
(const Handle(Transfer_Finder)& start,
|
||||
const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Handle(TopTools_HSequenceOfShape)& shapeGroup = NULL,
|
||||
const Standard_Boolean isManifold = Standard_True,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
@@ -77,7 +78,7 @@ public:
|
||||
(const Handle(Transfer_Finder)& start,
|
||||
const Handle(StepShape_ShapeDefinitionRepresentation)& SDR,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT void SetMode (const STEPControl_StepModelType M);
|
||||
|
@@ -93,24 +93,6 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_AxisIntersector::ScaleAndTransform (
|
||||
return aRes;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : CopyWithBuilder
|
||||
// purpose : Returns a copy of the frustum using the given frustum builder configuration.
|
||||
// Returned frustum should be re-constructed before being used.
|
||||
//=======================================================================
|
||||
Handle(SelectMgr_BaseIntersector) SelectMgr_AxisIntersector::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const
|
||||
{
|
||||
(void )theBuilder;
|
||||
Standard_ASSERT_RAISE(mySelectionType == SelectMgr_SelectionType_Point,
|
||||
"Error! SelectMgr_AxisIntersector::CopyWithBuilder() should be called after selection axis initialization");
|
||||
|
||||
Handle(SelectMgr_AxisIntersector) aRes = new SelectMgr_AxisIntersector();
|
||||
aRes->myAxis = myAxis;
|
||||
aRes->mySelectionType = mySelectionType;
|
||||
|
||||
return aRes;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : hasIntersection
|
||||
// purpose :
|
||||
|
@@ -52,11 +52,6 @@ public:
|
||||
const gp_GTrsf& theTrsf,
|
||||
const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a copy of the intersector transformed using the builder configuration given.
|
||||
//! Builder is an argument that represents corresponding settings for re-constructing transformed frustum from scratch.
|
||||
//! In this class, builder is not used and theBuilder parameter is ignored.
|
||||
Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
//! Intersection test between defined axis and given axis-aligned box
|
||||
|
@@ -71,11 +71,6 @@ public:
|
||||
const gp_GTrsf& theTrsf,
|
||||
const Handle(SelectMgr_FrustumBuilder)& theBuilder) const = 0;
|
||||
|
||||
//! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch;
|
||||
//! should NOT be NULL.
|
||||
//! @return a copy of the frustum with the input builder assigned
|
||||
virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const = 0;
|
||||
|
||||
public:
|
||||
|
||||
//! Return camera definition.
|
||||
|
@@ -449,28 +449,6 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_RectangularFrustum::ScaleAndTransfor
|
||||
return aRes;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : CopyWithBuilder
|
||||
// purpose : Returns a copy of the frustum using the given frustum builder configuration.
|
||||
// Returned frustum should be re-constructed before being used.
|
||||
// =======================================================================
|
||||
Handle(SelectMgr_BaseIntersector) SelectMgr_RectangularFrustum::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const
|
||||
{
|
||||
Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Point || mySelectionType == SelectMgr_SelectionType_Box,
|
||||
"Error! SelectMgr_RectangularFrustum::CopyWithBuilder() should be called after selection frustum initialization");
|
||||
|
||||
Standard_ASSERT_RAISE (!theBuilder.IsNull(),
|
||||
"Error! SelectMgr_RectangularFrustum::CopyWithBuilder() should be called with valid builder");
|
||||
|
||||
Handle(SelectMgr_RectangularFrustum) aRes = new SelectMgr_RectangularFrustum();
|
||||
aRes->mySelectionType = mySelectionType;
|
||||
aRes->mySelRectangle = mySelRectangle;
|
||||
aRes->myPixelTolerance = myPixelTolerance;
|
||||
aRes->SetBuilder (theBuilder);
|
||||
|
||||
return aRes;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : IsScalable
|
||||
// purpose :
|
||||
|
@@ -99,13 +99,6 @@ public:
|
||||
const gp_GTrsf& theTrsf,
|
||||
const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a copy of the frustum using the given frustum builder configuration.
|
||||
//! Returned frustum should be re-constructed before being used.
|
||||
//! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch;
|
||||
//! should NOT be NULL.
|
||||
//! @return a copy of the frustum with the input builder assigned
|
||||
Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
|
||||
|
||||
// SAT Tests for different objects
|
||||
|
||||
//! SAT intersection test between defined volume and given axis-aligned box
|
||||
|
@@ -241,23 +241,17 @@ namespace
|
||||
//=============================================================================
|
||||
SelectMgr_SelectableObjectSet::SelectMgr_SelectableObjectSet()
|
||||
{
|
||||
myBVH[BVHSubset_ortho2dPersistent] = new BVH_Tree<Standard_Real, 3>();
|
||||
myBVH[BVHSubset_ortho3dPersistent] = new BVH_Tree<Standard_Real, 3>();
|
||||
myBVH[BVHSubset_2dPersistent] = new BVH_Tree<Standard_Real, 3>();
|
||||
myBVH[BVHSubset_3dPersistent] = new BVH_Tree<Standard_Real, 3>();
|
||||
myBVH[BVHSubset_3d] = new BVH_Tree<Standard_Real, 3>();
|
||||
myBVH[BVHSubset_2dPersistent] = new BVH_Tree<Standard_Real, 3>();
|
||||
myBVH[BVHSubset_3dPersistent] = new BVH_Tree<Standard_Real, 3>();
|
||||
myBVH[BVHSubset_3d] = new BVH_Tree<Standard_Real, 3>();
|
||||
|
||||
myBuilder[BVHSubset_ortho2dPersistent] = new BVH_LinearBuilder<Standard_Real, 3> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth);
|
||||
myBuilder[BVHSubset_ortho3dPersistent] = new BVH_LinearBuilder<Standard_Real, 3> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth);
|
||||
myBuilder[BVHSubset_2dPersistent] = new BVH_LinearBuilder<Standard_Real, 3> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth);
|
||||
myBuilder[BVHSubset_3dPersistent] = new BVH_LinearBuilder<Standard_Real, 3> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth);
|
||||
myBuilder[BVHSubset_3d] = new BVH_BinnedBuilder<Standard_Real, 3, 4> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth, Standard_True);
|
||||
myBuilder[BVHSubset_2dPersistent] = new BVH_LinearBuilder<Standard_Real, 3> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth);
|
||||
myBuilder[BVHSubset_3dPersistent] = new BVH_LinearBuilder<Standard_Real, 3> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth);
|
||||
myBuilder[BVHSubset_3d] = new BVH_BinnedBuilder<Standard_Real, 3, 4> (BVH_Constants_LeafNodeSizeSingle, BVH_Constants_MaxTreeDepth, Standard_True);
|
||||
|
||||
myIsDirty[BVHSubset_ortho2dPersistent] = Standard_False;
|
||||
myIsDirty[BVHSubset_ortho3dPersistent] = Standard_False;
|
||||
myIsDirty[BVHSubset_2dPersistent] = Standard_False;
|
||||
myIsDirty[BVHSubset_3dPersistent] = Standard_False;
|
||||
myIsDirty[BVHSubset_3d] = Standard_False;
|
||||
myIsDirty[BVHSubset_2dPersistent] = Standard_False;
|
||||
myIsDirty[BVHSubset_3dPersistent] = Standard_False;
|
||||
myIsDirty[BVHSubset_3d] = Standard_False;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
@@ -268,9 +262,10 @@ Standard_Boolean SelectMgr_SelectableObjectSet::Append (const Handle(SelectMgr_S
|
||||
{
|
||||
// get an appropriate BVH subset to insert the object into it
|
||||
const Standard_Integer aSubsetIdx = appropriateSubset (theObject);
|
||||
|
||||
|
||||
// check that the object is excluded from other subsets
|
||||
if (currentSubset (theObject) != -1)
|
||||
if (myObjects[(aSubsetIdx + 1) % BVHSubsetNb].Contains (theObject)
|
||||
|| myObjects[(aSubsetIdx + 2) % BVHSubsetNb].Contains (theObject))
|
||||
{
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -406,51 +401,9 @@ void SelectMgr_SelectableObjectSet::UpdateBVH (const Handle(Graphic3d_Camera)& t
|
||||
myBuilder[BVHSubset_2dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_2dPersistent].get(), anAdaptor.Box());
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// check and update 3D orthographic persistence BVH tree if necessary
|
||||
// -------------------------------------------------------------------
|
||||
if (!IsEmpty (BVHSubset_ortho3dPersistent)
|
||||
&& (myIsDirty[BVHSubset_ortho3dPersistent]
|
||||
|| myLastViewState.IsChanged (aViewState)
|
||||
|| isWinSizeChanged))
|
||||
{
|
||||
Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection
|
||||
aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
|
||||
|
||||
// construct adaptor over private fields to provide direct access for the BVH builder
|
||||
BVHBuilderAdaptorPersistent anAdaptor (myObjects[BVHSubset_ortho3dPersistent],
|
||||
aNewOrthoCam, aNewOrthoCam->ProjectionMatrix(),
|
||||
aNewOrthoCam->OrientationMatrix(), theWinSize);
|
||||
|
||||
// update corresponding BVH tree data structure
|
||||
myBuilder[BVHSubset_ortho3dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_ortho3dPersistent].get(), anAdaptor.Box());
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// check and update 2D orthographic persistence BVH tree if necessary
|
||||
// -------------------------------------------------------------------
|
||||
if (!IsEmpty (BVHSubset_ortho2dPersistent)
|
||||
&& (myIsDirty[BVHSubset_ortho2dPersistent]
|
||||
|| myLastViewState.IsProjectionChanged (aViewState)
|
||||
|| isWinSizeChanged))
|
||||
{
|
||||
Handle(Graphic3d_Camera) aNewOrthoCam = new Graphic3d_Camera (*theCam); // If OrthoPers, copy camera and set to orthographic projection
|
||||
aNewOrthoCam->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
|
||||
|
||||
// construct adaptor over private fields to provide direct access for the BVH builder
|
||||
BVHBuilderAdaptorPersistent anAdaptor (myObjects[BVHSubset_ortho2dPersistent],
|
||||
aNewOrthoCam, aNewOrthoCam->ProjectionMatrix(),
|
||||
SelectMgr_SelectableObjectSet_THE_IDENTITY_MAT, theWinSize);
|
||||
|
||||
// update corresponding BVH tree data structure
|
||||
myBuilder[BVHSubset_ortho2dPersistent]->Build (&anAdaptor, myBVH[BVHSubset_ortho2dPersistent].get(), anAdaptor.Box());
|
||||
}
|
||||
|
||||
// release dirty state for every subset
|
||||
myIsDirty[BVHSubset_3dPersistent] = Standard_False;
|
||||
myIsDirty[BVHSubset_2dPersistent] = Standard_False;
|
||||
myIsDirty[BVHSubset_ortho3dPersistent] = Standard_False;
|
||||
myIsDirty[BVHSubset_ortho2dPersistent] = Standard_False;
|
||||
myIsDirty[BVHSubset_3dPersistent] = Standard_False;
|
||||
myIsDirty[BVHSubset_2dPersistent] = Standard_False;
|
||||
|
||||
// keep last view state
|
||||
myLastViewState = aViewState;
|
||||
@@ -466,11 +419,9 @@ void SelectMgr_SelectableObjectSet::UpdateBVH (const Handle(Graphic3d_Camera)& t
|
||||
//=============================================================================
|
||||
void SelectMgr_SelectableObjectSet::MarkDirty()
|
||||
{
|
||||
myIsDirty[BVHSubset_3d] = Standard_True;
|
||||
myIsDirty[BVHSubset_3dPersistent] = Standard_True;
|
||||
myIsDirty[BVHSubset_2dPersistent] = Standard_True;
|
||||
myIsDirty[BVHSubset_ortho3dPersistent] = Standard_True;
|
||||
myIsDirty[BVHSubset_ortho2dPersistent] = Standard_True;
|
||||
myIsDirty[BVHSubset_3d] = Standard_True;
|
||||
myIsDirty[BVHSubset_3dPersistent] = Standard_True;
|
||||
myIsDirty[BVHSubset_2dPersistent] = Standard_True;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : DumpJson
|
||||
|
@@ -42,22 +42,11 @@ public:
|
||||
//! needs to be updated only when camera's projection changes. Bounding volumes for this object subclass
|
||||
//! is represented directly in eye space coordinates.
|
||||
//! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf.
|
||||
//! - BVHSubset_ortho3dPersistent refers to the subset of 3D persistent selectable objects (rotate, pan, zoom persistence)
|
||||
//! that contains `Graphic3d_TMF_OrthoPers` persistence mode.
|
||||
//! Associated BVH tree needs to be updated when either the camera's projection and position change.
|
||||
//! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf.
|
||||
//! - BVHSubset_ortho2dPersistent refers to the subset of 2D persistent selectable objects
|
||||
//! that contains `Graphic3d_TMF_OrthoPers` persistence mode. Associated BVH tree
|
||||
//! needs to be updated only when camera's projection changes. Bounding volumes for this object subclass
|
||||
//! is represented directly in eye space coordinates.
|
||||
//! This subset uses linear BVH builder with 32 levels of depth and 1 element per leaf.
|
||||
enum BVHSubset
|
||||
{
|
||||
BVHSubset_3d,
|
||||
BVHSubset_3dPersistent,
|
||||
BVHSubset_2dPersistent,
|
||||
BVHSubset_ortho3dPersistent,
|
||||
BVHSubset_ortho2dPersistent,
|
||||
BVHSubsetNb
|
||||
};
|
||||
|
||||
@@ -151,9 +140,7 @@ public:
|
||||
{
|
||||
return myObjects[BVHSubset_3d].Contains (theObject)
|
||||
|| myObjects[BVHSubset_3dPersistent].Contains (theObject)
|
||||
|| myObjects[BVHSubset_2dPersistent].Contains (theObject)
|
||||
|| myObjects[BVHSubset_ortho3dPersistent].Contains (theObject)
|
||||
|| myObjects[BVHSubset_ortho2dPersistent].Contains (theObject);
|
||||
|| myObjects[BVHSubset_2dPersistent].Contains (theObject);
|
||||
}
|
||||
|
||||
//! Returns true if the object set does not contain any selectable objects.
|
||||
@@ -161,9 +148,7 @@ public:
|
||||
{
|
||||
return myObjects[BVHSubset_3d].IsEmpty()
|
||||
&& myObjects[BVHSubset_3dPersistent].IsEmpty()
|
||||
&& myObjects[BVHSubset_2dPersistent].IsEmpty()
|
||||
&& myObjects[BVHSubset_ortho3dPersistent].IsEmpty()
|
||||
&& myObjects[BVHSubset_ortho2dPersistent].IsEmpty();
|
||||
&& myObjects[BVHSubset_2dPersistent].IsEmpty();
|
||||
}
|
||||
|
||||
//! Returns true if the specified object subset is empty.
|
||||
@@ -207,18 +192,10 @@ private:
|
||||
}
|
||||
return SelectMgr_SelectableObjectSet::BVHSubset_3d;
|
||||
}
|
||||
else if ((theObject->TransformPersistence()->Mode() & Graphic3d_TMF_2d) != 0)
|
||||
else if (theObject->TransformPersistence()->Mode() == Graphic3d_TMF_2d)
|
||||
{
|
||||
if (theObject->TransformPersistence()->IsOrthoPers())
|
||||
{
|
||||
return SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent;
|
||||
}
|
||||
return SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent;
|
||||
}
|
||||
else if (theObject->TransformPersistence()->IsOrthoPers())
|
||||
{
|
||||
return SelectMgr_SelectableObjectSet::BVHSubset_ortho3dPersistent;
|
||||
}
|
||||
else
|
||||
{
|
||||
return SelectMgr_SelectableObjectSet::BVHSubset_3dPersistent;
|
||||
|
@@ -67,28 +67,6 @@ SelectMgr_SelectingVolumeManager SelectMgr_SelectingVolumeManager::ScaleAndTrans
|
||||
return aMgr;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : CopyWithBuilder
|
||||
// purpose : Returns a copy of the selecting volume manager and its active frustum re-constructed using the passed builder.
|
||||
// Builder is an argument that represents corresponding settings for re-constructing transformed
|
||||
// frustum from scratch.
|
||||
//=======================================================================
|
||||
SelectMgr_SelectingVolumeManager SelectMgr_SelectingVolumeManager::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const
|
||||
{
|
||||
SelectMgr_SelectingVolumeManager aMgr;
|
||||
aMgr.myToAllowOverlap = myToAllowOverlap;
|
||||
aMgr.myViewClipPlanes = myViewClipPlanes;
|
||||
aMgr.myObjectClipPlanes = myObjectClipPlanes;
|
||||
aMgr.myViewClipRange = myViewClipRange;
|
||||
if (!myActiveSelectingVolume.IsNull())
|
||||
{
|
||||
aMgr.myActiveSelectingVolume = myActiveSelectingVolume->CopyWithBuilder (theBuilder);
|
||||
aMgr.BuildSelectingVolume();
|
||||
}
|
||||
|
||||
return aMgr;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : GetActiveSelectionType
|
||||
// purpose :
|
||||
|
@@ -81,11 +81,6 @@ public:
|
||||
const gp_GTrsf& theTrsf,
|
||||
const Handle(SelectMgr_FrustumBuilder)& theBuilder) const;
|
||||
|
||||
//! Returns a copy of the selecting volume manager and its active frustum re-constructed using the passed builder.
|
||||
//! Builder is an argument that represents corresponding settings for re-constructing transformed
|
||||
//! frustum from scratch.
|
||||
Standard_EXPORT virtual SelectMgr_SelectingVolumeManager CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const;
|
||||
|
||||
public:
|
||||
|
||||
//! Returns current camera definition.
|
||||
|
@@ -28,7 +28,7 @@ IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_SensitiveEntitySet, BVH_PrimitiveSet3d)
|
||||
SelectMgr_SensitiveEntitySet::SelectMgr_SensitiveEntitySet (const Handle(Select3D_BVHBuilder3d)& theBuilder)
|
||||
: BVH_PrimitiveSet3d (theBuilder)
|
||||
{
|
||||
myNbEntityWithPersistence = 0;
|
||||
//
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -42,6 +42,7 @@ void SelectMgr_SensitiveEntitySet::Append (const Handle(SelectMgr_SensitiveEntit
|
||||
theEntity->ResetSelectionActiveStatus();
|
||||
return;
|
||||
}
|
||||
|
||||
const Standard_Integer anExtent = mySensitives.Extent();
|
||||
if (mySensitives.Add (theEntity) > anExtent)
|
||||
{
|
||||
@@ -49,7 +50,7 @@ void SelectMgr_SensitiveEntitySet::Append (const Handle(SelectMgr_SensitiveEntit
|
||||
}
|
||||
if (!theEntity->BaseSensitive()->TransformPersistence().IsNull())
|
||||
{
|
||||
++myNbEntityWithPersistence;
|
||||
myHasEntityWithPersistence = Standard_True;
|
||||
}
|
||||
MarkDirty();
|
||||
}
|
||||
@@ -77,7 +78,7 @@ void SelectMgr_SensitiveEntitySet::Append (const Handle(SelectMgr_Selection)& th
|
||||
}
|
||||
if (!aSensEnt->BaseSensitive()->TransformPersistence().IsNull())
|
||||
{
|
||||
++myNbEntityWithPersistence;
|
||||
myHasEntityWithPersistence = Standard_True;
|
||||
}
|
||||
}
|
||||
MarkDirty();
|
||||
@@ -92,8 +93,7 @@ void SelectMgr_SensitiveEntitySet::Remove (const Handle(SelectMgr_Selection)& th
|
||||
{
|
||||
for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSelection->Entities()); aSelEntIter.More(); aSelEntIter.Next())
|
||||
{
|
||||
const Handle(SelectMgr_SensitiveEntity)& aSensEnt = aSelEntIter.Value();
|
||||
const Standard_Integer anEntIdx = mySensitives.FindIndex (aSensEnt);
|
||||
const Standard_Integer anEntIdx = mySensitives.FindIndex (aSelEntIter.Value());
|
||||
if (anEntIdx == 0)
|
||||
{
|
||||
continue;
|
||||
@@ -103,13 +103,9 @@ void SelectMgr_SensitiveEntitySet::Remove (const Handle(SelectMgr_Selection)& th
|
||||
{
|
||||
Swap (anEntIdx - 1, mySensitives.Size() - 1);
|
||||
}
|
||||
if (!aSensEnt->BaseSensitive()->TransformPersistence().IsNull())
|
||||
{
|
||||
--myNbEntityWithPersistence;
|
||||
}
|
||||
|
||||
mySensitives.RemoveLast();
|
||||
removeOwner (aSensEnt->BaseSensitive()->OwnerId());
|
||||
removeOwner (aSelEntIter.Value()->BaseSensitive()->OwnerId());
|
||||
}
|
||||
|
||||
MarkDirty();
|
||||
|
@@ -77,7 +77,7 @@ public:
|
||||
const SelectMgr_MapOfOwners& Owners() const { return myOwnersMap; }
|
||||
|
||||
//! Returns map of entities.
|
||||
Standard_Boolean HasEntityWithPersistence() const { return myNbEntityWithPersistence > 0; }
|
||||
Standard_Boolean HasEntityWithPersistence() const { return myHasEntityWithPersistence; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -89,9 +89,9 @@ protected:
|
||||
|
||||
private:
|
||||
|
||||
SelectMgr_IndexedMapOfHSensitive mySensitives; //!< Map of entities and its corresponding index in BVH
|
||||
SelectMgr_MapOfOwners myOwnersMap; //!< Map of entity owners and its corresponding number of sensitives
|
||||
Standard_Integer myNbEntityWithPersistence; //!< number of sensitive entities that have own transform persistence
|
||||
SelectMgr_IndexedMapOfHSensitive mySensitives; //!< Map of entities and its corresponding index in BVH
|
||||
SelectMgr_MapOfOwners myOwnersMap; //!< Map of entity owners and its corresponding number of sensitives
|
||||
Standard_Boolean myHasEntityWithPersistence; //!< flag if some of sensitive entity has own transform persistence
|
||||
};
|
||||
|
||||
#endif // _SelectMgr_SensitiveEntitySet_HeaderFile
|
||||
|
@@ -189,20 +189,6 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustum::ScaleAndTransform
|
||||
return aRes;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : CopyWithBuilder
|
||||
// purpose : Returns a copy of the frustum using the given frustum builder configuration.
|
||||
// Returned frustum should be re-constructed before being used.
|
||||
//=======================================================================
|
||||
Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustum::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const
|
||||
{
|
||||
Handle(SelectMgr_TriangularFrustum) aRes = new SelectMgr_TriangularFrustum();
|
||||
aRes->mySelTriangle = mySelTriangle;
|
||||
aRes->SetBuilder (theBuilder);
|
||||
|
||||
return aRes;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : OverlapsBox
|
||||
// purpose : SAT intersection test between defined volume and
|
||||
|
@@ -55,13 +55,6 @@ public:
|
||||
const gp_GTrsf& theTrsf,
|
||||
const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a copy of the frustum using the given frustum builder configuration.
|
||||
//! Returned frustum should be re-constructed before being used.
|
||||
//! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch;
|
||||
//! should NOT be NULL.
|
||||
//! @return a copy of the frustum with the input builder assigned
|
||||
Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
|
||||
|
||||
public: //! @name SAT Tests for different objects
|
||||
|
||||
//! SAT intersection test between defined volume and given axis-aligned box
|
||||
|
@@ -186,32 +186,6 @@ Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustumSet::ScaleAndTransf
|
||||
return aRes;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function : CopyWithBuilder
|
||||
// purpose : Returns a copy of the frustum using the given frustum builder configuration.
|
||||
// Returned frustum should be re-constructed before being used.
|
||||
//=======================================================================
|
||||
Handle(SelectMgr_BaseIntersector) SelectMgr_TriangularFrustumSet::CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const
|
||||
{
|
||||
Standard_ASSERT_RAISE (mySelectionType == SelectMgr_SelectionType_Polyline,
|
||||
"Error! SelectMgr_TriangularFrustumSet::CopyWithBuilder() should be called after selection frustum initialization");
|
||||
|
||||
Standard_ASSERT_RAISE (!theBuilder.IsNull(),
|
||||
"Error! SelectMgr_TriangularFrustumSet::CopyWithBuilder() should be called with valid builder");
|
||||
|
||||
Handle(SelectMgr_TriangularFrustumSet) aRes = new SelectMgr_TriangularFrustumSet();
|
||||
aRes->SetCamera (myCamera);
|
||||
for (SelectMgr_TriangFrustums::Iterator anIter (myFrustums); anIter.More(); anIter.Next())
|
||||
{
|
||||
aRes->myFrustums.Append (Handle(SelectMgr_TriangularFrustum)::DownCast (anIter.Value()->CopyWithBuilder (theBuilder)));
|
||||
}
|
||||
aRes->mySelectionType = mySelectionType;
|
||||
aRes->mySelPolyline = mySelPolyline;
|
||||
aRes->myToAllowOverlap = myToAllowOverlap;
|
||||
aRes->SetBuilder (theBuilder);
|
||||
return aRes;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : OverlapsBox
|
||||
// purpose :
|
||||
|
@@ -62,13 +62,6 @@ public:
|
||||
const gp_GTrsf& theTrsf,
|
||||
const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns a copy of the frustum using the given frustum builder configuration.
|
||||
//! Returned frustum should be re-constructed before being used.
|
||||
//! @param theBuilder [in] argument that represents corresponding settings for re-constructing transformed frustum from scratch;
|
||||
//! should NOT be NULL.
|
||||
//! @return a copy of the frustum with the input builder assigned
|
||||
Standard_EXPORT virtual Handle(SelectMgr_BaseIntersector) CopyWithBuilder (const Handle(SelectMgr_FrustumBuilder)& theBuilder) const Standard_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean OverlapsBox (const SelectMgr_Vec3& theMinPnt,
|
||||
|
@@ -138,12 +138,12 @@ void SelectMgr_ViewerSelector::updatePoint3d (SelectMgr_SortCriterion& theCriter
|
||||
case SelectMgr_TypeOfDepthTolerance_UniformPixels:
|
||||
case SelectMgr_TypeOfDepthTolerance_SensitivityFactor:
|
||||
{
|
||||
if (theMgr.Camera().IsNull())
|
||||
if (mySelectingVolumeMgr.Camera().IsNull())
|
||||
{
|
||||
// fallback for an arbitrary projection matrix
|
||||
theCriterion.Tolerance = aSensFactor / 33.0;
|
||||
}
|
||||
else if (theMgr.Camera()->IsOrthographic())
|
||||
else if (mySelectingVolumeMgr.Camera()->IsOrthographic())
|
||||
{
|
||||
theCriterion.Tolerance = myCameraScale * aSensFactor;
|
||||
}
|
||||
@@ -634,9 +634,6 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie
|
||||
|
||||
Graphic3d_Vec2i aWinSize;
|
||||
mySelectingVolumeMgr.WindowSize (aWinSize.x(), aWinSize.y());
|
||||
const double aPixelSize = aWinSize.x() > 0 && aWinSize.y() > 0
|
||||
? Max (1.0 / aWinSize.x(), 1.0 / aWinSize.y())
|
||||
: 1.0;
|
||||
|
||||
const Handle(Graphic3d_Camera)& aCamera = mySelectingVolumeMgr.Camera();
|
||||
Graphic3d_Mat4d aProjectionMat, aWorldViewMat;
|
||||
@@ -649,6 +646,11 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie
|
||||
|
||||
myCameraEye = aCamera->Eye().XYZ();
|
||||
myCameraDir = aCamera->Direction().XYZ();
|
||||
myCameraScale = aCamera->IsOrthographic()
|
||||
? aCamera->Scale()
|
||||
: 2.0 * Tan (aCamera->FOVy() * M_PI / 360.0);
|
||||
const double aPixelSize = Max (1.0 / aWinSize.x(), 1.0 / aWinSize.y());
|
||||
myCameraScale *= aPixelSize;
|
||||
}
|
||||
mySelectableObjects.UpdateBVH (aCamera, aWinSize);
|
||||
|
||||
@@ -670,8 +672,7 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie
|
||||
// for 2D space selection transform selecting volumes to perform overlap testing
|
||||
// directly in camera's eye space omitting the camera position, which is not
|
||||
// needed there at all
|
||||
if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent
|
||||
|| aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent)
|
||||
if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_2dPersistent)
|
||||
{
|
||||
gp_GTrsf aTFrustum;
|
||||
aTFrustum.SetValue (1, 1, aWorldViewMat.GetValue (0, 0));
|
||||
@@ -687,46 +688,22 @@ void SelectMgr_ViewerSelector::TraverseSensitives (const Standard_Integer theVie
|
||||
aWorldViewMat.GetValue (1, 3),
|
||||
aWorldViewMat.GetValue (2, 3)));
|
||||
|
||||
// define corresponding frustum builder parameters for 2d persistence.
|
||||
// define corresponding frustum builder parameters
|
||||
Handle(SelectMgr_FrustumBuilder) aBuilder = new SelectMgr_FrustumBuilder();
|
||||
Handle(Graphic3d_Camera) aNewCamera = new Graphic3d_Camera();
|
||||
aNewCamera->CopyMappingData (aCamera);
|
||||
aNewCamera->SetIdentityOrientation();
|
||||
if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho2dPersistent)
|
||||
{
|
||||
aNewCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
|
||||
}
|
||||
aWorldViewMat = aNewCamera->OrientationMatrix(); // should be identity matrix
|
||||
aProjectionMat = aNewCamera->ProjectionMatrix(); // should be the same to aProjectionMat
|
||||
aBuilder->SetCamera (aNewCamera);
|
||||
aBuilder->SetWindowSize (aWinSize.x(), aWinSize.y());
|
||||
aMgr = mySelectingVolumeMgr.ScaleAndTransform (1, aTFrustum, aBuilder);
|
||||
}
|
||||
else if (aBVHSubset == SelectMgr_SelectableObjectSet::BVHSubset_ortho3dPersistent)
|
||||
{
|
||||
// define corresponding frustum builder parameters for 3d orthographic persistence.
|
||||
Handle(SelectMgr_FrustumBuilder) aBuilder = new SelectMgr_FrustumBuilder();
|
||||
Handle(Graphic3d_Camera) aNewCamera = new Graphic3d_Camera (*aCamera);
|
||||
aNewCamera->SetProjectionType (Graphic3d_Camera::Projection_Orthographic);
|
||||
aWorldViewMat = aNewCamera->OrientationMatrix(); // should be the same to aWorldViewMat
|
||||
aProjectionMat = aNewCamera->ProjectionMatrix(); // should be orthographic projection
|
||||
aBuilder->SetCamera (aNewCamera);
|
||||
aBuilder->SetWindowSize (aWinSize.x(), aWinSize.y());
|
||||
aMgr = mySelectingVolumeMgr.CopyWithBuilder (aBuilder);
|
||||
}
|
||||
else
|
||||
{
|
||||
aMgr = mySelectingVolumeMgr;
|
||||
}
|
||||
|
||||
if (!aMgr.Camera().IsNull())
|
||||
{
|
||||
myCameraScale = aMgr.Camera()->IsOrthographic()
|
||||
? aMgr.Camera()->Scale()
|
||||
: 2.0 * Tan (aMgr.Camera()->FOVy() * M_PI / 360.0);
|
||||
myCameraScale *= aPixelSize;
|
||||
}
|
||||
|
||||
const opencascade::handle<BVH_Tree<Standard_Real, 3> >& aBVHTree = mySelectableObjects.BVH (aBVHSubset);
|
||||
|
||||
Standard_Integer aNode = 0;
|
||||
|
@@ -328,7 +328,7 @@ protected:
|
||||
//! @param theObject [in] the selectable object for traversal.
|
||||
//! @param theMgr [in] the (un)transformed copy of the selecting volume manager representing active selection frustum.
|
||||
//! @param theCamera, theProjectionMat, theWorldViewMat [in] the source camera and matrices for theMgr given.
|
||||
//! @param theWinSize [in] viewport (window) dimensions for evaluating
|
||||
//! @param theViewportWidth, theViewportHeight [in] viewport (window) dimensions for evaluating
|
||||
//! object's transformation persistence.
|
||||
Standard_EXPORT void traverseObject (const Handle(SelectMgr_SelectableObject)& theObject,
|
||||
const SelectMgr_SelectingVolumeManager& theMgr,
|
||||
|
@@ -14,8 +14,10 @@
|
||||
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_Mutex.hxx>
|
||||
|
||||
#include <Standard_Assert.hxx>
|
||||
#include <Standard_CStringHasher.hxx>
|
||||
#include <Standard_Mutex.hxx>
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
@@ -23,12 +25,23 @@ IMPLEMENT_STANDARD_RTTIEXT(Standard_Type,Standard_Transient)
|
||||
|
||||
//============================================================================
|
||||
|
||||
namespace
|
||||
{
|
||||
static Standard_CString copy_string (const char* theString)
|
||||
{
|
||||
size_t aLength = strlen (theString);
|
||||
char* aResult = static_cast<char*> (Standard::Allocate (aLength + 1));
|
||||
strncpy (aResult, theString, aLength + 1); //including null-character
|
||||
return aResult;
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Type::Standard_Type (const std::type_info& theInfo,
|
||||
const char* theName,
|
||||
Standard_Size theSize,
|
||||
const Handle(Standard_Type)& theParent) :
|
||||
myInfo(theInfo),
|
||||
myName(theName),
|
||||
myName(copy_string (theName)),
|
||||
mySize(theSize),
|
||||
myParent(theParent)
|
||||
{
|
||||
@@ -62,7 +75,7 @@ void Standard_Type::Print (Standard_OStream& AStream) const
|
||||
|
||||
namespace {
|
||||
// Map of string to type
|
||||
typedef std::unordered_map<std::type_index, Standard_Type*> registry_type;
|
||||
typedef std::unordered_map<Standard_CString, Standard_Type*, Standard_CStringHasher, Standard_CStringHasher> registry_type;
|
||||
|
||||
// Registry is made static in the function to ensure that it gets
|
||||
// initialized by the time of first access
|
||||
@@ -87,7 +100,7 @@ Standard_Type* Standard_Type::Register (const std::type_info& theInfo, const cha
|
||||
// return existing descriptor if already in the registry
|
||||
registry_type& aRegistry = GetRegistry();
|
||||
Standard_Type* aType = 0;
|
||||
auto anIter = aRegistry.find(theInfo);
|
||||
auto anIter = aRegistry.find(theName);
|
||||
if (anIter != aRegistry.end())
|
||||
return anIter->second;
|
||||
|
||||
@@ -95,7 +108,7 @@ Standard_Type* Standard_Type::Register (const std::type_info& theInfo, const cha
|
||||
aType = new Standard_Type (theInfo, theName, theSize, theParent);
|
||||
|
||||
// then add it to registry and return (the reference to the handle stored in the registry)
|
||||
aRegistry.emplace(theInfo, aType);
|
||||
aRegistry.emplace(theName, aType);
|
||||
return aType;
|
||||
}
|
||||
|
||||
@@ -103,5 +116,6 @@ Standard_Type::~Standard_Type ()
|
||||
{
|
||||
// remove descriptor from the registry
|
||||
registry_type& aRegistry = GetRegistry();
|
||||
Standard_ASSERT(aRegistry.erase(myInfo) > 0, "Standard_Type::~Standard_Type() cannot find itself in registry",);
|
||||
Standard_ASSERT(aRegistry.erase(myName) > 0, "Standard_Type::~Standard_Type() cannot find itself in registry",);
|
||||
Standard::Free (myName);
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@
|
||||
//! - "dev" for development version between releases
|
||||
//! - "beta..." or "rc..." for beta releases or release candidates
|
||||
//! - "project..." for version containing project-specific fixes
|
||||
#define OCC_VERSION_DEVELOPMENT "dev"
|
||||
//#define OCC_VERSION_DEVELOPMENT "dev"
|
||||
|
||||
// Derived (manually): version as real and string (major.minor)
|
||||
#define OCC_VERSION 7.8
|
||||
|
@@ -299,7 +299,7 @@ void StepData_StepReaderData::cleanText(const Handle(TCollection_HAsciiString)&
|
||||
}
|
||||
}
|
||||
}
|
||||
if (aChar == '\n')
|
||||
if (aChar == '\n' || aChar == '\r')
|
||||
{
|
||||
aResString.SetValue(aSetCharInd, aResString.ToExtString() + aStringInd);
|
||||
aResStringSize--;
|
||||
|
@@ -1008,7 +1008,7 @@ Handle(Geom_BSplineSurface) StepToGeom::MakeBSplineSurface (const Handle(StepGeo
|
||||
Handle(Geom_CartesianPoint) StepToGeom::MakeCartesianPoint (const Handle(StepGeom_CartesianPoint)& SP,
|
||||
const StepData_Factors& theLocalFactors)
|
||||
{
|
||||
if (SP->NbCoordinates() == 3)
|
||||
if (!SP.IsNull() && SP->NbCoordinates() == 3)
|
||||
{
|
||||
const Standard_Real LF = theLocalFactors.LengthFactor();
|
||||
const Standard_Real X = SP->CoordinatesValue(1) * LF;
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
#include <StepData_Factors.hxx>
|
||||
|
||||
class Geom_Axis1Placement;
|
||||
class Geom_Axis2Placement;
|
||||
@@ -68,6 +67,7 @@ class Geom2d_VectorWithMagnitude;
|
||||
class gp_Trsf;
|
||||
class gp_Trsf2d;
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_Axis1Placement;
|
||||
class StepGeom_Axis2Placement2d;
|
||||
class StepGeom_Axis2Placement3d;
|
||||
@@ -115,94 +115,94 @@ class StepToGeom
|
||||
public:
|
||||
|
||||
Standard_EXPORT static Handle(Geom_Axis1Placement) MakeAxis1Placement (const Handle(StepGeom_Axis1Placement)& SA,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_Axis2Placement) MakeAxis2Placement (const Handle(StepGeom_Axis2Placement3d)& SA,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_Axis2Placement) MakeAxis2Placement (const Handle(StepGeom_SuParameters)& SP);
|
||||
Standard_EXPORT static Handle(Geom2d_AxisPlacement) MakeAxisPlacement (const Handle(StepGeom_Axis2Placement2d)& SA,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_BoundedCurve) MakeBoundedCurve (const Handle(StepGeom_BoundedCurve)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom2d_BoundedCurve) MakeBoundedCurve2d (const Handle(StepGeom_BoundedCurve)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_BoundedSurface) MakeBoundedSurface (const Handle(StepGeom_BoundedSurface)& SS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_BSplineCurve) MakeBSplineCurve (const Handle(StepGeom_BSplineCurve)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakeBSplineCurve2d (const Handle(StepGeom_BSplineCurve)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_BSplineSurface) MakeBSplineSurface (const Handle(StepGeom_BSplineSurface)& SS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_CartesianPoint) MakeCartesianPoint (const Handle(StepGeom_CartesianPoint)& SP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom2d_CartesianPoint) MakeCartesianPoint2d (const Handle(StepGeom_CartesianPoint)& SP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_Circle) MakeCircle (const Handle(StepGeom_Circle)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom2d_Circle) MakeCircle2d (const Handle(StepGeom_Circle)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_Conic) MakeConic (const Handle(StepGeom_Conic)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom2d_Conic) MakeConic2d (const Handle(StepGeom_Conic)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_ConicalSurface) MakeConicalSurface (const Handle(StepGeom_ConicalSurface)& SS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_Curve) MakeCurve (const Handle(StepGeom_Curve)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom2d_Curve) MakeCurve2d (const Handle(StepGeom_Curve)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_CylindricalSurface) MakeCylindricalSurface (const Handle(StepGeom_CylindricalSurface)& SS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_Direction) MakeDirection (const Handle(StepGeom_Direction)& SD);
|
||||
Standard_EXPORT static Handle(Geom2d_Direction) MakeDirection2d (const Handle(StepGeom_Direction)& SD);
|
||||
Standard_EXPORT static Handle(Geom_ElementarySurface) MakeElementarySurface (const Handle(StepGeom_ElementarySurface)& SS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_Ellipse) MakeEllipse (const Handle(StepGeom_Ellipse)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom2d_Ellipse) MakeEllipse2d (const Handle(StepGeom_Ellipse)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_Hyperbola) MakeHyperbola (const Handle(StepGeom_Hyperbola)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom2d_Hyperbola) MakeHyperbola2d (const Handle(StepGeom_Hyperbola)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_Line) MakeLine (const Handle(StepGeom_Line)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom2d_Line) MakeLine2d (const Handle(StepGeom_Line)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_Parabola) MakeParabola (const Handle(StepGeom_Parabola)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom2d_Parabola) MakeParabola2d (const Handle(StepGeom_Parabola)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_Plane) MakePlane (const Handle(StepGeom_Plane)& SP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_BSplineCurve) MakePolyline (const Handle(StepGeom_Polyline)& SPL,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakePolyline2d (const Handle(StepGeom_Polyline)& SPL,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_RectangularTrimmedSurface) MakeRectangularTrimmedSurface (const Handle(StepGeom_RectangularTrimmedSurface)& SS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_SphericalSurface) MakeSphericalSurface (const Handle(StepGeom_SphericalSurface)& SS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_Surface) MakeSurface (const Handle(StepGeom_Surface)& SS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_SurfaceOfLinearExtrusion) MakeSurfaceOfLinearExtrusion (const Handle(StepGeom_SurfaceOfLinearExtrusion)& SS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_SurfaceOfRevolution) MakeSurfaceOfRevolution (const Handle(StepGeom_SurfaceOfRevolution)& SS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_SweptSurface) MakeSweptSurface (const Handle(StepGeom_SweptSurface)& SS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_ToroidalSurface) MakeToroidalSurface (const Handle(StepGeom_ToroidalSurface)& SS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Standard_Boolean MakeTransformation2d (const Handle(StepGeom_CartesianTransformationOperator2d)& SCTO, gp_Trsf2d& CT,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Standard_Boolean MakeTransformation3d (const Handle(StepGeom_CartesianTransformationOperator3d)& SCTO, gp_Trsf& CT,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_TrimmedCurve) MakeTrimmedCurve (const Handle(StepGeom_TrimmedCurve)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom2d_BSplineCurve) MakeTrimmedCurve2d (const Handle(StepGeom_TrimmedCurve)& SC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom_VectorWithMagnitude) MakeVectorWithMagnitude (const Handle(StepGeom_Vector)& SV,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
Standard_EXPORT static Handle(Geom2d_VectorWithMagnitude) MakeVectorWithMagnitude2d (const Handle(StepGeom_Vector)& SV);
|
||||
Standard_EXPORT static Handle(TColStd_HArray1OfReal) MakeYprRotation(const StepKinematics_SpatialRotation& SR, const Handle(StepRepr_GlobalUnitAssignedContext)& theCntxt);
|
||||
};
|
||||
|
@@ -897,8 +897,8 @@ void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedFace)& theTF,
|
||||
// ============================================================================
|
||||
void StepToTopoDS_Builder::Init(const Handle(StepVisual_TessellatedSurfaceSet)& theTSS,
|
||||
const Handle(Transfer_TransientProcess)& theTP,
|
||||
Standard_Boolean& theHasGeom,
|
||||
const StepData_Factors& theLocalFactors)
|
||||
const StepData_Factors& theLocalFactors,
|
||||
Standard_Boolean& theHasGeom)
|
||||
{
|
||||
StepToTopoDS_TranslateFace aTranFace;
|
||||
aTranFace.SetPrecision(Precision());
|
||||
|
@@ -55,41 +55,41 @@ public:
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_ManifoldSolidBrep)& theManifoldSolid,
|
||||
const Handle(Transfer_TransientProcess)& theTP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_BrepWithVoids)& theBRepWithVoids,
|
||||
const Handle(Transfer_TransientProcess)& theTP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_FacetedBrep)& theFB,
|
||||
const Handle(Transfer_TransientProcess)& theTP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_FacetedBrepAndBrepWithVoids)& theFBABWV,
|
||||
const Handle(Transfer_TransientProcess)& theTP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_ShellBasedSurfaceModel)& S,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
StepToTopoDS_NMTool& NMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_EdgeBasedWireframeModel)& S,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_FaceBasedSurfaceModel)& S,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_GeometricSet)& S,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Handle(Transfer_ActorOfTransientProcess)& RA = NULL,
|
||||
const Standard_Boolean isManifold = Standard_False,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
@@ -98,26 +98,26 @@ public:
|
||||
const Handle(Transfer_TransientProcess)& theTP,
|
||||
const Standard_Boolean theReadTessellatedWhenNoBRepOnly,
|
||||
Standard_Boolean& theHasGeom,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepVisual_TessellatedShell)& theTSh,
|
||||
const Handle(Transfer_TransientProcess)& theTP,
|
||||
const Standard_Boolean theReadTessellatedWhenNoBRepOnly,
|
||||
Standard_Boolean& theHasGeom,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepVisual_TessellatedFace)& theTF,
|
||||
const Handle(Transfer_TransientProcess)& theTP,
|
||||
const Standard_Boolean theReadTessellatedWhenNoBRepOnly,
|
||||
Standard_Boolean& theHasGeom,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepVisual_TessellatedSurfaceSet)& theTSS,
|
||||
const Handle(Transfer_TransientProcess)& theTP,
|
||||
Standard_Boolean& theHasGeom,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors,
|
||||
Standard_Boolean& theHasGeom);
|
||||
|
||||
Standard_EXPORT const TopoDS_Shape& Value() const;
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include <StepToTopoDS_Root.hxx>
|
||||
#include <Message_ProgressRange.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepGeom_Axis2Placement3d;
|
||||
class StepGeom_CartesianTransformationOperator3d;
|
||||
class TopoDS_Shape;
|
||||
@@ -46,11 +47,11 @@ public:
|
||||
//! If not done, the transformation will by Identity
|
||||
Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_Axis2Placement3d)& Origin,
|
||||
const Handle(StepGeom_Axis2Placement3d)& Target,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Computes a transformation defined by an operator 3D
|
||||
Standard_EXPORT Standard_Boolean Compute (const Handle(StepGeom_CartesianTransformationOperator3d)& Operator,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Returns the computed transformation (Identity if not yet or
|
||||
//! if failed)
|
||||
@@ -72,7 +73,7 @@ public:
|
||||
//! transformed as an instance of this Shape
|
||||
Standard_EXPORT TopoDS_Shape TranslateMappedItem (const Handle(StepRepr_MappedItem)& mapit,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
|
||||
|
@@ -49,26 +49,26 @@ public:
|
||||
//! Translates standalone composite_curve
|
||||
Standard_EXPORT StepToTopoDS_TranslateCompositeCurve(const Handle(StepGeom_CompositeCurve)& CC,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Translates composite_curve lying on surface
|
||||
Standard_EXPORT StepToTopoDS_TranslateCompositeCurve(const Handle(StepGeom_CompositeCurve)& CC,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const Handle(StepGeom_Surface)& S,
|
||||
const Handle(Geom_Surface)& Surf,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Translates standalone composite_curve
|
||||
Standard_EXPORT Standard_Boolean Init (const Handle(StepGeom_CompositeCurve)& CC,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Translates composite_curve lying on surface
|
||||
Standard_EXPORT Standard_Boolean Init (const Handle(StepGeom_CompositeCurve)& CC,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const Handle(StepGeom_Surface)& S,
|
||||
const Handle(Geom_Surface)& Surf,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Returns result of last translation or null wire if failed.
|
||||
Standard_EXPORT const TopoDS_Wire& Value() const;
|
||||
|
@@ -41,12 +41,12 @@ public:
|
||||
//! Translate surface
|
||||
Standard_EXPORT StepToTopoDS_TranslateCurveBoundedSurface(const Handle(StepGeom_CurveBoundedSurface)& CBS,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Translate surface
|
||||
Standard_EXPORT Standard_Boolean Init (const Handle(StepGeom_CurveBoundedSurface)& CBS,
|
||||
const Handle(Transfer_TransientProcess)& TP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Returns result of last translation or null wire if failed.
|
||||
Standard_EXPORT const TopoDS_Face& Value() const;
|
||||
|
@@ -408,7 +408,24 @@ void StepToTopoDS_TranslateEdge::MakeFromCurve3D
|
||||
temp1 = pU1.Distance ( pv1 );
|
||||
temp2 = pU2.Distance ( pv2 );
|
||||
if ( temp1 > preci || temp2 > preci ) {
|
||||
TP->AddWarning (C3D,"Poor result from projection vertex / curve 3d");
|
||||
// #25415: handling of special case found on some STEP files produced by FPX Expert 2013 (PCB design system):
|
||||
// edge curve is line displaced from its true position but with correct direction;
|
||||
// we can shift the line in this case so that it passes through vertices correcty
|
||||
if (Abs (temp1 - temp2) < preci && Abs (U2 - U1 - pnt1.Distance(pnt2)) < Precision::Confusion() &&
|
||||
C1->IsKind(STANDARD_TYPE(Geom_Line)))
|
||||
{
|
||||
Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast (C1);
|
||||
gp_Lin aLin = aLine->Lin();
|
||||
gp_Pnt anOrigin = pnt1.XYZ() - aLin.Position().Direction().XYZ() * U1;
|
||||
aLin.SetLocation (anOrigin);
|
||||
C1 = new Geom_Line (aLin);
|
||||
|
||||
TP->AddWarning (C3D,"Poor result from projection vertex / line 3d, line shifted");
|
||||
}
|
||||
else
|
||||
{
|
||||
TP->AddWarning (C3D,"Poor result from projection vertex / curve 3d");
|
||||
}
|
||||
}
|
||||
B.UpdateVertex ( V1, 1.000001*temp1 ); //:h6 abv 14 Jul 98: PRO8845 #2746: *=1.0001
|
||||
B.UpdateVertex ( V2, 1.000001*temp2 ); //:h6
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <StepToTopoDS_TranslateEdgeError.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <StepToTopoDS_Root.hxx>
|
||||
class StepData_Factors;
|
||||
class StepShape_Edge;
|
||||
class StepToTopoDS_Tool;
|
||||
class StepToTopoDS_NMTool;
|
||||
@@ -50,12 +51,12 @@ public:
|
||||
Standard_EXPORT StepToTopoDS_TranslateEdge(const Handle(StepShape_Edge)& E,
|
||||
StepToTopoDS_Tool& T,
|
||||
StepToTopoDS_NMTool& NMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_Edge)& E,
|
||||
StepToTopoDS_Tool& T,
|
||||
StepToTopoDS_NMTool& NMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
//! Warning! C3D is assumed to be a Curve 3D ...
|
||||
//! other cases to checked before calling this
|
||||
@@ -67,11 +68,11 @@ public:
|
||||
TopoDS_Vertex& V1,
|
||||
TopoDS_Vertex& V2,
|
||||
StepToTopoDS_Tool& T,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT Handle(Geom2d_Curve) MakePCurve (const Handle(StepGeom_Pcurve)& PCU,
|
||||
const Handle(Geom_Surface)& ConvSurf,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
const StepData_Factors& theLocalFactors) const;
|
||||
|
||||
Standard_EXPORT const TopoDS_Shape& Value() const;
|
||||
|
||||
|
@@ -49,7 +49,7 @@ public:
|
||||
const Standard_Boolean ss,
|
||||
StepToTopoDS_Tool& T,
|
||||
StepToTopoDS_NMTool& NMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_FaceBound)& FB,
|
||||
const TopoDS_Face& F,
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
const Standard_Boolean ss,
|
||||
StepToTopoDS_Tool& T,
|
||||
StepToTopoDS_NMTool& NMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const TopoDS_Shape& Value() const;
|
||||
|
||||
|
@@ -105,12 +105,13 @@ namespace {
|
||||
// ============================================================================
|
||||
static void SetNodes(const Handle(Poly_Triangulation)& theMesh,
|
||||
Handle(TColgp_HArray1OfXYZ)& theNodes,
|
||||
const Standard_Integer theNumPnindex,
|
||||
Handle(TColStd_HArray1OfInteger)& thePnindices,
|
||||
const Standard_Real theLengthFactor)
|
||||
{
|
||||
for (Standard_Integer aPnIndex = 1; aPnIndex <= theMesh->NbNodes(); ++aPnIndex)
|
||||
{
|
||||
const gp_XYZ& aPoint = theNodes->Value(thePnindices->Value(aPnIndex));
|
||||
const gp_XYZ& aPoint = theNodes->Value((theNumPnindex > 0) ? thePnindices->Value(aPnIndex) : aPnIndex);
|
||||
theMesh->SetNode(aPnIndex, theLengthFactor * aPoint);
|
||||
}
|
||||
}
|
||||
@@ -326,10 +327,11 @@ namespace {
|
||||
|
||||
const Standard_Boolean aHasUVNodes = Standard_False;
|
||||
const Standard_Boolean aHasNormals = (aNormNum > 0);
|
||||
const Standard_Integer aNbNodes = (aNumPnindex > 0) ? aNumPnindex : aNodes->Length();
|
||||
|
||||
if (aTrianStripsNum == 0 && aTrianFansNum == 0)
|
||||
{
|
||||
aMesh = new Poly_Triangulation(aNumPnindex, aTrianNum, aHasUVNodes, aHasNormals);
|
||||
aMesh = new Poly_Triangulation(aNbNodes, aTrianNum, aHasUVNodes, aHasNormals);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -359,14 +361,14 @@ namespace {
|
||||
aNbTriaFans += aTriangleFan->Length() - 2;
|
||||
}
|
||||
|
||||
aMesh = new Poly_Triangulation(aNumPnindex, aNbTriaStrips + aNbTriaFans, aHasUVNodes, aHasNormals);
|
||||
aMesh = new Poly_Triangulation(aNbNodes, aNbTriaStrips + aNbTriaFans, aHasUVNodes, aHasNormals);
|
||||
}
|
||||
|
||||
SetNodes(aMesh, aNodes, aPnindices, theLocalFactors.LengthFactor());
|
||||
SetNodes(aMesh, aNodes, aNumPnindex, aPnindices, theLocalFactors.LengthFactor());
|
||||
|
||||
if (aHasNormals)
|
||||
{
|
||||
SetNormals(aMesh, aNormals, aNormNum, aNumPnindex);
|
||||
SetNormals(aMesh, aNormals, aNormNum, aNbNodes);
|
||||
}
|
||||
|
||||
SetTriangles(aMesh, aTriangles, aTrianStripsNum, aTriaStrips, aTrianFansNum, aTriaFans);
|
||||
@@ -761,6 +763,8 @@ void StepToTopoDS_TranslateFace::Init(const Handle(StepVisual_TessellatedFace)&
|
||||
if (theNMTool.IsActive())
|
||||
theNMTool.Bind(theTF, aF);
|
||||
|
||||
aTP->Bind(theTF, new TransferBRep_ShapeBinder(aF));
|
||||
|
||||
myResult = aF;
|
||||
myError = StepToTopoDS_TranslateFaceDone;
|
||||
done = Standard_True;
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <StepToTopoDS_Root.hxx>
|
||||
class Poly_Triangulation;
|
||||
class StepData_Factors;
|
||||
class StepShape_FaceSurface;
|
||||
class StepToTopoDS_Tool;
|
||||
class StepToTopoDS_NMTool;
|
||||
@@ -46,36 +47,36 @@ public:
|
||||
Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepShape_FaceSurface)& FS,
|
||||
StepToTopoDS_Tool& T,
|
||||
StepToTopoDS_NMTool& NMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepVisual_TessellatedFace)& theTF,
|
||||
StepToTopoDS_Tool& theTool,
|
||||
StepToTopoDS_NMTool& theNMTool,
|
||||
const Standard_Boolean theReadTessellatedWhenNoBRepOnly,
|
||||
Standard_Boolean& theHasGeom,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT StepToTopoDS_TranslateFace(const Handle(StepVisual_TessellatedSurfaceSet)& theTSS,
|
||||
StepToTopoDS_Tool& theTool,
|
||||
StepToTopoDS_NMTool& theNMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_FaceSurface)& FS,
|
||||
StepToTopoDS_Tool& T,
|
||||
StepToTopoDS_NMTool& NMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepVisual_TessellatedFace)& theTF,
|
||||
StepToTopoDS_Tool& theTool,
|
||||
StepToTopoDS_NMTool& theNMTool,
|
||||
const Standard_Boolean theReadTessellatedWhenNoBRepOnly,
|
||||
Standard_Boolean& theHasGeom,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init(const Handle(StepVisual_TessellatedSurfaceSet)& theTSS,
|
||||
StepToTopoDS_Tool& theTool,
|
||||
StepToTopoDS_NMTool& theNMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const TopoDS_Shape& Value() const;
|
||||
|
||||
@@ -84,7 +85,7 @@ public:
|
||||
private:
|
||||
|
||||
Handle(Poly_Triangulation) createMesh(const Handle(StepVisual_TessellatedItem)& theTI,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
const StepData_Factors& theLocalFactors) const;
|
||||
|
||||
StepToTopoDS_TranslateFaceError myError;
|
||||
TopoDS_Shape myResult;
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <StepToTopoDS_TranslatePolyLoopError.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <StepToTopoDS_Root.hxx>
|
||||
class StepData_Factors;
|
||||
class StepShape_PolyLoop;
|
||||
class StepToTopoDS_Tool;
|
||||
class Geom_Surface;
|
||||
@@ -44,13 +45,13 @@ public:
|
||||
StepToTopoDS_Tool& T,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopoDS_Face& F,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_PolyLoop)& PL,
|
||||
StepToTopoDS_Tool& T,
|
||||
const Handle(Geom_Surface)& S,
|
||||
const TopoDS_Face& F,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const TopoDS_Shape& Value() const;
|
||||
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
Standard_EXPORT void Init (const Handle(StepShape_ConnectedFaceSet)& CFS,
|
||||
StepToTopoDS_Tool& T,
|
||||
StepToTopoDS_NMTool& NMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepVisual_TessellatedShell)& theTSh,
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
StepToTopoDS_NMTool& theNMTool,
|
||||
const Standard_Boolean theReadTessellatedWhenNoBRepOnly,
|
||||
Standard_Boolean& theHasGeom,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT const TopoDS_Shape& Value() const;
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
StepToTopoDS_NMTool& theNMTool,
|
||||
const Standard_Boolean theReadTessellatedWhenNoBRepOnly,
|
||||
Standard_Boolean& theHasGeom,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT const TopoDS_Shape& Value() const;
|
||||
|
@@ -96,6 +96,11 @@ void StepToTopoDS_TranslateVertex::Init(const Handle(StepShape_Vertex)& aVertex,
|
||||
//:S4136 Standard_Real preci = BRepAPI::Precision();
|
||||
const Handle(StepShape_VertexPoint) VP = Handle(StepShape_VertexPoint)::DownCast(aVertex);
|
||||
const Handle(StepGeom_Point) P = VP->VertexGeometry();
|
||||
if (P.IsNull()) {
|
||||
myError = StepToTopoDS_TranslateVertexOther;
|
||||
done = Standard_False;
|
||||
return;
|
||||
}
|
||||
const Handle(StepGeom_CartesianPoint) P1 = Handle(StepGeom_CartesianPoint)::DownCast(P);
|
||||
Handle(Geom_CartesianPoint) P2 = StepToGeom::MakeCartesianPoint (P1, theLocalFactors);
|
||||
BRep_Builder B;
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <StepToTopoDS_TranslateVertexError.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <StepToTopoDS_Root.hxx>
|
||||
class StepData_Factors;
|
||||
class StepShape_Vertex;
|
||||
class StepToTopoDS_Tool;
|
||||
class StepToTopoDS_NMTool;
|
||||
@@ -42,12 +43,12 @@ public:
|
||||
Standard_EXPORT StepToTopoDS_TranslateVertex(const Handle(StepShape_Vertex)& V,
|
||||
StepToTopoDS_Tool& T,
|
||||
StepToTopoDS_NMTool& NMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_Vertex)& V,
|
||||
StepToTopoDS_Tool& T,
|
||||
StepToTopoDS_NMTool& NMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const TopoDS_Shape& Value() const;
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <StepToTopoDS_TranslateVertexLoopError.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <StepToTopoDS_Root.hxx>
|
||||
class StepData_Factors;
|
||||
class StepShape_VertexLoop;
|
||||
class StepToTopoDS_Tool;
|
||||
class StepToTopoDS_NMTool;
|
||||
@@ -42,12 +43,12 @@ public:
|
||||
Standard_EXPORT StepToTopoDS_TranslateVertexLoop(const Handle(StepShape_VertexLoop)& VL,
|
||||
StepToTopoDS_Tool& T,
|
||||
StepToTopoDS_NMTool& NMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const Handle(StepShape_VertexLoop)& VL,
|
||||
StepToTopoDS_Tool& T,
|
||||
StepToTopoDS_NMTool& NMTool,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const TopoDS_Shape& Value() const;
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include <TopoDSToStep_Root.hxx>
|
||||
#include <Message_ProgressRange.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepShape_TopologicalRepresentationItem;
|
||||
class StepVisual_TessellatedItem;
|
||||
class TopoDS_Shape;
|
||||
@@ -47,14 +48,14 @@ public:
|
||||
TopoDSToStep_Tool& T,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const Standard_Integer theTessellatedGeomParam,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT void Init (const TopoDS_Shape& S,
|
||||
TopoDSToStep_Tool& T,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const Standard_Integer theTessellatedGeomParam,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT TopoDSToStep_BuilderError Error() const;
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
|
||||
Standard_EXPORT TopoDSToStep_MakeBrepWithVoids(const TopoDS_Solid& S,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT const Handle(StepShape_BrepWithVoids)& Value() const;
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <TopoDSToStep_Root.hxx>
|
||||
#include <Message_ProgressRange.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepShape_FacetedBrep;
|
||||
class StepVisual_TessellatedItem;
|
||||
class TopoDS_Shell;
|
||||
@@ -45,12 +46,12 @@ public:
|
||||
|
||||
Standard_EXPORT TopoDSToStep_MakeFacetedBrep(const TopoDS_Shell& S,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT TopoDSToStep_MakeFacetedBrep(const TopoDS_Solid& S,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT const Handle(StepShape_FacetedBrep)& Value() const;
|
||||
|
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
Standard_EXPORT TopoDSToStep_MakeFacetedBrepAndBrepWithVoids(const TopoDS_Solid& S,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT const Handle(StepShape_FacetedBrepAndBrepWithVoids)& Value() const;
|
||||
|
@@ -39,7 +39,7 @@ public:
|
||||
|
||||
Standard_EXPORT TopoDSToStep_MakeGeometricCurveSet(const TopoDS_Shape& SH,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepShape_GeometricCurveSet)& Value() const;
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include <TopoDSToStep_Root.hxx>
|
||||
#include <Message_ProgressRange.hxx>
|
||||
|
||||
class StepData_Factors;
|
||||
class StepShape_ManifoldSolidBrep;
|
||||
class StepVisual_TessellatedItem;
|
||||
class TopoDS_Shell;
|
||||
@@ -44,12 +45,12 @@ public:
|
||||
|
||||
Standard_EXPORT TopoDSToStep_MakeManifoldSolidBrep(const TopoDS_Shell& S,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT TopoDSToStep_MakeManifoldSolidBrep(const TopoDS_Solid& S,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT const Handle(StepShape_ManifoldSolidBrep)& Value() const;
|
||||
|
@@ -45,17 +45,17 @@ public:
|
||||
|
||||
Standard_EXPORT TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Face& F,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Shell& S,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT TopoDSToStep_MakeShellBasedSurfaceModel(const TopoDS_Solid& S,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const StepData_Factors& theLocalFactors,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT const Handle(StepShape_ShellBasedSurfaceModel)& Value() const;
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <TopoDSToStep_MakeEdgeError.hxx>
|
||||
#include <TopoDSToStep_Root.hxx>
|
||||
class StepData_Factors;
|
||||
class StepShape_TopologicalRepresentationItem;
|
||||
class TopoDS_Edge;
|
||||
class TopoDSToStep_Tool;
|
||||
@@ -44,12 +45,12 @@ public:
|
||||
Standard_EXPORT TopoDSToStep_MakeStepEdge(const TopoDS_Edge& E,
|
||||
TopoDSToStep_Tool& T,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const TopoDS_Edge& E,
|
||||
TopoDSToStep_Tool& T,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const;
|
||||
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <TopoDSToStep_MakeFaceError.hxx>
|
||||
#include <TopoDSToStep_Root.hxx>
|
||||
class StepData_Factors;
|
||||
class StepShape_TopologicalRepresentationItem;
|
||||
class TopoDS_Face;
|
||||
class TopoDSToStep_Tool;
|
||||
@@ -44,12 +45,12 @@ public:
|
||||
Standard_EXPORT TopoDSToStep_MakeStepFace(const TopoDS_Face& F,
|
||||
TopoDSToStep_Tool& T,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const TopoDS_Face& F,
|
||||
TopoDSToStep_Tool& T,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const;
|
||||
|
||||
|
@@ -44,12 +44,12 @@ public:
|
||||
Standard_EXPORT TopoDSToStep_MakeStepVertex(const TopoDS_Vertex& V,
|
||||
TopoDSToStep_Tool& T,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const TopoDS_Vertex& V,
|
||||
TopoDSToStep_Tool& T,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const;
|
||||
|
||||
|
@@ -44,12 +44,12 @@ public:
|
||||
Standard_EXPORT TopoDSToStep_MakeStepWire(const TopoDS_Wire& W,
|
||||
TopoDSToStep_Tool& T,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const TopoDS_Wire& W,
|
||||
TopoDSToStep_Tool& T,
|
||||
const Handle(Transfer_FinderProcess)& FP,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT const Handle(StepShape_TopologicalRepresentationItem)& Value() const;
|
||||
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include <TopoDSToStep_BuilderError.hxx>
|
||||
#include <TopoDSToStep_Root.hxx>
|
||||
#include <MoniTool_DataMapOfShapeTransient.hxx>
|
||||
class StepData_Factors;
|
||||
class TopoDS_Shape;
|
||||
class TopoDSToStep_Tool;
|
||||
class Transfer_FinderProcess;
|
||||
@@ -45,11 +46,11 @@ public:
|
||||
|
||||
Standard_EXPORT TopoDSToStep_WireframeBuilder(const TopoDS_Shape& S,
|
||||
TopoDSToStep_Tool& T,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT void Init (const TopoDS_Shape& S,
|
||||
TopoDSToStep_Tool& T,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
const StepData_Factors& theLocalFactors);
|
||||
|
||||
Standard_EXPORT TopoDSToStep_BuilderError Error() const;
|
||||
|
||||
@@ -61,21 +62,21 @@ public:
|
||||
const TopoDS_Face& F,
|
||||
MoniTool_DataMapOfShapeTransient& M,
|
||||
Handle(TColStd_HSequenceOfTransient)& L,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
const StepData_Factors& theLocalFactors) const;
|
||||
|
||||
//! Extraction of Trimmed Curves from TopoDS_Face for the
|
||||
//! Creation of a GeometricallyBoundedWireframeRepresentation
|
||||
Standard_EXPORT Standard_Boolean GetTrimmedCurveFromFace (const TopoDS_Face& F,
|
||||
MoniTool_DataMapOfShapeTransient& M,
|
||||
Handle(TColStd_HSequenceOfTransient)& L,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
const StepData_Factors& theLocalFactors) const;
|
||||
|
||||
//! Extraction of Trimmed Curves from any TopoDS_Shape for the
|
||||
//! Creation of a GeometricallyBoundedWireframeRepresentation
|
||||
Standard_EXPORT Standard_Boolean GetTrimmedCurveFromShape (const TopoDS_Shape& S,
|
||||
MoniTool_DataMapOfShapeTransient& M,
|
||||
Handle(TColStd_HSequenceOfTransient)& L,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
const StepData_Factors& theLocalFactors) const;
|
||||
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user