1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +03:00

Compare commits

..

1 Commits

Author SHA1 Message Date
ifv
cd65cebc0d 0032811: Bad result of sweep operation due to Surface Surface Intersect Bug 2022-02-21 12:10:46 +03:00
102 changed files with 308 additions and 1435 deletions

View File

@@ -370,18 +370,6 @@ Standard_Boolean BRepToIGES_BREntity::GetPCurveMode () const
{
return myPCurveMode;
}
void BRepToIGES_BREntity::SetConvertSurfaceMode(const Standard_Boolean theVal)
{
Interface_Static::SetIVal("write.convertsurface.mode", theVal);
myConvSurface = theVal;
}
Standard_EXPORT void BRepToIGES_BREntity::SetPCurveMode(const Standard_Boolean theVal)
{
Interface_Static::SetIVal("write.surfacecurve.mode", theVal);
myPCurveMode = theVal;
}
//=======================================================================
//function : ~BRepToIGES_BREntity

View File

@@ -109,24 +109,15 @@ public:
//! Returns mode for writing pcurves
//! (value of parameter write.surfacecurve.mode)
Standard_EXPORT Standard_Boolean GetPCurveMode() const;
Standard_EXPORT void SetConvertSurfaceMode(const Standard_Boolean theVal);
Standard_EXPORT void SetPCurveMode(const Standard_Boolean theVal);
Standard_EXPORT virtual ~BRepToIGES_BREntity();
protected:
Standard_Boolean myConvSurface;
Standard_Boolean myPCurveMode;
private:
Handle(IGESData_IGESModel) TheModel;
Standard_Real TheUnitFactor;
Standard_Boolean myConvSurface;
Standard_Boolean myPCurveMode;
Handle(Transfer_FinderProcess) TheMap;
};
#endif // _BRepToIGES_BREntity_HeaderFile

View File

@@ -494,7 +494,7 @@ Handle(IGESSolid_Face) BRepToIGESBRep_Entity ::TransferFace(const TopoDS_Face& s
GeomToIGES_GeomSurface GS;
//S4181 pdn 17.04.99 Boolean flags in order to define write of elementary surfaces added.
GS.SetBRepMode(Standard_True);
GS.SetAnalyticMode (myConvSurface == 0 );
GS.SetAnalyticMode ( Interface_Static::IVal("write.convertsurface.mode") ==0 );
GS.SetModel(GetModel());
Handle(Geom_Surface) st;

View File

@@ -140,6 +140,7 @@ private:
Handle(IGESSolid_EdgeList) myEdgeList;
Handle(IGESSolid_VertexList) myVertexList;
};

View File

@@ -217,7 +217,7 @@ void BndLib_Add3dCurve::Add( const Adaptor3d_Curve& C,
if(Bsaux->LastParameter() < U2 ) u2 = Bsaux->LastParameter();
// modified by NIZHNY-EAP Fri Dec 3 14:29:18 1999 ___END___
}
Standard_Real aSegmentTol = Precision::PConfusion();
Standard_Real aSegmentTol = 2. * Precision::PConfusion();
if (Abs(u2 - u1) < aSegmentTol)
aSegmentTol = Abs(u2 - u1) * 0.01;
Bsaux->Segment(u1, u2, aSegmentTol);

View File

@@ -80,11 +80,16 @@ void GeomInt_IntSS::Perform(const Handle(Geom_Surface)& S1,
Handle(Adaptor3d_TopolTool) dom1 = new Adaptor3d_TopolTool(myHS1);
Handle(Adaptor3d_TopolTool) dom2 = new Adaptor3d_TopolTool(myHS2);
myLConstruct.Load(dom1,dom2,myHS1,myHS2);
Standard_Real TolArc = Tol;
Standard_Real TolTang = Tol;
Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2);
Standard_Real Deflection = 0.1;
if (myHS1->GetType() == GeomAbs_BSplineSurface && myHS2->GetType() == GeomAbs_BSplineSurface)
{
Deflection /= 10.;
}
myIntersector.SetTolerances(TolArc,TolTang,UVMaxStep,Deflection);

View File

@@ -87,7 +87,6 @@
GeomToIGES_GeomCurve::GeomToIGES_GeomCurve()
:GeomToIGES_GeomEntity()
{
myOffsetModeIVal = Interface_Static::IVal("write.iges.offset.mode");
}
@@ -99,7 +98,6 @@ GeomToIGES_GeomCurve::GeomToIGES_GeomCurve
(const GeomToIGES_GeomEntity& GE)
:GeomToIGES_GeomEntity(GE)
{
myOffsetModeIVal = Interface_Static::IVal("write.iges.offset.mode");
}
@@ -817,7 +815,7 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomCurve::TransferCurve
if (Precision::IsNegativeInfinite(Udeb)) U1 = -Precision::Infinite();
if (Precision::IsPositiveInfinite(Ufin)) U2 = Precision::Infinite();
if (myOffsetModeIVal == 0)
if (Interface_Static::IVal("write.iges.offset.mode") == 0)
{
res = TransferCurve(GeomConvert::CurveToBSplineCurve(start),U1,U2);
return res;
@@ -855,14 +853,3 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomCurve::TransferCurve
res = OffsetC;
return res;
}
void GeomToIGES_GeomCurve::SetOffsetModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.iges.offset.mode", theVal);
myOffsetModeIVal = theVal;
}
Standard_Integer GeomToIGES_GeomCurve::GetOffsetModeIVal() const
{
return myOffsetModeIVal;
}

View File

@@ -92,9 +92,7 @@ public:
Standard_EXPORT Handle(IGESData_IGESEntity) TransferCurve (const Handle(Geom_OffsetCurve)& start, const Standard_Real Udeb, const Standard_Real Ufin);
Standard_EXPORT void SetOffsetModeIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetOffsetModeIVal() const;
protected:
@@ -106,7 +104,7 @@ protected:
private:
Standard_Integer myOffsetModeIVal;
};

View File

@@ -100,7 +100,6 @@ GeomToIGES_GeomSurface::GeomToIGES_GeomSurface()
{
myBRepMode = Standard_False;
myAnalytic = Standard_False;
myPlaneModeIVal = Interface_Static::IVal("write.iges.plane.mode");
}
@@ -113,7 +112,6 @@ GeomToIGES_GeomSurface::GeomToIGES_GeomSurface(const GeomToIGES_GeomEntity& GE)
{
myBRepMode = Standard_False;
myAnalytic = Standard_False;
myPlaneModeIVal = Interface_Static::IVal("write.iges.plane.mode");
}
@@ -539,7 +537,7 @@ Handle(IGESData_IGESEntity) GeomToIGES_GeomSurface::TransferSurface(const Handle
if (start.IsNull()) {
return res;
}
if (myPlaneModeIVal == 0){
if (Interface_Static::IVal("write.iges.plane.mode") == 0){
Handle(IGESGeom_Plane) aPlane = new IGESGeom_Plane;
Standard_Real A,B,C,D;
start->Coefficients(A,B,C,D);
@@ -1349,13 +1347,3 @@ void GeomToIGES_GeomSurface::SetAnalyticMode(const Standard_Boolean flag)
myAnalytic = flag;
}
void GeomToIGES_GeomSurface::SetPlaneModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.iges.plane.mode", theVal);
myPlaneModeIVal = theVal;
}
Standard_Integer GeomToIGES_GeomSurface::GetPlaneModeIVal() const
{
return myPlaneModeIVal;
}

View File

@@ -129,9 +129,7 @@ public:
//! Setst flag for writing elementary surfaces
Standard_EXPORT void SetAnalyticMode (const Standard_Boolean flag);
Standard_EXPORT void SetPlaneModeIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetPlaneModeIVal() const;
protected:
@@ -147,7 +145,6 @@ private:
Standard_Real TheLength;
Standard_Boolean myBRepMode;
Standard_Boolean myAnalytic;
Standard_Integer myPlaneModeIVal;
};

View File

@@ -35,12 +35,7 @@
IMPLEMENT_STANDARD_RTTIEXT(IGESControl_ActorWrite,Transfer_ActorOfFinderProcess)
IGESControl_ActorWrite::IGESControl_ActorWrite ()
{
ModeTrans() = 0;
myPrecRVal = Interface_Static::RVal("write.precision.val");
myMaxPrecRVal = Interface_Static::RVal("read.maxprecision.val");
}
IGESControl_ActorWrite::IGESControl_ActorWrite () { ModeTrans() = 0; }
Standard_Boolean IGESControl_ActorWrite::Recognize
(const Handle(Transfer_Finder)& start)
@@ -75,8 +70,8 @@ Handle(Transfer_Binder) IGESControl_ActorWrite::Transfer
if (shape.IsNull()) return NullResult();
// modified by NIZHNY-EAP Tue Aug 29 11:16:54 2000 ___BEGIN___
Handle(Standard_Transient) info;
Standard_Real Tol = myPrecRVal;
Standard_Real maxTol = myMaxPrecRVal;
Standard_Real Tol = Interface_Static::RVal("write.precision.val");
Standard_Real maxTol = Interface_Static::RVal("read.maxprecision.val");
shape = XSAlgo::AlgoContainer()->ProcessShape( shape, Tol, maxTol,
"write.iges.resource.name",
"write.iges.sequence", info,
@@ -118,25 +113,3 @@ Handle(Transfer_Binder) IGESControl_ActorWrite::Transfer
return NullResult();
}
void IGESControl_ActorWrite::SetPrecRVal(const Standard_Real theVal)
{
Interface_Static::SetRVal("write.precision.val", theVal);
myPrecRVal = theVal;
}
void IGESControl_ActorWrite::SetMaxPrecRVal(const Standard_Real theVal)
{
Interface_Static::SetRVal("read.maxprecision.val", theVal);
myMaxPrecRVal = theVal;
}
Standard_Real IGESControl_ActorWrite::GetPrecRVal() const
{
return myPrecRVal;
}
Standard_Real IGESControl_ActorWrite::GetMaxPrecRVal() const
{
return myMaxPrecRVal;
}

View File

@@ -51,13 +51,8 @@ public:
const Handle(Transfer_FinderProcess)& FP,
const Message_ProgressRange& theProgress = Message_ProgressRange()) Standard_OVERRIDE;
Standard_EXPORT void SetPrecRVal(const Standard_Real theVal);
Standard_EXPORT void SetMaxPrecRVal(const Standard_Real theVal);
Standard_EXPORT Standard_Real GetPrecRVal() const;
Standard_EXPORT Standard_Real GetMaxPrecRVal() const;
DEFINE_STANDARD_RTTIEXT(IGESControl_ActorWrite,Transfer_ActorOfFinderProcess)
@@ -68,8 +63,7 @@ protected:
private:
Standard_Real myPrecRVal;
Standard_Real myMaxPrecRVal;
};

View File

@@ -52,7 +52,6 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESControl_IGESBoundary,IGESToBRep_IGESBoundary)
//=======================================================================
IGESControl_IGESBoundary::IGESControl_IGESBoundary() : IGESToBRep_IGESBoundary()
{
myParModeIVal = Interface_Static::IVal("read.stdsameparameter.mode");
}
//=======================================================================
@@ -63,7 +62,6 @@ IGESControl_IGESBoundary::IGESControl_IGESBoundary() : IGESToBRep_IGESBoundary()
IGESControl_IGESBoundary::IGESControl_IGESBoundary(const IGESToBRep_CurveAndSurface& CS) :
IGESToBRep_IGESBoundary (CS)
{
myParModeIVal = Interface_Static::IVal("read.stdsameparameter.mode");
}
//=======================================================================
@@ -304,7 +302,7 @@ static Standard_Boolean Connect (const Handle(ShapeAnalysis_Wire)& theSAW,
#endif
}
//#74 rln 10.03.99 S4135: handling use of BRepLib::SameParameter by new static parameter
if (myParModeIVal) {
if (Interface_Static::IVal ("read.stdsameparameter.mode")) {
Standard_Real first, last;
BRep_Tool::Range(edge3d,first,last);
// pdn 08.04.99 S4135 optimizing in computation of SPTol
@@ -407,13 +405,3 @@ static Standard_Boolean Connect (const Handle(ShapeAnalysis_Wire)& theSAW,
return okCurve;
}
void IGESControl_IGESBoundary::SetParModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.stdsameparameter.mode", theVal);
myParModeIVal = theVal;
}
Standard_Integer IGESControl_IGESBoundary::GetParModeIVal() const
{
return myParModeIVal;
}

View File

@@ -54,20 +54,12 @@ public:
//! wire to contain only closed representation.
Standard_EXPORT virtual void Check (const Standard_Boolean result, const Standard_Boolean checkclosure, const Standard_Boolean okCurve3d, const Standard_Boolean okCurve2d) Standard_OVERRIDE;
Standard_EXPORT void SetParModeIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetParModeIVal() const;
DEFINE_STANDARD_RTTIEXT(IGESControl_IGESBoundary,IGESToBRep_IGESBoundary)
protected:
Standard_EXPORT virtual Standard_Boolean Transfer (Standard_Boolean& okCurve, Standard_Boolean& okCurve3d, Standard_Boolean& okCurve2d, const Handle(IGESData_IGESEntity)& icurve3d, const Handle(ShapeExtend_WireData)& scurve3d, const Standard_Boolean usescurve, const Standard_Boolean toreverse3d, const Handle(IGESData_HArray1OfIGESEntity)& curves2d, const Standard_Boolean toreverse2d, const Standard_Integer number, Handle(ShapeExtend_WireData)& lsewd) Standard_OVERRIDE;
private:
Standard_Integer myParModeIVal;
};
#endif // _IGESControl_IGESBoundary_HeaderFile

View File

@@ -61,7 +61,7 @@ IGESControl_Reader::IGESControl_Reader ()
SetWS (new XSControl_WorkSession);
SetNorm("IGES");
Standard_Integer onlyvisible = Interface_Static::IVal("read.iges.onlyvisible");
myOnlyVisIVal = (onlyvisible == 1);
theReadOnlyVisible = (onlyvisible == 1);
}
@@ -77,7 +77,7 @@ IGESControl_Reader::IGESControl_Reader
SetWS (WS,scratch);
SetNorm ("IGES");
Standard_Integer onlyvisible = Interface_Static::IVal("read.iges.onlyvisible");
myOnlyVisIVal = (onlyvisible == 1);
theReadOnlyVisible = (onlyvisible == 1);
}
@@ -114,14 +114,14 @@ Standard_Integer IGESControl_Reader::NbRootsForTransfer()
Interface_ShareFlags SH (model,protocol);
// sln 11.06.2002 OCC448
Interface_Static::SetIVal("read.iges.onlyvisible",myOnlyVisIVal);
Interface_Static::SetIVal("read.iges.onlyvisible",theReadOnlyVisible);
Standard_Integer nb = model->NbEntities();
for (Standard_Integer i = 1; i <= nb; i ++) {
Handle(IGESData_IGESEntity) ent = model->Entity(i);
if ( SH.IsShared(ent) || ! actor->Recognize (ent) ) continue;
// on ajoute un traitement pour ne prendre que les entites visibles
if ( ! myOnlyVisIVal || ent->BlankStatus() == 0 ) {
if ( ! theReadOnlyVisible || ent->BlankStatus() == 0 ) {
theroots.Append(ent);
}
}
@@ -320,14 +320,3 @@ void IGESControl_Reader::PrintTransferInfo
}
}
}
void IGESControl_Reader::SetOnlyVisibleIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.iges.onlyvisible", theVal);
myOnlyVisIVal = theVal;
}
Standard_Integer IGESControl_Reader::GetOnlyVisibleIVal() const
{
return myOnlyVisIVal;
}

View File

@@ -97,9 +97,7 @@ public:
//! Prints Statistics and check list for Transfer
Standard_EXPORT void PrintTransferInfo (const IFSelect_PrintFail failwarn, const IFSelect_PrintCount mode) const;
Standard_EXPORT void SetOnlyVisibleIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetOnlyVisibleIVal() const;
protected:
@@ -112,7 +110,7 @@ private:
Standard_Boolean myOnlyVisIVal;
Standard_Boolean theReadOnlyVisible;
};

View File

@@ -18,7 +18,7 @@
inline void IGESControl_Reader::SetReadVisible (const Standard_Boolean ReadRoot)
{
myOnlyVisIVal = ReadRoot;
theReadOnlyVisible = ReadRoot;
}
@@ -29,5 +29,5 @@ inline void IGESControl_Reader::SetReadVisible (const Standard_Boolean ReadRoot)
inline Standard_Boolean IGESControl_Reader::GetReadVisible ()const
{
return myOnlyVisIVal;
return theReadOnlyVisible;
}

View File

@@ -54,29 +54,20 @@ IGESControl_Writer::IGESControl_Writer ()
myIsComputed (Standard_False)
{
// faudrait aussi (?) prendre les parametres par defaut ... ?
myUnitCVal = Interface_Static::CVal("write.iges.unit");
myBRepModeIVal = Interface_Static::IVal("write.iges.brep.mode");
myPrecRVal = Interface_Static::RVal("write.precision.val");
myMaxPrecRVal = Interface_Static::RVal("read.maxprecision.val");
myPrecModeIVal = Interface_Static::IVal("write.precision.mode");
IGESControl_Controller::Init();
myEditor.Init(IGESSelect_WorkLibrary::DefineProtocol());
myEditor.SetUnitName(myUnitCVal);
myEditor.SetUnitName(Interface_Static::CVal ("write.iges.unit"));
myEditor.ApplyUnit();
myWriteMode = Interface_Static::IVal ("write.iges.brep.mode");
myModel = myEditor.Model();
}
IGESControl_Writer::IGESControl_Writer
(const Standard_CString unit, const Standard_Integer modecr)
: myTP (new Transfer_FinderProcess(10000)) ,
myBRepModeIVal (modecr) , myIsComputed (Standard_False)
myWriteMode (modecr) , myIsComputed (Standard_False)
{
// faudrait aussi (?) prendre les parametres par defaut ... ?
myUnitCVal = Interface_Static::CVal("write.iges.unit");
myBRepModeIVal = Interface_Static::IVal("write.iges.brep.mode");
myPrecRVal = Interface_Static::RVal("write.precision.val");
myMaxPrecRVal = Interface_Static::RVal("read.maxprecision.val");
myPrecModeIVal = Interface_Static::IVal("write.precision.mode");
IGESControl_Controller::Init();
myEditor.Init(IGESSelect_WorkLibrary::DefineProtocol());
myEditor.SetUnitName(unit);
@@ -89,14 +80,7 @@ IGESControl_Writer::IGESControl_Writer
: myTP (new Transfer_FinderProcess(10000)) ,
myModel (model) ,
myEditor (model,IGESSelect_WorkLibrary::DefineProtocol()) ,
myBRepModeIVal (modecr) , myIsComputed (Standard_False)
{
myUnitCVal = Interface_Static::CVal("write.iges.unit");
myBRepModeIVal = Interface_Static::IVal("write.iges.brep.mode");
myPrecRVal = Interface_Static::RVal("write.precision.val");
myMaxPrecRVal = Interface_Static::RVal("read.maxprecision.val");
myPrecModeIVal = Interface_Static::IVal("write.precision.mode");
}
myWriteMode (modecr) , myIsComputed (Standard_False) { }
Standard_Boolean IGESControl_Writer::AddShape (const TopoDS_Shape& theShape,
const Message_ProgressRange& theProgress)
@@ -108,8 +92,8 @@ Standard_Boolean IGESControl_Writer::AddShape (const TopoDS_Shape& theShape,
Message_ProgressScope aPS(theProgress, NULL, 2);
// modified by NIZHNY-EAP Tue Aug 29 11:16:54 2000 ___BEGIN___
Handle(Standard_Transient) info;
Standard_Real Tol = myPrecRVal;
Standard_Real maxTol = myMaxPrecRVal;
Standard_Real Tol = Interface_Static::RVal("write.precision.val");
Standard_Real maxTol = Interface_Static::RVal("read.maxprecision.val");
TopoDS_Shape Shape = XSAlgo::AlgoContainer()->ProcessShape( theShape, Tol, maxTol,
"write.iges.resource.name",
"write.iges.sequence", info,
@@ -120,7 +104,7 @@ Standard_Boolean IGESControl_Writer::AddShape (const TopoDS_Shape& theShape,
// modified by NIZHNY-EAP Tue Aug 29 11:17:01 2000 ___END___
BRepToIGES_BREntity B0; B0.SetTransferProcess(myTP); B0.SetModel(myModel);
BRepToIGESBRep_Entity B1; B1.SetTransferProcess(myTP); B1.SetModel(myModel);
Handle(IGESData_IGESEntity) ent = myBRepModeIVal?
Handle(IGESData_IGESEntity) ent = myWriteMode?
B1.TransferShape (Shape, aPS.Next()) : B0.TransferShape(Shape, aPS.Next());
if (!aPS.More())
return Standard_False;
@@ -139,9 +123,9 @@ Standard_Boolean IGESControl_Writer::AddShape (const TopoDS_Shape& theShape,
Standard_Real oldtol = myModel->GlobalSection().Resolution(), newtol;
Standard_Integer tolmod = myPrecModeIVal;
Standard_Integer tolmod = Interface_Static::IVal("write.precision.mode");
if (tolmod == 2)
newtol = myPrecRVal;
newtol = Interface_Static::RVal("write.precision.val");
else {
ShapeAnalysis_ShapeTolerance stu;
Standard_Real Tolv = stu.Tolerance (Shape, tolmod, TopAbs_VERTEX);
@@ -287,57 +271,3 @@ Standard_Boolean IGESControl_Writer::Write
return res;
}
void IGESControl_Writer::SetUnitCVal(const Standard_CString& theVal)
{
Interface_Static::SetCVal("write.iges.unit", theVal);
myUnitCVal = theVal;
}
void IGESControl_Writer::SetBRepModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.iges.brep.mode", theVal);
myBRepModeIVal = theVal;
}
void IGESControl_Writer::SetPrecRVal(const Standard_Real theVal)
{
Interface_Static::SetRVal("write.precision.val", theVal);
myPrecRVal = theVal;
}
void IGESControl_Writer::SetMaxPrecRVal(const Standard_Real theVal)
{
Interface_Static::SetRVal("read.maxprecision.val", theVal);
myMaxPrecRVal = theVal;
}
void IGESControl_Writer::SetPrecModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.precision.mode", theVal);
myPrecModeIVal = theVal;
}
Standard_CString IGESControl_Writer::GetUnitCVal() const
{
return myUnitCVal;
}
Standard_Integer IGESControl_Writer::GetBRepModeIVal() const
{
return myBRepModeIVal;
}
Standard_Real IGESControl_Writer::GetPrecRVal() const
{
return myPrecRVal;
}
Standard_Real IGESControl_Writer::GetMaxPrecRVal() const
{
return myMaxPrecRVal;
}
Standard_Integer IGESControl_Writer::GetPrecModeIVal() const
{
return myPrecModeIVal;
}

View File

@@ -115,36 +115,12 @@ public:
//! if the processor could not create the file).
Standard_EXPORT Standard_Boolean Write (const Standard_CString file, const Standard_Boolean fnes = Standard_False);
Standard_EXPORT void SetUnitCVal(const Standard_CString& theVal);
Standard_EXPORT void SetBRepModeIVal(const Standard_Integer theVal);
Standard_EXPORT void SetPrecRVal(const Standard_Real theVal);
Standard_EXPORT void SetMaxPrecRVal(const Standard_Real theVal);
Standard_EXPORT void SetPrecModeIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_CString GetUnitCVal() const;
Standard_EXPORT Standard_Integer GetBRepModeIVal() const;
Standard_EXPORT Standard_Real GetPrecRVal() const;
Standard_EXPORT Standard_Real GetMaxPrecRVal() const;
Standard_EXPORT Standard_Integer GetPrecModeIVal() const;
private:
Handle(Transfer_FinderProcess) myTP;
Handle(IGESData_IGESModel) myModel;
IGESData_BasicEditor myEditor;
Standard_CString myUnitCVal;
Standard_Integer myBRepModeIVal;
Standard_Real myPrecRVal;
Standard_Real myMaxPrecRVal;
Standard_Integer myPrecModeIVal;
Standard_Integer myWriteMode;
Standard_Boolean myIsComputed;
};

View File

@@ -256,20 +256,21 @@ Standard_Boolean IGESData_IGESModel::ApplyStatic
return Standard_True;
}
Standard_CString val;
if (param[0] == 'r') {
myHeadRecCVal = Interface_Static::CVal("write.iges.header.receiver");
if (!myHeadRecCVal || myHeadRecCVal[0] == '\0') return Standard_False;
theheader.SetReceiveName (new TCollection_HAsciiString(myHeadRecCVal));
val = Interface_Static::CVal("write.iges.header.receiver");
if (!val || val[0] == '\0') return Standard_False;
theheader.SetReceiveName (new TCollection_HAsciiString(val));
}
if (param[0] == 'a') {
myHeadAuthorCVal = Interface_Static::CVal("write.iges.header.author");
if (!myHeadAuthorCVal || myHeadAuthorCVal[0] == '\0') return Standard_False;
theheader.SetAuthorName (new TCollection_HAsciiString(myHeadAuthorCVal));
val = Interface_Static::CVal("write.iges.header.author");
if (!val || val[0] == '\0') return Standard_False;
theheader.SetAuthorName (new TCollection_HAsciiString(val));
}
if (param[0] == 'c') {
myHeadCompCVal = Interface_Static::CVal("write.iges.header.company");
if (!myHeadCompCVal || myHeadCompCVal[0] == '\0') return Standard_False;
theheader.SetCompanyName (new TCollection_HAsciiString(myHeadCompCVal));
val = Interface_Static::CVal("write.iges.header.company");
if (!val || val[0] == '\0') return Standard_False;
theheader.SetCompanyName (new TCollection_HAsciiString(val));
}
return Standard_True;
}
@@ -623,36 +624,3 @@ Handle(TCollection_HAsciiString) IGESData_IGESModel::StringLabel(const Handle(St
}
return label;
}
void IGESData_IGESModel::SetHeaderReciever(const Standard_CString& theVal)
{
Interface_Static::SetCVal("write.iges.header.receiver", theVal);
myHeadRecCVal = theVal;
}
void IGESData_IGESModel::SetHeaderAuthor(const Standard_CString& theVal)
{
Interface_Static::SetCVal("write.iges.header.author", theVal);
myHeadRecCVal = theVal;
}
void IGESData_IGESModel::SetHeaderCompany(const Standard_CString& theVal)
{
Interface_Static::SetCVal("write.iges.header.company", theVal);
myHeadRecCVal = theVal;
}
Standard_CString IGESData_IGESModel::GetHeaderReciever() const
{
return myHeadRecCVal;
}
Standard_CString IGESData_IGESModel::GetHeaderAuthor() const
{
return myHeadAuthorCVal;
}
Standard_CString IGESData_IGESModel::GetHeaderCompany() const
{
return myHeadCompCVal;
}

View File

@@ -152,17 +152,7 @@ public:
//! i.e. a string "Dnn" with nn = directory entry number (2*N-1)
Standard_EXPORT Handle(TCollection_HAsciiString) StringLabel (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE;
Standard_EXPORT void SetHeaderReciever(const Standard_CString& theVal);
Standard_EXPORT void SetHeaderAuthor(const Standard_CString& theVal);
Standard_EXPORT void SetHeaderCompany(const Standard_CString& theVal);
Standard_EXPORT Standard_CString GetHeaderReciever() const;
Standard_EXPORT Standard_CString GetHeaderAuthor() const;
Standard_EXPORT Standard_CString GetHeaderCompany() const;
DEFINE_STANDARD_RTTIEXT(IGESData_IGESModel,Interface_InterfaceModel)
@@ -177,10 +167,6 @@ private:
Handle(TColStd_HSequenceOfHAsciiString) thestart;
IGESData_GlobalSection theheader;
Standard_CString myHeadRecCVal;
Standard_CString myHeadAuthorCVal;
Standard_CString myHeadCompCVal;
};

View File

@@ -44,10 +44,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IGESToBRep_Actor,Transfer_ActorOfTransientProcess)
//purpose :
//=======================================================================
IGESToBRep_Actor::IGESToBRep_Actor ()
{
thecontinuity = 0;
theeps = 0.0001;
}
{ thecontinuity = 0; theeps = 0.0001; }
//=======================================================================
@@ -58,11 +55,6 @@ void IGESToBRep_Actor::SetModel (const Handle(Interface_InterfaceModel)& model)
{
themodel = model;
theeps = Handle(IGESData_IGESModel)::DownCast(themodel)->GlobalSection().Resolution();
myApproxd1IVal = Interface_Static::IVal("read.iges.bspline.approxd1.mode");
myFaultyEntIVal = Interface_Static::IVal("read.iges.faulty.entities");
myPrecModeIVal = Interface_Static::IVal("read.precision.mode");
myPrecRVal = Interface_Static::RVal("read.precision.val");;
mySurfaceCurIVal = Interface_Static::IVal("read.surfacecurve.mode");
}
@@ -157,7 +149,7 @@ Handle(Transfer_Binder) IGESToBRep_Actor::Transfer
if (mymodel.IsNull() || ent.IsNull()) return NullResult();
Standard_Integer anum = mymodel->Number(start);
if (myFaultyEntIVal == 0 && mymodel->IsErrorEntity(anum))
if (Interface_Static::IVal("read.iges.faulty.entities") == 0 && mymodel->IsErrorEntity(anum))
return NullResult();
TopoDS_Shape shape;
@@ -178,15 +170,15 @@ Handle(Transfer_Binder) IGESToBRep_Actor::Transfer
CAS.SetModel(mymodel);
CAS.SetContinuity(thecontinuity);
CAS.SetTransferProcess(TP);
Standard_Integer Ival = myPrecModeIVal;
Standard_Integer Ival = Interface_Static::IVal("read.precision.mode");
if ( Ival == 0)
eps = mymodel->GlobalSection().Resolution();
else
eps = myPrecRVal; //:10 ABV 11 Nov 97
eps = Interface_Static::RVal("read.precision.val"); //:10 ABV 11 Nov 97
//:10 eps = BRepAPI::Precision();
Ival = myApproxd1IVal;
Ival = Interface_Static::IVal("read.iges.bspline.approxd1.mode");
CAS.SetModeApprox ( (Ival > 0) );
Ival = mySurfaceCurIVal;
Ival = Interface_Static::IVal("read.surfacecurve.mode");
CAS.SetSurfaceCurve (Ival);
if (eps > 1.E-08) {
@@ -229,62 +221,5 @@ Handle(Transfer_Binder) IGESToBRep_Actor::Transfer
}
Standard_Real IGESToBRep_Actor::UsedTolerance () const
{
return theeps;
}
void IGESToBRep_Actor::SetApproxd1IVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.iges.bspline.approxd1.mode", theVal);
myApproxd1IVal = theVal;
}
void IGESToBRep_Actor::SetFaultyEntIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.iges.faulty.entities", theVal);
myFaultyEntIVal = myFaultyEntIVal;
}
void IGESToBRep_Actor::SetPrecModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.precision.mode", theVal);
myPrecModeIVal = theVal;
}
void IGESToBRep_Actor::SetPrecRVal(const Standard_Real theVal)
{
Interface_Static::SetRVal("read.precision.val", theVal);
myPrecRVal = theVal;
}
void IGESToBRep_Actor::SetSurfaceCurIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.surfacecurve.mode", theVal);
mySurfaceCurIVal = theVal;
}
Standard_Integer IGESToBRep_Actor::GetApproxd1IVal() const
{
return myApproxd1IVal;
}
Standard_Integer IGESToBRep_Actor::GetFaultyEntIVal() const
{
return myFaultyEntIVal;
}
Standard_Integer IGESToBRep_Actor::GetPrecModeIVal() const
{
return myPrecModeIVal;
}
Standard_Real IGESToBRep_Actor::GetPrecRVal() const
{
return myPrecRVal;
}
Standard_Integer IGESToBRep_Actor::GetSurfaceCurIVal() const
{
return mySurfaceCurIVal;
}
Standard_Real IGESToBRep_Actor::UsedTolerance () const
{ return theeps; }

View File

@@ -68,25 +68,7 @@ public:
//! the file or from statics
Standard_EXPORT Standard_Real UsedTolerance() const;
Standard_EXPORT void SetApproxd1IVal(const Standard_Integer theVal);
Standard_EXPORT void SetFaultyEntIVal(const Standard_Integer theVal);
Standard_EXPORT void SetPrecModeIVal(const Standard_Integer theVal);
Standard_EXPORT void SetPrecRVal(const Standard_Real theVal);
Standard_EXPORT void SetSurfaceCurIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetApproxd1IVal() const;
Standard_EXPORT Standard_Integer GetFaultyEntIVal() const;
Standard_EXPORT Standard_Integer GetPrecModeIVal() const;
Standard_EXPORT Standard_Real GetPrecRVal() const;
Standard_EXPORT Standard_Integer GetSurfaceCurIVal() const;
DEFINE_STANDARD_RTTIEXT(IGESToBRep_Actor,Transfer_ActorOfTransientProcess)
@@ -102,11 +84,6 @@ private:
Handle(Interface_InterfaceModel) themodel;
Standard_Integer thecontinuity;
Standard_Real theeps;
Standard_Integer myApproxd1IVal;
Standard_Integer myFaultyEntIVal;
Standard_Integer myPrecModeIVal;
Standard_Real myPrecRVal;
Standard_Integer mySurfaceCurIVal;
};

