View Issue Details

IDProjectCategoryView StatusLast Update
0032447CommunityOCCT:Modeling Algorithmspublic2023-03-19 19:21
ReporterJerome Caucat Assigned Toakaftasev  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformLinuxOSUbuntu 20.04 
Target Version7.7.0Fixed in Version7.6.3 
Summary0032447: BRepOffsetAPI_MakePipeShell result in inaccurate shape when using -DT mode and DT_ShapeDivide on the spine
DescriptionUsing OCCT 7.5.2 with the patch for https://tracker.dev.opencascade.org/view.php?id=29645 and https://tracker.dev.opencascade.org/view.php?id=31147.

When trying to build a pipe with the provided spine and profiles using "setsweep -DT" and "buildsweep r -C -S" I get a Standard_NullObject.

If I use "DT_ShapeDivide" on the spine beforehand I then get a shape that does not represent well the spine and profiles (two straight pipes crossing each other), see the provided .png.

Adjusting the tolerance of "DT_ShapeDivide" can lead to better results, but not perfect.
Steps To Reproducetest bugs modalg_7 bug32447_1
test bugs modalg_7 bug32447_2
test bugs modalg_7 bug32447_3
test bugs modalg_7 bug32447_4
TagsNo tags attached.
Test case numbertest bugs modalg_7 bug32447

Attached Files

  • sample.zip (17,132 bytes)
  • sample_polyline.zip (1,579 bytes)
  • Screenshot.png (9,316 bytes)
  • Screenshot_1.png (36,620 bytes)
  • Screenshot_2.png (39,037 bytes)
  • test_DT_Screenshot_1.tcl (363 bytes)
  • test_DT_Screenshot_2.tcl (403 bytes)
  • test_DT.tcl (260 bytes)
  • Screenshot_3.png (6,909 bytes)
  • sample_cross.zip (61,410 bytes)
  • image.png (9,935 bytes)
  • Screenshot from 2022-03-22 09-49-08.png (4,172 bytes)
  • Suggestions_for_32447.docx (353,548 bytes)
  • image-2.png (1,595 bytes)

Relationships

related to 0032639 newmsv Community BRepOffsetAPI_MakePipeShell results in an invalid shape when using -DT mode 

Activities

Jerome Caucat

2021-06-16 16:14

reporter  

sample.zip (17,132 bytes)

Jerome Caucat

2021-09-28 17:19

reporter  

sample_polyline.zip (1,579 bytes)

Jerome Caucat

2021-09-28 17:20

reporter   ~0104420

I have a similar result (pipe looking like a cross) with the sample_polyline.zip where the spine is a polyline and with a single profile.

Jerome Caucat

2021-09-28 17:28

reporter   ~0104421

And I also reproduce in C++ using C0BSplineToSequenceOfC1BSplineCurve instead of ShapeUpgrade_ShapeDivideContinuity to convert the spine from C0 to C1 with the data from original sample.zip.

akaftasev

2021-10-14 15:08

developer  

Screenshot.png (9,316 bytes)

akaftasev

2021-10-14 15:24

developer   ~0104635

Last edited: 2021-10-14 16:38

Dear Jerome Caucat, there is a problem with your entry data.
As you can see on attached file (Screenshot.png), profile_4.brep lies "deaper" on spine than needed to recive correct result.
You also can recive more correct result if you exclude this profile from sweep algorithm, but not good enough (see attached file Screenshot_1.png, script: test_DT_Screenshot_1.tcl)
If you want to recieve result, passing through all presented profiles, it is needed to use 'buildsweep' command without '-C' or '-R' parameters, but resulting shape will have curvature on top border (see attached file Screenshot_2.png, script: test_DT_Screenshot_1.tcl)

akaftasev

2021-10-14 15:24

developer  

Screenshot_1.png (36,620 bytes)

akaftasev

2021-10-14 15:24

developer  

Screenshot_2.png (39,037 bytes)

akaftasev

2021-10-14 16:36

developer  

test_DT_Screenshot_1.tcl (363 bytes)

akaftasev

2021-10-14 16:36

developer  

test_DT_Screenshot_2.tcl (403 bytes)

Jerome Caucat

2021-10-15 10:58

reporter   ~0104645

Dear akaftasev, thank you for your feedback.

I see what you mean about profile number 4, there is indeed a problem with the data.

However, in sample_polyline.zip there is only one profile and we have a similar "cross" result. Using 'buildsweep' command without '-C' or '-R' parameters does not help. Is there also a problem with the data?

git

2021-10-19 17:51

administrator   ~0104748

Branch CR32447 has been created by andrey.kaftasev_159541.

SHA-1: 2943042c4fc6a48d24132e86f56fe9195b5306f9


Detailed log of new commits:

Author: akaftasev
Date: Tue Oct 19 17:50:53 2021 +0300

    0032447: Modeling Algorithms - BRepOffsetAPI_MakePipeShell result in inaccurate shape when using -DT mode and DT_ShapeDivide on the spine
    
    Changed tolerance for test

akaftasev

2021-10-22 10:31

developer   ~0104784

Last edited: 2021-10-22 10:33

Dear Jerome Caucat, unfortunately, on the "sample_polyline" configuration of the input data, the algorithm can’t handle corner trimming due to the location of the inner edges of the guide spine.
The algorithm sequentially processes the faces, built on the edges and tries to find the line along which it will be necessary to trim the intersecting faces.
See below the picture explaining this process (Screenshot_3.png).
As we can see on the above picture, this line can’t be built.
                               
At the same time, to get a valid result a work around may be used.
The attached tcl script implements some small workaround allowing to get a valid result.

We can offer you two possible approaches:
Solution 1: Continue investigation and solution elaboration.
            This problem requires additional more deep
            investigation/debugging of internal algorithm for a fixing
            solution elaboration.
            The exact estimation of the requested additional budget will be
            sent you by mail.

Solution 2: Use the workaround.
            This approach is presented by the ‘tcl’ script (test_DT.tcl).
            The script eliminates the problem of the location of the edges
            of the guide spine.
            You can play this script and check does it work for you.

akaftasev

2021-10-22 10:32

developer  

test_DT.tcl (260 bytes)

akaftasev

2021-10-22 10:34

developer  

Screenshot_3.png (6,909 bytes)

Jerome Caucat

2021-10-22 12:01

reporter   ~0104787

Dear akaftasev, thank you for your feedback.

Solution 2 does indeed produce correct results.

However, at the moment I fix the shape with fixshape before testing it for validity, in order to solve other construction problems. And after fixshape, the invalid "cross" shape, result of the sample, becomes valid, and I cannot detect the problem anymore. I'll see if I can get rid of fixshape and use the workaround for the other construction problems that were fixed by fixshape.

I'll discuss with my colleagues the solutions you suggested.

git

2021-11-25 13:58

administrator   ~0105418

Branch CR32447 has been updated forcibly by andrey.kaftasev_159541.

SHA-1: 27a3e26bbc5eb244f81484fd282882599a77021a

Jerome Caucat

2022-03-21 16:49

reporter   ~0107378

I've added 6 samples of spines and profiles for which the resulting pipes display a cross shape (sample_cross.zip). I hope this will help debugging and developing a solution.
sample_cross.zip (61,410 bytes)

akaftasev

2022-03-21 21:34

developer   ~0107383

Dear Jerome Caucat,
Thank you for your feedback and attached samples.
I have researched new samples, but unfortunately, almost all samples (exclude the sample_cross_4) have an indepensable geometry for the current set of input parameters of the algorithm bacause the trimming is not possible for them due to the inability to draw a red line,since the algorithm requires that the green lines intersect (see on attached picture).

Current samples can be resolved by changing your scripts to:

mksweep s
setsweep -DT
addsweep p
buildsweep r -S

In this part of the script, we change transition mode (delete "-C" flag) to avoid the necessity for corner trimming.
image.png (9,935 bytes)

Jerome Caucat

2022-03-22 12:03

reporter   ~0107386

Dear akaftasev,

Thank you for your feedback, I see what you mean, I'll double-check the data.

However, IMO without the "-C" the shape is inaccurate, the extremities are wrong and the width should be uniform (sample_cross_6):
Screenshot from 2022-03-22 09-49-08.png (4,172 bytes)

akaftasev

2022-03-29 11:51

developer   ~0107461

Last edited: 2022-03-29 11:51

Dear Jerome Caucat, My colleagues and I had discussions about your problem, and we have a question to you about possible solution (you can see it on the attached doc-file).

akaftasev

2022-03-29 21:48

developer   ~0107471

Suggestions_for_32447.docx (353,548 bytes)

Jerome Caucat

2022-03-30 10:39

