mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
Tolerance post Build (Perform) fix was changed for BRepOffset_MakeOffset.
Standard_Boolean parameter theCopy with default value Standard_False was added to methods LocOpe_WiresOnShape::Bind to determine whether bind passing shape or its copy. Tolerance post Build (Perform) fix was created for - BiTgte_Blend, - LocOpe_Spliter. Commands checkshape were added to tests: - bugs modalg_2 bug22864, - bug22946, - modalg_4 bug8842_1. Minor change in BRepFeat_SplitShape.cxx.
This commit is contained in:
parent
85c81d703f
commit
8415a280ed
@ -33,9 +33,10 @@
|
||||
void BRepFeat_SplitShape::Build ()
|
||||
{
|
||||
mySShape.Perform(myWOnShape);
|
||||
if (mySShape.IsDone()) {
|
||||
Done();
|
||||
if (mySShape.IsDone())
|
||||
{
|
||||
myShape = mySShape.ResultingShape();
|
||||
Done();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include <BRepCheck_Vertex.hxx>
|
||||
#include <BRepLib.hxx>
|
||||
#include <BRepLib_MakeVertex.hxx>
|
||||
#include <BRepLib_ToleranceRule.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRep_TVertex.hxx>
|
||||
@ -761,10 +762,10 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
|
||||
// ----------------------------
|
||||
if (!myOffsetShape.IsNull()) {
|
||||
UpdateTolerance (myOffsetShape,myFaces);
|
||||
BRepLib::UpdateTolerances( myOffsetShape );
|
||||
}
|
||||
|
||||
CorrectConicalFaces();
|
||||
BRepLib_ToleranceRule::SetProperTolerances(myOffsetShape);
|
||||
|
||||
myDone = Standard_True;
|
||||
}
|
||||
|
@ -308,6 +308,9 @@ is
|
||||
---Purpose: Computes the center lines
|
||||
is static;
|
||||
|
||||
IsProtectedFromModification(me; theS : Shape from TopoDS) returns Boolean from Standard;
|
||||
---Purpose: Indicates if theS is protected from modification.
|
||||
|
||||
ComputeSurfaces( me : in out)
|
||||
---Purpose: Perform the generated surfaces.
|
||||
is static private;
|
||||
@ -359,5 +362,6 @@ fields
|
||||
myNbBranches : Integer from Standard;
|
||||
myIndices : HArray1OfInteger from TColStd;
|
||||
myDone : Boolean from Standard;
|
||||
myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
|
||||
|
||||
end Blend;
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRepLib_MakeEdge.hxx>
|
||||
#include <BRepLib_ToleranceRule.hxx>
|
||||
#include <BRepOffset_DataMapOfShapeOffset.hxx>
|
||||
#include <BRepOffset_DataMapIteratorOfDataMapOfShapeOffset.hxx>
|
||||
#include <BRepOffset_Offset.hxx>
|
||||
@ -844,6 +845,8 @@ BiTgte_Blend::BiTgte_Blend(const TopoDS_Shape& S,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean NUBS)
|
||||
{
|
||||
TopExp::MapShapes(S, myProtectedFromModificationShapes);
|
||||
//
|
||||
myAsDes = new BRepAlgo_AsDes();
|
||||
Init(S,Radius,Tol,NUBS);
|
||||
}
|
||||
@ -859,6 +862,8 @@ void BiTgte_Blend::Init(const TopoDS_Shape& S,
|
||||
const Standard_Real Tol,
|
||||
const Standard_Boolean NUBS)
|
||||
{
|
||||
TopExp::MapShapes(S, myProtectedFromModificationShapes);
|
||||
//
|
||||
Clear();
|
||||
myShape = S;
|
||||
myTol = Tol;
|
||||
@ -1060,6 +1065,7 @@ void BiTgte_Blend::Perform(const Standard_Boolean BuildShape)
|
||||
// Finally construct curves 3d from edges to be transfered
|
||||
// since the partition is provided ( A Priori);
|
||||
BRepLib::BuildCurves3d(myResult, Precision::Confusion());
|
||||
BRepLib_ToleranceRule::SetProperTolerances(myResult, *this);
|
||||
|
||||
#ifdef DEB
|
||||
ChFi3d_ResultChron(cl_total, t_total);
|
||||
@ -1855,6 +1861,15 @@ void BiTgte_Blend::ComputeCenters()
|
||||
#endif
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsProtectedFromModification
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean BiTgte_Blend::IsProtectedFromModification(
|
||||
const TopoDS_Shape & theS) const
|
||||
{
|
||||
return myProtectedFromModificationShapes.Contains(theS);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ComputeSurfaces
|
||||
|
@ -56,6 +56,7 @@
|
||||
#include <TopExp.hxx>
|
||||
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <BRepLib_ToleranceRule.hxx>
|
||||
|
||||
|
||||
// Modified by skv - Mon May 31 13:00:30 2004 OCC5865 Begin
|
||||
@ -99,6 +100,8 @@ void LocOpe_Spliter::Perform(const Handle(LocOpe_ProjectedWires)& PW)
|
||||
BRepTools_Substitution theSubs;
|
||||
BRep_Builder BB;
|
||||
|
||||
// LocOpe_ProjectedWires::InitEdgeIterator() is much more then simple
|
||||
// initialization.
|
||||
for (PW->InitEdgeIterator(); PW->MoreEdge(); PW->NextEdge()) {
|
||||
const TopoDS_Edge& edg = PW->Edge();
|
||||
mapE.Add(edg);
|
||||
@ -432,6 +435,7 @@ void LocOpe_Spliter::Perform(const Handle(LocOpe_ProjectedWires)& PW)
|
||||
}
|
||||
}
|
||||
|
||||
BRepLib_ToleranceRule::SetProperTolerances(myRes);
|
||||
myDone = Standard_True;
|
||||
}
|
||||
|
||||
|
@ -55,23 +55,24 @@ is
|
||||
is static;
|
||||
|
||||
Bind(me: mutable; W: Wire from TopoDS;
|
||||
F: Face from TopoDS)
|
||||
F : Face from TopoDS; theCopy : Boolean from Standard = Standard_False)
|
||||
|
||||
is static;
|
||||
|
||||
Bind(me: mutable; Comp: Compound from TopoDS;
|
||||
F: Face from TopoDS)
|
||||
F : Face from TopoDS; theCopy : Boolean from Standard = Standard_False)
|
||||
|
||||
is static;
|
||||
|
||||
Bind(me: mutable; E: Edge from TopoDS;
|
||||
F: Face from TopoDS)
|
||||
F : Face from TopoDS; theCopy : Boolean from Standard = Standard_False)
|
||||
|
||||
is static;
|
||||
|
||||
|
||||
Bind(me: mutable; EfromW: Edge from TopoDS;
|
||||
EonFace: Edge from TopoDS)
|
||||
EonFace: Edge from TopoDS;
|
||||
theCopy : Boolean from Standard = Standard_False)
|
||||
|
||||
is static;
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include <TopExp_Explorer.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRepBuilderAPI_Copy.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <TopTools_MapOfShape.hxx>
|
||||
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
|
||||
@ -117,10 +118,10 @@ void LocOpe_WiresOnShape::Init(const TopoDS_Shape& S)
|
||||
//=======================================================================
|
||||
|
||||
void LocOpe_WiresOnShape::Bind(const TopoDS_Wire& W,
|
||||
const TopoDS_Face& F)
|
||||
const TopoDS_Face & F, Standard_Boolean theCopy)
|
||||
{
|
||||
for (TopExp_Explorer exp(W, TopAbs_EDGE); exp.More(); exp.Next()) {
|
||||
Bind(TopoDS::Edge(exp.Current()),F);
|
||||
Bind(TopoDS::Edge(exp.Current()), F, theCopy);
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,10 +131,10 @@ void LocOpe_WiresOnShape::Bind(const TopoDS_Wire& W,
|
||||
//=======================================================================
|
||||
|
||||
void LocOpe_WiresOnShape::Bind(const TopoDS_Compound& Comp,
|
||||
const TopoDS_Face& F)
|
||||
const TopoDS_Face & F, Standard_Boolean theCopy)
|
||||
{
|
||||
for (TopExp_Explorer exp(Comp, TopAbs_EDGE); exp.More(); exp.Next()) {
|
||||
Bind(TopoDS::Edge(exp.Current()),F);
|
||||
Bind(TopoDS::Edge(exp.Current()), F, theCopy);
|
||||
}
|
||||
myFacesWithSection.Add(F);
|
||||
}
|
||||
@ -144,7 +145,7 @@ void LocOpe_WiresOnShape::Bind(const TopoDS_Compound& Comp,
|
||||
//=======================================================================
|
||||
|
||||
void LocOpe_WiresOnShape::Bind(const TopoDS_Edge& E,
|
||||
const TopoDS_Face& F)
|
||||
const TopoDS_Face & F, Standard_Boolean theCopy)
|
||||
{
|
||||
// if (!myMapEF.IsBound(E)) {
|
||||
if (!myMapEF.Contains(E)) {
|
||||
@ -157,7 +158,12 @@ void LocOpe_WiresOnShape::Bind(const TopoDS_Edge& E,
|
||||
}
|
||||
if (!exp.More()) {
|
||||
// myMapEF.Bind(E,F);
|
||||
myMapEF.Add(E,F);
|
||||
TopoDS_Shape anE = E;
|
||||
if (theCopy)
|
||||
{
|
||||
anE = BRepBuilderAPI_Copy(E).Shape();
|
||||
}
|
||||
myMapEF.Add(anE, F);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -172,12 +178,17 @@ void LocOpe_WiresOnShape::Bind(const TopoDS_Edge& E,
|
||||
//=======================================================================
|
||||
|
||||
void LocOpe_WiresOnShape::Bind(const TopoDS_Edge& Ewir,
|
||||
const TopoDS_Edge& Efac)
|
||||
const TopoDS_Edge & Efac, Standard_Boolean theCopy)
|
||||
{
|
||||
if (Ewir.IsSame(Efac)) {
|
||||
return;
|
||||
}
|
||||
myMap.Bind(Ewir,Efac);
|
||||
TopoDS_Shape anE = Ewir;
|
||||
if (theCopy)
|
||||
{
|
||||
anE = BRepBuilderAPI_Copy(Ewir).Shape();
|
||||
}
|
||||
myMap.Bind(anE, Efac);
|
||||
}
|
||||
|
||||
|
||||
|
@ -9,7 +9,9 @@ puts ""
|
||||
set BugNumber OCC22864
|
||||
|
||||
restore [locate_data_file bug22864_face1.brep] f1
|
||||
checkshape f1
|
||||
restore [locate_data_file bug22864_face2.brep] f2
|
||||
checkshape f2
|
||||
|
||||
shape aShape C
|
||||
add f1 aShape
|
||||
@ -33,6 +35,7 @@ set Numbers 11
|
||||
for {set i 0} {$i < ${Numbers}} {incr i} {
|
||||
puts "i=$i"
|
||||
rollingball result aShape 15 @ f1 f2
|
||||
checkshape result
|
||||
|
||||
set nb_info [nbshapes result]
|
||||
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v
|
||||
|
@ -9,9 +9,12 @@ puts ""
|
||||
set BugNumber OCC22946
|
||||
|
||||
restore [locate_data_file OCC22946-FaceWithNewCurves.brep] a
|
||||
checkshape a
|
||||
restore [locate_data_file OCC22946-CompoundWithoutPcurves.brep] b
|
||||
checkshape b
|
||||
|
||||
splitshape result a a b
|
||||
checkshape result
|
||||
|
||||
set square 6.06498e+08
|
||||
set 3dviewer 0
|
||||
|
@ -33,6 +33,7 @@ puts " cone_CATIA + 5"
|
||||
if [catch { myoffset result con1 5 0 } catch_result] {
|
||||
puts "${BugNumber}: Faulty (1)"
|
||||
} else {
|
||||
checkshape result
|
||||
|
||||
set square 32396.2
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user