1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-18 14:27:39 +03:00

Compare commits

...

10 Commits

Author SHA1 Message Date
akaftasev
ce4d294074 0033306: Modeling Algorithm - Crash in TrimEdge() method
Added condition to not cut the edges by closely located parameters
2023-01-09 21:44:11 +00:00
akaftasev
9f338a00a1 0033298: Modeling Algorithm - Offset operation gives wrong result
Process only those images of the faces, if one if them has anInsideEdges/anInsideVertices and the other is not.
2023-01-03 18:01:14 +00:00
akaftasev
a011359b8a 0033227: Modeling Algorithm - BOPAlgo_BuilderSolid generates incomplete result
Deleted outer loop for shells.
Added additional check of edges orientation for RefineShell().
2023-01-03 18:01:05 +00:00
msv
42e4ae96ae 0033304: Modeling Data - Floating point signal when converting a B-spline curve to analytical form
Protect the static function ConicDefinition from calling sqrt with negative argument.
2023-01-03 18:00:55 +00:00
akaftasev
686926c0a9 0033247: Modeling Algorithm - BOP report small edges problem and produce empty result
Build shifted pcurve for ellipse and circle cases.
2022-12-22 16:20:54 +00:00
akaftasev
a638dd6224 0033265: Modeling Algorithms - Boolean operation hangs on the attached shapes
Added test case.
2022-12-16 14:28:08 +00:00
ifv
961a306dc4 0033244: Modeling Algorithms - Surface-surface intersection produces the double curves
IntAna_QuadQuadGeo.cxx - estimation of angular tolerance is added for case cone-cone

tests/lowalgos/intss/bug33244 - new test case added
2022-12-12 10:27:10 +03:00
ifv
195a068c4f 0030781: Sweep algorithm creates non-planar edges (orig. BOPAlgo_MakerVolume fails to build a solid)
BRepFill/BRepFill_AdvancedEvolved.cxx - estimation of angular tolerance is added in method GetLids()

tests/evolved/voluved/bug30781 - new test added
2022-12-10 14:04:53 +00:00
dpasukhi
669e0dfc17 0033246: Data Exchange, DE Wrapper - Checking license leads to performance problem
ReWork UpdateLoad functionality:
UpdateLoad calls only if provider is found.
UpdateLoad calls only for chosen type of translation (read/write)
Add new method to UpdateLoad all registered nodes.
2022-12-10 14:02:56 +00:00
nunomsil
74cb5673a5 0031919: Modeling Algorithms - General Fuse raises exception on attempt to imprint a contour to a shell
Exception no longer occurs in current version. However, fuzzyvalue should be set to 1 for the result of the operation to make sense (result of common is 1 wire). Test case added
2022-12-07 14:45:36 +00:00
33 changed files with 686 additions and 257 deletions

View File

