View Issue Details

IDProjectCategoryView StatusLast Update
0032239CommunityOCCT:Data Exchangepublic2023-03-19 20:22
Reporterrobertlipman Assigned Toona 
PrioritynormalSeveritymajor 
Status closedResolutionfixed 
Product Version6.3.1 
Target Version7.7.0Fixed in Version7.7.0 
Summary0032239: Data Exchange, STEP import - bounding box is too large
DescriptionThe bounding box is too large for the attached STEP file. The X range as reported by CAD Assistant is 157.233mm. However, measuring the X range in another viewer (eDrawings) shows 106.182mm. The Y and Z range is also too large.
Steps To ReproduceOpen the attached file in CAD Assistant and get the range. Measure the range some other way and compare the values.

pload XDE OCAF VISUALIZATION MODELING
dtracelevel trace
testreadstep {UTG RED DOT OPTIC.STEP} s
checkshape s s
bounding s


Output:
 -- The Shape s has problems :
  Check                                    Count
 ------------------------------------------------
  Unorientable Shape ....................... 4
  Not Closed ............................... 4
 ------------------------------------------------
*** Shapes with problems : 8
WIRE    :  4 Items -> compound named s_w
FACE    :  4 Items -> compound named s_f

-82.043211434255824 -97.41395356722937 -97.41395356722937 73.632312330445473 97.41395356722937 97.41395356722937
TagsNo tags attached.
Test case numberbugs/step/bug32239

Attached Files

  • UTG RED DOT OPTIC.zip (3,694,975 bytes)
  • optic_KO.png (25,608 bytes)
  • optic_lenses_KO.png (8,318 bytes)
  • optic.png (82,661 bytes)

Activities

robertlipman

2021-03-22 20:45

reporter  

UTG RED DOT OPTIC.zip (3,694,975 bytes)

kgv

2021-09-25 17:39

developer  

optic_KO.png (25,608 bytes)

kgv

2021-09-25 17:39

developer  

optic_lenses_KO.png (8,318 bytes)

kgv

2021-09-25 17:49

developer   ~0104375

Last edited: 2021-09-25 17:51

STEP import produces 4 unorientable Faces (for lenses).
So the problem could be reformulated as fixing STEP import to produce a valid shape (or to determine that specific STEP file is invalid and has no proper fix).

Afterwards, bounding box on fixed shape should has expected dimensions.

 -- The Shape s has problems :
  Check                                    Count
 ------------------------------------------------
  Unorientable Shape ....................... 4
  Not Closed ............................... 4
 ------------------------------------------------
*** Shapes with problems : 8
WIRE    :  4 Items -> compound named s_w
FACE    :  4 Items -> compound named s_f

-82.043211434255824 -97.41395356722937 -97.41395356722937 73.632312330445473 97.41395356722937 97.41395356722937


git

2022-09-08 10:51

administrator   ~0110844

Branch CR32239 has been created by ona.

SHA-1: 564f7a9938785f42c1082c5fdecd23e542b9d092


Detailed log of new commits:

Author: ona
Date: Wed Sep 7 18:48:09 2022 +0300

    0032239: Data Exchange, STEP import - bounding box is too large
    
    - ShapeFix_Face::FixMissingSeam method is fixed in order to handle degenerated torus
    - Calculation of degenerated torus bounding box is fixed

kgv

2022-09-08 13:59

developer   ~0110861

@ona
Please attach screenshots of the model after fix to this bug.

+static void ComputeDegeneratedTorus (const gp_Torus& Torus, 
+                           const Standard_Real UMin, const Standard_Real UMax, 
+                           const Standard_Real VMin, const Standard_Real VMax, 
+                           Bnd_Box& B)

Please:
- Name internal/protected/private functions starting with lower-case (computeDegeneratedTorus);
- Add description to the function;
- Apply OCCT name conventions (the/a prefixes to variables).

+  if (UMax - UMin >= uper && VMax - VMin >= vper)
+  {
+    // a whole sphere
+    B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
+  }
+  else

Putting "return" and avoiding "else" would make code simpler to read.

