1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

34 Commits

Author SHA1 Message Date
akaftasev
ae1683705e 0033420: Modeling Algorithm - Missing inner part after offset operation
Added condition to not remove face image, consisting only of invalid edges for artifactically invalid face.
This face image should be connected with other image faces minimum through the edge.
2023-08-07 11:32:08 +01: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
aml
33a4d46b28 0032781: Coding - get rid of unused headers [BRepCheck to ChFiKPart] 2022-01-19 20:05:46 +03:00
emv
0101c6febe 0032333: Modeling Algorithms - Empty(wrong) result of offset operation in mode "Complete" join type "Intersection"
Add more faces for intersection in rebuilding process basing on the connection of the splits of offset faces (special treatment for the artificially invalid faces).
When rebuilding faces add vertices common for faces for trimming the new intersection edges.

Adjust existing and create new test cases.
2022-01-13 20:52:33 +03:00
emv
b878139461 0032566: Modeling Algorithms - Incorrect result of offset operation in mode "Complete" join type "Intersection"
Before removal of the part make sure that it was not filled due to overlapping of opposite parts.
Improve procedure of checking for inverted edges by taking into account that the original edges may not be connected.

Correct test case offset/shape_type_i_c/YL5, as it was working incorrectly - some parts were missing.
2021-09-17 20:07:39 +03:00
akaftasev
7c6fecf9a8 0032330: Modeling Algorithms - Extend Offset algorithm with Progress Indicator and User Break
Add progress indicator to BRepOffset_MakeOffset::MakeOffsetShape().
2021-09-15 20:08:36 +03:00
emv
b7344f5d72 0032329: Modeling Algorithms - Refactoring of the BRepOffset_MakeOffset_1.cxx to decrease number of static methods
Refactoring of the BRepOffset_MakeOffset_1.cxx - Introduce local class BRepOffset_BuildOffsetFaces to compute splits of offset faces.

Change of tests is caused by the correction of the misprint in the code (incorrect input parameter for CheckEdgesCreatedByVertex method).
2021-07-23 11:28:42 +03:00
emv
62eafa5ac7 0032088: Modeling Algorithms - Empty result of offset operation in mode "Complete" join type "Intersection"
Mark inverted edges located inside loops of invalid edges as invalid as well.
2021-04-28 18:37:28 +03:00
jgv
8948e18df8 0031845: Modeling Algorithms - BRepOffsetAPI_MakeThickSolid fails
Multiple changes in BRepOffset_MakeOffset algorithm:
- correct fusing vertices;
- correct building intersection edges;
- correct intersecting new edges in 2D;
- correct building wire on a new face;
- correct building history.
2021-01-22 19:09:02 +03:00
emv
6f04cbb1fb 0031734: Modeling Algorithms - Incorrect result of offset operation in mode "Complete" join type "Intersection"
BRepOffset_MakeOffset_1::IntersectFaces - Build intersection pairs for rebuilding process basing on the intersection results and removed faces.
2020-08-28 17:53:40 +03:00
emv
bea1065693 0031639: Modeling Algorithms - Offset algorithm incorrectly fills one of the holes
Check if unclassified edge may be added as neutral (invalid in one split, valid in other) by checking the SD faces in which the edge was classified.
2020-07-03 11:03:08 +03:00
emv
4b59685af1 0031542: Modeling Algorithms - Offset algorithm produces incomplete result in mode "Complete" join type "Intersection"
Mark unchecked edges originated from vertices as invalid if they are contained in invalid faces.
2020-05-15 18:05:59 +03:00
emv
9e9b826aa1 0031307: Modeling Algorithms - Offset algorithm produces incorrect result in mode "Complete" join type "Intersection"
Do not classify edges originated from combination of edges and vertices as the classification will likely be unstable.
Mark faces containing valid inverted edges as invalid but do not remove them from valid splits.

Extend the debug command DBRep_SetComp to allow different containers for creating the TopoDS_Compound.
2020-05-15 18:05:58 +03:00
emv
420b38fde9 0031148: Modeling Algorithms - Offset adjacent co-planar faces with different offset values
Extend the Offset operation (Join Type "Intersection", mode "Complete") to allow different offset values on adjacent co-planar faces.
The gap between adjacent faces is closed by creating artificial face perpendicular to the face.