View File

@@ -74,8 +74,6 @@ IGESToBRep_CurveAndSurface::IGESToBRep_CurveAndSurface()
myIsResolCom (Standard_False),
myTP (new Transfer_TransientProcess())
{
myOnlyVisibleIVal = Interface_Static::IVal("read.iges.onlyvisible");
myMaxPrecRVal = Interface_Static::RVal("read.maxprecision.val");
UpdateMinMaxTol();
}
@@ -106,8 +104,6 @@ IGESToBRep_CurveAndSurface::IGESToBRep_CurveAndSurface
myIsResolCom (Standard_False),
myTP (new Transfer_TransientProcess())
{
myOnlyVisibleIVal = Interface_Static::IVal("read.iges.onlyvisible");
myMaxPrecRVal = Interface_Static::RVal("read.maxprecision.val");
UpdateMinMaxTol();
}
@@ -132,8 +128,6 @@ void IGESToBRep_CurveAndSurface::Init()
mySurface.Nullify();
myIsResolCom = Standard_False;
myUVResolution = 0.;
myOnlyVisibleIVal = Interface_Static::IVal("read.iges.onlyvisible");
myMaxPrecRVal = Interface_Static::RVal("read.maxprecision.val");
UpdateMinMaxTol();
}
@@ -157,9 +151,8 @@ void IGESToBRep_CurveAndSurface::UpdateMinMaxTol()
{
//#74 rln 11.03.99 S4135: Setting maximum tolerances according to
//static parameter
myMaxTol = Max (myMaxPrecRVal, myEpsGeom * myUnitFactor);
myMaxTol = Max (Interface_Static::RVal ("read.maxprecision.val"), myEpsGeom * myUnitFactor);
myMinTol = Precision::Confusion();
}
//=======================================================================
@@ -265,7 +258,7 @@ TopoDS_Shape IGESToBRep_CurveAndSurface::TransferGeometry
// sln 13.06.2002 OCC448: Avoid transferring invisible sub entities which
// logically depend on the one
Standard_Integer onlyvisible = myOnlyVisibleIVal;
Standard_Integer onlyvisible = Interface_Static::IVal("read.iges.onlyvisible");
if (IGESToBRep::IsCurveAndSurface(start)) {
if(onlyvisible && start->BlankStatus() == 1)
@@ -660,27 +653,7 @@ Standard_Real IGESToBRep_CurveAndSurface::GetUVResolution()
return myUVResolution;
}
void IGESToBRep_CurveAndSurface::SetOnlyVisibleIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.iges.onlyvisible", theVal);
myOnlyVisibleIVal = theVal;
}
void IGESToBRep_CurveAndSurface::SetMaxPrecRVal(const Standard_Real theVal)
{
Interface_Static::SetRVal("read.maxprecision.val", theVal);
myMaxPrecRVal = theVal;
}
Standard_Integer IGESToBRep_CurveAndSurface::GetOnlyVisibleIVal() const
{
return myOnlyVisibleIVal;
}
Standard_Real IGESToBRep_CurveAndSurface::GetMaxPrecRVal() const
{
return myMaxPrecRVal;
}

View File

@@ -191,13 +191,7 @@ public:
Standard_EXPORT Standard_Real GetUVResolution();
Standard_EXPORT void SetOnlyVisibleIVal(const Standard_Integer theVal);
Standard_EXPORT void SetMaxPrecRVal(const Standard_Real theVal);
Standard_EXPORT Standard_Integer GetOnlyVisibleIVal() const;
Standard_EXPORT Standard_Real GetMaxPrecRVal() const;
protected:
@@ -226,8 +220,6 @@ private:
Standard_Boolean myIsResolCom;
Handle(IGESData_IGESModel) myModel;
Handle(Transfer_TransientProcess) myTP;
Standard_Integer myOnlyVisibleIVal;
Standard_Real myMaxPrecRVal;
};

View File

@@ -210,12 +210,6 @@ Standard_Integer IGESToBRep_Reader::LoadFile (const Standard_CString filename)
theModel = model;
theDone = Standard_False;
theShapes.Clear();
myApproxd1IVal = Interface_Static::IVal("read.iges.bspline.approxd1.mode");
myBSContinuityIVal = Interface_Static::IVal("read.iges.bspline.continuity");
myOnlyVisIVal = Interface_Static::IVal("read.iges.onlyvisible");
myPrecModeIVal = Interface_Static::IVal("read.precision.mode");
myPrecRVal = Interface_Static::RVal("read.precision.val");
mySurfaceCurIVal = Interface_Static::IVal("read.surfacecurve.mode");
if ( theProc.IsNull() )
theProc = new Transfer_TransientProcess (theModel->NbEntities());
else
@@ -374,7 +368,7 @@ static void TrimTolerances (const TopoDS_Shape& shape,
//function : TransferRoots
//purpose : Transfers all Roots Entities
//=======================================================================
void IGESToBRep_Reader::TransferRoots (const Standard_Boolean theOnlyVisible,
void IGESToBRep_Reader::TransferRoots (const Standard_Boolean onlyvisible,
const Message_ProgressRange& theProgress)
{
if (theModel.IsNull() || theProc.IsNull()) return;
@@ -393,7 +387,7 @@ void IGESToBRep_Reader::TransferRoots (const Standard_Boolean theOnlyVisible,
theProc->SetRootManagement(Standard_True);
// PrepareTransfer(); -> protocol, actor
theActor->SetModel(theModel);
Standard_Integer continuity = myBSContinuityIVal;
Standard_Integer continuity = Interface_Static::IVal("read.iges.bspline.continuity");
theActor->SetContinuity (continuity);
theProc->SetModel (theModel);
theProc->SetActor (theActor);
@@ -405,24 +399,24 @@ void IGESToBRep_Reader::TransferRoots (const Standard_Boolean theOnlyVisible,
ShapeExtend_Explorer SBE;
Standard_Integer precisionMode = myPrecModeIVal;
Standard_Integer precisionMode = Interface_Static::IVal("read.precision.mode");
Message_Msg msg2035("IGES_2035");
msg2035.Arg(precisionMode);
TF->Send (msg2035, Message_Info);
if (precisionMode==1) {
Message_Msg msg2040("IGES_2040");
msg2040.Arg(myPrecRVal);//#70 rln 03.03.99
msg2040.Arg(Interface_Static::RVal("read.precision.val"));//#70 rln 03.03.99
TF->Send (msg2040, Message_Info);
}
Message_Msg msg2045("IGES_2045");
msg2045.Arg(continuity);
TF->Send (msg2045, Message_Info);
Message_Msg msg2050("IGES_2050");
msg2050.Arg(mySurfaceCurIVal);
msg2050.Arg(Interface_Static::IVal("read.surfacecurve.mode"));
TF->Send (msg2050, Message_Info);
// sln 11.06.2002 OCC448
SetOnlyVisIVal(theOnlyVisible);
Interface_Static::SetIVal("read.iges.onlyvisible",onlyvisible);
Message_ProgressScope PS (theProgress, "Root", nb);
for (Standard_Integer i = 1; i <= nb && PS.More(); i++)
@@ -437,7 +431,7 @@ void IGESToBRep_Reader::TransferRoots (const Standard_Boolean theOnlyVisible,
TF->Send (msg2070, Message_Info);
}
// on ajoute un traitement pour ne prendre que les entites visibles
if ( ! theOnlyVisible || ent->BlankStatus() == 0 ) {
if ( ! onlyvisible || ent->BlankStatus() == 0 ) {
TopoDS_Shape shape;
theDone = Standard_True;
try {
@@ -517,7 +511,7 @@ Standard_Boolean IGESToBRep_Reader::Transfer(const Standard_Integer num,
IGESToBRep_CurveAndSurface CAS;
CAS.SetModel(theModel);
Standard_Real eps;
Standard_Integer Ival = myPrecModeIVal;
Standard_Integer Ival = Interface_Static::IVal("read.precision.mode");
Message_Msg msg2035("IGES_2035");
msg2035.Arg(Ival);
TF->Send (msg2035, Message_Info);
@@ -525,21 +519,21 @@ Standard_Boolean IGESToBRep_Reader::Transfer(const Standard_Integer num,
eps = theModel->GlobalSection().Resolution();
else {
//mjm : modif du 19/12/97 pour prise en compte effective du parametre
eps = myPrecRVal;
eps = Interface_Static::RVal("read.precision.val");
Message_Msg msg2040("IGES_2040");
msg2040.Arg(eps);//#70 rln 03.03.99
TF->Send (msg2040, Message_Info);
}
Ival = myApproxd1IVal;
Ival = Interface_Static::IVal("read.iges.bspline.approxd1.mode");
CAS.SetModeApprox ( (Ival > 0) );
Message_Msg msg2045("IGES_2045");
Ival = myBSContinuityIVal;
Ival = Interface_Static::IVal("read.iges.bspline.continuity");
msg2045.Arg(Ival);
TF->Send (msg2045, Message_Info);
CAS.SetContinuity(Ival);
Message_Msg msg2050("IGES_2050");
Ival = mySurfaceCurIVal;
Ival = Interface_Static::IVal("read.surfacecurve.mode");
msg2050.Arg(Ival);
TF->Send (msg2050, Message_Info);
CAS.SetSurfaceCurve (Ival);
@@ -654,69 +648,3 @@ Standard_Boolean IGESToBRep_Reader::Transfer(const Standard_Integer num,
return C;
}
}
void IGESToBRep_Reader::SetBSContinuityIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.iges.bspline.continuity", theVal);
myBSContinuityIVal = theVal;
}
void IGESToBRep_Reader::SetPrecModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.precision.mode", theVal);
myPrecModeIVal = theVal;
}
void IGESToBRep_Reader::SetPrecRVal(const Standard_Real theVal)
{
Interface_Static::SetRVal("read.precision.val", theVal);
myPrecRVal = theVal;
}
void IGESToBRep_Reader::SetSurfaceCurIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.surfacecurve.mode", theVal);
mySurfaceCurIVal = theVal;
}
void IGESToBRep_Reader::SetOnlyVisIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.iges.onlyvisible", theVal);
myOnlyVisIVal = theVal;
}
void IGESToBRep_Reader::SetApproxd1IVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.iges.bspline.approxd1.mode", theVal);
myApproxd1IVal = theVal;
}
Standard_Integer IGESToBRep_Reader::GetBSContinuityIVal() const
{
return myBSContinuityIVal;
}
Standard_Integer IGESToBRep_Reader::GetPrecModeIVal() const
{
return myPrecModeIVal;
}
Standard_Real IGESToBRep_Reader::GetPrecRVal() const
{
return myPrecRVal;
}
Standard_Integer IGESToBRep_Reader::GetSurfaceCurIVal() const
{
return mySurfaceCurIVal;
}
Standard_Integer IGESToBRep_Reader::GetOnlyVisIVal() const
{
return myOnlyVisIVal;
}
Standard_Integer IGESToBRep_Reader::GetApproxd1IVal() const
{
return myApproxd1IVal;
}

View File

@@ -110,29 +110,7 @@ public:
//! - a compound containing the resulting shapes if there are several.
Standard_EXPORT TopoDS_Shape OneShape() const;
Standard_EXPORT void SetBSContinuityIVal(const Standard_Integer theVal);
Standard_EXPORT void SetPrecModeIVal(const Standard_Integer theVal);
Standard_EXPORT void SetPrecRVal(const Standard_Real theVal);
Standard_EXPORT void SetSurfaceCurIVal(const Standard_Integer theVal);
Standard_EXPORT void SetOnlyVisIVal(const Standard_Integer theVal);
Standard_EXPORT void SetApproxd1IVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetBSContinuityIVal() const;
Standard_EXPORT Standard_Integer GetPrecModeIVal() const;
Standard_EXPORT Standard_Real GetPrecRVal() const;
Standard_EXPORT Standard_Integer GetSurfaceCurIVal() const;
Standard_EXPORT Standard_Integer GetOnlyVisIVal() const;
Standard_EXPORT Standard_Integer GetApproxd1IVal() const;
protected:
@@ -150,12 +128,6 @@ private:
TopTools_SequenceOfShape theShapes;
Handle(IGESToBRep_Actor) theActor;
Handle(Transfer_TransientProcess) theProc;
Standard_Integer myBSContinuityIVal;
Standard_Integer myPrecModeIVal;
Standard_Real myPrecRVal;
Standard_Integer mySurfaceCurIVal;
Standard_Integer myOnlyVisIVal; // setter
Standard_Integer myApproxd1IVal;
};

View File

@@ -29,12 +29,8 @@
#include <NCollection_Map.hxx>
static Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage);
static Standard_Integer ComputeIntersection(IntPolyh_PMaillageAffinage& theMaillage);
static Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage);
//=======================================================================
//function : IntPolyh_Intersection
//purpose :
@@ -49,6 +45,7 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th
myNbSU2 = 10;
myNbSV2 = 10;
myIsDone = Standard_False;
myIsParallel = Standard_False;
mySectionLines.Init(1000);
myTangentZones.Init(10000);
Perform();
@@ -72,6 +69,7 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th
myNbSU2 = theNbSU2;
myNbSV2 = theNbSV2;
myIsDone = Standard_False;
myIsParallel = Standard_False;
mySectionLines.Init(1000);
myTangentZones.Init(10000);
Perform();
@@ -95,6 +93,7 @@ IntPolyh_Intersection::IntPolyh_Intersection(const Handle(Adaptor3d_Surface)& th
myNbSU2 = theUPars2.Length();
myNbSV2 = theVPars2.Length();
myIsDone = Standard_False;
myIsParallel = Standard_False;
mySectionLines.Init(1000);
myTangentZones.Init(10000);
Perform(theUPars1, theVPars1, theUPars2, theVPars2);
@@ -442,7 +441,7 @@ void IntPolyh_Intersection::MergeCouples(IntPolyh_ListOfCouples &anArrayFF,
// too small (less than 5 deg), the advanced intersection is required.
// Otherwise, the standard intersection is considered satisfactory.
//=======================================================================
Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage)
Standard_Boolean IntPolyh_Intersection::IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage)
{
if (!theMaillage)
return Standard_True;
@@ -452,7 +451,7 @@ Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage)
// Number of interfering pairs
Standard_Integer aNbCouples = Couples.Extent();
// Flag to define whether advanced intersection is required or not
Standard_Boolean isAdvReq = (aNbCouples == 0);
Standard_Boolean isAdvReq = (aNbCouples == 0) && !IsParallel();
if (isAdvReq)
// No interfering triangles are found -> perform advanced intersection
return isAdvReq;
@@ -507,7 +506,7 @@ Standard_Integer ComputeIntersection(IntPolyh_PMaillageAffinage& theMaillage)
//function : AnalyzeIntersection
//purpose : Analyzes the intersection on the number of interfering triangles
//=======================================================================
Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage)
Standard_Boolean IntPolyh_Intersection::AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage)
{
if (!theMaillage)
return Standard_False;
@@ -528,7 +527,9 @@ Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage)
if (npara >= theMaillage->GetArrayOfTriangles(1).NbItems() ||
npara >= theMaillage->GetArrayOfTriangles(2).NbItems())
{
return Standard_False;
Couples.Clear();
myIsParallel = Standard_True;
return Standard_True;
}
}
return Standard_True;

View File

@@ -83,6 +83,12 @@ public: //! @name Getting the results
return myIsDone;
}
//! Returns state of the operation
Standard_Boolean IsParallel() const
{
return myIsParallel;
}
//! Returns the number of section lines
Standard_Integer NbSectionLines() const
{
@@ -186,6 +192,9 @@ private: //! @name Performing the intersection
IntPolyh_ListOfCouples& theArrayRF,
IntPolyh_ListOfCouples& theArrayRR) const;
Standard_Boolean AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage);
Standard_Boolean IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage);
private: //! @name Fields
@@ -200,6 +209,7 @@ private: //! @name Fields
Standard_Boolean myIsDone; //!< State of the operation
IntPolyh_ArrayOfSectionLines mySectionLines; //!< Section lines
IntPolyh_ArrayOfTangentZones myTangentZones; //!< Tangent zones
Standard_Boolean myIsParallel;
};
#endif // _IntPolyh_Intersection_HeaderFile