+  auto anIsDegeneratedTor  = ( aTorSurf.IsNull() ? Standard_False : aTorSurf->MajorRadius() < aTorSurf->MinorRadius() );

Please don't use 'auto'.

kgv

2022-09-08 14:00

developer   ~0110862

+checkview -display result -2d -path ${imagedir}/${test_image}.png

Please include 3D viewer screenshot to the test as well.

ona

2022-09-08 14:18

developer   ~0110866

Screenshot of the model after fix to this bug:
optic.png (82,661 bytes)

git

2022-09-08 16:31

administrator   ~0110877

Branch CR32239 has been updated by ona.

SHA-1: 4790c5412d3d3260973c2e8538f4eb4d330ca1b4


Detailed log of new commits:

Author: ona
Date: Thu Sep 8 16:14:26 2022 +0300

    #update after review

git

2022-09-13 12:26

administrator   ~0111002

Branch CR32239 has been updated by ona.

SHA-1: c87b227ab911b7ff6b8dd3804743661f2cce3464


Detailed log of new commits:

Author: ona
Date: Tue Sep 13 12:25:13 2022 +0300

    #test reference data is changed

gka

2022-09-13 13:02

developer   ~0111009

Could you please use real angle obtained from radius ratio instead of M_PI for the definition of the range by V:
  Standard_Real vper = M_PI - Precision::PConfusion();
in the function Compute Degenerated Torus of the class BndLib.cxx

git

2022-09-13 13:15

administrator   ~0111010

Branch CR32239 has been updated by ona.

SHA-1: 4e88e92730ccc078aac08f34a1ba75acc957df09


Detailed log of new commits:

Author: ona
Date: Tue Sep 13 13:14:14 2022 +0300

    #update after review

git

2022-09-14 13:12

administrator   ~0111037

Branch CR32239 has been updated forcibly by ona.

SHA-1: 41758a5459aaeac26529c5bfcd5e58cbb1175a89

ona

2022-09-15 12:15

developer   ~0111063

The following tests have different pictures, but there is not a regression:
- OCCT
  - de step_2 Q5
  - de step_2 Q6
  - de step_1 E6
  - mesh standard_shading E3
  - mesh standard_shading J2
  - mesh standard_shading E8
  - mesh standard_shading I9
  - mesh standard_shading T5
  - mesh standard_shading R1
  - mesh standard_shading A5
  - mesh standard_shading D1
  - mesh standard_shading N9
  - offset shape_type_a A8
  - bugs step bug26376
  - bugs modalg_2 bug5805_5
- Products
 - pointcloud reader gen_shell
 - pointcloud rendering circle_points
 - pointcloud rendering projection
 - pointcloud transformation bug30162

git

2022-09-19 14:07

administrator   ~0111147

Branch CR32239 has been updated forcibly by ona.

SHA-1: 1fcf87e1851b17b7790c3b0a23fceb8cebc3ec24

gka

2022-09-21 10:47

developer   ~0111164

Branch CR32239 has been reviewed

smoskvin

2022-09-25 13:31

administrator   ~0111244