Adding test cases.
2019-11-29 10:06:22 +03:00
tiv
0423218095 0030895: Coding Rules - specify std namespace explicitly for std::cout and streams
"endl" manipulator for Message_Messenger is renamed to "Message_EndLine".

The following entities from std namespace are now used
with std:: explicitly specified (from Standard_Stream.hxx):
std::istream,std::ostream,std::ofstream,std::ifstream,std::fstream,
std::filebuf,std::streambuf,std::streampos,std::ios,std::cout,std::cerr,
std::cin,std::endl,std::ends,std::flush,std::setw,std::setprecision,
std::hex,std::dec.
2019-08-16 12:16:38 +03:00
emv
e08a9b0302 0030470: Modeling Algorithms - Invalid result of offset operation in mode "Complete" with join type "Intersection"
The fix is intended to obtain the correct result of offset operation in which the result contained only the small inverse part of the shape, which clearly should not have been included in the result at all.

The fix adds treatment of the inverted edges while removing the inside faces (collapsed ones) - RemoveInsideFaces method:
- Removing the invalid hanging blocks containing the inverted edges.
- Considering the face containing the inverted edges as the invalid one.

Test cases for the issue.
2019-03-07 18:07:29 +03:00
emv
2ebb10988d 0030394: Modeling Algorithms - Empty result of offset operation (mode "Complete", join type - "Intersection")
The following changes have been made for improving the offset algorithm:
1. Multi-connexity support - intersection of the faces connected to the edge belonging to more than two faces is now performed.
2. Avoid intersection of the faces connected through internal edge.
3. Filling gaps (holes) in the splits of the created offset faces to increase possibility of creation of the closed volume from these splits.

Test cases for the issue.
2018-12-07 18:52:29 +03:00
kgv
b2d1851c43 0029814: Modeling Data - add method TopoDS_Shape::NbChildren() for simple check of sub-shapes number
TopoDS_Shape::NbChildren() - new method has been introduced.
TopoDS_Shape.lxx, TopoDS_TShape.lxx - inline methods have been moved to hxx.
TopoDS_TShape_Flags has been redeclared as enumeration instead of preprocessor macros.

Cyclic dependency between headers TopoDS_Shape.hxx and TopoDS_TShape.hxx eliminated.

Places where TopoDS_Iterator is used only for calculation of number of sub-shapes are updated to use NbChildren() instead
2018-06-14 14:03:09 +03:00
emv
81a55a6996 0029333: Boolean Operations - Prevent modification of the input shapes in case their sub-shapes have not been modified
Prevent modification of the input shapes in destructive mode in case their sub-shapes have not been modified:
1. Prevent edge splitting for the pave blocks with old vertices if it is possible to use the existing edge (*BOPAlgo_PaveFiller::MakeSplitEdges*);
2. Prevent creation of the new containers (WIRES/SHELLS/COMPSOLIDS) if non of its parts have been modified (*BOPAlgo_Builder::FillImagesContainer*);
3. Prevent creation of the new face if non of its wires have been modified (*BOPAlgo_Builder::FillImagesFaces*);
4. If possible, use the original face to be the representative for the group of SD faces (*BOPAlgo_Builder::FillSameDomainFaces*).

Cosmetic changes:
1. Documentation of the *BOPAlgo_Builder* class.
2. Making simple methods of the *BOPAlgo_Builder* class inline.
3. Getting rid of the *BOPAlgo_Builder::mySplits* field as it is excessive. *BOPAlgo_Builder::myImages* can be used instead.
3. Moving the Check Inverted option from *BOPAlgo_Options* to *BOPAlgo_Builder*.