reporter   ~0107474

Dear akaftasev, thank you for your feedback.

Regarding your question:
> does it matter to you the number of sub-shapes in the resulting shape?
No, it does not matter, you can merge the edges that smoothly connect to each other, as long as the resulting shape corresponds to the input spine and profile(s).

Regarding your recommendations on the input data, I'see what can be done.

I have a question about this recommendation:
> Lack of the smooth connections between neighboring edges of the spine
What do you mean exactly by `smooth`? The spine I provide is a wire, with connected edges.

akaftasev

2022-03-30 12:14

developer   ~0107479

Dear Jerome Caucat, you are right, that the spine is a wire with connected edges.
But under this paragraph, I meant to aviod wires, consisting of the edges, which connected with neighboring edges at angles, near 180 degrees (see on attached picture).
And, if it possible, it is better to combine these edges into one.
image-2.png (1,595 bytes)

akaftasev

2022-04-11 09:48

developer   ~0107830

Dear Jerome Caucat, for solve your problem, we offer to you the following solution:
We will add new flag for "mksweep" command, which will allow you to change input spine in accordance with the recommendations for a smooth connections automatically.
We need to know your decision about this solution.

Jerome Caucat

2022-04-19 10:14

reporter   ~0108025

Dear akaftasev,

I am ok with adding a new flag to the "mksweep" command (and its C++ equivalent). As long as I can use this flag all the time, or I can programmatically determine when to use this flag.

git

2022-05-11 18:19

administrator   ~0108400

Branch CR32447 has been updated forcibly by andrey.kaftasev_159541.

SHA-1: 5b185355c32c8dbb8c4b1b3e9bcde6c87471024c

git

2022-05-11 19:39

administrator   ~0108402

Branch CR32447 has been updated forcibly by andrey.kaftasev_159541.

SHA-1: b2060f7db1cf23f827e6427e3ff9937872860fb7

git

2022-05-12 11:45

administrator   ~0108405

Branch CR32447 has been updated forcibly by andrey.kaftasev_159541.

SHA-1: 18edc8ffecc08a748f4373b556e26156487fb91a

akaftasev

2022-05-12 16:42

developer   ~0108413

Branch for review:
OCCT - CR32447

Results of testing:
http://jenkins-test-occt.nnov.opencascade.com/view/CR32447-master-akaftasev/view/COMPARE/

jgv

2022-05-16 15:45

developer   ~0108445

Please add some cases testing history. See, for instance, the cases "bugs modalg_7 bug28949_*".

git

2022-05-19 11:15

administrator   ~0108496

Branch CR32447 has been updated forcibly by andrey.kaftasev_159541.

SHA-1: ef27466e134ef1b6d8dbad2e58147cef1b31cb73

git

2022-05-23 21:12

administrator   ~0108565

Branch CR32447_1 has been created by andrey.kaftasev_159541.

SHA-1: eb838bfeb38b740b40e5f2fc2036691cbbe65c12


Detailed log of new commits:

Author: akaftasev
Date: Wed May 11 18:17:31 2022 +0300

    0032447: BRepOffsetAPI_MakePipeShell result in inaccurate shape when using -DT mode and DT_ShapeDivide on the spine
    
    Added new option '-C' with possibility to set value of Angular and linear tolerances to 'mksweep' command to correct input spine by merging smooth connected neighboring edges

git

2022-05-23 21:13

administrator   ~0108566

Branch CR32447_1 has been updated forcibly by andrey.kaftasev_159541.

SHA-1: ccd0615a4fe4ec656dca391aa88ea996e2f76024

git

2022-05-24 12:19

administrator   ~0108581

Branch CR32447 has been updated forcibly by andrey.kaftasev_159541.

SHA-1: 3a0a1ef4c37fc2c7a898a3874bae375a125a39a7

jgv

2022-05-26 12:50

developer   ~0108622

Remarks:

1. Make default values of AngTol and LinTol in the command mksweep, must be

mksweep : mksweep wire [-C [AngTol LinTol]]

Also add to the comment notice that AngTol is in degrees.

2. There is no any check in your tests except checkshape: there must be also check of number of subshapes in the result, check of lengths of the results of the command "modified", check of areas of the results of the command "generated", picture of the result.

git

2022-05-27 13:40

administrator   ~0108651

Branch CR32447 has been updated forcibly by andrey.kaftasev_159541.