Combination -
OCCT branch : IR-2022-09-23
master SHA - changes and them, and you can discard any commits you make in this
b3284f3ba911e4d18477ff1788ace3d7201a8827
changes and them, and you can discard any commits you make in this
e0ceb716c70188b98130b1550914140d0502a6f9
Products branch : IR-2022-09-23 SHA - f1708bcb12b969ae6e6578ab6d46bb65e135a733
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18666.730000000585 / 18776.180000000597 [-0.58%]
Products
Total CPU difference: 11867.75000000012 / 11959.870000000119 [-0.77%]
Windows-64-VC14:
OCCT
Total CPU difference: 20851.8125 / 20857.796875 [-0.03%]
Products
Total CPU difference: 14092.984375 / 14084.640625 [+0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2022-09-25 13:40

administrator   ~0111251

Branch CR32239 has been deleted by mnt.

SHA-1: 1fcf87e1851b17b7790c3b0a23fceb8cebc3ec24

Related Changesets

occt: master b0f92d3d

2022-09-07 18:48:09

ona


Committer: smoskvin Details Diff
0032239: Data Exchange, STEP import - bounding box is too large

- ShapeFix_Face::FixMissingSeam method is fixed in order to handle degenerated torus
- Calculation of degenerated torus bounding box is fixed
- Test reference data is changed
Affected Issues
0032239
mod - src/BndLib/BndLib.cxx Diff File
mod - src/ShapeFix/ShapeFix_Face.cxx Diff File
mod - tests/bugs/moddata_1/bug15 Diff File
add - tests/bugs/step/bug32239 Diff File

Issue History

Date Modified Username Field Change
2021-03-22 20:45 robertlipman New Issue
2021-03-22 20:45 robertlipman Assigned To => gka
2021-03-22 20:45 robertlipman File Added: UTG RED DOT OPTIC.zip
2021-03-24 10:14 kgv Target Version => 7.6.0
2021-03-24 10:14 kgv Summary Bounding box to large => BRepBndLib returns too large Bounding Box
2021-09-25 17:39 kgv File Added: optic_KO.png
2021-09-25 17:39 kgv File Added: optic_lenses_KO.png
2021-09-25 17:39 kgv Steps to Reproduce Updated
2021-09-25 17:43 kgv Product Version 7.5.0 => 6.3.1
2021-09-25 17:44 kgv Steps to Reproduce Updated
2021-09-25 17:45 kgv Summary BRepBndLib returns too large Bounding Box => Data Exchange, STEP import - BRepBndLib returns too large Bounding Box
2021-09-25 17:49 kgv Note Added: 0104375
2021-09-25 17:49 kgv Note Edited: 0104375
2021-09-25 17:50 kgv Note Edited: 0104375
2021-09-25 17:50 kgv Note Edited: 0104375
2021-09-25 17:51 kgv Note Edited: 0104375
2021-09-25 17:51 kgv Summary Data Exchange, STEP import - BRepBndLib returns too large Bounding Box => Data Exchange, STEP import - bounding box is too large
2021-11-01 18:13 szy Target Version 7.6.0 => 7.7.0
2022-08-18 11:09 gka Assigned To gka => robertlipman
2022-08-18 11:10 gka Assigned To robertlipman => ona
2022-09-08 10:51 git Note Added: 0110844
2022-09-08 13:51 ona Assigned To ona => gka
2022-09-08 13:51 ona Status new => resolved
2022-09-08 13:59 kgv Note Added: 0110861
2022-09-08 14:00 kgv Note Added: 0110862
2022-09-08 14:18 ona Note Added: 0110866
2022-09-08 14:18 ona File Added: optic.png
2022-09-08 16:31 git Note Added: 0110877
2022-09-13 12:26 git Note Added: 0111002
2022-09-13 13:02 gka Note Added: 0111009
2022-09-13 13:02 gka Assigned To gka => ona
2022-09-13 13:02 gka Status resolved => assigned
2022-09-13 13:15 git Note Added: 0111010
2022-09-14 13:12 git Note Added: 0111037
2022-09-15 12:15 ona Note Added: 0111063
2022-09-15 12:17 ona Assigned To ona => gka
2022-09-15 12:17 ona Status assigned => resolved
2022-09-19 14:07 git Note Added: 0111147
2022-09-21 10:47 gka Assigned To gka => bugmaster
2022-09-21 10:47 gka Status resolved => reviewed
2022-09-21 10:47 gka Note Added: 0111164
2022-09-25 13:31 smoskvin Status reviewed => tested
2022-09-25 13:31 smoskvin Note Added: 0111244
2022-09-25 13:36 smoskvin Test case number => bugs/step/bug32239
2022-09-25 13:38 smoskvin Changeset attached => occt master b0f92d3d
2022-09-25 13:38 ona Assigned To bugmaster => ona
2022-09-25 13:38 ona Status tested => verified
2022-09-25 13:38 ona Resolution open => fixed
2022-09-25 13:40 git Note Added: 0111251
2023-03-19 20:22 vglukhik Status verified => closed
2023-03-19 20:22 vglukhik Fixed in Version => 7.7.0