void BRepFeat_SplitShape::Build ()
{
mySShape.Perform(myWOnShape);
- if (mySShape.IsDone()) {
- Done();
+ if (mySShape.IsDone())
+ {
myShape = mySShape.ResultingShape();
+ Done();
}
}
#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>
// ----------------------------
if (!myOffsetShape.IsNull()) {
UpdateTolerance (myOffsetShape,myFaces);
- BRepLib::UpdateTolerances( myOffsetShape );
}
CorrectConicalFaces();
+ BRepLib_ToleranceRule::SetProperTolerances(myOffsetShape);
myDone = Standard_True;
}
---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;
myNbBranches : Integer from Standard;
myIndices : HArray1OfInteger from TColStd;
myDone : Boolean from Standard;
+ myProtectedFromModificationShapes : IndexedMapOfShape from TopTools;
end Blend;
#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>
const Standard_Real Tol,
const Standard_Boolean NUBS)
{
+ TopExp::MapShapes(S, myProtectedFromModificationShapes);
+ //
myAsDes = new BRepAlgo_AsDes();
Init(S,Radius,Tol,NUBS);
}
const Standard_Real Tol,
const Standard_Boolean NUBS)
{
+ TopExp::MapShapes(S, myProtectedFromModificationShapes);
+ //
Clear();
myShape = S;
myTol = Tol;
// 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);
#endif
}
+//=======================================================================
+//function : IsProtectedFromModification
+//purpose :
+//=======================================================================
+Standard_Boolean BiTgte_Blend::IsProtectedFromModification(
+ const TopoDS_Shape & theS) const
+{
+ return myProtectedFromModificationShapes.Contains(theS);
+}
//=======================================================================
//function : ComputeSurfaces
#include <TopExp.hxx>
#include <Standard_ConstructionError.hxx>
+#include <BRepLib_ToleranceRule.hxx>
// Modified by skv - Mon May 31 13:00:30 2004 OCC5865 Begin
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);
}
}
+ BRepLib_ToleranceRule::SetProperTolerances(myRes);
myDone = Standard_True;
}
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;
#include <TopExp_Explorer.hxx>
#include <BRep_Builder.hxx>
+#include <BRepBuilderAPI_Copy.hxx>
#include <BRep_Tool.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
//=======================================================================
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);
}
}
//=======================================================================
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);
}
//=======================================================================
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)) {
}
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 {
//=======================================================================
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);
}
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
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
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
if [catch { myoffset result con1 5 0 } catch_result] {
puts "${BugNumber}: Faulty (1)"
} else {
+checkshape result
set square 32396.2