MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030003Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2018-07-31 16:222020-10-28 17:02
Reporterssv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatustestedResolutionopen 
PlatformWindowsOSVC++ 2013OS Version64 bit
Product Version[OCCT] 7.3.0 
Target Version[OCCT] 7.5.0Fixed in Version 
Summary0030003: Modeling Algorithms, GeomFill_Pipe - construction of pipe by two circular sections and spine curve leads to crash
DescriptionThe following simple code leads to an exception (Standard_ConstructionError) in GeomFill_NSections:
  TColgp_Array1OfPnt pathPoles(1, 3);
  pathPoles(1) = gp_Pnt(0.0,    0.0,   0.0);
  pathPoles(2) = gp_Pnt(100.0,  0.0,   0.0);
  pathPoles(3) = gp_Pnt(100.0,  100.0, 0.0);

  Handle(Geom_BezierCurve) path = new Geom_BezierCurve(pathPoles);

  Handle(Geom_Curve)
    c1 = GeomConvert::CurveToBSplineCurve( new Geom_Circle(gp_Ax2(gp::Origin(), gp::DX()), 10.0), Convert_Polynomial 
);
  //
  Handle(Geom_Curve)
    c2 = GeomConvert::CurveToBSplineCurve( new Geom_Circle(gp_Ax2(gp::Origin(), gp::DX()), 20.0), Convert_Polynomial 
);

  GeomFill_Pipe Pipe(path, c1, c2); // Error!
  Pipe.Perform();


There is a workaround for the issue which looks quite ugly but works (combug_02.png). The user can wrap each Geom_Circle with Geom_TrimmedCurve:
  Handle(Geom_Curve)
    c1 = GeomConvert::CurveToBSplineCurve( new Geom_TrimmedCurve(new Geom_Circle(gp_Ax2(gp::Origin(), 
gp::DX()), 10.0), 0, 2*M_PI), Convert_Polynomial );
  //
  Handle(Geom_Curve)
    c2 = GeomConvert::CurveToBSplineCurve( new Geom_TrimmedCurve(new Geom_Circle(gp_Ax2(gp::Origin(), 
gp::DX()), 20.0), 0, 2*M_PI), Convert_Polynomial );


This hack makes the curves c1 and c2 non-periodic and prevents Pipe operator from failure. However, it looks very reasonable to be able to work with periodic profiles in Pipes without this sort of workarounds. Please, also see an important note just below.

Note: ideally, GeomConvert::CurveToBSplineCurve() should not be called as GeomFill_Pipe converts section curves to splines internally. However, such internal conversion leads to another weird result: poor approximation of sections represented with rational curves (combug_03.png). Therefore, in the code above I used a polynomial approximation to avoid rationality. This is, again, weird, but that's likely a matter for another bug report.
Steps To Reproducetest pipe bugs bug30003
TagsNo tags attached.
Test case numberpipe/bugs/bug30003
Attached Filespng file icon combug_01.png (6,784 bytes) 2018-07-31 16:22
png file icon combug_02.png (19,931 bytes) 2018-07-31 16:22
png file icon combug_03.png (30,750 bytes) 2018-07-31 16:22

- Relationships

-  Notes
(0092771)
szy (manager)
2020-06-26 16:25

For processing.
(0095240)
git (administrator)
2020-09-23 14:50

Branch CR30003 has been created by akaftasev.

SHA-1: 4152b0f524582b810bc516cbdd7ee54ab8c66985


Detailed log of new commits:

Author: akaftasev
Date: Wed Sep 16 16:01:38 2020 +0300

    0030003: Construction of pipe by two circular sections and spine curve leads to crash
    
    Added new check for periodic path and sections
(0095263)
git (administrator)
2020-09-24 12:49

Branch CR30003 has been updated forcibly by akaftasev.

SHA-1: 545ce7185e313f6d105b88285ea2de120cc1ac78
(0095268)
git (administrator)
2020-09-24 15:09

Branch CR30003 has been updated forcibly by akaftasev.

SHA-1: beef2f3cc54bd00c809fefb05225b9943ba52272
(0095729)
jgv (developer)
2020-10-05 15:17

Remarks:

1. GeomFill_NSections.hxx

rename field of class "isPathPeriodic" to "myIsPathPeriodic".

2. GeomFill_Pipe.cxx

line 729: comparisons may be incorrect, it is better Abs(deb - first) < aTol

3. New Draw command is redundant. Please use existing command "tuyau" for pipe and command "beziercurve" for building bezier curves.

4. Please create more test cases: for periodic path and V-periodic surface, for periodic path and non-V-periodic surface, ...
(0096014)
git (administrator)
2020-10-16 17:48

Branch CR30003 has been updated forcibly by akaftasev.

SHA-1: f35a55903ea999be4b85f60c7cec52c3b1ccbf83
(0096015)
git (administrator)
2020-10-16 17:49

Branch CR30003 has been updated forcibly by akaftasev.

SHA-1: df71724a0955a5c3eadc1276216a864d6514f93f
(0096061)
kgv (developer)
2020-10-19 17:51

+  isPathPeriodic = thePathPeriodic;

Please use initialization list instead of constructor body for initialization of class fields.

-    mySec = new (GeomFill_NSections) (SeqC,SeqP,deb,fin,first,last);
+    mySec = new (GeomFill_NSections) (SeqC, SeqP, deb, fin, first, last, isPathPeriodic);

Please use common syntax "new GeomFill_NSections()" while changing these lines.

+# Modeling Algorithms - Construction of pipe by two circular sections and spine curve leads to crash


