View Issue Details

IDProjectCategoryView StatusLast Update
0023610Open CASCADEOCCT:DRAWpublic2023-08-01 15:08
ReporteremvAssigned Tomsv 
PrioritynormalSeverityminor 
Status assignedResolutionopen 
PlatformAOSL 
Target VersionUnscheduled 
Summary0023610: checkshape command does not detect mismatch of the tolerance values among the sub-shapes of the shape
DescriptionThe current implementation of the checkshape command does not provide the detection of mismatch of the tolerance values among the sub-shapes of the shape.
For example:
 restore /dn43/new_tests_data-2012-11-02/public/brep/buc60462b.brep b1
 explode b1 f
 checkshape b1_1
 #This shape seems to be valid
 tolerance b1_1
 #FACE : MAX=0.0060000000000000001
 #EDGE : MAX=2.4118263892078198e-006
 #VERTEX : MAX=0.0060000000000000001

The check on the correspondence of the tolerance values between:
1. EDGE and its VERTICES (the tolerance value of the EDGE should be less then or equal to the minimal tolerance value of its VERTICES),
2. FACE and its sub-shapes (EDGES and VERTICES) (the tolerance value of the FACE should be less then or equal to the minimal tolerance value of its sub-shapes (EDGES and VERTICES))
should be added in the implementation of command.
Steps To Reproducerestore /dn45/occttests/tests/ED/chl/data/buc60463b.brep b
explode b f
checkshape b_1
tolerance b_1
checkshape b_2
tolerance b_2
...
checkshape b_36
tolerance b_36
TagsNo tags attached.
Test case number

Relationships

has duplicate 0000330 acknowledgedskv Open CASCADE checkshape command consider the shape with incorrect order of tolerance as valid. 
related to 0023696 assignedabk Open CASCADE Restore work of draw function nexplode for degenerated edges 
related to 0006280 closedbugmaster Open CASCADE Problem is tolerance of vertices after blend operation 

Activities

omy

2012-12-07 11:38

developer   ~0022615

Dear abv,
The fix is integrated into branch CR23610.
Please, review.

abv

2012-12-11 10:19

manager   ~0022646

Some remarks (mostly stylistic):

- In BRepCheck::CheckTolerance():
  a) move calls to BRep_Tool::Tolerance() on S out from the cycles, to avoid doing the same on each iteration
  b) there is no need to check tolerance of vertices contained in edges in the cycle made for face; however we need also to check vertices that can be contained in the face directly
  c) what is a purpose of variables aMin*Tolerance? please remove them
  d) this function is not needed at all (see below), please remove

- In BRepCheck_Edge::InContext():
  a) on line 243: why SubshapeNotInShape is changed to InvalidToleranceValue? looks like done by mistake
  b) on line 249: there is no need to call CheckTolerance which checks ALL edges; it is sufficient to compare tolerance of myShape (edge) and S (face)

- In BRepCheck_Vertex::InContext(), there is no need to call CheckTolerance which checks ALL vertices; it is sufficient to compare tolerance of myShape (vertex) and S (edge)

- In BRepTest_CheckCommands:
  a) in PrintSub(), please make aName to be a static buffer with greater size (e.g. 256) and use restricted size specification for sprintf, to avoid memory leaks (what we obviously have now) and corruption (which is quite possible)
  b) on line 178, avoid outputting specific message for wrong tolerance status
  с) in StructuralDump(), avoid using numeric values (1, ... 33); use enumeration values instead
  d) function FillProblems() is not needed; the following statement should work instead:
     NbProblems->ChangeValue(it1.Value())++;

omy

2012-12-11 14:11

developer   ~0022649

Last edited: 2012-12-11 14:11

Dear abv,
I've made fixes in the branch according to your notes.
Please, review.

abv

2012-12-11 19:33

manager   ~0022660

I have pushed the revised fix (rebased on master) to CR23610.

Note that the new check causes ~ 800 failures in automatic tests (out of ~ 11.500 tests in total). I suggest we shall discuss whether the tolerance criterion is really critical, to decide whether it should be enforced or can be abandoned.

abv

2012-12-14 19:45

manager   ~0022713

I have pushed this correction applied to new BOP (0021762) to branch CR23610_CR21762. Please run tests and identify cases when OCCT algorithm produces shapes withh invalid tolerances, to be fixed.

abk

2013-01-11 16:15

developer   ~0022943