Test cases for the issue.
Adjustment of the test case to their current behavior.
Test case *blend/complex/H2* has been deleted as duplicate of the test case *blend/simple/Z1*.
2017-11-30 12:11:20 +03:00
emv
1155d05a06 0025609: Clean up the duplicate classes in TKBO project
1. The package BOPCol has been fully removed:
- *BOPCol_BaseAllocator* is replaced with *Handle(NCollection_BaseAllocator)*;
- *BOPCol_BoxBndTree* is replaced with *BOPTools_BoxBndTree*;
- *BOPCol_Box2DBndTree* is removed as unused;
- *BOPCol_DataMapOfIntegerInteger* is replaced with *TColStd_DataMapOfIntegerInteger*;
- *BOPCol_DataMapOfIntegerListOfInteger* is replaced with *TColStd_DataMapOfIntegerListOfInteger*;
- *BOPCol_DataMapOfIntegerListOfShape* is replaced with *TopTools_DataMapOfIntegerListOfShape*;
- *BOPCol_DataMapOfIntegerMapOfInteger.hxx* is removed as unused;
- *BOPCol_DataMapOfIntegerReal* is replaced with *TColStd_DataMapOfIntegerReal*;
- *BOPCol_DataMapOfIntegerShape* is replaced with *TopTools_DataMapOfIntegerShape*;
- *BOPCol_DataMapOfShapeBox* is replaced with *TopTools_DataMapOfShapeBox*;
- *BOPCol_DataMapOfShapeInteger* is replaced with *TopTools_DataMapOfShapeInteger*;
- *BOPCol_DataMapOfShapeListOfShape* is replaced with *TopTools_DataMapOfShapeListOfShape*;
- *BOPCol_DataMapOfShapeReal* is replaced with *TopTools_DataMapOfShapeReal*;
- *BOPCol_DataMapOfShapeShape* is replaced with *TopTools_DataMapOfShapeShape*;
- *BOPCol_DataMapOfTransientAddress* is removed as unused;
- *BOPCol_IndexedDataMapOfIntegerListOfInteger* is removed as unused;
- *BOPCol_IndexedDataMapOfShapeBox* is removed as unused;
- *BOPCol_IndexedDataMapOfShapeInteger* is removed as unused;
- *BOPCol_IndexedDataMapOfShapeListOfShape* is replaced with *TopTools_IndexedDataMapOfShapeListOfShape*;
- *BOPCol_IndexedDataMapOfShapeReal* is removed as unused;
- *BOPCol_IndexedDataMapOfShapeShape* is replaced with *TopTools_IndexedDataMapOfShapeShape*;
- *BOPCol_IndexedMapOfInteger* is replaced with *TColStd_IndexedMapOfInteger*;
- *BOPCol_IndexedMapOfOrientedShape* is replaced with *TopTools_IndexedMapOfOrientedShape*;
- *BOPCol_IndexedMapOfShape* is replaced with *TopTools_IndexedMapOfShape*;
- *BOPCol_ListOfInteger* is replaced with *TColStd_ListOfInteger*;
- *BOPCol_ListOfListOfShape* is replaced with *TopTools_ListOfListOfShape*;
- *BOPCol_ListOfShape* is replaced with *TopTools_ListOfShape*;
- *BOPCol_MapOfInteger* is replaced with *TColStd_MapOfInteger*;
- *BOPCol_MapOfOrientedShape* is replaced with *TopTools_MapOfOrientedShape*;
- *BOPCol_MapOfShape* is replaced with *TopTools_MapOfShape*;
- *BOPCol_PListOfInteger* is removed as unused;
- *BOPCol_PInteger* is removed as unused
- *BOPCol_SequenceOfPnt2d* is replaced with *TColgp_SequenceOfPnt2d*;
- *BOPCol_SequenceOfReal* is replaced with *TColStd_SequenceOfReal*;
- *BOPCol_SequenceOfShape* is replaced with *TopTools_SequenceOfShape*;
- *BOPCol_Parallel* is replaced with *BOPTools_Parallel*;
- *BOPCol_NCVector* is replaced with *NCollection_Vector*;

2. The class *BOPDS_PassKey* and containers for it have been removed as unused;

3. The unused containers from *IntTools* package have been removed:
- *IntTools_DataMapOfShapeAddress* is removed as unused;
- *IntTools_IndexedDataMapOfTransientAddress* is removed as unused;

4. The container *BiTgte_DataMapOfShapeBox* is replaced with *TopTools_DataMapOfShapeBox*;

5. The class *BOPTools* has been removed as duplicate of the class *TopExp*;
2017-11-30 12:11:15 +03:00
msv
f16a6cc5aa 0028467: Improve UnifySameDomain performance
This patch turns off some not needed modes of fix in the called ShapeFix_Face algorithm.

It stores pcurves on planes in the edges to avoid repeated computation of the same pcurves many times (it is done only when SafeInputMode is false).

It avoids unnecessary replace/apply actions in the modification context.

It removes the code that makes decomposition of surface of the face on several faces.