Please move bug description in test case to puts, to make it appear in HTML log, e.g.:
-puts "OCC30003"
+puts "0030003: Modeling Algorithms - Construction of pipe by two circular sections and spine curve leads to crash"

 Added new check for periodic path and sections

Please put into commit description the location of the fix (e.g. which algorithms/classes have been affected).
(0096266)
git (administrator)
2020-10-26 12:40

Branch CR30003 has been updated forcibly by ifv.

SHA-1: 3bc06f08aaa41d62e7c45bde9685c429cc183685
(0096275)
git (administrator)
2020-10-26 17:00

Branch CR30003 has been updated by ifv.

SHA-1: 46cd1367bded1aa61b8f194beed84e8f4313c03e


Detailed log of new commits:

Author: ifv
Date: Mon Oct 26 17:03:31 2020 +0300

    New version

Author: ifv
Date: Mon Oct 26 16:48:36 2020 +0300

    Revert changes

(0096276)
git (administrator)
2020-10-26 17:12

Branch CR30003 has been updated forcibly by ifv.

SHA-1: 808b35214de5c7d99c502f42114b35060d02ac6c
(0096280)
ifv (developer)
2020-10-26 20:48

Branch CR30003 is ready for review,
test result - CR30003-master-IFV

Branches for integration:
OCCT - CR30003
Products - not
(0096291)
jgv (developer)
2020-10-27 11:36

Reviewed.

Branches for integration:
OCCT - CR30003
Products - not
(0096346)
bugmaster (administrator)
2020-10-28 16:59

Combination -
OCCT branch : OCCT-750
master SHA - 5445eaeed56eb279c0ab00af552e614f1bbef9b6
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : OCCT-750 SHA - ebaa925ad092ce36a9743c12e5403ea978cb3417
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: 17992.300000000254 / 17994.53000000008 [-0.01%]
Products
Total CPU difference: 12161.930000000115 / 12171.670000000115 [-0.08%]
Windows-64-VC14:
OCCT
Total CPU difference: 19710.375 / 19728.265625 [-0.09%]
Products
Total CPU difference: 13569.53125 / 13538.390625 [+0.23%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

- Issue History
Date Modified Username Field Change
2018-07-31 16:22 ssv New Issue
2018-07-31 16:22 ssv Assigned To => msv
2018-07-31 16:22 ssv File Added: combug_01.png
2018-07-31 16:22 ssv File Added: combug_02.png
2018-07-31 16:22 ssv File Added: combug_03.png
2019-08-12 17:45 msv Target Version 7.4.0 => 7.5.0
2020-06-26 16:25 szy Note Added: 0092771
2020-06-26 16:25 szy Assigned To msv => akaftasev
2020-06-26 16:25 szy Status new => assigned
2020-09-15 17:19 msv Target Version 7.5.0 => 7.6.0*
2020-09-23 14:50 git Note Added: 0095240
2020-09-23 15:53 kgv Summary Construction of pipe by two circular sections and spine curve leads to crash => Modeling Algorithms - Construction of pipe by two circular sections and spine curve leads to crash
2020-09-23 15:53 kgv Product Version => 7.3.0
2020-09-23 15:54 kgv Description Updated View Revisions
2020-09-24 12:49 git Note Added: 0095263
2020-09-24 15:09 git Note Added: 0095268
2020-09-24 15:14 akaftasev Assigned To akaftasev => jgv
2020-09-24 15:14 akaftasev Status assigned => resolved
2020-09-24 15:14 akaftasev Steps to Reproduce Updated View Revisions
2020-10-05 15:17 jgv Note Added: 0095729
2020-10-05 15:17 jgv Assigned To jgv => akaftasev
2020-10-05 15:17 jgv Status resolved => assigned
2020-10-16 17:48 git Note Added: 0096014
2020-10-16 17:49 git Note Added: 0096015
2020-10-16 17:50 akaftasev Assigned To akaftasev => jgv
2020-10-16 17:50 akaftasev Status assigned => resolved
2020-10-16 17:50 akaftasev Steps to Reproduce Updated View Revisions
2020-10-19 17:51 kgv Note Added: 0096061
2020-10-19 17:52 kgv Assigned To jgv => akaftasev
2020-10-19 17:52 kgv Status resolved => assigned
2020-10-19 17:52 kgv Target Version 7.6.0* => 7.5.0
2020-10-19 17:57 kgv Summary Modeling Algorithms - Construction of pipe by two circular sections and spine curve leads to crash => Modeling Algorithms, GeomFill_Pipe - construction of pipe by two circular sections and spine curve leads to crash
2020-10-26 10:25 szy Assigned To akaftasev => ifv
2020-10-26 10:35 utverdov Target Version 7.5.0 => 7.6.0*
2020-10-26 12:40 git Note Added: 0096266
2020-10-26 17:00 git Note Added: 0096275
2020-10-26 17:12 git Note Added: 0096276
2020-10-26 17:57 szy Target Version 7.6.0* => 7.5.0
2020-10-26 20:45 ifv Steps to Reproduce Updated View Revisions
2020-10-26 20:48 ifv Note Added: 0096280
2020-10-26 20:48 ifv Assigned To ifv => jgv
2020-10-26 20:48 ifv Status assigned => resolved
2020-10-27 11:36 jgv Note Added: 0096291
2020-10-27 11:36 jgv Assigned To jgv => bugmaster
2020-10-27 11:36 jgv Status resolved => reviewed
2020-10-28 16:59 bugmaster Note Added: 0096346
2020-10-28 16:59 bugmaster Status reviewed => tested
2020-10-28 17:02 bugmaster Test case number => pipe/bugs/bug30003


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker