1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

261 Commits

Author SHA1 Message Date
emv
c5d8782cfd 0026420: BOPAlgo_Builder resets "Closed" flag in the result
Set flag Closed to new Wires and Shells created in General Fuse algorithm if necessary.

Test-cases for issue #26420
2015-07-29 15:30:42 +03:00
emv
787c4320b1 0026444: Boolean operation "bcut" gives invalid result between solid and halfspace solid.
class BOPAlgo_PaveFiller
method void BOPAlgo_PaveFiller::PutPaveOnCurve
  (const Standard_Integer nV,
   const Standard_Real aTolR3D,
   BOPDS_Curve& aNC,
   const BOPCol_MapOfInteger& aMI,
   BOPCol_DataMapOfIntegerReal& aMVTol,
   const Standard_Integer iCheckExtend)

Do not put the pave on the curve in case if there is already one with the same parameter.
Update tolerance of the existing vertex to reach the new one.

Added test case bugs/modalg_6/bug26444.
Test boolean/volumemaker/G1 is stable now (deleted TODOs), test offset/faces_type_i/C9 is bad (offset is done with wrong result).
2015-07-29 15:25:01 +03:00
emv
319da2e43f 0026019: Unstable behavior of test cases with operation mkvolume
The maps have been replaced with indexed maps to provide stability
of the algorithms based on the General Fuse algorithm.
2015-07-28 17:59:19 +03:00
abv
7f22979e82 0024023: Revamp the OCCT Handle - non-cost reference cast
Code corrected to avoid passing object to function as non-const reference to handle of the base type where it is not necessary.
2015-07-12 13:57:21 +03:00
abv
42cf5bc1ca 0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
2015-07-12 07:42:38 +03:00
abv
c04c30b3ee 0024023: Revamp the OCCT Handle -- general
Missing headers added; includes of headers "Handle_...hxx" removed.

Misuses of macro Handle() and its use in typedefs corrected.

Alias classes Profile and Option are removed from IFSelect; ones defined in MoniTool are used directly.

Removed header files defining only Handle classes (except Image_PixMap_Handle.hxx)

Classes SelectMgr_BaseFrustum and now inherit Standard_Transient and can be manipulated by Handle (not NCollection_Handle)

Fixed reference-type local variable pointing to temporary object

Use of handle in conditional expressions and comparisons to NULL are replaced by call to method IsNull()
2015-07-11 12:08:02 +03:00
abv
b7c077b9ee 0024750: Replace instantiations of TCollection generic classes by NCollection templates -- manual changes
Forward declaration of TCollection instances as classes are replaced by inclusion of corresponding header.
Cyclic dependencies between declaration of collection class and its item are resolved by forward declaring a class in collection header.
2015-07-11 12:01:54 +03:00
emv
0f04f1e11d 0026379: Wrong result produced by the volume maker algorithm
1. class BOPAlgo_ShellSplitter
static method void RefineShell(TopoDS_Shell& theShell,
                               BOPCol_ListOfShape& aLShX)
Added protection from INTERNAL edges.

2. class BOPAlgo_MakerVolume
method void BOPAlgo_MakerVolume::MakeBox(BOPCol_MapOfShape& theBoxFaces)
Creation of the overlapping box of proper size.

Test-cases for issue #26379
2015-07-09 14:20:02 +03:00
pkv
a2ab27029b 0026253: Wrong result obtained by General Fuse operator.
Replace BOPCol_MapOfShape by BOPCol_IndexedMapOfShape to provide
the same order of shells in the result

Test case for issue CR26253

Correction of test case for issue CR26253
2015-05-28 15:23:03 +03:00
azv
94f71cad33 0024682: Move out B-spline cache from curves and surfaces to dedicated classes BSplCLib_Cache and BSplSLib_Cache
1. B-spline cache was moved into separated classes: BSplCLib_Cache for 2D and 3D curves and BSplSLib_Cache for surfaces.

2. The cache is used now in corresponding adaptor classes (Geom2dAdaptor_Curve, GeomAdaptor_Curve and GeomAdaptor_Surface) when the curve or surface is a B-spline.

3. Algorithms were changed to use adaptors for B-spline calculations instead of curves or surfaces.

4. Precised calculation of derivatives of surface of revolution is implemented for the points of surface placed on the axis of revolution (Geom_SurfaceOfRevolution.cxx)

5. Small modifications are made to adjust algorithms to new behavior of B-spline calculation.

6. Test cases were modified according to the modern behavior.

7. Changes in BOPAlgo_WireSplitter, BOPTools_AlgoTools, BRepLib_CheckCurveOnSurface and ShapeAnalysis_Wire to use adaptors instead of geometric entities

8. Allow Geom2dAdaptor and GeomAdaptor in case of offset curve to use corresponding adaptor for basis curve

Modification of test-cases according to the new behavior.
2015-05-28 13:38:22 +03:00
emv
3285a59aa0 0026218: Wrong result done by General Fuse algorithm
class BOPAlgo_PaveFiller
1. method
  void BOPAlgo_PaveFiller::MakeBlocks()
 Update of FaceInfo IN information before filling the maps.

