MantisBT - Community
View Issue Details
0032447Community[OCCT] OCCT:Modeling Algorithmspublic2021-06-16 16:142021-10-22 16:17
Jerome Caucat 
Jerome Caucat 
LinuxUbuntu 20.0464 bit
0032447: BRepOffsetAPI_MakePipeShell result in inaccurate shape when using -DT mode and DT_ShapeDivide on the spine
Using OCCT 7.5.2 with the patch for [^] and [^]

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.
No tags attached.
related to 0032639new msv BRepOffsetAPI_MakePipeShell results in an invalid shape when using -DT mode 
zip (17,132) 2021-06-16 16:14
zip (1,579) 2021-09-28 17:19
png Screenshot.png (9,316) 2021-10-14 15:08
png Screenshot_1.png (36,620) 2021-10-14 15:24
png Screenshot_2.png (39,037) 2021-10-14 15:24
? test_DT_Screenshot_1.tcl (363) 2021-10-14 16:36
? test_DT_Screenshot_2.tcl (403) 2021-10-14 16:36
? test_DT.tcl (260) 2021-10-22 10:32
png Screenshot_3.png (6,909) 2021-10-22 10:34
Issue History
2021-06-16 16:14Jerome CaucatNew Issue
2021-06-16 16:14Jerome CaucatAssigned To => msv
2021-06-16 16:14Jerome CaucatFile Added:
2021-09-28 17:19Jerome CaucatFile Added:
2021-09-28 17:20Jerome CaucatNote Added: 0104420
2021-09-28 17:28Jerome CaucatNote Added: 0104421
2021-10-14 15:08akaftasevFile Added: Screenshot.png
2021-10-14 15:24akaftasevNote Added: 0104635
2021-10-14 15:24akaftasevFile Added: Screenshot_1.png
2021-10-14 15:24akaftasevFile Added: Screenshot_2.png
2021-10-14 15:26akaftasevAssigned Tomsv => Jerome Caucat
2021-10-14 15:26akaftasevStatusnew => feedback
2021-10-14 16:36akaftasevFile Added: test_DT_Screenshot_1.tcl
2021-10-14 16:36akaftasevFile Added: test_DT_Screenshot_2.tcl
2021-10-14 16:38akaftasevNote Edited: 0104635bug_revision_view_page.php?bugnote_id=104635#r25872
2021-10-15 10:58Jerome CaucatNote Added: 0104645
2021-10-19 17:51gitNote Added: 0104748
2021-10-22 10:31akaftasevNote Added: 0104784
2021-10-22 10:31akaftasevNote Edited: 0104784bug_revision_view_page.php?bugnote_id=104784#r25910
2021-10-22 10:32akaftasevFile Added: test_DT.tcl
2021-10-22 10:33akaftasevNote Edited: 0104784bug_revision_view_page.php?bugnote_id=104784#r25911
2021-10-22 10:34akaftasevFile Added: Screenshot_3.png
2021-10-22 12:01Jerome CaucatNote Added: 0104787
2021-10-22 16:17msvRelationship addedrelated to 0032639

Jerome Caucat   
2021-09-28 17:20   
I have a similar result (pipe looking like a cross) with the where the spine is a polyline and with a single profile.
Jerome Caucat   
2021-09-28 17:28   
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
2021-10-14 15:24   
(edited on: 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)

Jerome Caucat   
2021-10-15 10:58   
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 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?
2021-10-19 17:51   
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
2021-10-22 10:31   
(edited on: 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.

Jerome Caucat   
2021-10-22 12:01   
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.