Static public method EnsureToleranceRule(const TopoDS_Shape & theS) was
created in class BRepBuilderAPI_MakeShape to fix all tolerances of the
shape and it's subshapes by the tolerance rule:
vertex tolerance >= edge tolerance >= face tolerance.
Edge or vertex tolerance which does not satisfy the tolerance rule will be
increased.
Draw command EnsureTolRule was created to test new functional.
Tolerance post Build (Perform) fix was made for:
- BRepAlgoAPI_BooleanOperation,
- BRepBuilderAPI_Sewing,
- BRepFeat_MakePrism,
- BRepFilletAPI_MakeChamfer,
- BRepFilletAPI_MakeFillet,
- BRepOffsetAPI_MakePipe,
- BRepOffsetAPI_MakePipeShell,
- BRepOffsetAPI_NormalProjection,
- ShapeFix_Shape,
- ShapeUpgrade_ShapeDivide.

Draw command getsourcefile now returns result for:
- buildsweep,
- simulsweep,
- geompipe.

Method BRepGProp::LinearProperties was changed to avoid degenerated edges.

Correction of tolerances in result shape was made for group boolean and grids:
- heal drop_small_edges,
       fix_face_size,
       fix_gaps,
       split_angle_advanced,
       surface_to_bspline.

Correction of tolerances in input shapes was made for tests:
- bugs heal bug329,
- bugs modalg buc60462_1,
              buc60463,
              bug292,
              bug317,
              bug330,
              bug452_2,
              bug452_3,
              bug625,
              bug697_1,
              bug698,
              bug774_1,
              bug776_1,
              bug776_2,
              bug80,
              bug919,
- bugs moddata buc60652_2,
               buc60652_3,
               buc60707,
               bug368,
               bug75_2,
               fra62476_2,
               ger61235,
               pro20333,
- bugs step buc60948,
- bugs step bug630,
- bugs vis buc60661,
- bugs vis bug288_1,
- bugs vis bug288_4,
- bugs xde bug859,
- bugs xde bug861,
- feat featlf B8,
       featprism L2,
                 L8,
                 M1,
                 O6,
                 O9,
                 R1,
                 S1,
                 S2,
- sewing tol_0_01 T1.

Test case bugs/modalg/buc60462_2 was changed:
- tolerances were corrected on input shapes by the tolerance rule;
- set of error messages was changed.

Error message was changed in test files:
- chamfer/data/complex/B5,
- chamfer/data/complex/B6,
- chamfer/data/complex/B7.

Error messages was changed in test case heal/drop_small_edges/A4.

Draw function nexplode was replaced by explode in test case blend/complex/D4.

Error message was changed in test case data files:
- heal/data/advanced/H5,
- S7,
- ZC3,
- ZE6,
- ZE8,
- ZE9.
Result shape in the tests is invalid.

Error messages was changed in test case data file chamfer/data/complex/B9.

Error message was changed in test cases:
- thrusection/solids/A2,
- A3,
- A4,
- A5,
- A6,
- A7,
- A8,
- A9.

abk

2013-01-11 16:18

developer   ~0022944

Branch CR23610 was rebased to branch CR23610_2.
Review it please and direct to testing.

abk

2013-02-18 12:32

developer   ~0023367

The code was rebased to branch CR23610_3.

abk

2013-02-28 21:52

developer   ~0023541

BRepBuilderAPI_MakeShape::EnsureToleranceRule was replaced by
BRepLib::UpdateTolerances.

BRepBuilderAPI_MakeShape::EnsureToleranceRule was removed.

Draw command 'EnsureTolRule' was replaced by command 'updatetolerance' in
tests.

Draw command 'EnsureTolRule' was removed.

Input shapes were corrected by 'updatetolerance' in tests:
- bugs modalg bug697_3,
- bug697_4,
- bug697_7,
- bug697_8,
- bug697_11,
- bug1255,
- bug1255_1,
- bug5729,
- bug6181,
- bug6182,
- bug6272_85,
- bug6272_86,
- bug10842_5.

Error message was changed in tests:
- blend complex F6,
- F8,
- bugs fclasses bug309,

Error message was changed in test data files:
- chamfer data complex B5,
- B7,
- heal data advanced ZD3,
- standard R5.

Error message was changed in test 'bugs modalg bug10232'.

Error message was changed in test file 'heal data advanced ZD1'.

Class BRepLib_ToleranceRule was created to work with shape tolerances by
tolerance rule.

Some code from BRepLib was moved to BRepLib_ToleranceRule.

Tolerance post Build (Perform) fix was changed for:
- BRepBuilderAPI_Sewing,
- BRepFeat_MakePrism,
- BRepFilletAPI_MakeChamfer,
- BRepFilletAPI_MakeFillet,
- BRepOffsetAPI_MakePipe,
- BRepOffsetAPI_MakePipeShell
so that input shapes remain unchanged by the fix.

Tolerance post Build (Perform) fix was slightly changed for:
- BRepOffsetAPI_NormalProjection,
- ShapeFix_Shape,
- ShapeUpgrade_ShapeDivide.

Correction of tolerances in input shapes was made for tests:
- blend buildevol F9,
- complex B6,
- B8,
- D5,
- E2,
- E4,
- E6,
- E9,
- sewing tol_0_01 G3,
- G4.

abk

2013-03-14 17:33

developer   ~0023727

Build fix in CDL files was made.

Tolerances were corrected for input shapes in tests:
- bugs modalg_1 buc60462_2,
- bug1255,
- bug1255_1,
- bugs modalg_2 bug19811,
- bug22781_1,
- bug22781_2,
- bug22781_3,
- bug22781_4,
- bugs modalg_4 bug625,
- bug767,
- bugs moddata_2 bug75_2,
- bugs vis bug288_10,
- bugs vis bug288_7,
- pipe specific A1 - A9,
- B1 - B9,
- C1 - C6,
- K3 - K9,
- L1 - L9,
- M1 - M9,
- N1 - N5,
- S8 - S9,
- T1 - T9,
- U1 - U7.

Error messages were changed in tests and test files:
- bugs modalg_2 bug472_2,
- heal data advanced H5,
- drop_small_edges A4.

Input shapes checks were added in test bugs modalg_4 bug8842_1.

Tolerance post Build (Perform) fix was changed for BRepOffset_MakeOffset.

Standard_Boolean parameter theCopy with default value Standard_False was
added to methods LocOpe_WiresOnShape::Bind to determine whether to bind
passing shape or its copy.

Tolerance post Build (Perform) fix was created for
- BiTgte_Blend,
- LocOpe_Spliter.

Commands checkshape were added to tests:
- bugs modalg_2 bug22864,
- bug22946,
- modalg_4 bug8842_1.

Minor change in BRepFeat_SplitShape.cxx.

abk

2013-03-14 17:34

developer   ~0023728

The fix was pushed to branch CR23610_5.
Please review it.

Issue History

Date Modified Username Field Change
2012-12-03 09:30 emv New Issue
2012-12-03 09:30 emv Assigned To => abv
2012-12-03 11:05 abv Assigned To abv => emv
2012-12-03 11:05 abv Status new => assigned
2012-12-06 09:44 abv Assigned To emv => omy
2012-12-07 11:38 omy Note Added: 0022615
2012-12-07 11:38 omy Assigned To omy => abv
2012-12-07 11:38 omy Status assigned => resolved
2012-12-11 10:19 abv Note Added: 0022646
2012-12-11 10:19 abv Assigned To abv => omy
2012-12-11 10:19 abv Status resolved => assigned
2012-12-11 14:11 omy Note Added: 0022649
2012-12-11 14:11 omy Assigned To omy => abv
2012-12-11 14:11 omy Status assigned => resolved
2012-12-11 14:11 omy Note Edited: 0022649
2012-12-11 14:11 omy Note Edited: 0022649
2012-12-11 19:33 abv Note Added: 0022660
2012-12-11 19:33 abv Assigned To abv => emv
2012-12-11 19:33 abv Status resolved => feedback
2012-12-14 19:45 abv Note Added: 0022713
2012-12-14 19:45 abv Assigned To emv => abk
2012-12-14 19:45 abv Status feedback => assigned
2013-01-11 16:15 abk Note Added: 0022943
2013-01-11 16:18 abk Note Added: 0022944
2013-01-11 16:19 abk Assigned To abk => abv
2013-01-11 16:19 abk Status assigned => resolved
2013-01-11 16:39 abv Relationship added related to 0023696
2013-01-16 16:34 bugmaster Relationship added related to 0006280
2013-02-18 12:32 abk Note Added: 0023367
2013-02-28 21:52 abk Note Added: 0023541
2013-02-28 21:54 abk Assigned To abv => abk
2013-02-28 21:54 abk Status resolved => assigned
2013-03-14 17:33 abk Note Added: 0023727
2013-03-14 17:34 abk Note Added: 0023728
2013-03-14 17:34 abk Assigned To abk => abv
2013-03-14 17:34 abk Status assigned => resolved
2014-04-04 17:11 abv Target Version => 6.8.0
2014-09-26 08:51 abv Target Version 6.8.0 => 7.1.0
2015-04-09 12:00 msv Assigned To abv => msv
2015-04-10 10:13 msv Status resolved => assigned
2016-10-25 14:41 msv Target Version 7.1.0 => 7.2.0
2017-07-20 12:01 msv Target Version 7.2.0 => 7.3.0
2017-10-05 21:31 abv Relationship added has duplicate 0000330
2018-02-25 23:12 abv Target Version 7.3.0 => 7.4.0
2019-07-10 22:24 abv Target Version 7.4.0 => 7.5.0
2020-09-11 15:43 utverdov Target Version 7.5.0 => 7.6.0
2021-09-20 10:14 kgv Target Version 7.6.0 => 7.7.0
2022-10-24 10:40 szy Target Version 7.7.0 => 7.8.0
2023-08-01 15:08 dpasukhi Target Version 7.8.0 => Unscheduled