2. methods
  void BOPAlgo_PaveFiller::UpdateFaceInfo
    (BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME,
     const BOPCol_DataMapOfIntegerInteger& theDMV)

  void BOPAlgo_PaveFiller::ProcessExistingPaveBlocks
    (const Standard_Integer theInt,
     const BOPDS_IndexedMapOfPaveBlock& aMPBOnIn,
     const BOPCol_DataMapOfIntegerListOfInteger& aDMBV,
     BOPDS_IndexedDataMapOfShapeCoupleOfPaveBlocks& aMSCPB,
     BOPCol_DataMapOfShapeInteger& aMVI,
     BOPDS_MapOfPaveBlock& aMPB)

  Small changes in treatment of existing pave blocks when making new ones from intersection curves.

Test case for issue CR26218

Correction of test case for issue CR26218
2015-05-21 12:52:49 +03:00
pkv
905522eef8 0025880: fuzzy booleans with multiple tools
New features:
class BOPTools_AlgoTools2D
method:
 Standard_Integer BOPTools_AlgoTools2D::AttachExistingPCurve
   (const TopoDS_Edge& aEold,
    const TopoDS_Edge& aEnew,
    const TopoDS_Face& aF,
    const Handle(IntTools_Context)& aCtx)
has been added.

Purpose:
  To attach P-Curve on surface of the face <aF>  from the edge <aEold>
   to the edge <aEnew>
   It returns 0 in case of success.

Changes:
1. class BOPTools_AlgoTools
method:
 Standard_Boolean BOPTools_AlgoTools::IsSplitToReverse
  (const TopoDS_Face& theFSp,
   const TopoDS_Face& theFSr,
   Handle(IntTools_Context)& theContext)

The condition for a point on the surface of a face has been changed.

2. class BOPAlgo_PaveFiller
method:
 void BOPAlgo_PaveFiller::MakePCurves()

The treatment of E/E common bocks has been changed
to use mechanism of attacment P-Curves [ I.1 ]

Test case for issue CR25880
2015-04-30 14:42:59 +03:00
pkv
f47b8d2b37 0025937: Failed Cut Edge or Face by HalfSpace.
Addressing the causes of warnings.

Test cases for issue CR25937
2015-04-30 13:51:04 +03:00
emv
5e18f91719 0026112: Exception is raised during perform of General Fuse operation
class BOPAlgo_WireSplitter
method
Standard_Boolean RefineAngle2D(const TopoDS_Vertex& aV,
                               const TopoDS_Edge& aE,
                               const TopoDS_Face& myFace,
                               const Standard_Real aA1,
                               const Standard_Real aA2,
                               Standard_Real& aA)

Protection from null vector.

Test case for issue CR26112
2015-04-30 13:33:11 +03:00
pkv
a3476a9fe2 0025847: Wrong result obtained by General Fuse operator.
I. New features:
   No new features.

II. Changes:
II.1. class  BOPAlgo_PaveFiller
- method:
 void BOPAlgo_PaveFiller::PerformEE()
 has been changed.
 Intended set of VE interferences has been refined
 to avoid unwanted overlaps of pave blocks

- method:
 void BOPAlgo_PaveFiller::ForceInterfVE(const Standard_Integer nV,
                                       Handle(BOPDS_PaveBlock)& aPB,
                                       BOPDS_MapOfPaveBlock& aMPBToUpdate)
 The initialization of increment of VE interferences has been added.

- method:
 Standard_Boolean BOPAlgo_PaveFiller::ForceInterfVF
  (const Standard_Integer nV,
   const Standard_Integer nF)
 The initialization of increment of VF interferences has been added.

III. Modified entities:
 packages:
 BOPAlgo

Test case for issue CR25847
2015-02-26 13:40:16 +03:00
emv
bd28b2afac 0024646: Wrong result done by Boolean Operation algorithm
1. class BOPAlgo_PaveFiller
   method void BOPAlgo_PaveFiller::PerformEF()
   Do not create intersection vertices in case if it lies ON the boundary of the face.
2. class IntTools_Context
   New method
    Standard_Boolean IntTools_Context::IsPointInFace
        (const gp_Pnt& aP,
         const TopoDS_Face& aF,
         const Standard_Real aTol)
   has been implemented to check if the point IN the face.
3. class IntTools_EdgeFace
   method
    void IntTools_EdgeEdge::FindBestSolution(const Standard_Real aT11,
                                         const Standard_Real aT12,
                                         const Standard_Real aT21,
                                         const Standard_Real aT22,
                                         Standard_Real& aT1,
                                         Standard_Real& aT2)
   Treatment of the touching cases.

Test cases for issue CR24646

Correction of test cases for issue CR24646
2015-02-19 16:08:20 +03:00
pkv
0090ae85ab 0025788: Parallelization of the BOP Builder algorithm on second level
Changes:
class BOPAlgo_Builder
method:
  void BOPAlgo_Builder::FillIn3DParts
  (BOPCol_DataMapOfShapeListOfShape&,
   BOPCol_DataMapOfShapeShape&,
   const BOPCol_BaseAllocator& )
has been optimized and
modified to provide parallel treatment.

Correction of compilation errors

Test cases for issue CR25788
2015-02-12 11:58:02 +03:00
abv
2fe4f8f37b Fix compiler warning and adjust test cases for integration to master 2015-02-06 13:55:31 +03:00
msv
c7b59798ca 0024826: Wrapping of parallelisation algorithms
Simple primitives to parallelize loops type "for" and "foreach" were implemented. The primitives encapsulates complete logic for creating and managing parallel context of loops. Moreover the primitives may be a wrapper for some primitives from 3rd-party library - TBB.

To use it is necessary to implement TBB like interface which is based on functors. For example:

Class Functor
{
public:
  void operator() ([proccesing instance]) const
  {
    //...
  }
};

In the body of the operator () should be implemented thread-safe logic of computations that can be performed in parallel context. If parallelized loop iterates on the collections with direct access by index (such as Vector, Array), it is more efficient to use the primitive ParallelFor (because it has no critical section).

All parts of  OCC code which are using tbb were changed on new primitives.

0024826: Wrapping of parallelisation algorithms

Small fix.
2015-02-05 15:51:05 +03:00
pkv
402bfe81c0 0025769: Replace BOPCol_Array1 with NCollection_Vector
New features:
1. class NCollection_BaseVector
    method:
    void SetIncrement(const Standard_Integer aIncrement)
    has been added.
    The method allows to set the size of increment dynamically
    [ not in constructor ].

2 class BOPCol_Array1
    has been removed.

Changes:
1. classes
BOPDS_DS
BOPDS_InterfFF
BOPDS_Iterator
BOPDS_VectorOfCurve
BOPDS_VectorOfFaceInfo
BOPDS_VectorOfIndexRange
BOPDS_VectorOfInterfEE
BOPDS_VectorOfInterfEF
BOPDS_VectorOfInterfEZ
BOPDS_VectorOfInterfFF
BOPDS_VectorOfInterfFZ
BOPDS_VectorOfInterfVE
BOPDS_VectorOfInterfVF
BOPDS_VectorOfInterfVV
BOPDS_VectorOfInterfVZ
BOPDS_VectorOfInterfZZ
BOPDS_VectorOfListOfPassKeyBoolean
BOPDS_VectorOfListOfPaveBlock
BOPDS_VectorOfPoint
BOPDS_VectorOfShapeInfo
BOPAlgo_PaveFiller
QANewModTopOpe_Tools
have been modified to take into account New features: 1 and 2

2. class BOPTest_Chronometer
has been modified to use the driver of the type
OSD_Timer instead OSD_Chronometer
2015-02-05 14:32:08 +03:00
ski
bcf50875e3 0025734: GCC warnings in Android build
Warnings were fixed.

Fixed wrong re-initialization.
2015-02-05 14:24:12 +03:00
emv
92e24f9d36 0025722: Wrong implementation of SetFuzzyValue method
The following methods
  void BOPAlgo_ArgumentAnalyzer::SetFuzzyValue(const Standard_Real theFuzz)
  void BOPAlgo_Builder::SetFuzzyValue(const Standard_Real theFuzz)
  void BOPAlgo_PaveFiller::SetFuzzyValue(const Standard_Real theFuzz)
  void BOPDS_DS::SetFuzzyValue(const Standard_Real theFuzz)
  void BRepAlgoAPI_BuilderAlgo::SetFuzzyValue(const Standard_Real theFuzz)
  void BRepAlgoAPI_Check::SetFuzzyValue(const Standard_Real theFuzz)
have been corrected.

Added test case bugs/modalg_5/bug25722
2015-01-22 17:26:52 +03:00
emv
1b7ae95146 0025597: Invalid curve on surface in the result of General Fuse operation
1. The tool of computing the max distance between 3D curve and its 2d representation on the face
has been moved from static methods in BOPTools_AlgoTools class to BRepLib_CheckCurveOnSurface class.
2. The tools has been applied to 2d curves built during Boolean Operation
and to some intersection curves.
3. The functions
  Standard_Boolean BOPTools_AlgoTools::ComputeTolerance
    (const TopoDS_Face& theFace,
     const TopoDS_Edge& theEdge,
     Standard_Real& theMaxDist,
     Standard_Real& theMaxPar)
and
  Standard_Boolean IntTools_Tools::ComputeTolerance
    (const Handle(Geom_Curve)& theCurve3D,
     const Handle(Geom2d_Curve)& theCurve2D,
     const Handle(Geom_Surface)& theSurf,
     const Standard_Real theFirst,
     const Standard_Real theLast,
     Standard_Real& theMaxDist,
     Standard_Real& theMaxPar)
have been developed for easy access to BRepLib_CheckCurveOnSurface functionality.

class IntTools_FaceFace
method void IntTools_FaceFace::ComputeTolReached3d()
Case for Plane/BSpline intersection added for treatment.

Test case for issue CR25597

Fix for regression boolean bsection N7.

class BOPAlgo_PaveFiller
method
  void BOPAlgo_PaveFiller::UpdateFaceInfo
    (BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME,
     const BOPCol_DataMapOfIntegerInteger& theDMV)
Updating Face Info information with new vertices created in PostTreatFF.

Correction boolean/bsection/N2

Updated test cases.
2015-01-22 17:02:30 +03:00
pkv
49b0c452e2 0025614: Provide API access to the new fuctionalities of Boolean Components
I. New features:
1.1. class BOPAlgo_PaveFiller
method:
void BOPAlgo_PaveFiller::SetArguments(const TopTools_ListOfShape& theLS)
has been added to provide the setting argumemts  through
TopTools_ListOfShape

1.2. class BOPAlgo_Builder
method:
void BOPAlgo_Builder::SetArguments(const TopTools_ListOfShape& theLS)
has been added to provide the setting argumemts  through
TopTools_ListOfShape

1.3. class BOPAlgo_BOP
method:
void BOPAlgo_BOP::SetTools(const TopTools_ListOfShape& theLS)
has been added to provide the setting tools through
TopTools_ListOfShape

1.4. class BRepAlgoAPI_BuilderAlgo
construcror:
BRepAlgoAPI_BuilderAlgo::BRepAlgoAPI_BuilderAlgo
  (const BOPAlgo_PaveFiller& aPF)
has been added to provide the construction
of the object using BOPAlgo_PaveFiller object

method:
void BRepAlgoAPI_BuilderAlgo::SetArguments
 (const TopTools_ListOfShape& theLS)
has been added to provide the setting argumemts

method:
const TopTools_ListOfShape& BRepAlgoAPI_BuilderAlgo::Arguments()const
has been added to provide access to the argumemts

1.5. class BRepAlgoAPI_BooleanOperation
method:
void BRepAlgoAPI_BooleanOperation::SetTools
  (const TopTools_ListOfShape& theLS)
has been added to provide the setting tools

method:
const TopTools_ListOfShape& BRepAlgoAPI_BooleanOperation::Tools()const
has been added to provide access to the tools

1.6. class BRepAlgoAPI_Common
construcror:
BRepAlgoAPI_Common::BRepAlgoAPI_Common
(const BOPAlgo_PaveFiller& aPF)
has been added to provide the construction
of the object using BOPAlgo_PaveFiller object

1.7. class BRepAlgoAPI_Cut
construcror:
BRepAlgoAPI_Cut::BRepAlgoAPI_Cut
(const BOPAlgo_PaveFiller& aPF)
has been added to provide the construction
of the object using BOPAlgo_PaveFiller object

1.8. class BRepAlgoAPI_Fuse
construcror:
BRepAlgoAPI_Fuse::BRepAlgoAPI_Fuse
(const BOPAlgo_PaveFiller& aPF)
has been added to provide the construction
of the object using BOPAlgo_PaveFiller object

1.9. class BRepAlgoAPI_Section
construcror:
BRepAlgoAPI_Section::BRepAlgoAPI_Section
(const BOPAlgo_PaveFiller& aPF)
has been added to provide the construction
of the object using BOPAlgo_PaveFiller object

1.10. class BOPTest
method:
void BOPTest::APICommands(Draw_Interpretor& theCommands)
has been added to provide tcl commands to launch the algorithms
implemented in BRepAlgoAPI package using DRAWEXE application.

Commands:
 >bapibuild r
   performs General Fuse algorithm.
     r -the result of the operation

 >bapibop r type
   performs Boolean Operation agorithm
      r -the result of the operation
      type -type of the operation:
        0-common
        1-fuse
        2-cut
        3-cut21
        4-section

method:
void BOPTest::OptionCommands(Draw_Interpretor& theCommands)
has been added to provide tcl commands to set/get the options that is
necessary for the algorithms implemented in BRepAlgoAPI package.

Commands:
 >boptions
   dump the state of current options

  >brunparallel [0/1]
   1 -sets the parallel mode of the computations
   0 -sets the sequential mode of the computations

  >bfuzzyvalue value
    sets the fuzzy value

-------------------------------------------------------------------------------------------------------------
II. Changes:
II.1. class BRepAlgoAPI_BuilderAlgo
methods:
const TopTools_ListOfShape& BRepAlgoAPI_BuilderAlgo::Generated
  (const TopoDS_Shape& aS)
const TopTools_ListOfShape& BRepAlgoAPI_BuilderAlgo::Modified
  (const TopoDS_Shape& aS)
Standard_Boolean BRepAlgoAPI_BuilderAlgo::IsDeleted
  (const TopoDS_Shape& aS)
Standard_Boolean BRepAlgoAPI_BuilderAlgo::HasModified() const
Standard_Boolean BRepAlgoAPI_BuilderAlgo::HasGenerated() const
Standard_Boolean BRepAlgoAPI_BuilderAlgo::HasDeleted() const
has been redefined to provide access to the history

II.1. class BOPTest
method:
void BOPTest::APICommands(Draw_Interpretor& theCommands)
has been added to provide tcl commands to launch the algorithms
implemented in BRepAlgoAPI package using DRAWEXE application.

method:
void BOPTest::OptionCommands(Draw_Interpretor& theCommands)
has been added to provide tcl commands to set/get the options that is
necessary for the algorithms implemented in BRepAlgoAPI package.

II.2. class BRepAlgoAPI
method:
void BRepAlgoAPI::DumpOper(const Standard_CString theFilePath,
                           const TopoDS_Shape& theShape1,
                           const TopoDS_Shape& theShape2,
                           const TopoDS_Shape& theResult,
                           BOPAlgo_Operation theOperation,
                           Standard_Boolean isNonValidArgs)
has been removed. The contents has been shifted into the file:
BRepAlgoAPI_BooleanOperation.cxx

II.3. classes QANewModTopOpe_Glue, QANewModTopOpe_Intersection
the modifications have been done to provide the consistency with the
modifications in BRepAlgoAPI package [I].
-------------------------------------------------------------------------------------------------------------
III. Modified entities:
packages:
BOPAlgo
BRepAlgoAPI
BOPTest
QANewModTopOpe

Test cases for issue CR25614
2014-12-25 17:55:50 +03:00
emv
d2d9e8dc0e 0025470: Wrong result of COMMON operation
Fix for correct splitting of infinite faces.

Test cases for issue CR25470
2014-11-28 13:49:46 +03:00
emv
b1d15f53b3 0025477: Boolean Operations with additional tolerance - Fuzzy Boolean operations
Implementation of Fuzzy Boolean operations. Such operations allow to perform Boolean operations on the shapes
with near-coincidence between the entities of these shapes, i.e. between shapes in which some entities from one shape
are intended to be coincide with some entities from the other, but the coincidence is not precise.

API for Boolean operations has been improved to have a possibility to add new options.

Modified entities:
1. New option of setting additional tolerance have been added to the following classes:
class BOPAlgo_ArgumentAnalyzer
class BOPAlgo_BOP
class BOPAlgo_Builder
class BOPAlgo_MakerVolume
class BOPAlgo_PaveFiller
class BOPDS_DS
class BRepAlgoAPI_BooleanOperation
class BRepAlgoAPI_Check
class BRepAlgoAPI_Common
class BRepAlgoAPI_Cut
class BRepAlgoAPI_Fuse
class BRepAlgoAPI_Section

2. Following draw commands have been modified to support new functionality:
BOP commands:
bop b1 b2 [tol]
bcommon r b1 b2 [tol]
bcut r b1 b2 [tol]
bfuse r b1 b2 [tol]
bsection r s1 s2 [-n2d/-n2d1/-n2d2] [-na] [tol]
mkvolume r b1 b2 ... [-c] [-ni] [-s] [tol]
bfillds [-s -t] [tol]