The new command buildpcurvesonplane has been added, which builds and stores pcurves of edges on planar faces. This is useful for investigations how presence of pcurves on planes influence performance of algorithms.

Make drawing of dimension line in snowflake test independent on the order of vertices in the result.
2017-11-14 15:56:53 +03:00
emv
bc4a38670e 0029188: Null shape is produced by 3D offset algorithm (mode="Complete", Join Type="Intersection")
The following improvements have been made in the 3D offset algorithm for mode "Complete" and Join type "Intersection":
- RemoveInsideFaces() - Removal of the invalid parts outside of the solids built from the splits of offset faces is now performed. It helps to avoid their rebuilding and speed-up the computation.
- FindVerticesToAvoid() - Strengthening the criteria for the vertices to be avoided in the new splits.

Test cases for the issue.
Adjustment of the test cases to current behavior.
2017-10-16 17:54:42 +03:00
emv
dcba2e5ce3 0029135: 3D Offset algorithm produces a NULL shape
UpdateValidEdges in BRepOffset_MakeOffset_1 - Perform the filtering of splits of the edges in two stages:
1. Separate filtering of the connected blocks using localized bounding edges taken only from the splits of offset faces from the block;
2. Combined treatment of the remaining splits using bounding edges from the splits of all offset faces.
2017-10-06 10:28:32 +03:00
emv
33ba856502 0028786: Refactoring of the Warning/Error reporting system of Boolean Operations Algorithm
0. Basic tools for defining classes representing alerts (errors, warnings etc.) and collecting them during execution of algorithms are added in Message package.

1. Refactoring of the Error/Warning reporting system of the algorithms in Boolean Component.
   To dump the description of the Error/Warning status of the algorithm the DumpErrors/DumpWarnings method should be called.
   Also, the methods GerErrorMsg(int Error) and GetWarningMsg(int Warning) have been implemented to get the description for the given Error/Warning.
   All Error/Warning statuses are now listed in the enumeration ErrorStatusEnum/WarningStatusEnum of the algorithm.
   It is also possible to get the shapes for which the warning has been set by using the method GetWarningShapes().

2. The new class BOPAlgo_Options has been created to unify the options of the BOPAlgo_* and BRepAlgoAPI* algorithms.

3. The new checks across the algorithms have been added to detect and report errors and warnings.

4. Test cases
  boolean bopcut_complex B9 E1 E5 E8
  boolean bopfuse_complex B4 B5 C9 D1 D4 D5 D6 D7
have been rewritten to use Cells Builder algorithm instead of Boolean Operations algorithm, because latter always returns error "Unsupported Boolean operation" for these cases.

5. New chapter has been added in the user guide for Boolean Operations - Error / Warning reporting system.

6. Added comment to NCollection_List::Remove(Iterator&)
2017-07-06 12:41:56 +03:00
emv
edfa30deef 0028259: Method MakeBlocksCnx is duplicated in two different places in BOPAlgo
The methods BOPAlgo_Tools::MakeBlocksCnx(), BOPAlgo_Tools::MakeBlocks() and static method MakeBlocksCnx in BOPAlgo_Builder_2.cxx have been replaced with the new template method BOPAlgo_Tools::MakeBlocks(). The blocks of connected elements are now stored into the list of list instead of data map.
All methods BOPAlgo_Tools::FillMap() have been replaced with the new template method BOPAlgo_Tools::FillMap().

Making the Pave Block with the smallest index of original edge to be the first in the Common Block (i.e. the representing Pave Block).

The following improvements have been made in Boolean Operations algorithm to avoid regressions:
- When updating the existing common block update its pave blocks in a way that the parameters of the paves should be valid for the original edge (bugs/modalg_5/bug24809);
- When trying to reduce the tolerance of the section edge check the tolerance of all Face/Face interferences that created this edge (boolean/volumemaker/C4,D2);
- Avoid producing the different Pave Blocks for the same section edge (boolean/volumemaker/D6);

Adjustment of the test cases.
2017-06-01 10:20:25 +03:00
emv
b672545674 0028473: Incorrect result of 3D offset operation in mode Complete, Join type Intersection (spike is created)
Looking for inverted edges among the neutral ones while checking the offset edges on validity (BRepOffset_MakeOffset_1::FindInvalidEdges).