View File

@@ -504,7 +504,11 @@ void IntTools_FaceFace::Perform (const TopoDS_Face& aF1,
{
const Standard_Real UVMaxStep = IntPatch_Intersection::DefineUVMaxStep(myHS1, dom1, myHS2, dom2);
const Standard_Real Deflection = 0.1;
Standard_Real Deflection = 0.1;
if (aType1 == GeomAbs_BSplineSurface && aType2 == GeomAbs_BSplineSurface)
{
Deflection /= 10.;
}
myIntersector.SetTolerances(TolArc, TolTang, UVMaxStep, Deflection);
}

View File

@@ -448,5 +448,5 @@ void IntTools_TopolTool::SamplePnts(const Standard_Real theDefl,
myV0 = myVPars->Value(1);
myDU = (myUPars->Value(myNbSmplU) - myU0)/(myNbSmplU-1);
myDV = (myVPars->Value(myNbSmplV) - myU0)/(myNbSmplV-1);
myDV = (myVPars->Value(myNbSmplV) - myV0)/(myNbSmplV-1);
}

View File

@@ -4183,6 +4183,77 @@ static Standard_Integer OCC32744(Draw_Interpretor& theDi, Standard_Integer theNb
return 0;
}
//=======================================================================
//function : OCC24472
//purpose :
//=======================================================================
static Standard_Integer OCC24472(Draw_Interpretor& theDI,
Standard_Integer theNArg,
const char ** theArgVal)
{
// Checks whether theCurve has a loop / bend
if (theNArg < 2)
{
theDI << "Use: " << theArgVal[0] << " CheckLoops curve [CosMaxAngle [theNbPoints]]" << "/n";
return 1;
}
Handle(Geom_Curve) aCurve = DrawTrSurf::GetCurve(theArgVal[1]);
if(aCurve.IsNull())
{
theDI << " " << theArgVal[1] << " : NULL curve" << "\n";
return 0;
}
Standard_Real aCosMaxAngle = .8;
Standard_Integer aNbPoints = 1000;
if (theNArg > 2)
{
aCosMaxAngle = Draw::Atof(theArgVal[2]);
}
if (theNArg > 3)
{
aNbPoints = Draw::Atoi(theArgVal[3]);
}
Standard_Real U1 = aCurve->FirstParameter(), U2 = aCurve->LastParameter();
if (Precision::IsInfinite(U1) || Precision::IsInfinite(U2))
{
theDI << "Infinite interval : " << U1 << " " << U2 << "\n";
return 0;
}
Standard_Real delta = (U2 - U1) / aNbPoints;
gp_Pnt aP;
gp_Vec aDC1, aDC2;
aCurve->D1(U1, aP, aDC1);
gp_Dir aD1(aDC1);
Standard_Real p;
for (p = U1; p <= U2; p += delta)
{
aCurve->D1(p, aP, aDC2);
gp_Dir aD2(aDC2);
Standard_Real aCos = Abs(aD1*aD2);
if (aCos < aCosMaxAngle)
{
theDI << "Error: The curve " << theArgVal[1] << " is possible to have a bend at parameter " << p << ". Please check carefully \n";
}
aD1 = aD2;
}
return 0;
}
void QABugs::Commands_20(Draw_Interpretor& theCommands) {
const char *group = "QABugs";
@@ -4275,5 +4346,10 @@ void QABugs::Commands_20(Draw_Interpretor& theCommands) {
__FILE__,
OCC32744, group);
theCommands.Add("OCC24472",
"CheckLoops curve [CosMaxAngle [theNbPoints]]",
__FILE__,
OCC24472, group);
return;
}

View File

@@ -331,7 +331,6 @@ STEPCAFControl_Reader::STEPCAFControl_Reader()
myMatMode(Standard_True),
myViewMode(Standard_True)
{
mySubshapesIVal = Interface_Static::IVal("read.stepcaf.subshapes.name");
STEPCAFControl_Controller::Init();
}
@@ -377,7 +376,6 @@ void STEPCAFControl_Reader::Init(const Handle(XSControl_WorkSession)& WS,
myReader.SetWS(WS, scratch);
myFiles.Clear();
myMap.Clear();
mySubshapesIVal = Interface_Static::IVal("read.stepcaf.subshapes.name");
}
//=======================================================================
@@ -4584,7 +4582,7 @@ void STEPCAFControl_Reader::ExpandSubShapes(const Handle(XCAFDoc_ShapeTool)& Sha
TColStd_MapOfTransient aRepItems;
// Read translation control variables
Standard_Boolean doReadSNames = (mySubshapesIVal > 0);
Standard_Boolean doReadSNames = (Interface_Static::IVal("read.stepcaf.subshapes.name") > 0);
if (!doReadSNames)
return;
@@ -4944,14 +4942,3 @@ Standard_Boolean STEPCAFControl_Reader::GetViewMode() const
{
return myViewMode;
}
void STEPCAFControl_Reader::SetSubshapesIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.stepcaf.subshapes.name", theVal);
mySubshapesIVal = theVal;
}
Standard_Integer STEPCAFControl_Reader::GetSubshapesIVal() const
{
return mySubshapesIVal;
}

View File

@@ -263,10 +263,6 @@ protected:
//! Convert name into UNICODE text.
Standard_EXPORT virtual TCollection_ExtendedString convertName (const TCollection_AsciiString& theName) const;
Standard_EXPORT void SetSubshapesIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetSubshapesIVal() const;
private:
//! Internal method. Import all Datum attributes and set them to XCAF object. Set connection of Datum to GeomTolerance (theGDTL).
@@ -294,7 +290,6 @@ private:
void prepareUnits(const Handle(StepData_StepModel)& theModel,
const Handle(TDocStd_Document)& theDoc) const;
private:
STEPControl_Reader myReader;
@@ -309,7 +304,6 @@ private:
Standard_Boolean myMatMode;
Standard_Boolean myViewMode;
NCollection_DataMap<Handle(Standard_Transient), TDF_Label> myGDTMap;
Standard_Integer mySubshapesIVal;
};

View File

@@ -326,10 +326,6 @@ void STEPCAFControl_Writer::Init (const Handle(XSControl_WorkSession)& WS,
myLabels.Clear();
myGDTPresentationDM = new StepVisual_DraughtingModel();
myGDTPrsCurveStyle = new StepVisual_HArray1OfPresentationStyleAssignment(1, 1);
myAssemblyModeCVal = Interface_Static::CVal("write.step.assembly");
myAssemblyModeIVal = Interface_Static::IVal("write.step.assembly");
mySchemaIVal = Interface_Static::IVal("write.step.schema");
mySubshapesIVal = Interface_Static::IVal("write.stepcaf.subshapes.name");
}
@@ -546,7 +542,7 @@ Standard_Boolean STEPCAFControl_Writer::Transfer (STEPControl_Writer &writer,
const Handle(StepData_StepModel) aModel = Handle(StepData_StepModel)::DownCast(writer.WS()->Model());
prepareUnit(labels.First(), aModel); // set local length unit to the model
// translate free top-level shapes of the DECAF document
Standard_Integer anAp = mySchemaIVal;
Standard_Integer ap = Interface_Static::IVal ("write.step.schema");
TDF_LabelSequence sublabels;
Message_ProgressScope aPS(theProgress, "Labels", labels.Length());
for ( Standard_Integer i=1; i <= labels.Length() && aPS.More(); i++)
@@ -642,11 +638,11 @@ Standard_Boolean STEPCAFControl_Writer::Transfer (STEPControl_Writer &writer,
}
}
*/
Standard_Integer anAssemblyMode = myAssemblyMode;
SetAssemblyCVal("On");
Standard_Integer assemblymode = Interface_Static::IVal ("write.step.assembly");
Interface_Static::SetCVal ("write.step.assembly", "On");
writer.Transfer ( Sass, STEPControl_AsIs, Standard_True, aPS1.Next());
SetAssemblyIVal(anAssemblyMode);
SetSchemaIVal(anAp);
Interface_Static::SetIVal ("write.step.assembly", assemblymode);
Interface_Static::SetIVal ("write.step.schema", ap);
}
}
if (aPS.UserBreak())
@@ -675,7 +671,7 @@ Standard_Boolean STEPCAFControl_Writer::Transfer (STEPControl_Writer &writer,
// write G&DTs
if(GetDimTolMode()) {
if (anAp == 5) {
if (ap == 5) {
WriteDGTsAP242(writer.WS(), sublabels);
}
else {
@@ -704,7 +700,7 @@ Standard_Boolean STEPCAFControl_Writer::Transfer (STEPControl_Writer &writer,
if ( GetPropsMode() )
WriteValProps ( writer.WS(), sublabels, multi );
SetSchemaIVal(anAp);
Interface_Static::SetIVal ("write.step.schema", ap);
// refresh graph
writer.WS()->ComputeGraph ( Standard_True );
@@ -713,7 +709,7 @@ Standard_Boolean STEPCAFControl_Writer::Transfer (STEPControl_Writer &writer,
* Write names for the sub-shapes
* ================================ */
if (mySubshapesIVal != 0)
if (Interface_Static::IVal("write.stepcaf.subshapes.name") != 0)
{
const Handle(XSControl_TransferWriter) &TW = this->ChangeWriter().WS()->TransferWriter();
const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess();
@@ -803,11 +799,11 @@ TopoDS_Shape STEPCAFControl_Writer::TransferExternFiles (const TDF_Label &L,
EF->SetWS ( newWS );
EF->SetName ( name );
EF->SetLabel ( L );
Standard_Integer anAssemblyMode = myAssemblyMode;
SetAssemblyCVal("Off");
Standard_Integer assemblymode = Interface_Static::IVal ("write.step.assembly");
Interface_Static::SetCVal ("write.step.assembly", "Off");
const Standard_CString multi = 0;
EF->SetTransferStatus ( Transfer ( sw, Lseq, mode, multi, Standard_True, theProgress) );
SetAssemblyIVal(anAssemblyMode);
Interface_Static::SetIVal ("write.step.assembly", assemblymode);
myLabEF.Bind ( L, EF );
myFiles.Bind ( name->ToCString(), EF );
@@ -857,7 +853,7 @@ Standard_Boolean STEPCAFControl_Writer::WriteExternRefs (const Handle(XSControl_
const Handle(XSControl_TransferWriter) &TW = WS->TransferWriter();
const Handle(Transfer_FinderProcess) &FP = TW->FinderProcess();
STEPConstruct_ExternRefs EFTool ( WS );
Standard_Integer aSchema = mySchemaIVal;
Standard_Integer schema = Interface_Static::IVal("write.step.schema");
for ( Standard_Integer k=1; k <= labels.Length(); k++ ) {
TDF_Label lab = labels(k);
if ( XCAFDoc_ShapeTool::IsAssembly ( lab ) ) continue; // skip assemblies
@@ -880,7 +876,7 @@ Standard_Boolean STEPCAFControl_Writer::WriteExternRefs (const Handle(XSControl_
}
// add extern ref
const char* format = (aSchema == 3 ? "STEP AP203" : "STEP AP214");
const char* format = (schema == 3 ? "STEP AP203" : "STEP AP214");
// try to get PD from SDR
StepRepr_RepresentedDefinition RD = SDR->Definition();
Handle(StepRepr_PropertyDefinition) aPropDef = RD.PropertyDefinition();
@@ -900,7 +896,7 @@ Standard_Boolean STEPCAFControl_Writer::WriteExternRefs (const Handle(XSControl_
}
EFTool.AddExternRef ( EF->GetName()->ToCString(), PD, format );
}
EFTool.WriteExternRefs(aSchema);
EFTool.WriteExternRefs(schema);
return Standard_True;
}
@@ -4371,47 +4367,3 @@ Standard_Boolean STEPCAFControl_Writer::GetMaterialMode() const
{
return myMatMode;
}
void STEPCAFControl_Writer::SetAssemblyCVal(const Standard_CString& theVal)
{
Interface_Static::SetCVal("write.step.assembly", theVal);
myAssemblyModeCVal = theVal;
}
void STEPCAFControl_Writer::SetAssemblyIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.assembly", theVal);
myAssemblyModeIVal = theVal;
}
void STEPCAFControl_Writer::SetSchemaIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.schema", theVal);
mySchemaIVal = theVal;
}
void STEPCAFControl_Writer::SetSubshapesIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.stepcaf.subshapes.name", theVal);
mySubshapesIVal = theVal;
}
Standard_CString STEPCAFControl_Writer::GetAssemblyCVal() const
{
return myAssemblyModeCVal;
}
Standard_Integer STEPCAFControl_Writer::GetAssemblyIVal() const
{
return myAssemblyModeIVal;
}
Standard_Integer STEPCAFControl_Writer::GetSchemaIVal() const
{
return mySchemaIVal;
}
Standard_Integer STEPCAFControl_Writer::GetSubshapesIVal() const
{
return mySubshapesIVal;
}

View File

@@ -218,22 +218,6 @@ protected:
Standard_EXPORT void prepareUnit(const TDF_Label& theLabel,
const Handle(StepData_StepModel)& theModel);
Standard_EXPORT void SetAssemblyCVal(const Standard_CString& theVal);
Standard_EXPORT void SetAssemblyIVal(const Standard_Integer theVal);
Standard_EXPORT void SetSchemaIVal(const Standard_Integer theVal);
Standard_EXPORT void SetSubshapesIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_CString GetAssemblyCVal() const;
Standard_EXPORT Standard_Integer GetAssemblyIVal() const;
Standard_EXPORT Standard_Integer GetSchemaIVal() const;
Standard_EXPORT Standard_Integer GetSubshapesIVal() const;
private:
Standard_EXPORT Handle(StepRepr_ShapeAspect) WriteShapeAspect(const Handle(XSControl_WorkSession) &WS,
@@ -256,6 +240,7 @@ private:
private:
STEPControl_Writer myWriter;
NCollection_DataMap<TCollection_AsciiString, Handle(STEPCAFControl_ExternFile)> myFiles;
STEPCAFControl_DataMapOfLabelShape myLabels;
@@ -272,10 +257,6 @@ private:
Handle(StepVisual_DraughtingModel) myGDTPresentationDM;
Handle(StepVisual_HArray1OfPresentationStyleAssignment) myGDTPrsCurveStyle;
Handle(StepRepr_ProductDefinitionShape) myGDTCommonPDS;
Standard_Integer myAssemblyModeIVal;
Standard_CString myAssemblyModeCVal;
Standard_Integer mySchemaIVal;
Standard_Integer mySubshapesIVal;
};

View File

@@ -89,8 +89,6 @@ void STEPConstruct_ContextTool::SetModel (const Handle(StepData_StepModel)& aSte
// if (thePRPC.IsNull()) thePRPC = GetCasted(StepBasic_ProductRelatedProductCategory, ent);
//}
}
myProductNameCVal = Interface_Static::CVal("write.step.product.name");
mySchemaIVal = Interface_Static::IVal("write.step.schema");
}
//=======================================================================
@@ -113,7 +111,7 @@ void STEPConstruct_ContextTool::AddAPD (const Standard_Boolean enforce)
Standard_Boolean noapd = theAPD.IsNull();
if (noapd || enforce) theAPD = new StepBasic_ApplicationProtocolDefinition;
switch (mySchemaIVal) { //j4
switch (Interface_Static::IVal("write.step.schema")) { //j4
default:
case 1:
theAPD->SetApplicationProtocolYear (1997);
@@ -149,7 +147,7 @@ void STEPConstruct_ContextTool::AddAPD (const Standard_Boolean enforce)
if (theAPD->Application().IsNull())
theAPD->SetApplication (new StepBasic_ApplicationContext);
Handle(TCollection_HAsciiString) appl;
switch (mySchemaIVal) { //j4
switch (Interface_Static::IVal("write.step.schema")) { //j4
default:
case 1:
case 2: appl = new TCollection_HAsciiString ( "core data for automotive mechanical design processes" );
@@ -358,7 +356,7 @@ void STEPConstruct_ContextTool::AddPRPC (const Standard_Boolean enforce)
Standard_Boolean noprpc = thePRPC.IsNull();
if (noprpc || enforce) {
//:i3 abv 1 Sep 98: ProSTEP TR9: generate PRODUCT_TYPE (derived) instead of PRPC
switch (mySchemaIVal) { //j4
switch (Interface_Static::IVal("write.step.schema")) { //j4
default:
case 1:
thePRPC = new StepBasic_ProductType;
@@ -568,24 +566,19 @@ void STEPConstruct_ContextTool::SetIndex (const Standard_Integer ind)
Handle(TCollection_HAsciiString) STEPConstruct_ContextTool::GetProductName () const
{
Handle(TCollection_HAsciiString) aPdtName;
if (!myProductNameCVal.IsEmpty())
{
aPdtName = new TCollection_HAsciiString(myProductNameCVal);
}
else
{
aPdtName = new TCollection_HAsciiString("Product");
}
for ( Standard_Integer i=1; i <= myLevel.Length(); i++ )
{
aPdtName->AssignCat ((char*)( i >1 ? "." : " " ));
Handle(TCollection_HAsciiString) PdtName;
if (Interface_Static::IsSet("write.step.product.name"))
PdtName = new TCollection_HAsciiString(Interface_Static::CVal("write.step.product.name"));
else PdtName = new TCollection_HAsciiString("Product");
for ( Standard_Integer i=1; i <= myLevel.Length(); i++ ) {
PdtName->AssignCat ((char*)( i >1 ? "." : " " ));
char buf[100];
sprintf ( buf, "%d", myLevel.Value(i) );
aPdtName->AssignCat ( buf );
PdtName->AssignCat ( buf );
}
return aPdtName;
return PdtName;
}
//=======================================================================
@@ -603,8 +596,7 @@ Handle(TColStd_HSequenceOfTransient) STEPConstruct_ContextTool::GetRootsForPart
if ( ! SDRTool.PRPC().IsNull() ) seq->Append ( SDRTool.PRPC() );
// for AP203, add required product management data
if (mySchemaIVal == 3 )
{
if ( Interface_Static::IVal("write.step.schema") == 3 ) {
theAP203.Init ( SDRTool );
seq->Append (theAP203.GetProductCategoryRelationship());
seq->Append (theAP203.GetCreator());
@@ -634,8 +626,7 @@ Handle(TColStd_HSequenceOfTransient) STEPConstruct_ContextTool::GetRootsForAssem
seq->Append ( assembly.ItemValue() );
// for AP203, write required product management data
if (mySchemaIVal == 3 )
{
if ( Interface_Static::IVal("write.step.schema") == 3 ) {
theAP203.Init ( assembly.GetNAUO() );
seq->Append (theAP203.GetSecurity());
seq->Append (theAP203.GetClassificationOfficer());
@@ -648,24 +639,7 @@ Handle(TColStd_HSequenceOfTransient) STEPConstruct_ContextTool::GetRootsForAssem
return seq;
}
void STEPConstruct_ContextTool::SetProductNameCVal(const Standard_CString& theVal)
{
Interface_Static::SetCVal("write.step.product.name", theVal);
myProductNameCVal = theVal;
}
void STEPConstruct_ContextTool::SetSchemaIVal(Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.schema", theVal);
mySchemaIVal = theVal;
}
Standard_CString STEPConstruct_ContextTool::GetProductNameCVal() const
{
return myProductNameCVal;
}
Standard_Integer STEPConstruct_ContextTool::GetSchemaIVal() const
{
return mySchemaIVal;
}

View File

@@ -123,15 +123,7 @@ public:
//! for assembly link identified by assembly (including NAUO and CDSR)
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetRootsForAssemblyLink (const STEPConstruct_Assembly& assembly);
Standard_EXPORT TCollection_HAsciiString GetWriteStepProductName() const;
Standard_EXPORT void SetProductNameCVal(const Standard_CString& theVal);
Standard_EXPORT void SetSchemaIVal(Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetSchemaIVal() const;
Standard_EXPORT Standard_CString GetProductNameCVal() const;
protected:
@@ -148,8 +140,7 @@ private:
Handle(StepBasic_ApplicationProtocolDefinition) theAPD;
STEPConstruct_AP203Context theAP203;
Handle(StepGeom_Axis2Placement3d) myAxis;
Standard_CString myProductNameCVal;
Standard_Integer mySchemaIVal;
};

View File

@@ -52,7 +52,6 @@
STEPConstruct_Part::STEPConstruct_Part()
{
myDone = Standard_False;
mySchemaIVal = Interface_Static::IVal("write.step.schema");
}
//=======================================================================
@@ -65,11 +64,11 @@ void STEPConstruct_Part::MakeSDR(const Handle(StepShape_ShapeRepresentation)& SR
const Handle(StepBasic_ApplicationContext)& AC)
{
// get current schema
mySchemaIVal = Interface_Static::IVal("write.step.schema");
Standard_Integer schema = Interface_Static::IVal("write.step.schema");
// create PC
Handle(StepBasic_ProductContext) PC;
switch (mySchemaIVal) {
switch (schema) {
default :
case 1: PC = new StepBasic_MechanicalContext;
break;
@@ -94,7 +93,7 @@ void STEPConstruct_Part::MakeSDR(const Handle(StepShape_ShapeRepresentation)& SR
// create PDF
Handle(StepBasic_ProductDefinitionFormation) PDF;
switch (mySchemaIVal) {
switch (schema) {
default:
case 1:
case 2:
@@ -112,7 +111,7 @@ void STEPConstruct_Part::MakeSDR(const Handle(StepShape_ShapeRepresentation)& SR
// create PDC, depending on current schema
Handle(StepBasic_ProductDefinitionContext) PDC;
Handle(TCollection_HAsciiString) PDCname;
switch (mySchemaIVal) {
switch (schema) {
default:
case 1:
case 2:
@@ -148,7 +147,7 @@ void STEPConstruct_Part::MakeSDR(const Handle(StepShape_ShapeRepresentation)& SR
// and an associated PRPC
Handle(TCollection_HAsciiString) PRPCName;
switch (mySchemaIVal) {
switch (Interface_Static::IVal("write.step.schema")) {
default:
case 1:
myPRPC = new StepBasic_ProductType;
@@ -169,7 +168,6 @@ void STEPConstruct_Part::MakeSDR(const Handle(StepShape_ShapeRepresentation)& SR
PRPCproducts->SetValue(1,P);
myPRPC->Init ( PRPCName, Standard_False, 0, PRPCproducts );
myDone = Standard_True;
}
@@ -700,13 +698,3 @@ void STEPConstruct_Part::SetPRPCdescription (const Handle(TCollection_HAsciiStri
myPRPC->SetDescription ( text );
}
void STEPConstruct_Part::SetSchemaIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.schema", theVal);
mySchemaIVal = theVal;
}
Standard_Integer STEPConstruct_Part::GetSchemaIVal() const
{
return mySchemaIVal;
}

View File

@@ -136,9 +136,7 @@ public:
Standard_EXPORT void SetPRPCdescription (const Handle(TCollection_HAsciiString)& text);
Standard_EXPORT void SetSchemaIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetSchemaIVal() const;
protected:
@@ -154,7 +152,6 @@ private:
Standard_Boolean myDone;
Handle(StepShape_ShapeDefinitionRepresentation) mySDR;
Handle(StepBasic_ProductRelatedProductCategory) myPRPC;
Standard_Integer mySchemaIVal;
};

View File

@@ -87,7 +87,6 @@
//=======================================================================
STEPConstruct_Styles::STEPConstruct_Styles ()
{
mySchemaIVal = Interface_Static::IVal("write.step.schema")
}
@@ -99,7 +98,6 @@ STEPConstruct_Styles::STEPConstruct_Styles ()
STEPConstruct_Styles::STEPConstruct_Styles (const Handle(XSControl_WorkSession) &WS)
: STEPConstruct_Tool ( WS )
{
mySchemaIVal = Interface_Static::IVal("write.step.schema")
}
@@ -113,7 +111,6 @@ Standard_Boolean STEPConstruct_Styles::Init (const Handle(XSControl_WorkSession)
myMapOfStyles.Clear();
myStyles.Clear();
myPSA.Clear();
mySchemaIVal = Interface_Static::IVal("write.step.schema")
return SetWS ( WS );
}
@@ -238,8 +235,7 @@ Standard_Boolean STEPConstruct_Styles::CreateMDGPR (const Handle(StepRepr_Repres
// Model()->AddWithRefs ( Repr ); add into the model upper
// for AP203, add subschema name
if (mySchemaIVal == 3)
{
if ( Interface_Static::IVal("write.step.schema") ==3 ) {
APIHeaderSection_MakeHeader mkHdr ( Handle(StepData_StepModel)::DownCast ( Model() ) );
Handle(TCollection_HAsciiString) subSchema =
new TCollection_HAsciiString ( "SHAPE_APPEARANCE_LAYER_MIM" );
@@ -792,13 +788,3 @@ Standard_Boolean STEPConstruct_Styles::DecodeColor (const Handle(StepVisual_Colo
return Standard_False;
}
void STEPConstruct_Styles::SetSchemaIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.schema", theVal);
mySchemaIVal = theVal;
}
Standard_Integer STEPConstruct_Styles::GetSchemaIVal() const
{
return mySchemaIVal;
}

View File

@@ -147,9 +147,7 @@ public:
//! Returns True if OK or False if color is not recognized
Standard_EXPORT static Standard_Boolean DecodeColor (const Handle(StepVisual_Colour)& Colour, Quantity_Color& Col);
Standard_EXPORT void SetSchemaIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetSchemaIVal() const;
protected:
@@ -165,7 +163,6 @@ private:
TColStd_IndexedDataMapOfTransientTransient myMapOfStyles;
TColStd_IndexedMapOfTransient myStyles;
TColStd_SequenceOfTransient myPSA;
Standard_Integer mySchemaIVal;
};

View File

@@ -67,7 +67,6 @@ STEPConstruct_UnitContext::STEPConstruct_UnitContext()
areaDone = volumeDone = Standard_False;
//pdn file r_47-sd.stp initialize field.
theUncertainty = RealLast();
myWriteUnitIVal = Interface_Static::IVal("write.step.unit");
}
//=======================================================================
@@ -93,8 +92,7 @@ void STEPConstruct_UnitContext::Init(const Standard_Real Tol3d)
Standard_Boolean hasPref = Standard_True;
StepBasic_SiPrefix siPref = StepBasic_spMilli;
Standard_Real aScale = 1.;
myWriteUnitIVal = Interface_Static::IVal("write.step.unit");
switch (myWriteUnitIVal)
switch (Interface_Static::IVal("write.step.unit"))
{
case 1: uName = "INCH"; aScale = 25.4; break;
default:
@@ -605,15 +603,3 @@ Standard_Boolean STEPConstruct_UnitContext::VolumeDone() const
{
return volumeDone;
}
void STEPConstruct_UnitContext::SetWriteUnitIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.unit", theVal);
myWriteUnitIVal = theVal;
}
Standard_Integer STEPConstruct_UnitContext::GetWriteUnitIVal() const
{
return myWriteUnitIVal;
}

View File

@@ -112,9 +112,7 @@ public:
//! real factor (e.g. 1e6 for mega)
Standard_EXPORT static Standard_Real ConvertSiPrefix (const StepBasic_SiPrefix aPrefix);
Standard_EXPORT void SetWriteUnitIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetWriteUnitIVal() const;
protected:
@@ -145,7 +143,7 @@ private:
Standard_Boolean planeAngleDone;
Standard_Boolean solidAngleDone;
Standard_Boolean hasUncertainty;
Standard_Integer myWriteUnitIVal;
};

View File

@@ -73,7 +73,6 @@
//=======================================================================
STEPConstruct_ValidationProps::STEPConstruct_ValidationProps ()
{
mySchemaIVal = Interface_Static::IVal("write.step.schema");
}
//=======================================================================
@@ -84,7 +83,6 @@ STEPConstruct_ValidationProps::STEPConstruct_ValidationProps ()
STEPConstruct_ValidationProps::STEPConstruct_ValidationProps (const Handle(XSControl_WorkSession) &WS)
: STEPConstruct_Tool(WS)
{
mySchemaIVal = Interface_Static::IVal("write.step.schema");
}
//=======================================================================
@@ -94,7 +92,6 @@ STEPConstruct_ValidationProps::STEPConstruct_ValidationProps (const Handle(XSCon
Standard_Boolean STEPConstruct_ValidationProps::Init (const Handle(XSControl_WorkSession) &WS)
{
mySchemaIVal = Interface_Static::IVal("write.step.schema");
return SetWS ( WS );
}
@@ -362,8 +359,7 @@ Standard_Boolean STEPConstruct_ValidationProps::AddProp (const StepRepr_Characte
Model()->AddWithRefs ( PrDR );
// for AP203, add subschema name
if ( mySchemaIVal == 3 )
{
if ( Interface_Static::IVal("write.step.schema") ==3 ) {
APIHeaderSection_MakeHeader mkHdr ( Handle(StepData_StepModel)::DownCast ( Model() ) );
Handle(TCollection_HAsciiString) subSchema =
new TCollection_HAsciiString ( "GEOMETRIC_VALIDATION_PROPERTIES_MIM" );
@@ -750,14 +746,3 @@ void STEPConstruct_ValidationProps::SetAssemblyShape (const TopoDS_Shape& shape)
Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper(FinderProcess(),shape);
FinderProcess()->FindTypedTransient(mapper,STANDARD_TYPE(StepBasic_ProductDefinition),myAssemblyPD);
}
void STEPConstruct_ValidationProps::SetSchemaIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.schema", theVal);
mySchemaIVal = theVal;
}
Standard_Integer STEPConstruct_ValidationProps::GetSchemaIVal() const
{
return mySchemaIVal;
}

View File

@@ -121,9 +121,7 @@ public:
//! Sets current assembly shape SDR (for FindCDSR calls)
Standard_EXPORT void SetAssemblyShape (const TopoDS_Shape& shape);
Standard_EXPORT void SetSchemaIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetSchemaIVal() const;
protected:
@@ -139,7 +137,6 @@ private:
StepBasic_Unit areaUnit;
StepBasic_Unit volUnit;
Handle(StepBasic_ProductDefinition) myAssemblyPD;
Standard_Integer mySchemaIVal;
};

View File

@@ -208,19 +208,6 @@ STEPControl_ActorRead::STEPControl_ActorRead()
: myPrecision(0.0),
myMaxTol(0.0)
{
myAngleUnitIVal = Interface_Static::IVal("step.angleunit.mode");
myStepShapeReprIVal = Interface_Static::IVal("read.step.shape.repr");
myRelationshipIVal = Interface_Static::IVal("read.step.shape.relationship");
myShapeAspectIVal = Interface_Static::IVal("read.step.shape.aspect");
myProductCVal = Interface_Static::CVal("read.step.product.mode");
myReadAssemblyIVal = Interface_Static::IVal("read.step.assembly.level");
myNonmanifoldIVal = Interface_Static::IVal("read.step.nonmanifold");
myIdeasModeIVal = Interface_Static::IVal("read.step.ideas");
myConstructiveGeomIVal = Interface_Static::IVal("read.step.constructivegeom.relationship");
myRootTransformationIVal = Interface_Static::IVal("read.step.root.transformation");
myPrecisionModeIVal = Interface_Static::IVal("read.precision.mode");
myPrecisionRVal = Interface_Static::RVal("read.precision.val");
myMaxPrecisionRVal = Interface_Static::RVal("read.maxprecision.val");
}
// ============================================================================
// Method : STEPControl_ActorRead::Recognize
@@ -236,7 +223,7 @@ Standard_Boolean STEPControl_ActorRead::Recognize
if (start->IsKind(STANDARD_TYPE(StepRepr_NextAssemblyUsageOccurrence))) return Standard_True;
TCollection_AsciiString aProdMode = myProductCVal;
TCollection_AsciiString aProdMode = Interface_Static::CVal("read.step.product.mode");
if(!aProdMode.IsEqual("ON"))
if(start->IsKind(STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation))) return Standard_True;
@@ -322,7 +309,7 @@ Handle(Transfer_Binder) STEPControl_ActorRead::Transfer
}
}
// [END] Get version of preprocessor (to detect I-Deas case) (ssv; 23.11.2010)
Standard_Boolean aTrsfUse = (myRootTransformationIVal == 1);
Standard_Boolean aTrsfUse = (Interface_Static::IVal("read.step.root.transformation") == 1);
return TransferShape(start, TP, Standard_True, aTrsfUse, theProgress);
}
@@ -532,14 +519,14 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
// Flag indicating whether SDRs associated with the product`s main SDR
// by SRRs (which correspond to hybrid model representation in AP203 since 1998)
// should be taken into account
Standard_Integer readSRR = myRelationshipIVal;
Standard_Integer readSRR = Interface_Static::IVal("read.step.shape.relationship");
Standard_Integer aReadConstructiveGeomRR = myConstructiveGeomIVal;
Standard_Integer readConstructiveGeomRR = Interface_Static::IVal("read.step.constructivegeom.relationship");
// Flag indicating whether SDRs associated with the product`s main SDR
// by SAs (which correspond to hybrid model representation in AP203 before 1998)
// should be taken into account
Standard_Integer aReadSA = myShapeAspectIVal;
if ( ! aReadSA )
Standard_Integer readSA = Interface_Static::IVal("read.step.shape.aspect");
if ( ! readSA )
listSDRAspect->Clear();
// remember number of normal SDRs (not those found via ShapeAspect)
@@ -552,10 +539,10 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
// possibly attached directly to intermediate assemblies (1)
// Special mode (4) is used to translate shape attached to this product only,
// ignoring sub-assemblies if any
Standard_Integer aReadAssembly = myReadAssemblyIVal;
if ( aReadAssembly ==3 || ( aReadAssembly ==2 && listNAUO->Length() >0 ) )
Standard_Integer readAssembly = Interface_Static::IVal("read.step.assembly.level");
if ( readAssembly ==3 || ( readAssembly ==2 && listNAUO->Length() >0 ) )
listSDR->Clear();
else if ( aReadAssembly == 4 )
else if ( readAssembly == 4 )
listNAUO->Clear();
Standard_Integer nbEnt = listSDR->Length() + listNAUO->Length();
@@ -676,7 +663,7 @@ static void getSDR(const Handle(StepRepr_ProductDefinitionShape)& PDS,
nbShapes++;
}
}
else if(aReadConstructiveGeomRR && anitem->IsKind(STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship)))
else if(readConstructiveGeomRR && anitem->IsKind(STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship)))
{
Handle(StepRepr_ConstructiveGeometryRepresentationRelationship) aCSRR =
Handle(StepRepr_ConstructiveGeometryRepresentationRelationship)::DownCast(anitem);
@@ -839,7 +826,7 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(
Standard_Integer nsh = 0;
// [BEGIN] Proceed with non-manifold topology (ssv; 12.11.2010)
Standard_Boolean isNMMode = myNonmanifoldIVal != 0;
Standard_Boolean isNMMode = Interface_Static::IVal("read.step.nonmanifold") != 0;
Standard_Boolean isManifold = Standard_True;
if ( isNMMode && sr->IsKind(STANDARD_TYPE(StepShape_NonManifoldSurfaceShapeRepresentation)) ) {
isManifold = Standard_False;
@@ -851,8 +838,8 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(
}
// Special processing for I-DEAS STP case (ssv; 15.11.2010)
else {
Standard_Integer anIsIdeasMode = myIdeasModeIVal;
if (isNMMode && myNMTool.IsIDEASCase() && anIsIdeasMode) {
Standard_Integer isIDeasMode = Interface_Static::IVal("read.step.ideas");
if (isNMMode && myNMTool.IsIDEASCase() && isIDeasMode) {
isManifold = Standard_False;
NM_DETECTED = Standard_True;
#ifdef OCCT_DEBUG
@@ -1368,149 +1355,6 @@ Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::OldWay
return shbinder;
}
void STEPControl_ActorRead::SetAngleUnitIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("step.angleunit.mode", theVal);
myAngleUnitIVal = theVal;
}
void STEPControl_ActorRead::SetStepShapeReprIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.step.shape.repr", theVal);
myStepShapeReprIVal = theVal;
}
void STEPControl_ActorRead::SetRelationshipIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.step.shape.relationship", theVal);
myRelationshipIVal = theVal;
}
void STEPControl_ActorRead::SetShapeAspectIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.step.shape.aspect", theVal);
myShapeAspectIVal = theVal;
}
void STEPControl_ActorRead::SetProductCVal(const Standard_CString& theVal)
{
Interface_Static::SetCVal("read.step.product.mode", theVal);
myProductCVal = theVal;
}
void STEPControl_ActorRead::SetReadAssemblyIValconst(Standard_Integer theVal)
{
Interface_Static::SetIVal("read.step.assembly.level", theVal);
myReadAssemblyIVal = theVal;
}
void STEPControl_ActorRead::SetNonmanifoldIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.step.nonmanifold", theVal);
myNonmanifoldIVal = theVal;
}
void STEPControl_ActorRead::SetIdeasModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.step.ideas", theVal);
myIdeasModeIVal = theVal;
}
void STEPControl_ActorRead::SetConstructiveGeomIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.step.constructivegeom.relationship", theVal);
myStepShapeReprIVal = theVal;
}
void STEPControl_ActorRead::SetRootTransformationIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.step.root.transformation", theVal);
myRootTransformationIVal = theVal;
}
void STEPControl_ActorRead::SetPrecisionModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.precision.mode", theVal);
myPrecisionModeIVal = theVal;
}
void STEPControl_ActorRead::SetPrecisionRVal(const Standard_Real theVal)
{
Interface_Static::SetRVal("read.precision.val", theVal);
myPrecisionRVal = theVal;
}
void STEPControl_ActorRead::SetMaxPrecisionRVal(const Standard_Real theVal)
{
Interface_Static::SetRVal("read.maxprecision.val", theVal);
myMaxPrecisionRVal = theVal;
}
Standard_Integer STEPControl_ActorRead::GetAngleUnitIVal() const
{
return myAngleUnitIVal;
}
Standard_Integer STEPControl_ActorRead::GetStepShapeReprIVal() const
{
return myStepShapeReprIVal;
}
Standard_Integer STEPControl_ActorRead::GetRelationshipIVal() const
{
return myRelationshipIVal;
}
Standard_Integer STEPControl_ActorRead::GetShapeAspectIVal() const
{
return myShapeAspectIVal;
}
Standard_CString STEPControl_ActorRead::GetProductCVal() const
{
return myProductCVal;
}
Standard_Integer STEPControl_ActorRead::GetReadAssemblyIVal() const
{
return myReadAssemblyIVal;
}
Standard_Integer STEPControl_ActorRead::GetNonmanifoldIVal() const
{
return myNonmanifoldIVal;
}
Standard_Integer STEPControl_ActorRead::GetIdeasModeIVal() const
{
return myIdeasModeIVal;
}
Standard_Integer STEPControl_ActorRead::GetConstructiveGeomIVal() const
{
return myConstructiveGeomIVal;
}
Standard_Integer STEPControl_ActorRead::GetRootTransformationIVal() const
{
return myRootTransformationIVal;
}
Standard_Integer STEPControl_ActorRead::GetPrecisionModeIVal() const
{
return myPrecisionModeIVal;
}
Standard_Real STEPControl_ActorRead::GetPrecisionRVal() const
{
return myPrecisionRVal;
}
Standard_Real STEPControl_ActorRead::GetMaxPrecisionRVal() const
{
return myMaxPrecisionRVal;
}
//=======================================================================
//function : TransferEntity
//purpose :
@@ -1789,7 +1633,7 @@ Handle(Transfer_Binder) STEPControl_ActorRead::TransferShape(
// Product Definition Entities
// They should be treated with Design Manager
// case ShapeDefinitionRepresentation if ProductMode != ON
TCollection_AsciiString aProdMode = myProductCVal;
TCollection_AsciiString aProdMode = Interface_Static::CVal("read.step.product.mode");
if(!aProdMode.IsEqual("ON") &&
start->IsKind(STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation)))
shbinder = OldWay(start,TP, theProgress);
@@ -1910,7 +1754,7 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)&
if (!theGUAC.IsNull()) {
stat1 = myUnit.ComputeFactors(theGUAC);
Standard_Integer anglemode = myAngleUnitIVal;
Standard_Integer anglemode = Interface_Static::IVal("step.angleunit.mode");
Standard_Real angleFactor = ( anglemode == 0 ? myUnit.PlaneAngleFactor() :
anglemode == 1 ? 1. : M_PI/180. );
StepData_GlobalFactors::Intance().InitializeFactors(myUnit.LengthFactor(),
@@ -1925,15 +1769,15 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)&
}
// myPrecision = Precision::Confusion();
if (myPrecisionModeIVal == 1) //:i1 gka S4136 05.04.99
myPrecision = myPrecisionRVal;
if (Interface_Static::IVal("read.precision.mode") == 1) //:i1 gka S4136 05.04.99
myPrecision = Interface_Static::RVal("read.precision.val");
else if (myUnit.HasUncertainty())
myPrecision = myUnit.Uncertainty() * myUnit.LengthFactor();
else {
TP->AddWarning(theRepCont,"No Length Uncertainty, value of read.precision.val is taken");
myPrecision = myPrecisionRVal;
myPrecision = Interface_Static::RVal("read.precision.val");
}
myMaxTol = Max ( myPrecision, myMaxPrecisionRVal );
myMaxTol = Max ( myPrecision, Interface_Static::RVal("read.maxprecision.val") );
// Assign uncertainty
#ifdef TRANSLOG
if (TP->TraceLevel() > 1)
@@ -1949,8 +1793,8 @@ void STEPControl_ActorRead::PrepareUnits(const Handle(StepRepr_Representation)&
void STEPControl_ActorRead::ResetUnits ()
{
StepData_GlobalFactors::Intance().InitializeFactors ( 1, 1, 1 );
myPrecision = myPrecisionRVal;
myMaxTol = Max (myPrecision, myMaxPrecisionRVal);
myPrecision = Interface_Static::RVal("read.precision.val");
myMaxTol = Max ( myPrecision, Interface_Static::RVal("read.maxprecision.val") );
}
//=======================================================================

View File

@@ -172,57 +172,6 @@ protected:
const Handle(Transfer_TransientProcess)& TP,
const Message_ProgressRange& theProgress);
Standard_EXPORT void SetAngleUnitIVal(const Standard_Integer theVal);
Standard_EXPORT void SetStepShapeReprIVal(const Standard_Integer theVal);
Standard_EXPORT void SetRelationshipIVal(const Standard_Integer theVal);
Standard_EXPORT void SetShapeAspectIVal(const Standard_Integer theVal);
Standard_EXPORT void SetProductCVal(const Standard_CString& theVal);
Standard_EXPORT void SetReadAssemblyIValconst(Standard_Integer theVal);
Standard_EXPORT void SetNonmanifoldIVal(const Standard_Integer theVal);
Standard_EXPORT void SetIdeasModeIVal(const Standard_Integer theVal);
Standard_EXPORT void SetConstructiveGeomIVal(const Standard_Integer theVal);
Standard_EXPORT void SetRootTransformationIVal(const Standard_Integer theVal);
Standard_EXPORT void SetPrecisionModeIVal(const Standard_Integer theVal);
Standard_EXPORT void SetPrecisionRVal(const Standard_Real theVal);
Standard_EXPORT void SetMaxPrecisionRVal(const Standard_Real theVal);
Standard_EXPORT Standard_Integer GetAngleUnitIVal() const;
Standard_EXPORT Standard_Integer GetStepShapeReprIVal() const;
Standard_EXPORT Standard_Integer GetRelationshipIVal() const;
Standard_EXPORT Standard_Integer GetShapeAspectIVal() const;
Standard_EXPORT Standard_CString GetProductCVal() const;
Standard_EXPORT Standard_Integer GetReadAssemblyIVal() const;
Standard_EXPORT Standard_Integer GetNonmanifoldIVal() const;
Standard_EXPORT Standard_Integer GetIdeasModeIVal() const;
Standard_EXPORT Standard_Integer GetConstructiveGeomIVal() const;
Standard_EXPORT Standard_Integer GetRootTransformationIVal() const;
Standard_EXPORT Standard_Integer GetPrecisionModeIVal() const;
Standard_EXPORT Standard_Real GetPrecisionRVal() const;
Standard_EXPORT Standard_Real GetMaxPrecisionRVal() const;
private:
@@ -236,19 +185,7 @@ private:
Standard_Real myPrecision;
Standard_Real myMaxTol;
Handle(StepRepr_Representation) mySRContext;
Standard_Integer myAngleUnitIVal;
Standard_Integer myStepShapeReprIVal;
Standard_Integer myRelationshipIVal;
Standard_Integer myShapeAspectIVal;
Standard_CString myProductCVal;
Standard_Integer myReadAssemblyIVal;
Standard_Integer myNonmanifoldIVal;
Standard_Boolean myIdeasModeIVal;
Standard_Integer myConstructiveGeomIVal;
Standard_Integer myRootTransformationIVal;
Standard_Integer myPrecisionModeIVal;
Standard_Real myPrecisionRVal;
Standard_Real myMaxPrecisionRVal;
};

View File

@@ -232,13 +232,6 @@ static Standard_Boolean IsManifoldShape(const TopoDS_Shape& theShape) {
STEPControl_ActorWrite::STEPControl_ActorWrite ()
: mygroup (0) , mytoler (-1.)
{
myAngleUnitIVal = Interface_Static::IVal("step.angleunit.mode");
mySchemaIVal = Interface_Static::IVal("write.step.schema");
myPrecisionModeIVal = Interface_Static::IVal("write.precision.mode");
myVertexModeIVal = Interface_Static::IVal("write.step.vertex.mode");
myNonmanifoldIVal = Interface_Static::IVal("write.step.nonmanifold");
myPrecisionRVal = Interface_Static::RVal("write.precision.val");
myMaxPrecisionRVal = Interface_Static::RVal("read.maxprecision.val");
SetMode(STEPControl_ShellBasedSurfaceModel);
}
@@ -475,7 +468,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::Transfer (const Handle(Transfer_
}
Standard_Real aLFactor = model->WriteLengthUnit();
aLFactor /= model->LocalLengthUnit();
Standard_Integer anglemode = myAngleUnitIVal;
Standard_Integer anglemode = Interface_Static::IVal("step.angleunit.mode");
StepData_GlobalFactors::Intance().InitializeFactors (aLFactor, ( anglemode <= 1 ? 1. : M_PI/180. ), 1. );
// create SDR
@@ -539,7 +532,7 @@ Standard_Boolean STEPControl_ActorWrite::IsAssembly (TopoDS_Shape &S) const
{
if ( ! GroupMode() || S.ShapeType() != TopAbs_COMPOUND ) return Standard_False;
// PTV 16.09.2002 OCC725 for storing compound of vertices
if (myVertexModeIVal == 0) {//bug 23950
if (Interface_Static::IVal("write.step.vertex.mode") == 0) {//bug 23950
if (S.ShapeType() == TopAbs_COMPOUND ) {
Standard_Boolean IsOnlyVertices = Standard_True;
TopoDS_Iterator anItr( S );
@@ -563,83 +556,6 @@ Standard_Boolean STEPControl_ActorWrite::IsAssembly (TopoDS_Shape &S) const
return IsAssembly ( S );
}
void STEPControl_ActorWrite::SetGetAngleUnitIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("step.angleunit.mode", theVal);
myAngleUnitIVal = theVal;
}
void STEPControl_ActorWrite::SetSchemaIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.schema", theVal);
mySchemaIVal = theVal;
}
void STEPControl_ActorWrite::SetPrecisionModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.precision.mode", theVal);
myPrecisionModeIVal = theVal;
}
void STEPControl_ActorWrite::SetVertexModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.vertex.mode", theVal);
myVertexModeIVal = theVal;
}
void STEPControl_ActorWrite::SetNonmanifoldIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.nonmanifold", theVal);
myNonmanifoldIVal = theVal;
}
void STEPControl_ActorWrite::SetPrecisionRVal(const Standard_Real theVal)
{
Interface_Static::SetRVal("write.precision.val", theVal);
myPrecisionRVal = theVal;
}
void STEPControl_ActorWrite::SetMaxPrecisionRVal(const Standard_Real theVal)
{
Interface_Static::SetRVal("read.maxprecision.val", theVal);
myMaxPrecisionRVal = theVal;
}
Standard_Integer STEPControl_ActorWrite::GetAngleUnitIVal() const
{
return myAngleUnitIVal;
}
Standard_Integer STEPControl_ActorWrite::GetSchemaIVal() const
{
return mySchemaIVal;
}
Standard_Integer STEPControl_ActorWrite::GetPrecisionModeIVal() const
{
return myPrecisionModeIVal;
}
Standard_Integer STEPControl_ActorWrite::GetVertexModeIVal() const
{
return myVertexModeIVal;
}
Standard_Integer STEPControl_ActorWrite::GetNonmanifoldIVal() const
{
return myNonmanifoldIVal;
}
Standard_Real STEPControl_ActorWrite::GetPrecisionRVal() const
{
return myPrecisionRVal;
}
Standard_Real STEPControl_ActorWrite::GetMaxPrecisionRVal() const
{
return myMaxPrecisionRVal;
}
//=======================================================================
//function : TransferShape
//purpose :
@@ -735,7 +651,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape
Message_ProgressScope aPSRoot(theProgress, NULL, 2);
// [BEGIN] Separate manifold topology from non-manifold in group mode 0 (ssv; 18.11.2010)
Standard_Boolean isNMMode = myNonmanifoldIVal != 0;
Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0;
Handle(Transfer_Binder) aNMBinder;
if (isNMMode && !GroupMode() && theShape.ShapeType() == TopAbs_COMPOUND) {
TopoDS_Compound aNMCompound;
@@ -858,7 +774,8 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape
// create a list of items to translate
Handle(TopTools_HSequenceOfShape) RepItemSeq = new TopTools_HSequenceOfShape();
Standard_Boolean isSeparateVertices = myVertexModeIVal;//bug 23950
Standard_Boolean isSeparateVertices =
Interface_Static::IVal("write.step.vertex.mode") == 0;//bug 23950
// PTV 16.09.2002 OCC725 separate shape from solo vertices.
Standard_Boolean isOnlyVertices = Standard_False;
if (theShape.ShapeType() == TopAbs_COMPOUND) {
@@ -990,7 +907,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape
// if ( DMT.IsDone() ) aShape = DMT.ModifiedShape ( aShape );
//// aShape = TopoDSToStep::DirectFaces(xShape);
Handle(Standard_Transient) info;
Standard_Real maxTol = myMaxPrecisionRVal;
Standard_Real maxTol = Interface_Static::RVal("read.maxprecision.val");
Message_ProgressScope aPS1 (aPS.Next(), NULL, 2);
@@ -1274,7 +1191,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferShape
GetCasted(StepRepr_RepresentationItem, ItemSeq->Value(rep));
items->SetValue(rep,repit);
}
Standard_Integer ap = mySchemaIVal;
Standard_Integer ap = Interface_Static::IVal("write.step.schema");
Transfer_SequenceOfBinder aSeqBindRelation;
if(ap == 3 && nbs > 1) {
Standard_Integer j = 1;
@@ -1381,7 +1298,7 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound
TopoDS_Shape theShape = mapper->Value();
// Inspect non-manifold topology case (ssv; 10.11.2010)
Standard_Boolean isNMMode = myNonmanifoldIVal != 0;
Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0;
Standard_Boolean isManifold;
if (isNMMode)
isManifold = IsManifoldShape(theShape);
@@ -1392,7 +1309,8 @@ Handle(Transfer_Binder) STEPControl_ActorWrite::TransferCompound
Handle(TopTools_HSequenceOfShape) RepItemSeq = new TopTools_HSequenceOfShape();
// Prepare a collection for non-manifold group of shapes
Handle(TopTools_HSequenceOfShape) NonManifoldGroup = new TopTools_HSequenceOfShape();
Standard_Boolean isSeparateVertices = myVertexModeIVal == 0;//bug 23950
Standard_Boolean isSeparateVertices =
(Interface_Static::IVal("write.step.vertex.mode") == 0);//bug 23950
// PTV OCC725 17.09.2002 -- begin --
Standard_Integer nbFreeVrtx = 0;
TopoDS_Compound aCompOfVrtx;

View File

@@ -96,33 +96,8 @@ public:
//! NOTE: this method can modify shape
Standard_EXPORT virtual Standard_Boolean IsAssembly (TopoDS_Shape& S) const;
Standard_EXPORT void SetGetAngleUnitIVal(const Standard_Integer theVal);
Standard_EXPORT void SetSchemaIVal(const Standard_Integer theVal);
Standard_EXPORT void SetPrecisionModeIVal(const Standard_Integer theVal);
Standard_EXPORT void SetVertexModeIVal(const Standard_Integer theVal);
Standard_EXPORT void SetNonmanifoldIVal(const Standard_Integer theVal);
Standard_EXPORT void SetPrecisionRVal(const Standard_Real theVal);
Standard_EXPORT void SetMaxPrecisionRVal(const Standard_Real theVal);
Standard_EXPORT Standard_Integer GetAngleUnitIVal() const;
Standard_EXPORT Standard_Integer GetSchemaIVal() const;
Standard_EXPORT Standard_Integer GetPrecisionModeIVal() const;
Standard_EXPORT Standard_Integer GetVertexModeIVal() const;
Standard_EXPORT Standard_Integer GetNonmanifoldIVal() const;
Standard_EXPORT Standard_Real GetPrecisionRVal() const;
Standard_EXPORT Standard_Real GetMaxPrecisionRVal() const;
DEFINE_STANDARD_RTTIEXT(STEPControl_ActorWrite,Transfer_ActorOfFinderProcess)
@@ -147,13 +122,7 @@ private:
Standard_Integer mygroup;
Standard_Real mytoler;
STEPConstruct_ContextTool myContext;
Standard_Integer myAngleUnitIVal;
Standard_Integer mySchemaIVal;
Standard_Integer myPrecisionModeIVal;
Standard_Integer myVertexModeIVal;
Standard_Integer myNonmanifoldIVal;
Standard_Real myPrecisionRVal;
Standard_Real myMaxPrecisionRVal;
};

View File

@@ -63,8 +63,6 @@ STEPControl_Controller::STEPControl_Controller ()
RWHeaderSection::Init(); RWStepAP214::Init();
Interface_Static::Init ("step","write.step.product.name",'t',"Open CASCADE STEP translator " OCC_VERSION_STRING);
Interface_Static::SetCVal("write.step.product.name", "");
Interface_Static::Init ("step","write.step.assembly",'e',"");
Interface_Static::Init ("step","write.step.assembly",'&',"enum 0");
Interface_Static::Init ("step","write.step.assembly",'&',"eval Off");

View File

@@ -75,10 +75,6 @@
STEPControl_Reader::STEPControl_Reader ()
{
STEPControl_Controller::Init();
myAllShapeIVal = Interface_Static::IVal("read.step.all.shapes");
myProductContextCVal = Interface_Static::CVal("read.step.product.context");
myProductContextIVal = Interface_Static::IVal("read.step.product.context");
myProductModeCVal = Interface_Static::CVal("read.step.product.mode");
SetNorm ("STEP");
}
@@ -92,10 +88,6 @@ STEPControl_Reader::STEPControl_Reader
{
STEPControl_Controller::Init();
SetWS (WS,scratch);
myAllShapeIVal = Interface_Static::IVal("read.step.all.shapes");
myProductContextCVal = Interface_Static::CVal("read.step.product.context");
myProductContextIVal = Interface_Static::IVal("read.step.product.context");
myProductModeCVal = Interface_Static::CVal("read.step.product.mode");
SetNorm ("STEP");
}
@@ -134,7 +126,7 @@ Standard_Integer STEPControl_Reader::NbRootsForTransfer()
Standard_Integer nb = Model()->NbEntities();
for (Standard_Integer i = 1; i <= nb; i ++) {
Handle(Standard_Transient) ent = Model()->Value(i);
if (myAllShapeIVal == 1) {
if (Interface_Static::IVal("read.step.all.shapes") == 1) {
// Special case to read invalid shape_representation without links to shapes.
if (ent->IsKind(STANDARD_TYPE(StepShape_ManifoldSolidBrep))) {
Interface_EntityIterator aShareds = WS()->Graph().Sharings(ent);
@@ -194,9 +186,9 @@ Standard_Integer STEPControl_Reader::NbRootsForTransfer()
}
// determinate roots used ProductDefinitionContext
if(IsRoot) {
const char *aStr1 = myProductContextCVal;
Standard_Integer anICS = myProductContextIVal;
if(anICS>1) {
const char *str1 = Interface_Static::CVal("read.step.product.context");
Standard_Integer ICS = Interface_Static::IVal("read.step.product.context");
if(ICS>1) {
subs = graph.Shareds(PD);
for(subs.Start(); subs.More(); subs.Next()) {
Handle(StepBasic_ProductDefinitionContext) PDC =
@@ -204,7 +196,7 @@ Standard_Integer STEPControl_Reader::NbRootsForTransfer()
if (PDC.IsNull()) continue;
const char *str2 = PDC->LifeCycleStage()->String().ToCString();
const char *str3 = PDC->Name()->String().ToCString();
if( !( strcasecmp(aStr1,str2)==0 || strcasecmp(aStr1,str3)==0 ) )
if( !( strcasecmp(str1,str2)==0 || strcasecmp(str1,str3)==0 ) )
IsRoot=Standard_False;
}
}
@@ -228,7 +220,7 @@ Standard_Integer STEPControl_Reader::NbRootsForTransfer()
WS()->TransferReader()->TransientProcess()->RootsForTransfer()->Append(ent);
}
}
TCollection_AsciiString aProdMode = myProductModeCVal;
TCollection_AsciiString aProdMode = Interface_Static::CVal("read.step.product.mode");
if(!aProdMode.IsEqual("ON")) {
if(ent->IsKind(STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation))) {
Standard_Boolean IsRoot = Standard_True;
@@ -596,47 +588,3 @@ Standard_Boolean STEPControl_Reader::findUnits(
return nbFind != 0;
}
void STEPControl_Reader::SetAllShapeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.step.all.shapes", theVal);
myAllShapeIVal = theVal;
}
void STEPControl_Reader::SetProductContextCVal(const Standard_CString theVal)
{
Interface_Static::SetCVal("read.step.product.context", theVal);
myProductContextCVal = theVal;
}
void STEPControl_Reader::SetProductContextIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.step.product.context", theVal);
myProductContextIVal = theVal;
}
void STEPControl_Reader::SetProductModeCVal(const Standard_CString theVal)
{
Interface_Static::SetCVal("read.step.product.mode", theVal);
myProductModeCVal = theVal;
}
Standard_Integer STEPControl_Reader::GetAllShapeIVal() const
{
return myAllShapeIVal;
}
Standard_CString STEPControl_Reader::GetProductContextCVal() const
{
return myProductContextCVal;
}
Standard_Integer STEPControl_Reader::GetProductContextIVal() const
{
return myProductContextIVal;
}
Standard_CString STEPControl_Reader::GetProductModeCVal() const
{
return myProductModeCVal;
}

View File

@@ -106,22 +106,6 @@ public:
//! Returns system length unit used by transfer process
Standard_EXPORT Standard_Real SystemLengthUnit() const;
Standard_EXPORT void SetAllShapeIVal(const Standard_Integer theVal);
Standard_EXPORT void SetProductContextCVal(const Standard_CString theVal);
Standard_EXPORT void SetProductContextIVal(const Standard_Integer theVal);
Standard_EXPORT void SetProductModeCVal(const Standard_CString theVal);
Standard_EXPORT Standard_Integer GetAllShapeIVal() const;
Standard_EXPORT Standard_CString GetProductContextCVal() const;
Standard_EXPORT Standard_Integer GetProductContextIVal() const;
Standard_EXPORT Standard_CString GetProductModeCVal() const;
protected:
@@ -134,10 +118,8 @@ private:
//! Returns units for length , angle and solidangle for shape representations
Standard_EXPORT Standard_Boolean findUnits (const Handle(StepRepr_RepresentationContext)& theReprContext, TColStd_Array1OfAsciiString& theNameUnits, TColStd_Array1OfReal& theFactorUnits);
Standard_Integer myAllShapeIVal;
Standard_CString myProductContextCVal;
Standard_Integer myProductContextIVal;
Standard_CString myProductModeCVal;
};

View File

@@ -1630,7 +1630,6 @@ StepAP214_Protocol::StepAP214_Protocol ()
types.Bind(STANDARD_TYPE(StepKinematics_MechanismStateRepresentation), 801);
types.Bind(STANDARD_TYPE(StepVisual_RepositionedTessellatedGeometricSet), 802);
types.Bind(STANDARD_TYPE(StepVisual_RepositionedTessellatedItem), 803);
mySchemaIVal = Interface_Static::IVal("write.step.schema");
}
@@ -1655,7 +1654,7 @@ Handle(Standard_Type)& atype) const
Standard_CString StepAP214_Protocol::SchemaName() const
{
switch (mySchemaIVal) { //:j4
switch (Interface_Static::IVal("write.step.schema")) { //:j4
default:
case 1 : return schemaAP214CD; break;
case 2 : return schemaAP214DIS; break;
@@ -1688,13 +1687,3 @@ Handle(Interface_Protocol) StepAP214_Protocol::Resource
return HeaderSection::Protocol();
}
void StepAP214_Protocol::SetSchemaIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.schema", theVal);
mySchemaIVal = theVal;
}
Standard_Integer StepAP214_Protocol::GetSchemaIVal() const
{
return mySchemaIVal;
}

View File

@@ -51,9 +51,7 @@ public:
//! Returns a Resource, given its rank (between 1 and NbResources)
Standard_EXPORT virtual Handle(Interface_Protocol) Resource (const Standard_Integer num) const Standard_OVERRIDE;
Standard_EXPORT void SetSchemaIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetSchemaIVal() const;
DEFINE_STANDARD_RTTIEXT(StepAP214_Protocol,StepData_Protocol)
@@ -65,7 +63,7 @@ protected:
private:
Standard_Integer mySchemaIVal;
};

View File

@@ -38,8 +38,7 @@ IMPLEMENT_STANDARD_RTTIEXT(StepData_StepModel,Interface_InterfaceModel)
StepData_StepModel::StepData_StepModel () :mySourceCodePage((Resource_FormatType)Interface_Static::IVal("read.step.codepage")),
myReadUnitIsInitialized(Standard_False), myWriteUnit (1.)
{
myWriteUnitIVal = Interface_Static::IVal("write.step.unit");
switch (myWriteUnitIVal)
switch (Interface_Static::IVal("write.step.unit"))
{
case 1: myWriteUnit = 25.4; break;
case 2: myWriteUnit = 1.; break;
@@ -248,15 +247,4 @@ void StepData_StepModel::SetWriteLengthUnit(const Standard_Real theUnit)
Standard_Real StepData_StepModel::WriteLengthUnit() const
{
return myWriteUnit;
}
void StepData_StepModel::SetWriteUnitIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.unit", theVal);
myWriteUnitIVal = theVal;
}
Standard_Integer StepData_StepModel::GetWriteUnitIVal() const
{
return myWriteUnitIVal;
}
}

View File

@@ -120,10 +120,6 @@ public:
//! False - the unit value was not initialized, the default value is used
Standard_Boolean IsInitializedUnit() const { return myReadUnitIsInitialized; }
Standard_EXPORT void SetWriteUnitIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetWriteUnitIVal() const;
DEFINE_STANDARD_RTTIEXT(StepData_StepModel,Interface_InterfaceModel)
protected:
@@ -139,7 +135,6 @@ private:
Resource_FormatType mySourceCodePage;
Standard_Boolean myReadUnitIsInitialized;
Standard_Real myWriteUnit;
Standard_Integer myWriteUnitIVal;
};

View File

@@ -107,11 +107,10 @@ Standard_Boolean StepToTopoDS_TranslateCompositeCurve::Init (const Handle(StepGe
Standard_Boolean SurfMode = ( ! S.IsNull() && ! Surf.IsNull() );
Standard_Boolean isClosed = Standard_False;
mySurCurModeIVal = Interface_Static::IVal("read.surfacecurve.mode");
if (SurfMode && mySurCurModeIVal == -3)
{
SurfMode = Standard_False;
if ( SurfMode ) {
Standard_Integer modepcurve = Interface_Static::IVal("read.surfacecurve.mode");
if ( modepcurve ==-3 ) SurfMode = Standard_False;
}
Handle(ShapeExtend_WireData) sbwd = new ShapeExtend_WireData;
@@ -287,14 +286,3 @@ const TopoDS_Wire& StepToTopoDS_TranslateCompositeCurve::Value () const
{
return myWire;
}
void StepToTopoDS_TranslateCompositeCurve::SetSurCurModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.surfacecurve.mode", theVal);
mySurCurModeIVal = theVal;
}
Standard_Integer StepToTopoDS_TranslateCompositeCurve::GetSurCurModeIVal() const
{
return mySurCurModeIVal;
}

View File

@@ -63,11 +63,9 @@ public:
Standard_EXPORT const TopoDS_Wire& Value() const;
//! Returns True if composite_curve contains a segment with infinite parameters.
Standard_Boolean IsInfiniteSegment() const;
Standard_Boolean IsInfiniteSegment() const;
Standard_EXPORT void SetSurCurModeIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetSurCurModeIVal() const;
protected:
@@ -82,7 +80,6 @@ private:
TopoDS_Wire myWire;
Standard_Boolean myInfiniteSegment;
Standard_Integer mySurCurModeIVal
};

View File

@@ -226,7 +226,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac
done = Standard_True;
return;
}
mySurCurModeIVal = Interface_Static::IVal("read.surfacecurve.mode");
Standard_Integer modepcurve = Interface_Static::IVal("read.surfacecurve.mode");
// 0,1 : suivre le code, 2 : ne prendre que pcurve, 3 : ne prendre que C3D
BRep_Builder B;
@@ -498,7 +498,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac
// If modepcurve = 3, PCurve are ignored here
// -----------------------------------------
else if (mySurCurModeIVal == 3) {
else if (modepcurve == 3) {
aTool.ComputePCurve(Standard_True);
hasPcurve = Standard_False;
}
@@ -745,13 +745,3 @@ StepToTopoDS_TranslateEdgeLoopError StepToTopoDS_TranslateEdgeLoop::Error() cons
return myError;
}
void StepToTopoDS_TranslateEdgeLoop::SetSurCurModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.surfacecurve.mode", theVal);
mySurCurModeIVal = theVal;
}
Standard_Integer StepToTopoDS_TranslateEdgeLoop::GetSurCurModeIVal() const
{
return mySurCurModeIVal;
}

View File

@@ -51,9 +51,7 @@ public:
Standard_EXPORT StepToTopoDS_TranslateEdgeLoopError Error() const;
Standard_EXPORT void SetSurCurModeIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetSurCurModeIVal() const;
protected:
@@ -68,7 +66,6 @@ private:
StepToTopoDS_TranslateEdgeLoopError myError;
TopoDS_Shape myResult;
Standard_Integer mySurCurModeIVal;
};

View File

@@ -91,8 +91,7 @@ void TopoDSToStep_MakeStepEdge::Init(const TopoDS_Edge& aEdge,
aTool.SetCurrentEdge(aEdge);
// [BEGIN] Processing non-manifold topology (ssv; 11.11.2010)
myNonmanifoldIVal = Interface_Static::IVal("write.step.nonmanifold");
Standard_Boolean isNMMode = myNonmanifoldIVal != 0;
Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0;
if (isNMMode) {
Handle(StepShape_EdgeCurve) anEC;
Handle(TransferBRep_ShapeMapper) aSTEPMapper = TransferBRep::ShapeMapper(FP, aEdge);
@@ -357,15 +356,3 @@ TopoDSToStep_MakeEdgeError TopoDSToStep_MakeStepEdge::Error() const
{
return myError;
}
void TopoDSToStep_MakeStepEdge::SetNonmanifoldIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.nonmanifold", theVal);
myNonmanifoldIVal = theVal;
}
Standard_Integer TopoDSToStep_MakeStepEdge::GetNonmanifoldIVal() const
{
return myNonmanifoldIVal;
}

View File

@@ -49,9 +49,7 @@ public:
Standard_EXPORT TopoDSToStep_MakeEdgeError Error() const;
Standard_EXPORT void SetNonmanifoldIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetNonmanifoldIVal() const;
protected:
@@ -66,7 +64,6 @@ private:
Handle(StepShape_TopologicalRepresentationItem) myResult;
TopoDSToStep_MakeEdgeError myError;
Standard_Integer myNonmanifoldIVal;
};

View File

@@ -120,7 +120,6 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace,
// --------------------------------------------------------------
//szv#4:S4163:12Mar99 SGI warns
myNonmanifoldIVal = Interface_Static::IVal("write.step.nonmanifold");
TopoDS_Shape sh = aFace.Oriented(TopAbs_FORWARD);
const TopoDS_Face ForwardFace = TopoDS::Face(sh);
aTool.SetCurrentFace(ForwardFace);
@@ -128,7 +127,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace,
new TransferBRep_ShapeMapper(aFace); // on ne sait jamais
// [BEGIN] Processing non-manifold topology (another approach) (ssv; 10.11.2010)
Standard_Boolean isNMMode = myNonmanifoldIVal != 0;
Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0;
if (isNMMode) {
Handle(StepShape_AdvancedFace) anAF;
Handle(TransferBRep_ShapeMapper) aSTEPMapper = TransferBRep::ShapeMapper(FP, aFace);
@@ -525,14 +524,3 @@ TopoDSToStep_MakeFaceError TopoDSToStep_MakeStepFace::Error() const
{
return myError;
}
void TopoDSToStep_MakeStepFace::SetNonmanifoldIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.nonmanifold", theVal);
myNonmanifoldIVal = theVal;
}
Standard_Integer TopoDSToStep_MakeStepFace::GetNonmanifoldIVal() const
{
return myNonmanifoldIVal;
}

View File

@@ -49,9 +49,7 @@ public:
Standard_EXPORT TopoDSToStep_MakeFaceError Error() const;
Standard_EXPORT void SetNonmanifoldIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetNonmanifoldIVal() const;
protected:
@@ -66,7 +64,6 @@ private:
Handle(StepShape_TopologicalRepresentationItem) myResult;
TopoDSToStep_MakeFaceError myError;
Standard_Integer myNonmanifoldIVal;
};

View File

@@ -59,11 +59,11 @@ void TopoDSToStep_MakeStepVertex::Init(const TopoDS_Vertex& aVertex,
TopoDSToStep_Tool& aTool,
const Handle(Transfer_FinderProcess)& FP)
{
myNonmanifoldIVal = Interface_Static::IVal("write.step.nonmanifold");
aTool.SetCurrentVertex(aVertex);
// [BEGIN] Processing non-manifold topology (ssv; 11.11.2010)
Standard_Boolean isNMMode = myNonmanifoldIVal != 0;
Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0;
if (isNMMode) {
Handle(StepShape_VertexPoint) aVP;
Handle(TransferBRep_ShapeMapper) aSTEPMapper = TransferBRep::ShapeMapper(FP, aVertex);
@@ -124,13 +124,3 @@ TopoDSToStep_MakeVertexError TopoDSToStep_MakeStepVertex::Error() const
return myError;
}
void TopoDSToStep_MakeStepVertex::SetNonmanifoldIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.nonmanifold", theVal);
myNonmanifoldIVal = theVal;
}
Standard_Integer TopoDSToStep_MakeStepVertex::GetNonmanifoldIVal() const
{
return myNonmanifoldIVal;
}

View File

@@ -49,9 +49,7 @@ public:
Standard_EXPORT TopoDSToStep_MakeVertexError Error() const;
Standard_EXPORT void SetNonmanifoldIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetNonmanifoldIVal() const;
protected:
@@ -66,7 +64,6 @@ private:
Handle(StepShape_TopologicalRepresentationItem) myResult;
TopoDSToStep_MakeVertexError myError;
Standard_Integer myNonmanifoldIVal;
};

View File

@@ -338,9 +338,3 @@ Standard_Integer TopoDSToStep_Tool::PCurveMode () const
{
return myPCurveMode;
}
void TopoDSToStep_Tool::SetPCurveMode(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.surfacecurve.mode", theVal);
myPCurveMode = theVal;
}

View File

@@ -89,7 +89,7 @@ public:
//! (initialized by parameter write.surfacecurve.mode)
Standard_EXPORT Standard_Integer PCurveMode() const;
Standard_EXPORT void SetPCurveMode(const Standard_Integer theVal);
protected:

View File

@@ -72,8 +72,6 @@ IMPLEMENT_STANDARD_RTTIEXT(XSAlgo_AlgoContainer,Standard_Transient)
//=======================================================================
XSAlgo_AlgoContainer::XSAlgo_AlgoContainer()
{
myParModeIVal = Interface_Static::IVal("read.stdsameparameter.mode");
myUnitIVal = Interface_Static::IVal("xstep.cascade.unit");
myTC = new XSAlgo_ToolContainer;
}
@@ -84,7 +82,7 @@ XSAlgo_AlgoContainer::XSAlgo_AlgoContainer()
void XSAlgo_AlgoContainer::PrepareForTransfer() const
{
UnitsMethods::SetCasCadeLengthUnit(myUnitIVal);
UnitsMethods::SetCasCadeLengthUnit(Interface_Static::IVal("xstep.cascade.unit"));
}
//=======================================================================
@@ -359,7 +357,7 @@ Standard_Boolean XSAlgo_AlgoContainer::CheckPCurve (const TopoDS_Edge& E,
B.Range(edge,face,w1,w2);
B.SameRange(edge, Standard_False );
//:S4136
Standard_Integer SPmode = myParModeIVal;
Standard_Integer SPmode = Interface_Static::IVal("read.stdsameparameter.mode");
if ( SPmode )
B.SameParameter (edge, Standard_False );
@@ -568,25 +566,3 @@ void XSAlgo_AlgoContainer::MergeTransferInfo(const Handle(Transfer_FinderProcess
}
}
}
void XSAlgo_AlgoContainer::SetParModeIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("read.stdsameparameter.mode", theVal);
myParModeIVal = theVal;
}
void XSAlgo_AlgoContainer::SetUnitIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("xstep.cascade.unit", theVal);
myUnitIVal = theVal;
}
Standard_Integer XSAlgo_AlgoContainer::GetParModeIVal() const
{
return myParModeIVal;
}
Standard_EXPORT Standard_Integer XSAlgo_AlgoContainer::GetUnitIVal() const
{
return myUnitIVal;
}

View File

@@ -82,13 +82,7 @@ public:
//! from item startTPitem
Standard_EXPORT virtual void MergeTransferInfo (const Handle(Transfer_FinderProcess)& FP, const Handle(Standard_Transient)& info) const;
Standard_EXPORT void SetParModeIVal(const Standard_Integer theVal);
Standard_EXPORT void SetUnitIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetParModeIVal() const;
Standard_EXPORT Standard_Integer GetUnitIVal() const;
DEFINE_STANDARD_RTTIEXT(XSAlgo_AlgoContainer,Standard_Transient)
@@ -102,8 +96,6 @@ private:
Handle(XSAlgo_ToolContainer) myTC;
Standard_Integer myParModeIVal;
Standard_Integer myUnitIVal;
};

View File

@@ -22,8 +22,6 @@
inline void XSAlgo_AlgoContainer::SetToolContainer(const Handle(XSAlgo_ToolContainer)& TC)
{
myParModeIVal = Interface_Static::IVal("read.stdsameparameter.mode");
myUnitIVal = Interface_Static::IVal("xstep.cascade.unit");
myTC = TC;
}

View File

@@ -145,7 +145,7 @@ IFSelect_ReturnStatus XSControl_TransferWriter::TransferWriteShape
if (theModel.IsNull()) return IFSelect_RetVoid;
TopoDS_Shape aShape = theShape;
Standard_Boolean isNMMode = myNonmanifoldIVal != 0;
Standard_Boolean isNMMode = Interface_Static::IVal("write.step.nonmanifold") != 0;
if (isNMMode)
{
ShapeUpgrade_RemoveLocations aRemLoc;
@@ -222,14 +222,3 @@ Interface_CheckIterator XSControl_TransferWriter::ResultCheckList
}
return chl;
}
void XSControl_TransferWriter::SetNonmanifoldIVal(const Standard_Integer theVal)
{
Interface_Static::SetIVal("write.step.nonmanifold", theVal);
myNonmanifoldIVal = theVal;
}
Standard_Integer XSControl_TransferWriter::GetNonmanifoldIVal() const
{
return myNonmanifoldIVal;
}

View File

@@ -22,7 +22,6 @@
#include <Standard_Transient.hxx>
#include <IFSelect_ReturnStatus.hxx>
#include <Interface_Static.hxx>
#include <Transfer_FinderProcess.hxx>
class XSControl_Controller;
class Interface_InterfaceModel;
@@ -66,7 +65,6 @@ class XSControl_TransferWriter : public Standard_Transient
void SetController (const Handle(XSControl_Controller)& theCtl)
{
myController = theCtl;
myNonmanifoldIVal = Interface_Static::IVal("write.step.nonmanifold");
Clear(-1);
}
@@ -129,10 +127,6 @@ class XSControl_TransferWriter : public Standard_Transient
//! instead of keeping the original Mapper, whenever known
Standard_EXPORT Interface_CheckIterator ResultCheckList (const Handle(Interface_InterfaceModel)& theModel) const;
Standard_EXPORT void SetNonmanifoldIVal(const Standard_Integer theVal);
Standard_EXPORT Standard_Integer GetNonmanifoldIVal() const;
DEFINE_STANDARD_RTTIEXT(XSControl_TransferWriter,Standard_Transient)
private:
@@ -140,7 +134,6 @@ class XSControl_TransferWriter : public Standard_Transient
Handle(XSControl_Controller) myController;
Handle(Transfer_FinderProcess) myTransferWriter;
Standard_Integer myTransferMode;
Standard_Integer myNonmanifoldIVal;
};
#endif // _XSControl_TransferWriter_HeaderFile

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
#jmu
#pro18457

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "PRO15946"
puts "Fuse"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "============"
puts "OCC12918"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "============"
puts "OCC697"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "============"
puts "OCC697"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "============"
puts "OCC697"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "============"
puts "OCC697"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "=========="
puts "OCC22829"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "================"
puts "OCC24003"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "================"
puts "OCC25625"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "=========="
puts "OCC24161"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "========"
puts "OCC28283"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO OCC21134 ALL: Error: checkshape command does not return faulty shapes"
puts "============"

View File

@@ -3,7 +3,7 @@ puts "0025082: bopcommon returns different result on Windows and Linux system"
puts "========"
puts ""
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
restore [locate_data_file bug25054_shape1.brep] b1
restore [locate_data_file bug25054_shape2.brep] b2

View File

@@ -3,7 +3,7 @@ puts "0025082: bopcommon returns different result on Windows and Linux system"
puts "========"
puts ""
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
restore [locate_data_file bug25054_shape1.brep] b1
restore [locate_data_file bug25054_shape2.brep] b2

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "========"
puts "OCC28150"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 All: Intersection of pair of shapes has failed"
##puts "TODO CR29596 All: Intersection of pair of shapes has failed"
puts "========"
puts "OCC29900: Invalid result of FUSE operation"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "============================================================================================="
puts "0030559: BOP Fuse: result is inconsistent"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "========"
puts "30760: Modeling Algorithms - Intersection fails in Occt 7.3.0"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "=========================================="
puts "0031890: Invalid result of common fuse BOP"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "================"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO OCC12345 ALL: Faulty shapes in variables faulty_1 to faulty_"
puts "================"

View File

@@ -6,8 +6,9 @@ puts ""
## Wrong section curves
###############################
puts "TODO OCC29501 ALL: Error in ii12_22"
puts "TODO OCC29501 All: Error: The curve ii12_22 is possible"
pload QAcommands
##puts "TODO OCC29501 ALL: Error in ii12_22"
##puts "TODO OCC29501 All: Error: The curve ii12_22 is possible"
set MaxToler 1.5e-4
restore [locate_data_file bug24472_Pipe_1.brep] b1
@@ -26,6 +27,9 @@ puts "First test"
intersect ii12 s1 s2
foreach c [directory ii12*] {
puts "Curve $c"
bounds $c U1 U2
if {[dval U2-U1] < 1.0e-9} {
@@ -33,7 +37,7 @@ foreach c [directory ii12*] {
}
# cos(~75.5deg)
CheckLoops $c 0.25
OCC24472 $c 0.25
xdistcs $c s1 U1 U2 10 $MaxToler
xdistcs $c s2 U1 U2 10 $MaxToler
@@ -55,6 +59,9 @@ puts "Third test"
intersect ii13 s1 s3
foreach c [directory ii13*] {
puts "Curve $c"
bounds $c U1 U2
if {[dval U2-U1] < 1.0e-9} {
@@ -62,7 +69,7 @@ foreach c [directory ii13*] {
}
# cos(~75.5deg)
CheckLoops $c 0.25
OCC24472 $c 0.25
xdistcs $c s1 U1 U2 10 $MaxToler
xdistcs $c s2 U1 U2 10 $MaxToler

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO OCC11111 ALL: Error : is WRONG because number of "
puts "============"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO OCC11111 ALL: Error : is WRONG because number of "
puts "============"

View File

@@ -1,4 +1,4 @@
puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
##puts "TODO CR29596 ALL: Warning: Intersection of pair of shapes has failed"
puts "TODO OCC11111 ALL: Error : is WRONG because number of "
puts "============"

Some files were not shown because too many files have changed in this diff Show More