Check commands:
bopcheck Shape [level of check: 0 - 9] [-t -s] [-tol tol]
bopargcheck [-F/O/C/T/S/U] [/R|F|T|V|E|I|P|C|S]] [#BF] [-tol tol]

3. Two new classes have been added to API to provide the root interface for algorithms
class BRepAlgoAPI_Algo
class BRepAlgoAPI_BuilderAlgo

Fix to eliminate the warning.

Test-cases for issue #25477
2014-11-28 12:24:39 +03:00
pkv
e83c01bfc0 0025505: General Fuse produces self-intersection shape
Changes:
class BOPAlgo_BuilderSolid
method:
void BOPAlgo_BuilderSolid::PerformAreas()

The misprint has been corrected

Test case for issue CR25505
2014-11-21 15:42:31 +03:00
pkv
ceb31c6156 0025450: Common operation returns wrong shape
Changes:
class BOPAlgo_PaveFiller
 method:
 void BOPAlgo_PaveFiller::PerformEF()

 The index of the face has been added in post-treatment map

Test cases for issue CR25450

Correction of test case for issue CR25450
2014-11-21 13:49:09 +03:00
emv
c088aa932f 0025446: The method BRepAlgoAPI_BooleanOperation::IsDeleted() returns TRUE for the faces contained in the result of BOP
1. The method
  Standard_Boolean BOPAlgo_Builder::IsDeleted
    (const TopoDS_Shape& theS)
  has been modified to return TRUE only if the shape theS has been deleted.
2. Added new draw (QA) command OCC25446 to test this method.
2014-11-07 17:10:49 +03:00
nbv
e98e39903b 0025410: Tool for extended check of validity of the curve on the surface
Modifications:
1. class BOPTools_AlgoTools
1.1. method
 Standard_Boolean BOPTools_AlgoTools::ComputeTolerance
  (const Handle(Geom_Curve)& theCurve3D,
   const Handle(Geom2d_Curve)& theCurve2D,
   const Handle(Geom_Surface)& theSurf,
   const Standard_Real theFirst,
   const Standard_Real theLast,
   Standard_Real& theMaxDist,
   Standard_Real& theMaxPar)
  It computes the max distance between points taken from 3D and 2D curves by the same parameter

1.2. method
 Standard_Boolean BOPTools_AlgoTools::ComputeTolerance
  (const TopoDS_Face& theFace,
   const TopoDS_Edge& theEdge,
   Standard_Real& theMaxDist,
   Standard_Real& theParameter)
  Computes the valid value of the tolerance for the edge using the function above.

2.  Added possibility to check shape on the validity of the curves on the surfaces.
2.1. New status BOPAlgo_InvalidCurveOnSurface has been added to the enumeration BOPAlgo_CheckStatus
2.2. class BOPAlgo_ArgumentAnalyzer
 method
   void BOPAlgo_ArgumentAnalyzer::TestCurveOnSurface()
 It checks each edge/face pair in the shape using the method ComputeTolerance from BOPTools_AlgoTools and stores invalid pairs to myResults.
 Invalid pairs are those which contain the edge with tolerance value less then the value computed by the ComputeTolerance method.

2.3. class BOPAlgo_CheckResult
 Added new fields:
    myMaxDist1 : Real from Standard;
    myMaxDist2 : Real from Standard;
    myMaxPar1  : Real from Standard;
    myMaxPar2  : Real from Standard;
 and corresponding setters and getters.
 These fields are used to store the results of the TestCurveOnSurface() check.

3. Added new option to the bopargcheck command and two new commands.
class BOPTest_CheckCommands
3.1. command bopargcheck
 As it is using the BOPAlgo_ArgumentAnalyzer class to check the shapes
 it checks also the validity of the curves on the surfaces.
 The output for the invalid shapes is following:

Draw[]> bopargcheck b2 /ic #f
Made faulty shape: s1COnS_1 (MaxDist = 0.0013334343378738308, MaxPar = 0.02884285498274167)
Made faulty shape: s1COnS_2 (MaxDist = 0.0013334340648766174, MaxPar = 0.02884285497934707)
Made faulty shape: s1COnS_3 (MaxDist = 0.0013335086668628978, MaxPar = 1.4133051942712607)
Made faulty shape: s1COnS_4 (MaxDist = 0.0013335086525838983, MaxPar = 1.4133051942713901)
Faulties for FIRST  shape found : 4
---------------------------------
Shapes are not suppotrted by BOP: NO
Self-Intersections              : NO
Check for SI has been aborted   : NO
Too small edges                 : NO
Bad faces                       : NO
Too close vertices              : NO
Too close edges                 : NO
Shapes with Continuity C0       : NO
Invalid Curve on Surface        : YES  Cases(4)  Total shapes(8)

Faulties for SECOND  shape found : 0

 The compounds s1COnS_* contain pair of edge and face.
 MaxDist is maximal distance between points taken from 3D curve of the edge and 2D curve of that edge on the face.
 MaxPar is a parameter in which the MaxDist is reached.

 To disable this check it is necessary to use option /S (bopargcheck shape /S).

3.2. command xdistef
 Usage of the command:
   xdistef edge face
 It computes distance between points taken from 3D curve of the edge and 2D curve of that edge on the face.
 Example:
Draw[]> explode s1COnS_1
s1COnS_1_1 s1COnS_1_2
Draw[]> whatis s1COnS_1_1
s1COnS_1_1 is a shape EDGE FORWARD Modified Orientable
Draw[]> whatis s1COnS_1_2
s1COnS_1_2 is a shape FACE FORWARD Modified Orientable
Draw[]> xdistef s1COnS_1_1 s1COnS_1_2
Max Distance = 0.0013334343378738308; Parameter on curve = 0.02884285498274167

3.3. command checkcurveonsurf
 Usage of the command:
  checkcurveonsurf shape.
 It checks each edge/face pair in the shape using the method ComputeTolerance from BOPTools_AlgoTools.
Example:
Draw[]> checkcurveonsurf b2
Invalid curves on surface:
edge e_0 on face f_0 (max dist: 0.0013334343378738, parameter on curve: 0.0288428549827417)
edge e_1 on face f_0 (max dist: 0.0013334340648766, parameter on curve: 0.0288428549793471)
edge e_2 on face f_1 (max dist: 0.0013335086668629, parameter on curve: 1.4133051942712607)
edge e_3 on face f_1 (max dist: 0.0013335086525839, parameter on curve: 1.4133051942713901)

Sugestions to fix the shape:
explode b2 e;
settolerance b2_6 0.0013335086668629;
settolerance b2_7 0.0013334343378738;
settolerance b2_8 0.0013334340648766;
settolerance b2_10 0.0013335086525839;

The command gives suggestions to fix the shape by increasing tolerance values of the invalid edges.
In some cases the tolerance values suggested by the tool can be very large.
Such values should be used very carefully, because setting large tolerance values to the sub-shapes
of the shape can make it non valid (self-interfered) or lead to unexpected result when using
such shapes in some operations (boolean for example).

Test case for issue CR25410
2014-10-30 14:27:29 +03:00
pkv
b858a6984e 0025184: Non-deterministic order of wires in the result of General Fuse
The source is brought in line with the current version

Test case for issue CR25184
2014-10-30 13:19:31 +03:00
pkv
8591531065 0025354: Intersection operation
I. New features:
I.1 class BOPAlgo_Section
     The class clontains the algorithm to build a result of Secton between the arguments.
     The result of Section consists of vertices and edges.
     The result of Section contains:
     1. new vertices that are subjects of V/V, E/E, E/F, F/F interferences
     2. vertices that are subjects of V/E, V/F interferences
     3. new edges that are subjects of F/F interferences
     4. edges that are Common Blocks
     5.a vertex is included in result of Section only when it is not shared
     between the edges of the result of Section

The class BOPAlgo_Section inherits the functionality of root class BOPAlgo_Builder

1.2 class BOPTest_Objects
method:
BOPAlgo_Section& BOPTest_Objects::Section()
has been added to get access to BOPAlgo_Section object

II. Changes:
II.1. class BOPAlgo_BOP
method:
void BOPAlgo_BOP::BuildSection()
has been removed
methods:
void BOPAlgo_BOP::CheckData()
void BOPAlgo_BOP::Prepare()
void BOPAlgo_BOP::PerformInternal1(const BOPAlgo_PaveFiller& theFiller)
const TopTools_ListOfShape& BOPAlgo_BOP::Generated
  (const TopoDS_Shape& theS)
have been modified to eliminate references on Section operation

II.2. class BOPAlgo_PaveFiller
method:
void BOPAlgo_PaveFiller::UpdateFaceInfo
  (BOPDS_DataMapOfPaveBlockListOfPaveBlock& theDME)
modified to prevent the usage of negative index in Data Structure

II.3. class BOPTest_Objects
static function:
Standard_Integer bopsection(Draw_Interpretor& di, Standard_Integer n, const char** a)
has been modified to use BOPAlgo_Section object instead of BOPAlgo_BOP object

static function:
Standard_Integer bbop(Draw_Interpretor& di,
                      Standard_Integer n,
                      const char** a)
has been modified to use BOPAlgo_Section object instea of BOPAlgo_BOP object

II.4. class BRepAlgoAPI_BooleanOperation
field:
myBuilder
the type has been changed from BOPAlgo_BOP* to BOPAlgo_Builder*
method:
void BRepAlgoAPI_BooleanOperation::Build()
has been modified  to use BOPAlgo_Section object

II.5. class QANewModTopOpe_Tools
method:
Standard_Boolean QANewModTopOpe_Tools::HasSameDomain(
                                                   const BOPAlgo_PBOP& theBuilder,
                                                     const TopoDS_Shape& theFace)

void QANewModTopOpe_Tools::SameDomain(
                                      const BOPAlgo_PBOP&   theBuilder,
                                      const TopoDS_Shape&   theFace,
                                      TopTools_ListOfShape& theResultList)

the type of the parameter <theBuilder> has been modified
to use BOPAlgo_Builder* instead of BOPAlgo_BOP*

II.6. The method:
const TopTools_ListOfShape& BOPAlgo_BOP::Generated
  (const TopoDS_Shape& theS)
has been removed
2014-10-23 16:20:54 +04:00
abv
0644bfa483 Fix compilation without TBB (VC9) 2014-10-17 16:58:48 +04:00
emv
4691b61a72 0025319: Bop Common produces strange results with same shapes.
class BOPAlgo_Builder
method
  void BOPAlgo_Builder::FillIn3DParts
    (BOPCol_DataMapOfShapeListOfShape& theInParts,
     BOPCol_DataMapOfShapeShape& theDraftSolids,
     const BOPCol_BaseAllocator&)
Sort faces before its classification relatively to the solid.

Test cases for issue CR25319

Correction of test cases for issue CR25319
2014-10-16 15:31:11 +04:00
abv
ab860031bd 0025202: Incorrect value of IsClosed flag in shapes produced by some algorithms
Method BRep_Tool::IsClosed() extended to analyze closure of wires in addition to shells and solids.
External and Internal edges and vertices are ignored in this check.
Analysis of compounds is disabled.

Update of flag Closed according to actual state is added in most places where new shells are constructed.

Draw-command and test case for issue CR25202
2014-10-10 16:28:36 +04:00
aml
e322db461d 0025269: Make parallel version of boolean operations avaible from DRAW
new command bsetparallelmode added.
usage: bsetparallelmode [1/0].

Documentation for new command "bsetparallelmode" added.
2014-10-02 13:33:43 +04:00
emv
92ae0f2fe3 0025232: Functionality to create solids from set of shapes
Purpose:
The algorithm is to build solids from set of shapes.
It uses the BOPAlgo_Builder algorithm to intersect the given shapes and build the images
of faces (if needed) and BOPAlgo_BuilderSolid algorithm to build the solids.
Steps of the algorithm:
1. Collect all faces: intersect the shapes if necessary and collect  the images of faces,
   otherwise just collect the faces to the <myFaces> list.
   All faces on this step added twice, with orientation FORWARD and REVERSED;
2. Create bounding box covering all the faces from <myFaces> and create solid box from corner points
   of that bounding box (myBBox, mySBox). Add faces from that box to <myFaces>;
3. Build solids using faces from <myFaces> using BOPAlgo_BuilderSolid algorithm;
4. Treat the result: Eliminate solid containig faces from <mySBox>;
5. Fill internal shapes: add internal vertices and edges into created solids;
6. Prepare the history.

Fix for regression.
class BOPAlgo_BuilderSolid:
The tolerance value used in BRepClass3d_SolidClassifier has been increased.

Test cases for issue CR25232

Small correction to eliminate the warning.
2014-09-26 17:12:29 +04:00
pkv
955b3e7102 0025242: Wrong result of cut operation.
1. class BOPDS_Iterator
method:
void BOPDS_Iterator::Intersect()
The ttreatment of solid/* interferences has been added.

2 class BOPAlgo_PaveFiller
protected methods:
void BOPAlgo_PaveFiller::PerformVZ()
void BOPAlgo_PaveFiller::PerformEZ()
void BOPAlgo_PaveFiller::PerformFZ()
void BOPAlgo_PaveFiller::PerformZZ()
has been added.
The methods are to Compute
Vertex/Solid
Edge/Solid
Face/Solid
Solid/Solid
interferences.

3. class BOPAlgo_PaveFiller
protected method:
void BOPAlgo_PaveFiller::PerformFF()
Empty interferences has not been added in the interferences' table

4. class BOPAlgo_CheckerSI
protected methods:
void BOPAlgo_CheckerSI::PerformVZ()
void BOPAlgo_CheckerSI:PerformEZ()
void BOPAlgo_CheckerSI::PerformFZ()
void BOPAlgo_CheckerSI::PerformZZ()
has been removed.

5. class BOPAlgo_BOP
protected method:
void BOPAlgo_BOP::BuildRC()
void BOPAlgo_BOP::BuildSolid()
changed to treat non-interferred solids and keep it in the result as they were

Test case for issue #25242
2014-09-25 15:58:10 +04:00
emv
a967f10410 0025043: there is no possibility to know what exactly subshape of source shape has detected problems by BRepAlgoAPI_Check
Since there is a possibility to run the check on self-intersection (BOPAlgo_CheckerSI algorithm) in non-destructive mode (source shape will not be modified)
there is no need to make copies of the arguments of BRepAlgoAPI_Check.

Test case added
2014-08-21 15:51:09 +04:00
pkv
fc88faf18a 0025163: Wrong result of common operation for faces.
Changes:
class BOPAlgo_WireSplitter
static function:
Standard_Boolean RefineAngle2D(const TopoDS_Vertex& aV,
                               const TopoDS_Edge& aE,
                               const TopoDS_Face& myFace,
                               const Standard_Real aA1,
                               const Standard_Real aA2,
                               Standard_Real& aA)
The contents of Domain 2D for the straight line has been changed.

class BOPTools_AlgoTools2D
method:
void BOPTools_AlgoTools2D::AdjustPCurveOnFace
  (const TopoDS_Face& aF,
   const Standard_Real aFirst,
   const Standard_Real aLast,
   const Handle(Geom2d_Curve)& aC2D,
   Handle(Geom2d_Curve)& aC2DA)
The treatment of cylindrical surfaces has been changed taking into account
existing values of tolerances of the edges.

Test cases for issue CR25163
2014-08-21 15:51:08 +04:00
pkv
465d1fba7c 0024157: Parallelization of assembly part of BO
The branch CR24157_12 deals with the parallelization of building the solids in case of lot internal faces.
Test case for issue CR24157
2014-06-26 13:00:50 +04:00
pkv
36f4947b8d 0024952: Possibility to break Boolean operations algorithm by user request
class: BOPAlgo_Algo
method:
void BOPAlgo_Algo::SetProgressIndicator
  (const Handle(Message_ProgressIndicator)& theObj)
Purpose: Set the Progress Indicator object <theObj>.

method:
void BOPAlgo_Algo::UserBreak() const
Purpose: Breaks the execution if the break signal is indicated.
2014-06-05 14:20:15 +04:00
abv
ddf2fe8eeb 0024911: Avoid using virtual functions in NCollection classes
NCollection_BaseCollection class, relevant header files, and macro DEFINE_BASECOLLECTION removed.
Hence methods Assign() from other compatible (via inheritance of BaseCollection) collections are not available any more, as well as base Iterator class.

All methods of Iterator classes are made non-virtual, allowing their inline expansion for better performance.

OCCT-specific operators new and delete added to collection classes and removed from iterator classes.
2014-06-05 14:12:18 +04:00
pkv
1e143abba6 0024940: WOK: Cyclic dependency detected between: BOPInt IntTools
Classes  BOPInt_Context, BOPInt_ShrunkRange, BOPInt_Tools have been removed.
Package BOPInt has been removed
Classes IntTools_Context, IntTools_ShrunkRange have been added to replace corresponding BOPInt_ classes.
The classes provide same functionality as corresponding BOPInt_ classes.
Classes :
BOPAlgo_ArgumentAnalyzer
BOPAlgo_Builder
BOPAlgo_BuilderArea
BOPAlgo_BuilderFace
BOPAlgo_BuilderSolid
BOPAlgo_CheckerSI
BOPAlgo_PaveFiller
BOPAlgo_ShellSplitter
BOPTools_AlgoTools3D
BRepFill_TrimShellCorner
IntTools_BeanFaceIntersector
IntTools_EdgeFace
IntTools_FaceFace
IntTools_Tools
have been modified to use new classes IntTools_Context IntTools_ShrunkRange

Class IntTools_Tools has been modofied to provide the functionality that was in BOPInt_Tools.
2014-05-29 15:27:31 +04:00
emv
b6a21c7e6d 0024950: Wrong result of Boolean CUT operation
Modification:
class BOPAlgo_PaveFiller
method BOPAlgo_PaveFiller::PutBoundPaveOnCurve().
Create bounding paves for each section curve separately.
Added test case bugs/modalg_5/bug24950
2014-05-29 15:02:07 +04:00
emv
f56518cdbe 0024879: Wrong result of General Fuse operation
Modifications:
1. class BOPAlgo_WireSplitter
  1.1. Removed static method RecomputeAngles(...).
  1.2. Minor corrections.
2. class BOPTools_AlgoTools
  2.1 method GetFaceOff
  For definition of an angles between faces the same step in 3D space has been used for all faces in the list.
  To define that step new static function MinStep3D has been implemented.

Added test case bugs/modalg_5/bug24879
Deleted unnecessary TODOs in test case bugs/modalg_2/bug497_3
2014-05-22 18:13:24 +04:00
pkv
f1baf495b6 0024157: Parallelization of assembly part of BO
The modifications deal with the parallelization of P-curves computations.
Added test cases bugs/modalg_5/bug24157_1 ... bug24157_9
2014-05-22 17:50:46 +04:00
pkv
63def8e679 0024933: Inconsistent results of self-interferences checker in SALOME and DRAW Applications.
class BOPAlgo_CheckerSI
   - methods:
void BOPAlgo_CheckerSI::Perform()

class BOPAlgo_ArgumentAnalyzer
   - methods:
void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences()

The changes have been done to provide the consistence
between results in SALOME Application and DRAW Application

The sytax of the command "bopcheck" has been changed:
bopcheck Shape [level of check: 0 - 9] [-t -s]
The options:
 -t - display elapsed CPU time
 -s - run in serial (non-parallel) mode. The default mode is parallel.

Modified test cases bugs/modalg_5/bug24029 and bugs/modalg_5/bug24764 according to changed output format of the "bopcheck" command.
2014-05-22 17:25:13 +04:00
emv
6a43d224e4 0024799: [regression] BRepAlgoAPI_Common returns empty result
To track the modification of the source vertices, the new vertices, created in PostTreatFF, have been added to myShapesSD map.
2014-05-08 12:46:00 +04:00
pkv
c26b5a34bc 0024157: Parallelization of assembly part of BO
The branch deals with the parallelization of Post-Treatment part of the Builder
2014-04-30 13:32:21 +04:00