Test cases for the issue.
2017-03-03 17:01:20 +03:00
emv
0da0275c18 0028442: Incorrect result of 3D offset operation in mode Complete, Join type - Intersection
1. For the support of the new configurations of the input shapes for the 3D offset algorithm
(shapes containing the faces with holes, which are growing during offset operation and
sometimes (depending on the offset value) even kill the faces themselves) the new function
*FindFacesInsideHoleWires* has been implemented. This new function looks for the splits of
the offset face located inside the new hole wire built from offset edges of the edges of the
hole wires of the original face. All found splits are simply removed.

2. Test cases for the issue.
2017-03-02 12:31:53 +03:00
emv
baaacd4683 0028387: Empty result of 3D Offset operation in mode Complete JoinType Intersection
1. The smarter conditions for removing the invalid faces with inverted edges have been implemented
   (BRepOffset_MakeOffset::RemoveInvalidSplitsByInvertedEdges).

2. Avoid removed (completely inside) edges in the filtering of invalid faces
   (BRepOffset_MakeOffset::FilterInvalidFaces).

3. Test cases for the issue.
2017-02-02 16:12:36 +03:00
emv
a8232603a0 0028273: Inefficient implementation of the BRepOffset_MakeOffset::BuildSplitsOfFace function
The method for building splits of the face BRepOffset_MakeOffset::BuildSplitsOfFace has been redesigned to use the BOPAlgo_BuilderFace algorithm directly.
The methods FindInvalidFaces and TrimNewIntersectionEdges have been corrected to avoid possible instabilities.
The filtering of invalid edges by existing bounding edges has been corrected to avoid removal of valid splits.
The method BRepOffset_Analyse::Correct2dPoint has been modified to avoid unnecessary initialization of BRepAdaptor_Surface.

Adjustment of the test cases.
Test case bugs modalg_6 bug26513 has been modified to unify faces of the input shape before operation.
2016-12-29 14:50:24 +03:00
emv
b443d53628 0028163: 3D Offset algorithm produces incorrect result on attached shape in mode Complete Intersection
1. Correct building of the lists of intersection faces connected to the same vertex.
2. For the artificially invalid cases with only one invalid face avoid usage of the edges having same origins as invalid edges.
3. Test cases for the issue.
4. Test cases offset shape_type_i_c XM1, ZW*,ZX*,ZY* have been modified to provide more clear result.
5. TODO statements have been removed from the test case offset shape_type_i_c XE6 as it is OK.
6. Test case offset shape_type_i_c ZZ2 is improvement.
2016-12-08 16:28:42 +03:00
apn
d96fd48ee5 Fix warning on vc14 2016-11-24 12:00:58 +03:00
emv
41aa3c3d5d 0028046: Incomplete result of offset operation in mode complete intersection
1. Special usage of the common edges not belonging to any invalidity while rebuilding the invalid faces (method IntersectFaces() in BRepOffset_MakeOffset_1.cxx).
Such edges could only be extended to the valid faces boundaries, thus could only split the face and not create any new part.

2. Test cases for the issue.
2016-11-23 13:02:53 +03:00
abv
45d0af05b9 0028096: VC14 compiler warnings of 7.1.0.beta
Warnings are eliminated
// minor corrections in headers
2016-11-17 15:14:42 +03:00
emv
ecf4f17cb8 0026917: 3D Offset algorithm produces incorrect result
Extension on the 3D Offset algorithm (Mode="Complete", Join Type = "Intersection")
for colliding cases to add support for new configurations of the shapes.
In the previous approach the result of the offset operation was build from
the offset faces using MakerVolume algorithm, without checking of the validity of these faces.
The new extension is based on this approach, but now the offset faces are being checked
on invalidity and rebuild in case of any. This allows (in case of successful rebuilding) to avoid creation
of the unforeseen parts such as dangling parts, spikes, inverted faces in the result of offset operation.
The main criteria for the validity of the faces is the coincidence of the normal
direction of the offset face with the normal direction of the original face.
Check for removal of invalid faces has been removed as obsolete.

BRepOffset_Inter2D: Avoid excess trimming of the edges due to coincidence with other edges.
BRepOffset_Inter3D: Careful treatment of the intersection of the faces connected only through vertices.

Eliminating the compiler warning.

Small corrections of test cases for issue CR26917
2016-11-08 18:05:05 +03:00