@@ -248,167 +248,178 @@ void BOPAlgo_ShellSplitter::SplitBlock(BOPTools_ConnexityBlock& aCB)
//
// Build the shells
aItF.Initialize (aLFConnected);
for (i = 1; aItF.More() && !bAllFacesTaken; aItF.Next(), ++i) {
for (i = 1; aItF.More() && !bAllFacesTaken; aItF.Next(), ++i)
{
const TopoDS_Shape& aFF = aItF.Value();
if (!AddedFacesMap.Add(aFF)) {
continue;
}
//
// make a new shell
TopoDS_Shell aShellStart;
aBB.MakeShell(aShellStart);
aBB.Add(aShellStart, aFF);
TopoDS_Shell aShell;
aBB.MakeShell(aShell);
aBB.Add(aShell, aFF);
aMEFP.Clear();
TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEFP);
//
TopTools_ListOfShape aLShells;
aLShells.Append(aShellStart);
//
TopTools_ListIteratorOfListOfShape aItLShells(aLShells);
for (; aItLShells.More(); aItLShells.Next()) {
TopoDS_Shell& aShell = TopoDS::Shell(aItLShells.ChangeValue());
// loop on faces added to Shell;
// add their neighbor faces to Shell and so on
aItS.Initialize(aShell);
for (; aItS.More(); aItS.Next()) {
const TopoDS_Face& aF = (*(TopoDS_Face*)(&aItS.Value()));
Standard_Boolean isBoundary = aBoundaryFaces.Contains (aF);
//
aMEFP.Clear();
TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aMEFP);
//
// loop on faces added to Shell;
// add their neighbor faces to Shell and so on
aItS.Initialize(aShell);
for (; aItS.More(); aItS.Next()) {
const TopoDS_Face& aF = (*(TopoDS_Face*)(&aItS.Value()));
Standard_Boolean isBoundary = aBoundaryFaces.Contains (aF);
// loop on edges of aF; find a good neighbor face of aF by aE
aExp.Init(aF, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Edge& aE = (*(TopoDS_Edge*)(&aExp.Current()));
//
// loop on edges of aF; find a good neighbor face of aF by aE
aExp.Init(aF, TopAbs_EDGE);
for (; aExp.More(); aExp.Next()) {
const TopoDS_Edge& aE = (*(TopoDS_Edge*)(&aExp.Current()));
//
// proceed only free edges in this shell
if (aMEFP.Contains(aE)) {
const TopTools_ListOfShape& aLFP = aMEFP.FindFromKey(aE);
aNbFP = aLFP.Extent();
if (aNbFP > 1) {
continue;
}
}
// avoid processing of internal edges
anOr = aE.Orientation();
if (anOr == TopAbs_INTERNAL) {
// proceed only free edges in this shell
if (aMEFP.Contains(aE)) {
const TopTools_ListOfShape& aLFP = aMEFP.FindFromKey(aE);
aNbFP = aLFP.Extent();
if (aNbFP > 1) {
continue;
}
// avoid processing of degenerated edges
if (BRep_Tool::Degenerated(aE)) {
}
// avoid processing of internal edges
anOr = aE.Orientation();
if (anOr == TopAbs_INTERNAL) {
continue;
}
// avoid processing of degenerated edges
if (BRep_Tool::Degenerated(aE)) {
continue;
}
//
// candidate faces list
const TopTools_ListOfShape& aLF = aEFMap.FindFromKey(aE);
aNbLF = aLF.Extent();
if (!aNbLF) {
continue;
}
//
// prepare for selecting the next face
// take only not-processed faces as a candidates
BOPTools_ListOfCoupleOfShape aLCSOff;
//
Standard_Integer aNbWaysInside = 0;
TopoDS_Face aSelF;
TopTools_ListIteratorOfListOfShape aItLF(aLF);
for (; aItLF.More(); aItLF.Next()) {
const TopoDS_Face& aFL = (*(TopoDS_Face*)(&aItLF.Value()));
if (aF.IsSame(aFL) || AddedFacesMap.Contains(aFL)) {
continue;
}
//
// candidate faces list
const TopTools_ListOfShape& aLF = aEFMap.FindFromKey(aE);
aNbLF = aLF.Extent();
if (!aNbLF) {
// find current edge in the face
if (!BOPTools_AlgoTools::GetEdgeOff(aE, aFL, aEL)) {
continue;
}
//
// prepare for selecting the next face
// take only not-processed faces as a candidates
BOPTools_ListOfCoupleOfShape aLCSOff;
//
Standard_Integer aNbWaysInside = 0;
TopoDS_Face aSelF;
TopTools_ListIteratorOfListOfShape aItLF(aLF);
for (; aItLF.More(); aItLF.Next()) {
const TopoDS_Face& aFL = (*(TopoDS_Face*)(&aItLF.Value()));
if (aF.IsSame(aFL) || AddedFacesMap.Contains(aFL)) {
continue;
}
//
// find current edge in the face
if (!BOPTools_AlgoTools::GetEdgeOff(aE, aFL, aEL)) {
continue;
}
//
if (isBoundary && !aBoundaryFaces.Contains (aFL))
{
++aNbWaysInside;
aSelF = aFL;
}
aCSOff.SetShape1(aEL);
aCSOff.SetShape2(aFL);
aLCSOff.Append(aCSOff);
}//for (; aItLF.More(); aItLF.Next()) {
//
aNbOff = aLCSOff.Extent();
if (!aNbOff){
continue;
}
//
// among all the adjacent faces chose one with the minimal
// angle to the current one
if (!isBoundary || aNbWaysInside != 1)
if (isBoundary && !aBoundaryFaces.Contains (aFL))
{
if (aNbOff == 1) {
aSelF = (*(TopoDS_Face*)(&aLCSOff.First().Shape2()));
}
else if (aNbOff > 1) {
BOPTools_AlgoTools::GetFaceOff(aE, aF, aLCSOff, aSelF, aContext);
}
++aNbWaysInside;
aSelF = aFL;
}
//
if (!aSelF.IsNull() && AddedFacesMap.Add(aSelF)) {
aBB.Add(aShell, aSelF);
TopExp::MapShapesAndAncestors(aSelF, TopAbs_EDGE, TopAbs_FACE, aMEFP);
}
} // for (; aExp.More(); aExp.Next()) {
} // for (; aItS.More(); aItS.Next()) {
//
// split the shell on multi-connected edges
TopTools_ListOfShape aLShSp;
RefineShell(aShell, aMEFP, aLShSp);
//
// collect the not closed shells for further processing
TopTools_ListOfShape aLShNC;
//
TopTools_ListIteratorOfListOfShape aItLShSp(aLShSp);
for (; aItLShSp.More(); aItLShSp.Next()) {
TopoDS_Shell& aShSp = *((TopoDS_Shell*)&aItLShSp.Value());
aCSOff.SetShape1(aEL);
aCSOff.SetShape2(aFL);
aLCSOff.Append(aCSOff);
}//for (; aItLF.More(); aItLF.Next()) {
//
if (BRep_Tool::IsClosed(aShSp)) {
aShSp.Closed(Standard_True);
myLoops.Append(aShSp);
aNbOff = aLCSOff.Extent();
if (!aNbOff){
continue;
}
else {
aLShNC.Append(aShSp);
}
}
//
bAllFacesTaken = (AddedFacesMap.Extent() == aNbShapes);
if (bAllFacesTaken) {
break;
}
//
if (aLShSp.Extent() == 1) {
// not further processing of not closed shells is needed,
// as it will not bring any new results
continue;
}
//
Standard_Integer aNbShNC = aLShNC.Extent();
if (aNbShNC == 1) {
// try to complete the shell with other faces
aLShells.Append(aLShNC);
}
else if (aNbShNC > 1) {
// remove th faces of not closed shells from the map of processed faces
// and try to rebuild the shells using all not processed faces,
// because faces of one shell might be needed for building the other
TopTools_ListIteratorOfListOfShape aItLShNC(aLShNC);
for (; aItLShNC.More(); aItLShNC.Next()) {
TopoDS_Iterator aItNC(aItLShNC.Value());
for (; aItNC.More(); aItNC.Next()) {
AddedFacesMap.Remove(aItNC.Value());
//
// among all the adjacent faces chose one with the minimal
// angle to the current one
if (!isBoundary || aNbWaysInside != 1)
{
if (aNbOff == 1) {
aSelF = (*(TopoDS_Face*)(&aLCSOff.First().Shape2()));
}
else if (aNbOff > 1) {
BOPTools_AlgoTools::GetFaceOff(aE, aF, aLCSOff, aSelF, aContext);
}
}
//
if (!aSelF.IsNull() && AddedFacesMap.Add(aSelF)) {
aBB.Add(aShell, aSelF);
TopExp::MapShapesAndAncestors(aSelF, TopAbs_EDGE, TopAbs_FACE, aMEFP);
}
} // for (; aExp.More(); aExp.Next()) {
} // for (; aItS.More(); aItS.Next()) {
//
// split the shell on multi-connected edges
TopTools_ListOfShape aLShSp;
RefineShell(aShell, aMEFP, aLShSp);
//
// collect the not closed shells for further processing
TopTools_ListOfShape aLShNC;
//
TopTools_ListIteratorOfListOfShape aItLShSp(aLShSp);
for (; aItLShSp.More(); aItLShSp.Next()) {
TopoDS_Shell& aShSp = *((TopoDS_Shell*)&aItLShSp.Value());
//
if (BRep_Tool::IsClosed(aShSp)) {
aShSp.Closed(Standard_True);
myLoops.Append(aShSp);
}
else {
aLShNC.Append(aShSp);
}
}
//
bAllFacesTaken = (AddedFacesMap.Extent() == aNbShapes);
if (bAllFacesTaken) {
break;
}
//
if (aLShSp.Extent() == 1) {
// not further processing of not closed shells is needed,
// as it will not bring any new results
continue;
}
//
// remove th faces of not closed shells from the map of processed faces
// and try to rebuild the shells using all not processed faces,
// because faces of one shell might be needed for building the other
TopTools_ListIteratorOfListOfShape aItLShNC(aLShNC);
for (; aItLShNC.More(); aItLShNC.Next())
{
TopoDS_Iterator aItNC(aItLShNC.Value());
for (; aItNC.More(); aItNC.Next())
{
AddedFacesMap.Remove(aItNC.Value());
}
}
} // for (; aItF.More(); aItF.Next()) {
}
//=======================================================================
//function : FindShape
//purpose :
//=======================================================================
TopoDS_Shape FindShape (const TopoDS_Shape& theShapeToFind,
const TopoDS_Shape& theShape)
{
TopoDS_Shape aRes;
TopExp_Explorer anExp(theShape, theShapeToFind.ShapeType());
for (; anExp.More(); anExp.Next())
{
const TopoDS_Shape& aShape = anExp.Current();
if (aShape.IsSame(theShapeToFind))
{
aRes = aShape;
break;
}
}
return aRes;
}
//=======================================================================
//function : RefineShell
//purpose :
@@ -434,6 +445,21 @@ void RefineShell(TopoDS_Shell& theShell,
aMEStop.Add(aE);
continue;
}
if (aLF.Extent() == 2)
{
const TopoDS_Face& aF1 = TopoDS::Face(aLF.First());
const TopoDS_Face& aF2 = TopoDS::Face(aLF.Last());
TopoDS_Shape aE1 = FindShape(aE, aF1);
TopoDS_Shape aE2 = FindShape(aE, aF2);
if (aE1.Orientation() == aE2.Orientation())
{
aMEStop.Add(aE);
continue;
}
}
//
// check for internal edges - count faces, in which the edge
// is internal, twice

View File

@@ -44,6 +44,8 @@
#include <BRepGProp_Face.hxx>
#include <BRep_TEdge.hxx>
#include <ShapeUpgrade_UnifySameDomain.hxx>
#include <Bnd_Box.hxx>
#include <BRepBndLib.hxx>
#ifdef BRepFill_AdvancedEvolved_DEBUG
#include <BinTools.hxx>
@@ -524,9 +526,14 @@ void BRepFill_AdvancedEvolved::GetLids()
return;
}
Standard_Real aTol = Max(aFS.Tolerance(), aFS.ToleranceReached());
aTol += myFuzzyValue;
Bnd_Box aProfBox;
BRepBndLib::Add(myProfile, aProfBox);
Standard_Real aSqDiag = aProfBox.SquareExtent();
//Square of the default angular tolerance in
//BOPAlgo_Tools::EdgesToWires(...) and BOPAlgo_Tools::WiresToFaces(...) methods
const Standard_Real aSqAnguarTol = 1.0e-16;
const Standard_Real aSqAnguarTol = aTol*aTol / aSqDiag;
const gp_Dir &aNormal = aSurf->Position().Direction();
// Obtain free-edges from myPipeShell. All edges must be planar
@@ -541,6 +548,7 @@ void BRepFill_AdvancedEvolved::GetLids()
gp_Pnt aPtmp;
gp_Vec aTan;
Standard_Real aDPMax = 0.;
for (Standard_Integer i = 1; i <= aMapEF.Size(); i++)
{
TopTools_ListOfShape& aListF = aMapEF(i);
@@ -564,6 +572,8 @@ void BRepFill_AdvancedEvolved::GetLids()
continue;
const Standard_Real aDP = aTan.XYZ().Dot(aNormal.XYZ());
if (Abs(aDP) > aDPMax)
aDPMax = Abs(aDP);
if (aDP*aDP>aSqModulus*aSqAnguarTol)
{
//Only planar edges are considered
@@ -594,8 +604,9 @@ void BRepFill_AdvancedEvolved::GetLids()
aBB.MakeCompound(aCompW);
aBB.MakeCompound(aCompF);
aBB.MakeCompound(myTopBottom);
BOPAlgo_Tools::EdgesToWires(aFreeEdges, aCompW, Standard_True);
BOPAlgo_Tools::WiresToFaces(aCompW, aCompF);
Standard_Real anAngTol = Sqrt(aSqAnguarTol);
BOPAlgo_Tools::EdgesToWires(aFreeEdges, aCompW, Standard_True, anAngTol);
BOPAlgo_Tools::WiresToFaces(aCompW, aCompF, anAngTol);
{
// Check orientation

View File

@@ -351,6 +351,10 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge,
for (j=1; j<=ndec; j++) {
// piece of edge
m1 = (CutValues.Value(j)-t0)*(last-first)/(t1-t0)+first;
if (Abs(m0 - m1) < Precision::Confusion())
{
return;
}
TopoDS_Edge CutE = BRepLib_MakeEdge(C,V0,Vbid,m0,m1);
CutE.Orientation(CurrentOrient);
S.Append(CutE);
@@ -358,6 +362,10 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge,
V0 = TopExp::LastVertex(CutE);
if (j==ndec) {
// last piece
if (Abs(m0 - last) < Precision::Confusion())
{
return;
}
TopoDS_Edge LastE = BRepLib_MakeEdge(C,V0,Vl,m0,last);
LastE.Orientation(CurrentOrient);
S.Append(LastE);
@@ -371,6 +379,10 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge,
for (j=ndec; j>=1; j--) {
// piece of edge
m0 = (CutValues.Value(j)-t0)*(last-first)/(t1-t0)+first;
if (Abs(m0 - m1) < Precision::Confusion())
{
return;
}
TopoDS_Edge CutE = BRepLib_MakeEdge(C,Vbid,V1,m0,m1);
CutE.Orientation(CurrentOrient);
S.Append(CutE);
@@ -378,6 +390,10 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge,
V1 = TopExp::FirstVertex(CutE);
if (j==1) {
// last piece
if (Abs(first - m1) < Precision::Confusion())
{
return;
}
TopoDS_Edge LastE = BRepLib_MakeEdge(C,Vf,V1,first,m1);
LastE.Orientation(CurrentOrient);
S.Append(LastE);
@@ -547,6 +563,10 @@ static Standard_Boolean EdgeIntersectOnWire (const gp_Pnt& P1,
SR.Clear();
SR.Append(param);
TrimEdge(E,SR,first,last,SO,SE);
if (SE.IsEmpty())
{
return Standard_False;
}
theEdgeNewEdges(E) = SE;
TopoDS_Vertex VV1,VV2;
TopExp::Vertices(TopoDS::Edge(SE.Value(1)),VV1,VV2);

View File

@@ -5225,7 +5225,6 @@ void BRepOffset_BuildOffsetFaces::FilterInvalidEdges (const BRepOffset_DataMapOf
const TopTools_ListOfShape* pEOrigins = myOEOrigins.Seek (aE);
if (!pEOrigins)
{
theMEUseInRebuild.Add (aE);
continue;
}
@@ -5393,6 +5392,29 @@ void BRepOffset_BuildOffsetFaces::FindFacesToRebuild()
}
}
namespace
{
//=======================================================================
//function : mapShapes
//purpose : Collect theVecShapes into theMap with setted theType
//=======================================================================
template<class Container>
static void mapShapes (const Container& theVecShapes,
const TopAbs_ShapeEnum theType,
TopTools_MapOfShape& theMap)
{
for (const auto& aShape : theVecShapes)
{
for (TopExp_Explorer anExp(aShape, theType); anExp.More(); anExp.Next())
{
theMap.Add(anExp.Current());
}
}
}
}
//=======================================================================
//function : IntersectFaces
//purpose : Intersection of the faces that should be rebuild to resolve all invalidities
@@ -5715,7 +5737,10 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT
TopoDS_Compound aCBE;
aBB.MakeCompound (aCBE);
//
TopExp_Explorer aExp (aCBInv, TopAbs_EDGE);
// remember inside edges and vertices to further check
TopTools_MapOfShape anInsideEdges;
TopTools_MapOfShape anInsideVertices;
TopExp_Explorer aExp(aCBInv, TopAbs_EDGE);
for (; aExp.More(); aExp.Next())
{
const TopoDS_Shape& aE = aExp.Current();
@@ -5724,6 +5749,15 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT
if (aMEFence.Add (aE))
{
aBB.Add (aCBE, aE);
if (!myEdgesToAvoid.Contains(aE) && myInvalidEdges.Contains(aE))
{
anInsideEdges.Add(aE);
TopoDS_Iterator anIt(aE);
for (; anIt.More(); anIt.Next())
{
anInsideVertices.Add(anIt.Value());
}
}
}
}
}
@@ -5749,10 +5783,6 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT
TopExp::MapShapes (aCBELoc, TopAbs_EDGE, aME);
aMECV = aME;
TopExp::MapShapes (aCBELoc, TopAbs_VERTEX, aME);
//
// Using the map <aME> find chain of faces to be intersected;
//
// faces for intersection
TopTools_IndexedMapOfShape aMFInt;
// additional faces for intersection
TopTools_IndexedMapOfShape aMFIntExt;
@@ -5801,6 +5831,14 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT
if (pMFInter && !pInterFi)
continue;
// create map of edges and vertices for aLFImi
TopTools_MapOfShape aMEVIm;
mapShapes(*aLFImi, TopAbs_EDGE, aMEVIm);
mapShapes(*aLFImi, TopAbs_VERTEX, aMEVIm);
Standard_Boolean isIContainsE = aMEVIm.HasIntersection(anInsideEdges);
Standard_Boolean isIContainsV = aMEVIm.HasIntersection(anInsideVertices);
for (j = i + 1; j <= aNb; ++j)
{
const TopoDS_Face& aFj = TopoDS::Face (aMFInt (j));
@@ -5820,6 +5858,28 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT
if (!aLFEj)
continue;
// create map of edges and vertices for aLFImi
aMEVIm.Clear();
mapShapes(*aLFImj, TopAbs_EDGE, aMEVIm);
mapShapes(*aLFImj, TopAbs_VERTEX, aMEVIm);
// check images of both faces contain anInsideEdges and anInsideVertices
// not process if false and true
Standard_Boolean isJContainsE = aMEVIm.HasIntersection(anInsideEdges);
Standard_Boolean isJContainsV = aMEVIm.HasIntersection(anInsideVertices);
// Check if one face is connected to inside edge then
// the other must be also connected
if ((isIContainsE && !isJContainsV) ||
(isJContainsE && !isIContainsV))
{
TopTools_ListOfShape aLVC;
// it is necessary to process the images if they already have
// common vertices
FindCommonParts(*aLFImi, *aLFImj, aLVC, TopAbs_VERTEX);
if (aLVC.IsEmpty())
continue;
}
//
// if there are some common edges between faces
// we should use these edges and do not intersect again.

View File

@@ -88,8 +88,11 @@ bool DE_ConfigurationNode::Save(const TCollection_AsciiString& theResourcePath)
// function : UpdateLoad
// purpose :
//=======================================================================
bool DE_ConfigurationNode::UpdateLoad()
bool DE_ConfigurationNode::UpdateLoad(const Standard_Boolean theToImport,
const Standard_Boolean theToKeep)
{
(void)theToImport;
(void)theToKeep;
return true;
}

View File

@@ -85,9 +85,12 @@ public:
//! @return new object with the same field values
Standard_EXPORT virtual Handle(DE_ConfigurationNode) Copy() const = 0;
//! Update loading status. Checking for the license.
//! Update loading status. Checking for the ability to read and write.
//! @param[in] theToImport flag to updates for import. Standard_True-import, Standard_False-export
//! @param[in] theToKeep flag to save update result
//! @return Standard_True, if node can be used
Standard_EXPORT virtual bool UpdateLoad();
Standard_EXPORT virtual bool UpdateLoad(const Standard_Boolean theToImport,
const Standard_Boolean theToKeep);
public:

View File

@@ -44,6 +44,7 @@ namespace
// purpose :
//=======================================================================
DE_Wrapper::DE_Wrapper()
:myKeepUpdates(Standard_False)
{}
//=======================================================================
@@ -67,6 +68,7 @@ DE_Wrapper::DE_Wrapper(const Handle(DE_Wrapper)& theWrapper)
Bind(aVendorIter.Value());
}
}
theWrapper->myKeepUpdates = myKeepUpdates;
}
//=======================================================================
@@ -445,7 +447,6 @@ void DE_Wrapper::ChangePriority(const TCollection_AsciiString& theFormat,
if (aVendorMap.FindFromKey(aVendorName, aNode))
{
aNode->SetEnabled(Standard_True);
aNode->UpdateLoad();
aNewVendorMap.Add(aVendorName, aNode);
}
}
@@ -532,7 +533,8 @@ Standard_Boolean DE_Wrapper::FindProvider(const TCollection_AsciiString& thePath
((theToImport && aNode->IsImportSupported()) ||
(!theToImport && aNode->IsExportSupported())) &&
(aNode->CheckExtension(anExtr) ||
(theToImport && aNode->CheckContent(aBuffer))))
(theToImport && aNode->CheckContent(aBuffer))) &&
aNode->UpdateLoad(theToImport, myKeepUpdates))
{
theProvider = aNode->BuildProvider();
aNode->GlobalParameters = GlobalParameters;
@@ -544,6 +546,28 @@ Standard_Boolean DE_Wrapper::FindProvider(const TCollection_AsciiString& thePath
return Standard_False;
}
//=======================================================================
// function : UpdateLoad
// purpose :
//=======================================================================
Standard_EXPORT void DE_Wrapper::UpdateLoad(const Standard_Boolean theToForceUpdate) const
{
for (DE_ConfigurationFormatMap::Iterator aFormatIter(myConfiguration);
aFormatIter.More(); aFormatIter.Next())
{
for (DE_ConfigurationVendorMap::Iterator aVendorIter(aFormatIter.Value());
aVendorIter.More(); aVendorIter.Next())
{
const Handle(DE_ConfigurationNode)& aNode = aVendorIter.Value();
aNode->UpdateLoad(Standard_True, Standard_True);
aNode->UpdateLoad(Standard_False, Standard_True);
if (!theToForceUpdate)
continue;
aNode->SetEnabled(aNode->IsExportSupported() || aNode->IsImportSupported());
}
}
}
//=======================================================================
// function : sort
// purpose :

View File

@@ -226,6 +226,16 @@ public:
const Standard_Boolean theToImport,
Handle(DE_Provider)& theProvider) const;
//! Updates all registered nodes, all changes will be saved in nodes
//! @param[in] theToForceUpdate flag that turns on/of nodes, according to updated ability to import/export
Standard_EXPORT void UpdateLoad(const Standard_Boolean theToForceUpdate = Standard_False) const;
//! Gets flag that keeps changes on configuration nodes which are being updated, false by default
Standard_Boolean KeepUpdates() const { return myKeepUpdates; }
//! Sets flag that keeps changes on configuration nodes which are being updated, false by default
void SetKeepUpdates(const Standard_Boolean theToKeepUpdates) { myKeepUpdates = theToKeepUpdates; }
//! Gets format map, contains vendor map with nodes
//! @return internal map of formats
Standard_EXPORT const DE_ConfigurationFormatMap& Nodes() const;
@@ -248,6 +258,7 @@ public:
private:
Standard_Boolean myKeepUpdates; //!< Flag that keeps changes on configuration nodes which are being updated
DE_ConfigurationFormatMap myConfiguration; //!< Internal map of formats
};

View File

@@ -34,9 +34,7 @@ namespace
//=======================================================================
DEBRepCascade_ConfigurationNode::DEBRepCascade_ConfigurationNode() :
DE_ConfigurationNode()
{
UpdateLoad();
}
{}
//=======================================================================
// function : DEBRepCascade_ConfigurationNode
@@ -46,7 +44,6 @@ DEBRepCascade_ConfigurationNode::DEBRepCascade_ConfigurationNode(const Handle(DE
:DE_ConfigurationNode(theNode)
{
InternalParameters = theNode->InternalParameters;
UpdateLoad();
}
//=======================================================================

View File

@@ -34,9 +34,7 @@ namespace
//=======================================================================
DEXCAFCascade_ConfigurationNode::DEXCAFCascade_ConfigurationNode() :
DE_ConfigurationNode()
{
UpdateLoad();
}
{}
//=======================================================================
// function : DEXCAFCascade_ConfigurationNode
@@ -46,7 +44,6 @@ DEXCAFCascade_ConfigurationNode::DEXCAFCascade_ConfigurationNode(const Handle(DE
:DE_ConfigurationNode(theNode)
{
InternalParameters = theNode->InternalParameters;
UpdateLoad();
}
//=======================================================================

View File

@@ -429,6 +429,8 @@ static Standard_Boolean ConicDefinition
term2 = -gdet/(cprim*pdet);
if (IsEllip) {
if (term1 <= eps || term2 <= eps)
return Standard_False;
Xax = cost;
Yax = sint;
Rmin = sqrt ( term1);
@@ -439,12 +441,16 @@ static Standard_Boolean ConicDefinition
}
}
else if (term1 <= eps){
if (-term1 <= eps || term2 <= eps)
return Standard_False;
Xax = -sint;
Yax = cost;
Rmin = sqrt (-term1);
Rmax = sqrt (term2);
}
else {
if (term1 <= eps || -term2 <= eps)
return Standard_False;
Xax = cost;
Yax = sint;
Rmin = sqrt (-term2);

View File

@@ -93,6 +93,15 @@ public:
//! converts RLine to Geom(2d)_Curve.
Standard_EXPORT static void TreatRLine (const Handle(IntPatch_RLine)& theRL, const Handle(GeomAdaptor_Surface)& theHS1, const Handle(GeomAdaptor_Surface)& theHS2, Handle(Geom_Curve)& theC3d, Handle(Geom2d_Curve)& theC2d1, Handle(Geom2d_Curve)& theC2d2, Standard_Real& theTolReached);
//! creates 2D-curve on given surface from given 3D-curve
Standard_EXPORT static void BuildPCurves (const Standard_Real theFirst, const Standard_Real theLast,
const Standard_Real theUmin, const Standard_Real theUmax,
const Standard_Real theVmin, const Standard_Real theVmax,
Standard_Real& theTol,
const Handle(Geom_Surface)& theSurface,
const Handle(Geom_Curve)& theCurve,
Handle(Geom2d_Curve)& theCurve2d);
//! creates 2D-curve on given surface from given 3D-curve
Standard_EXPORT static void BuildPCurves (const Standard_Real f, const Standard_Real l, Standard_Real& Tol, const Handle(Geom_Surface)& S, const Handle(Geom_Curve)& C, Handle(Geom2d_Curve)& C2d);

View File

@@ -1074,94 +1074,92 @@ void GeomInt_IntSS::TreatRLine(const Handle(IntPatch_RLine)& theRL,
//function : BuildPCurves
//purpose :
//=======================================================================
void GeomInt_IntSS::BuildPCurves (Standard_Real f,
Standard_Real l,
Standard_Real& Tol,
const Handle (Geom_Surface)& S,
const Handle (Geom_Curve)& C,
Handle (Geom2d_Curve)& C2d)
void GeomInt_IntSS::BuildPCurves (const Standard_Real theFirst, const Standard_Real theLast,
const Standard_Real theUmin, const Standard_Real theUmax,
const Standard_Real theVmin, const Standard_Real theVmax,
Standard_Real& theTol,
const Handle(Geom_Surface)& theSurface,
const Handle(Geom_Curve)& theCurve,
Handle(Geom2d_Curve)& theCurve2d)
{
if (!C2d.IsNull()) {
if (!theCurve2d.IsNull() || theSurface.IsNull()) {
return;
}
//
Standard_Real umin,umax,vmin,vmax;
//
S->Bounds(umin, umax, vmin, vmax);
// in class ProjLib_Function the range of parameters is shrank by 1.e-09
if((l - f) > 2.e-09) {
C2d = GeomProjLib::Curve2d(C,f,l,S,umin,umax,vmin,vmax,Tol);
if (C2d.IsNull()) {
if ((theLast - theFirst) > 2.e-09) {
theCurve2d = GeomProjLib::Curve2d(theCurve, theFirst, theLast, theSurface, theUmin, theUmax, theVmin, theVmax, theTol);
if (theCurve2d.IsNull()) {
// proj. a circle that goes through the pole on a sphere to the sphere
Tol += Precision::Confusion();
C2d = GeomProjLib::Curve2d(C,f,l,S,Tol);
theTol += Precision::Confusion();
theCurve2d = GeomProjLib::Curve2d(theCurve, theFirst, theLast, theSurface, theTol);
}
const Handle(Standard_Type)& aType = C2d->DynamicType();
if ( aType == STANDARD_TYPE(Geom2d_BSplineCurve))
const Handle(Standard_Type)& aType = theCurve2d->DynamicType();
if (aType == STANDARD_TYPE(Geom2d_BSplineCurve))
{
//Check first, last knots to avoid problems with trimming
//First, last knots can differ from f, l because of numerical error
//of projection and approximation
//The same checking as in Geom2d_TrimmedCurve
if((C2d->FirstParameter() - f > Precision::PConfusion()) ||
(l - C2d->LastParameter() > Precision::PConfusion()))
if ((theCurve2d->FirstParameter() - theFirst > Precision::PConfusion()) ||
(theLast - theCurve2d->LastParameter() > Precision::PConfusion()))
{
Handle(Geom2d_BSplineCurve) aBspl = Handle(Geom2d_BSplineCurve)::DownCast(C2d);
Handle(Geom2d_BSplineCurve) aBspl = Handle(Geom2d_BSplineCurve)::DownCast(theCurve2d);
TColStd_Array1OfReal aKnots(1, aBspl->NbKnots());
aBspl->Knots(aKnots);
BSplCLib::Reparametrize(f, l, aKnots);
BSplCLib::Reparametrize(theFirst, theLast, aKnots);
aBspl->SetKnots(aKnots);
}
}
}
else {
if((l - f) > Epsilon(Abs(f)))
if ((theLast - theFirst) > Epsilon(Abs(theFirst)))
{
//The domain of C2d is [Epsilon(Abs(f)), 2.e-09]
//On this small range C2d can be considered as segment
//of line.
Standard_Real aU=0., aV=0.;
Standard_Real aU = 0., aV = 0.;
GeomAdaptor_Surface anAS;
anAS.Load(S);
anAS.Load(theSurface);
Extrema_ExtPS anExtr;
const gp_Pnt aP3d1 = C->Value(f);
const gp_Pnt aP3d2 = C->Value(l);
const gp_Pnt aP3d1 = theCurve->Value(theFirst);
const gp_Pnt aP3d2 = theCurve->Value(theLast);
anExtr.SetAlgo(Extrema_ExtAlgo_Grad);
anExtr.Initialize(anAS, umin, umax, vmin, vmax,
Precision::Confusion(), Precision::Confusion());
anExtr.Initialize(anAS, theUmin, theUmax, theVmin, theVmax,
Precision::Confusion(), Precision::Confusion());
anExtr.Perform(aP3d1);
if(ParametersOfNearestPointOnSurface(anExtr, aU, aV))
if (ParametersOfNearestPointOnSurface(anExtr, aU, aV))
{
const gp_Pnt2d aP2d1(aU, aV);
anExtr.Perform(aP3d2);
if(ParametersOfNearestPointOnSurface(anExtr, aU, aV))
if (ParametersOfNearestPointOnSurface(anExtr, aU, aV))
{
const gp_Pnt2d aP2d2(aU, aV);
if(aP2d1.Distance(aP2d2) > gp::Resolution())
if (aP2d1.Distance(aP2d2) > gp::Resolution())
{
TColgp_Array1OfPnt2d poles(1,2);
TColStd_Array1OfReal knots(1,2);
TColStd_Array1OfInteger mults(1,2);
TColgp_Array1OfPnt2d poles(1, 2);
TColStd_Array1OfReal knots(1, 2);
TColStd_Array1OfInteger mults(1, 2);
poles(1) = aP2d1;
poles(2) = aP2d2;
knots(1) = f;
knots(2) = l;
knots(1) = theFirst;
knots(2) = theLast;
mults(1) = mults(2) = 2;
C2d = new Geom2d_BSplineCurve(poles,knots,mults,1);
theCurve2d = new Geom2d_BSplineCurve(poles, knots, mults, 1);
//Check same parameter in middle point .begin
const gp_Pnt PMid(C->Value(0.5*(f+l)));
const gp_Pnt PMid(theCurve->Value(0.5*(theFirst + theLast)));
const gp_Pnt2d pmidcurve2d(0.5*(aP2d1.XY() + aP2d2.XY()));
const gp_Pnt aPC(anAS.Value(pmidcurve2d.X(), pmidcurve2d.Y()));
const Standard_Real aDist = PMid.Distance(aPC);
Tol = Max(aDist, Tol);
theTol = Max(aDist, theTol);
//Check same parameter in middle point .end
}
}
@@ -1169,27 +1167,51 @@ void GeomInt_IntSS::BuildPCurves (Standard_Real f,
}
}
//
if (S->IsUPeriodic() && !C2d.IsNull()) {
if (theSurface->IsUPeriodic() && !theCurve2d.IsNull()) {
// Recadre dans le domaine UV de la face
Standard_Real aTm, U0, aEps, period, du, U0x;
Standard_Boolean bAdjust;
//
aEps = Precision::PConfusion();
period = S->UPeriod();
period = theSurface->UPeriod();
//
aTm = .5*(f + l);
gp_Pnt2d pm = C2d->Value(aTm);
aTm = .5 * (theFirst + theLast);
gp_Pnt2d pm = theCurve2d->Value(aTm);
U0 = pm.X();
//
bAdjust =
GeomInt::AdjustPeriodic(U0, umin, umax, period, U0x, du, aEps);
GeomInt::AdjustPeriodic(U0, theUmin, theUmax, period, U0x, du, aEps);
if (bAdjust) {
gp_Vec2d T1(du, 0.);
C2d->Translate(T1);
theCurve2d->Translate(T1);
}
}
}
//=======================================================================
//function : BuildPCurves
//purpose :
//=======================================================================
void GeomInt_IntSS::BuildPCurves (const Standard_Real f,
const Standard_Real l,
Standard_Real& Tol,
const Handle (Geom_Surface)& S,
const Handle (Geom_Curve)& C,
Handle (Geom2d_Curve)& C2d)
{
if (!C2d.IsNull() || S.IsNull()) {
return;
}
//
Standard_Real umin,umax,vmin,vmax;
//
S->Bounds(umin, umax, vmin, vmax);
BuildPCurves(f, l, umin, umax, vmin, vmax, Tol, S, C, C2d);
}
//=======================================================================
//function : TrimILineOnSurfBoundaries
//purpose : This function finds intersection points of given curves with

View File

@@ -34,9 +34,7 @@ namespace
//=======================================================================
IGESCAFControl_ConfigurationNode::IGESCAFControl_ConfigurationNode() :
DE_ConfigurationNode()
{
UpdateLoad();
}
{}
//=======================================================================
// function : IGESCAFControl_ConfigurationNode
@@ -46,7 +44,6 @@ IGESCAFControl_ConfigurationNode::IGESCAFControl_ConfigurationNode(const Handle(
:DE_ConfigurationNode(theNode)
{
InternalParameters = theNode->InternalParameters;
UpdateLoad();
}
//=======================================================================

View File

@@ -50,11 +50,21 @@
#include <Standard_DomainError.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
#include <gce_MakePln.hxx>
#include <ProjLib.hxx>
#include <IntAna2d_AnaIntersection.hxx>
#include <IntAna2d_IntPoint.hxx>
#ifdef DEBUGLINES
#include <Geom2d_Line.hxx>
#endif
static
gp_Ax2 DirToAx2(const gp_Pnt& P,const gp_Dir& D);
static
void RefineDir(gp_Dir& aDir);
static
Standard_Real EstimDist(const gp_Cone& theCon1, const gp_Cone& theCon2);
//=======================================================================
//class : AxeOperator
@@ -249,6 +259,72 @@ gp_Ax2 DirToAx2(const gp_Pnt& P,const gp_Dir& D)
return(gp_Ax2(P,D,gp_Dir(gp_Vec(-y,x,0.0))));
}
}
//=======================================================================
//function : EstimDist
//purpose : returns a minimal distance from apex to any solution
//=======================================================================
Standard_Real EstimDist(const gp_Cone& theCon1, const gp_Cone& theCon2)
{
//It is supposed that axes of cones are coplanar and
//distance between them > Precision::Confusion()
gp_Pnt aPA1 = theCon1.Apex(), aPA2 = theCon2.Apex();
gp_Pnt aP3 = aPA1.Translated(theCon1.Position().Direction());
gce_MakePln aMkPln(aPA1, aPA2, aP3);
if(!aMkPln.IsDone())
return Precision::Infinite();
const gp_Pln& aPln = aMkPln.Value();
gp_Lin anAx1(aPA1, theCon1.Position().Direction());
gp_Lin2d anAx12d = ProjLib::Project(aPln, anAx1);
gp_Lin2d Lines1[2];
Standard_Real anAng1 = theCon1.SemiAngle();
Lines1[0] = anAx12d.Rotated(anAx12d.Location(), anAng1);
Lines1[1] = anAx12d.Rotated(anAx12d.Location(), -anAng1);
//
gp_Lin anAx2(aPA2, theCon2.Position().Direction());
gp_Lin2d anAx22d = ProjLib::Project(aPln, anAx2);
gp_Lin2d Lines2[2];
Standard_Real anAng2 = theCon2.SemiAngle();
Lines2[0] = anAx22d.Rotated(anAx22d.Location(), anAng2);
Lines2[1] = anAx22d.Rotated(anAx22d.Location(), -anAng2);
#ifdef DEBUGLINES
Handle(Geom2d_Line) L10 = new Geom2d_Line(Lines1[0]);
Handle(Geom2d_Line) L11 = new Geom2d_Line(Lines1[1]);
Handle(Geom2d_Line) L20 = new Geom2d_Line(Lines2[0]);
Handle(Geom2d_Line) L21 = new Geom2d_Line(Lines2[1]);
#endif
Standard_Real aMinDist[2] = { Precision::Infinite(), Precision::Infinite() };
Standard_Integer i, j, k;
IntAna2d_AnaIntersection anInter;
for (i = 0; i < 2; ++i)
{
for (j = 0; j < 2; ++j)
{
anInter.Perform(Lines1[i], Lines2[j]);
if (anInter.IsDone())
{
Standard_Integer aNbPoints = anInter.NbPoints();
for (k = 1; k <= aNbPoints; ++k)
{
const IntAna2d_IntPoint& anIntP = anInter.Point(k);
Standard_Real aPar1 = Abs(anIntP.ParamOnFirst());
aMinDist[0] = Min(aPar1, aMinDist[0]);
Standard_Real aPar2 = Abs(anIntP.ParamOnSecond());
aMinDist[1] = Min(aPar2, aMinDist[1]);
}
}
}
}
Standard_Real aDist = Max(aMinDist[0], aMinDist[1]);
return aDist;
}
//=======================================================================
//function : IntAna_QuadQuadGeo
//purpose : Empty constructor
@@ -1358,7 +1434,7 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo(const gp_Cylinder& Cyl,
const gp_Cone& Con2,
const Standard_Real Tol)
{
done=Standard_True;
done = Standard_True;
//
Standard_Real tg1, tg2, aDA1A2, aTol2;
gp_Pnt aPApex1, aPApex2;
@@ -1366,20 +1442,39 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo(const gp_Cylinder& Cyl,
Standard_Real TOL_APEX_CONF = 1.e-10;
//
tg1=Tan(Con1.SemiAngle());
tg2=Tan(Con2.SemiAngle());
tg1 = Tan(Con1.SemiAngle());
tg2 = Tan(Con2.SemiAngle());
if((tg1 * tg2) < 0.) {
if ((tg1 * tg2) < 0.) {
tg2 = -tg2;
}
//
aTol2=Tol*Tol;
aPApex1=Con1.Apex();
aPApex2=Con2.Apex();
aDA1A2=aPApex1.SquareDistance(aPApex2);
aTol2 = Tol*Tol;
aPApex1 = Con1.Apex();
aPApex2 = Con2.Apex();
aDA1A2 = aPApex1.SquareDistance(aPApex2);
//
AxeOperator A1A2(Con1.Axis(),Con2.Axis());
AxeOperator A1A2(Con1.Axis(), Con2.Axis());
//
Standard_Real aTolAng = myEPSILON_ANGLE_CONE;
if ((Abs(tg1 - tg2) < Tol) && (A1A2.Parallel()))
{
Standard_Real DistA1A2 = A1A2.Distance();
if (DistA1A2 > 100. * Tol)
{
Standard_Real aMinSolDist = EstimDist(Con1, Con2);
if (aMinSolDist < Epsilon(1.))
{
aTolAng = Tol;
}
else
{
aTolAng = Max(myEPSILON_ANGLE_CONE, Tol / aMinSolDist);
aTolAng = Min(aTolAng, Tol);
}
}
}
// 1
if(A1A2.Same()) {
//-- two circles
@@ -1427,8 +1522,8 @@ IntAna_QuadQuadGeo::IntAna_QuadQuadGeo(const gp_Cylinder& Cyl,
}
} //-- fin A1A2.Same
// 2
else if((Abs(tg1-tg2)<myEPSILON_ANGLE_CONE) && (A1A2.Parallel())) {
//-- voir AnVer12mai98
else if((Abs(tg1-tg2) < aTolAng ) && (A1A2.Parallel())) {
Standard_Real DistA1A2=A1A2.Distance();
gp_Dir DA1=Con1.Position().Direction();
gp_Vec O1O2(Con1.Apex(),Con2.Apex());

View File

@@ -990,15 +990,19 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
if (typl == IntPatch_Circle || typl == IntPatch_Ellipse) {////
if(myApprox1) {
Handle (Geom2d_Curve) C2d;
GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc,
myHS1->Surface(), newc, C2d);
GeomInt_IntSS::BuildPCurves(fprm, lprm,
myHS1->FirstUParameter(), myHS1->LastUParameter(),
myHS1->FirstVParameter(), myHS1->LastVParameter(),
Tolpc, myHS1->Surface(), newc, C2d);
aCurve.SetFirstCurve2d(C2d);
}
if(myApprox2) {
Handle (Geom2d_Curve) C2d;
GeomInt_IntSS::BuildPCurves(fprm,lprm,Tolpc,
myHS2->Surface(),newc,C2d);
GeomInt_IntSS::BuildPCurves(fprm, lprm,
myHS2->FirstUParameter(), myHS2->LastUParameter(),
myHS2->FirstVParameter(), myHS2->LastVParameter(),
Tolpc, myHS2->Surface(), newc, C2d);
aCurve.SetSecondCurve2d(C2d);
}
}
@@ -1059,15 +1063,19 @@ void IntTools_FaceFace::MakeCurve(const Standard_Integer Index,
if(myApprox1) {
Handle (Geom2d_Curve) C2d;
GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc,
myHS1->Surface(), newc, C2d);
GeomInt_IntSS::BuildPCurves(fprm, lprm,
myHS1->FirstUParameter(), myHS1->LastUParameter(),
myHS1->FirstVParameter(), myHS1->LastVParameter(),
Tolpc, myHS1->Surface(), newc, C2d);
aCurve.SetFirstCurve2d(C2d);
}
if(myApprox2) {
Handle (Geom2d_Curve) C2d;
GeomInt_IntSS::BuildPCurves(fprm, lprm, Tolpc,
myHS2->Surface(), newc, C2d);
GeomInt_IntSS::BuildPCurves(fprm, lprm,
myHS2->FirstUParameter(), myHS2->LastUParameter(),
myHS2->FirstVParameter(), myHS2->LastVParameter(),
Tolpc, myHS2->Surface(), newc, C2d);
aCurve.SetSecondCurve2d(C2d);
}
}// end of if (typl == IntPatch_Circle || typl == IntPatch_Ellipse)

View File

@@ -33,9 +33,7 @@ namespace
//=======================================================================
RWGltf_ConfigurationNode::RWGltf_ConfigurationNode() :
DE_ConfigurationNode()
{
UpdateLoad();
}
{}
//=======================================================================
// function : RWGltf_ConfigurationNode
@@ -45,7 +43,6 @@ RWGltf_ConfigurationNode::RWGltf_ConfigurationNode(const Handle(RWGltf_Configura
:DE_ConfigurationNode(theNode)
{
InternalParameters = theNode->InternalParameters;
UpdateLoad();
}
//=======================================================================

View File

@@ -33,9 +33,7 @@ namespace
//=======================================================================
RWObj_ConfigurationNode::RWObj_ConfigurationNode() :
DE_ConfigurationNode()
{
UpdateLoad();
}
{}
//=======================================================================
// function : RWObj_ConfigurationNode
@@ -45,7 +43,6 @@ RWObj_ConfigurationNode::RWObj_ConfigurationNode(const Handle(RWObj_Configuratio
:DE_ConfigurationNode(theNode)
{
InternalParameters = theNode->InternalParameters;
UpdateLoad();
}
//=======================================================================

View File

@@ -27,9 +27,7 @@ static const TCollection_AsciiString THE_CONFIGURATION_SCOPE = "provider";
//=======================================================================
RWPly_ConfigurationNode::RWPly_ConfigurationNode() :
DE_ConfigurationNode()
{
UpdateLoad();
}
{}
//=======================================================================
// function : RWPly_ConfigurationNode
@@ -39,7 +37,6 @@ RWPly_ConfigurationNode::RWPly_ConfigurationNode(const Handle(RWPly_Configuratio
:DE_ConfigurationNode(theNode)
{
InternalParameters = theNode->InternalParameters;
UpdateLoad();
}
//=======================================================================

View File

@@ -34,9 +34,7 @@ namespace
//=======================================================================
RWStl_ConfigurationNode::RWStl_ConfigurationNode() :
DE_ConfigurationNode()
{
UpdateLoad();
}
{}
//=======================================================================
// function : STEPCAFControl_ConfigurationNode
@@ -46,7 +44,6 @@ RWStl_ConfigurationNode::RWStl_ConfigurationNode(const Handle(RWStl_Configuratio
:DE_ConfigurationNode(theNode)
{
InternalParameters = theNode->InternalParameters;
UpdateLoad();
}
//=======================================================================

View File

@@ -34,9 +34,7 @@ namespace
//=======================================================================
STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode() :
DE_ConfigurationNode()
{
UpdateLoad();
}
{}
//=======================================================================
// function : STEPCAFControl_ConfigurationNode
@@ -45,9 +43,7 @@ STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode() :
STEPCAFControl_ConfigurationNode::STEPCAFControl_ConfigurationNode(const Handle(STEPCAFControl_ConfigurationNode)& theNode)
:DE_ConfigurationNode(theNode),
InternalParameters(theNode->InternalParameters)
{
UpdateLoad();
}
{}
//=======================================================================
// function : Load

View File

@@ -33,9 +33,7 @@ namespace
//=======================================================================
Vrml_ConfigurationNode::Vrml_ConfigurationNode() :
DE_ConfigurationNode()
{
UpdateLoad();
}
{}
//=======================================================================
// function : STEPCAFControl_ConfigurationNode
@@ -45,7 +43,6 @@ Vrml_ConfigurationNode::Vrml_ConfigurationNode(const Handle(Vrml_ConfigurationNo
:DE_ConfigurationNode(theNode)
{
InternalParameters = theNode->InternalParameters;
UpdateLoad();
}
//=======================================================================

View File

@@ -0,0 +1,16 @@
puts "============"
puts "0033265: Modeling Algorithms - Boolean operation hangs on the attached shapes"
puts "============"
puts ""
restore [locate_data_file bug33265.brep] hull
plane p 0 0.0001 0 0 1 0
mkface f p -150 150 -150 150
bop hull f
bopsection res
checknbshapes res -vertex 16 -edge 16
checkprops res -l 170.631
checksection res -r 0
checkview -display res -2d -path ${imagedir}/${test_image}.png

View File

@@ -0,0 +1,17 @@
puts "============================================================================================="
puts "0031919: Modeling Algorithms - General Fuse raises ex-ception on attempt to imprint a contour to a shell"
puts "============================================================================================="
puts ""
pload ALL
restore [locate_data_file bug31919_Body.brep] body
restore [locate_data_file bug31919_Contour.brep] contour
bclearobjects
bcleartools
baddobjects body
baddtools contour
bfuzzyvalue 1
bfillds
bbop res 0
checknbshapes res -wire 1

View File

@@ -0,0 +1,13 @@
puts "============"
puts "0033227: Modeling Algorithm - BOPAlgo_BuilderSolid generates incomplete result"
puts "============"
puts ""
restore [locate_data_file bug33227.brep] s
bopbsolid r s
compound r_2 r_3 res
checknbshapes res -shell 6 -solid 2
checkprops res -v 3.33117e+07
checkview -display res -2d -path ${imagedir}/${test_image}.png

View File

@@ -0,0 +1,13 @@
puts "============"
puts "0033247: Modeling Algorithms - BOP report small edges problem and produce empty result"
puts "============"
puts ""
restore [locate_data_file bug33247_object.brep] a
restore [locate_data_file bug33247_tool.brep] b
bcommon r a b
checknbshapes r -vertex 98 -edge 131 -wire 35 -face 26
checkprops r -s 157.39
checkview -display r -2d -path ${imagedir}/${test_image}.png

View File

@@ -0,0 +1,11 @@
puts "REQUIRED ALL: Algorithm has failed"
puts "========================"
puts "0033306: Modeling Algorithm - Crash in TrimEdge() method"
puts "========================"
puts ""
restore [locate_data_file bug33306_1.brep] w1
restore [locate_data_file bug33306_2.brep] w2
thrusections res 0 0 w1 w2

View File

@@ -0,0 +1,9 @@
puts "==========================================================="
puts "0033304: Modeling Data - Floating point signal when converting a B-spline curve to analytical form"
puts "==========================================================="
puts "REQUIRED ALL: Conversion failed"
binrestore [locate_data_file bug33304_bspl_curv.bbrep] a
mkcurve c a
tocanon r c

View File

@@ -0,0 +1,17 @@
puts "##################################################"
puts "0030781: Sweep algorithm creates non-planar edges (orig. BOPAlgo_MakerVolume fails to build a solid)"
puts "##################################################"
binrestore [locate_data_file bug30781.bin] s
explode s
evolved result -s s_1 -p s_2 -solid -a -v -t 1.e-6
checkshape result
checknbshapes result -vertex 24 -edge 38 -wire 14 -face 14
checkprops result -s 41330.7
smallview
don result
fit
checkview -screenshot -2d -path ${imagedir}/${test_image}.png

View File

@@ -0,0 +1,48 @@
puts "============"
puts "0033244: Modeling Algorithms - Surface-surface intersection produces the double curves"
puts "============"
puts ""
set PI180 0.017453292519943295
set x -1.11630646267172
set y -4.54487349779333
set z 13.2493435203532
set dx -1.05794851588922e-07
set dy -1.39278337794573e-08
set dz 0.999999999999994
set ux 0.999999999999994
set uy 5.91645678915759e-31
set uz 1.05794851588922e-07
set semi-angle [expr 0.785398163360967 / ${PI180}]
set radius 0.560000000061149
cone s1 ${x} ${y} ${z} ${dx} ${dy} ${dz} ${semi-angle} ${radius}
set x -2.08647872350287e-07
set y -5.78732475509323
set z 13.2493436211
set dx -1.05794850062242e-07
set dy -1.39278350756825e-08
set dz 0.999999999999994
set ux 0.999999999999995
set uy 0
set uz 1.05794850062242e-07
set semi-angle [expr 0.785398163396248 / ${PI180}]
set radius 0.785398163396248
cone s2 ${x} ${y} ${z} ${dx} ${dy} ${dz} ${semi-angle} ${radius}
intersect ii s1 s2
if { ![isdraw ii_1] || ![isdraw ii_2] || [isdraw ii_3] } {
puts "ERROR. Intersection is wrong"
}
intersect jj s2 s1
if { ![isdraw jj_1] || ![isdraw jj_2] || [isdraw jj_3] } {
puts "ERROR. Intersection is wrong"
}

View File

@@ -0,0 +1,8 @@
restore [locate_data_file bug33298.brep] s
OFFSETSHAPE 35 {} $calcul $type
checkprops result -v 1.20105e+08
checknbshapes result -shell 1

View File

@@ -0,0 +1,8 @@
restore [locate_data_file bug33298_trimmed.brep] s
OFFSETSHAPE 35 {} $calcul $type
checkprops result -v 7.3756e+07
checknbshapes result -shell 1

View File

@@ -1,8 +1,7 @@
puts "TODO CR27414 ALL: Error: number of wire entities in the result"
puts "TODO CR27414 ALL: Error: number of face entities in the result"
puts "TODO CR27414 ALL: Error: operation with offset value 9 has failed"
puts "TODO CR27414 ALL: Error: operation with offset value 10 has failed"
puts "TODO CR27414 ALL: Operations with following offset values have failed: 9 10"
puts "TODO CR27414 ALL: Operations with following offset values have failed: 10"
puts "============================================================================================="
puts "0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode \"Complete\" join type \"Intersection\""