SHA-1: 81a04dc6e07bf61580380d20c8851b9bbace797c

jgv

2022-05-27 18:05

developer   ~0108663

Reviewed.

Branches for integration:
OCCT – CR32447
Products – NOT

afokin

2022-05-28 13:04

administrator   ~0108681

Combination -
OCCT branch : IR-2022-05-27
master SHA - 23c56fc66a1823b6e5e58ec3925a490d00eec6bc
e0ceb716c70188b98130b1550914140d0502a6f9
Products branch : IR-2022-05-27 SHA - aa5fde964222c544924ec5189b662b75a13e6bdd
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: 18742.72000000061 / 18677.050000000647 [+0.35%]
Products
Total CPU difference: 11723.460000000106 / 11729.870000000092 [-0.05%]
Windows-64-VC14:
OCCT
Total CPU difference: 20706.5625 / 20665.84375 [+0.20%]
Products
Total CPU difference: 13249.46875 / 13282.171875 [-0.25%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2022-05-28 15:25

administrator   ~0108694

Branch CR32447 has been deleted by mnt.

SHA-1: 81a04dc6e07bf61580380d20c8851b9bbace797c

git

2022-05-28 15:25

administrator   ~0108695

Branch CR32447_1 has been deleted by mnt.

SHA-1: ccd0615a4fe4ec656dca391aa88ea996e2f76024

akaftasev

2022-06-01 10:31

developer   ~0108762

Dear Jerome Caucat,
We added new flag '-C' to 'mksweep' command, which corrects the input spine by merging smooth connected neighboring edges.
You can also use ShapeUpgrade_UnifySameDomain class to programmatically correct input spine.

Related Changesets

occt: master 795c0d5d

2022-05-11 18:17:31

akaftasev


Committer: afokin Details Diff
0032447: BRepOffsetAPI_MakePipeShell result in inaccurate shape when using -DT mode and DT_ShapeDivide on the spine

Added new option '-C' with possibility to set value of Angular and linear tolerances to 'mksweep' command to correct input spine by merging smooth connected neighboring edges
Affected Issues
0032447
mod - src/BRepTest/BRepTest_SweepCommands.cxx Diff File
add - tests/bugs/modalg_7/bug32447_1 Diff File
add - tests/bugs/modalg_7/bug32447_2 Diff File
add - tests/bugs/modalg_7/bug32447_3 Diff File
add - tests/bugs/modalg_7/bug32447_4 Diff File

Issue History

Date Modified Username Field Change
2021-06-16 16:14 Jerome Caucat New Issue
2021-06-16 16:14 Jerome Caucat Assigned To => msv
2021-06-16 16:14 Jerome Caucat File Added: sample.zip
2021-09-28 17:19 Jerome Caucat File Added: sample_polyline.zip
2021-09-28 17:20 Jerome Caucat Note Added: 0104420
2021-09-28 17:28 Jerome Caucat Note Added: 0104421
2021-10-14 15:08 akaftasev File Added: Screenshot.png
2021-10-14 15:24 akaftasev Note Added: 0104635
2021-10-14 15:24 akaftasev File Added: Screenshot_1.png
2021-10-14 15:24 akaftasev File Added: Screenshot_2.png
2021-10-14 15:26 akaftasev Assigned To msv => Jerome Caucat
2021-10-14 15:26 akaftasev Status new => feedback
2021-10-14 16:36 akaftasev File Added: test_DT_Screenshot_1.tcl
2021-10-14 16:36 akaftasev File Added: test_DT_Screenshot_2.tcl
2021-10-14 16:38 akaftasev Note Edited: 0104635
2021-10-15 10:58 Jerome Caucat Note Added: 0104645
2021-10-19 17:51 git Note Added: 0104748
2021-10-22 10:31 akaftasev Note Added: 0104784
2021-10-22 10:31 akaftasev Note Edited: 0104784
2021-10-22 10:32 akaftasev File Added: test_DT.tcl
2021-10-22 10:33 akaftasev Note Edited: 0104784
2021-10-22 10:34 akaftasev File Added: Screenshot_3.png
2021-10-22 12:01 Jerome Caucat Note Added: 0104787
2021-10-22 16:17 msv Relationship added related to 0032639
2021-11-25 13:58 git Note Added: 0105418
2021-11-26 19:47 akaftasev Assigned To Jerome Caucat => akaftasev
2021-11-26 19:47 akaftasev Status feedback => assigned
2022-03-21 16:49 Jerome Caucat Note Added: 0107378
2022-03-21 16:49 Jerome Caucat File Added: sample_cross.zip
2022-03-21 21:34 akaftasev Note Added: 0107383
2022-03-21 21:34 akaftasev File Added: image.png
2022-03-22 12:03 Jerome Caucat Note Added: 0107386
2022-03-22 12:03 Jerome Caucat File Added: Screenshot from 2022-03-22 09-49-08.png
2022-03-29 11:51 akaftasev Note Added: 0107461
2022-03-29 11:51 akaftasev Note Edited: 0107461
2022-03-29 21:48 akaftasev File Deleted: Aerys_Suggestions.docx
2022-03-29 21:48 akaftasev Note Added: 0107471
2022-03-29 21:48 akaftasev File Added: Suggestions_for_32447.docx
2022-03-30 10:39 Jerome Caucat Note Added: 0107474
2022-03-30 12:14 akaftasev Note Added: 0107479
2022-03-30 12:14 akaftasev File Added: image-2.png
2022-04-11 09:48 akaftasev Note Added: 0107830
2022-04-19 10:14 Jerome Caucat Note Added: 0108025
2022-05-11 18:19 git Note Added: 0108400
2022-05-11 19:39 git Note Added: 0108402
2022-05-12 11:45 git Note Added: 0108405
2022-05-12 16:40 akaftasev Assigned To akaftasev => jgv
2022-05-12 16:40 akaftasev Status assigned => resolved
2022-05-12 16:40 akaftasev Steps to Reproduce Updated
2022-05-12 16:42 akaftasev Note Added: 0108413
2022-05-12 16:43 akaftasev Steps to Reproduce Updated
2022-05-12 16:43 akaftasev Test case number => test bugs modalg_7 bug32447
2022-05-16 15:45 jgv Assigned To jgv => akaftasev
2022-05-16 15:45 jgv Status resolved => assigned
2022-05-16 15:45 jgv Note Added: 0108445
2022-05-19 11:15 git Note Added: 0108496
2022-05-19 11:21 akaftasev Assigned To akaftasev => jgv
2022-05-19 11:21 akaftasev Status assigned => resolved
2022-05-23 11:44 jgv Assigned To jgv => akaftasev
2022-05-23 11:44 jgv Status resolved => assigned
2022-05-23 21:12 git Note Added: 0108565
2022-05-23 21:13 git Note Added: 0108566
2022-05-24 12:19 git Note Added: 0108581
2022-05-24 14:50 akaftasev Assigned To akaftasev => jgv
2022-05-24 14:50 akaftasev Status assigned => resolved
2022-05-26 12:50 jgv Assigned To jgv => akaftasev
2022-05-26 12:50 jgv Status resolved => assigned
2022-05-26 12:50 jgv Note Added: 0108622
2022-05-27 13:40 git Note Added: 0108651
2022-05-27 17:16 akaftasev Assigned To akaftasev => msv
2022-05-27 17:16 akaftasev Status assigned => resolved
2022-05-27 17:16 akaftasev Steps to Reproduce Updated
2022-05-27 17:17 akaftasev Assigned To msv => akaftasev
2022-05-27 17:17 akaftasev Status resolved => assigned
2022-05-27 17:17 akaftasev Assigned To akaftasev => jgv
2022-05-27 17:17 akaftasev Status assigned => resolved
2022-05-27 18:05 jgv Assigned To jgv => bugmaster
2022-05-27 18:05 jgv Status resolved => reviewed
2022-05-27 18:05 jgv Note Added: 0108663
2022-05-28 13:04 afokin Status reviewed => tested
2022-05-28 13:04 afokin Note Added: 0108681
2022-05-28 14:24 afokin Changeset attached => occt master 795c0d5d
2022-05-28 14:24 akaftasev Assigned To bugmaster => akaftasev
2022-05-28 14:24 akaftasev Status tested => verified
2022-05-28 14:24 akaftasev Resolution open => fixed
2022-05-28 15:25 git Note Added: 0108694
2022-05-28 15:25 git Note Added: 0108695
2022-06-01 10:31 akaftasev Note Added: 0108762
2022-06-28 06:40 azv Target Version => 7.7.0
2023-03-19 19:21 vglukhik Status verified => closed
2023-03-19 19:21 vglukhik Fixed in Version => 7.6.3