Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026198Community[OCCT] OCCT:Modeling Algorithmspublic2015-05-07 17:432015-10-23 20:51
Assigned Tobugmaster 
PlatformOSOS Version
Product Version[OCCT] 6.9.0 
Target Version[OCCT] 6.9.1Fixed in Version[OCCT] 6.9.1 
Summary0026198: ShapeConstruct_ProjectCurveOnSurface builds infinite line instead of bounded curve
DescriptionShapeConstruct_ProjectCurveOnSurface.Perform returns infinite line instead of bounded curve. In 6.8.0 Perform return Geom2d_BSplineCurve, but 6.9.0 Perform return Geom2d_Line. Returning infinite curve does not allow to get boundaries corresponding to original 3d curve. Please check it for correct behaviour.
Steps To ReproduceSteps To Reproduce:
const Handle(Geom_Curve)& aCurve;
const Handle(Geom_Surface)& aSurface;
Standard_Real theTol;
Handle (Geom2d_Curve) aPCurve;
const Standard_Real aFirst = aCurve->FirstParameter();
const Standard_Real aLast = aCurve->LastParameter();
ShapeConstruct_ProjectCurveOnSurface aProj;
aProj.Init (aSurface, aTol);
aProj.Perform (aCurve, aFirst, aLast, aPCurve);
TagsNo tags attached.
Test case numberNot needed
Attached Fileszip file icon (1,329 bytes) 2015-05-07 17:43

- Relationships

-  Notes
solomin_s (developer)
2015-05-07 17:46

This error has relationship with #22598, but I has no access to it.
msv (developer)
2015-05-08 15:26

Such behavior is intended. If the result curve 2D lies on a direct line then direct line is returned. Earlier, b-spline with much degree and much poles was created for such case.
The caller must not have concerns about boundaries of returned curve, as the output curve 2D is guaranteed to be same-parameter with input curve 3D on the interval [First, Last], and First and Last are known values for the caller.
The returned curve is usually put into an edge as a p-curve, and it always has a finite range, so there is no need to put the line into a TrimmedCurve. It is possible, and the edge created will be also good, but it will have extra nesting structure.

However, looking at the description of the method Perform of the class ShapeConstruct_ProjectCurveOnSurface, I have found improper comments, which were simply copied from another method. So, the documentation for this method should be updated.
git (administrator)
2015-05-08 15:44

Branch CR26198 has been created by msv.

SHA-1: 3b5f7d0c0f312ee8f3736cb5439b76c89e71bd77

Detailed log of new commits:

Author: msv
Date: Fri May 8 15:44:48 2015 +0300

    0026198: ShapeConstruct_ProjectCurveOnSurface builds infinite line instead of bounded curve
    Description of the method ShapeConstruct_ProjectCurveOnSurface::Perform has been updated to actual state.
msv (developer)
2015-05-08 15:47

Please review the change of the method description in the branch CR26198.
gka (developer)
2015-05-08 16:02

Branch CR26198 should not be tested.
Roman Lygin (developer)
2015-05-08 16:16

Hello Mikhail,

Thank you for your helpful comment. If there is a guarantee that the returned line is same parameter, this is good.

The fact that SC_PCoS returns an infinite line for a finite input is somewhat confusing but users can cope with this if the documentation is aligned indeed. The consideration for the edge creation should rather be addressed by the edge creation routines, not by the geometry ones (which SC_PCoS is). For instance, BRepBuilderAPI_MakeEdge will remove trimming (at least for 3D curve).

We encountered this 'regression' as the following code gave access violation
(where theCurve is H_Geom2d_Curve returned by SC_PCoS):

    Standard_Real aF = theCurve->FirstParameter(),
        aL = theCurve->LastParameter(), aMaxD, anAveD;
    Adaptor3d_CurveOnSurface aCOS (
        new Geom2dAdaptor_HCurve (theCurve, aF, aL),
        new GeomAdaptor_HSurface (theSurface));
    GeomLib::BuildCurve3d (theTol, aCOS, aF, aL, aRes, aMaxD, anAveD,
        (GeomAbs_Shape)Min (Min (GeomAbs_C1, theCurve->Continuity()), theSurface->Continuity()),
        BSplCLib::MaxDegree(), 10000);

It used to work in 6.8.0 and crashed in 6.9.0. Apparently GL::BC3d() cannot deal with infinite (iso)lines. So this creates extra overhead for us to recognize this new case. We will survive but will have to introduce another tweak :-(.
git (administrator)
2015-05-08 17:00

Branch CR26198 has been updated forcibly by apv.

SHA-1: 57fdf74508e19e1d2660a20ef5b362bee6ec5b8d
apv (tester)
2015-05-08 17:00

Branch CR26198 has been rebased on the current master.
abv (manager)
2015-05-08 17:06

No testing is required -- the fix consist in change of documentation comment
apv (tester)
2015-05-12 17:29

Dear BugMaster,

Branch CR26198 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms.
SHA-1: 57fdf74508e19e1d2660a20ef5b362bee6ec5b8d

Number of compiler warnings:
occt component:
   Linux: 18 (18 on master)
   Windows: 0 (0 on master)
products component:
   Linux: 4 (4 on master)
   Windows: 0 (0 on master)
git (administrator)
2015-08-14 11:01

Branch CR26198 has been deleted by inv.

SHA-1: 57fdf74508e19e1d2660a20ef5b362bee6ec5b8d

- Related Changesets
occt: master 56e26740
Timestamp: 2015-05-08 12:44:48
Author: msv
Committer: bugmaster
Details ] Diff ]
0026198: ShapeConstruct_ProjectCurveOnSurface builds infinite line instead of bounded curve

Description of the method ShapeConstruct_ProjectCurveOnSurface::Perform has been updated to actual state.
mod - src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cdl Diff ] File ]

- Issue History
Date Modified Username Field Change
2015-05-07 17:43 solomin_s New Issue
2015-05-07 17:43 solomin_s Assigned To => msv
2015-05-07 17:43 solomin_s File Added:
2015-05-07 17:46 solomin_s Note Added: 0040762
2015-05-08 15:26 msv Note Added: 0040785
2015-05-08 15:27 msv Status new => assigned
2015-05-08 15:44 git Note Added: 0040786
2015-05-08 15:45 msv Target Version 6.9.0 => 7.1.0
2015-05-08 15:47 msv Note Added: 0040787
2015-05-08 15:47 msv Assigned To msv => abv
2015-05-08 15:47 msv Status assigned => resolved
2015-05-08 15:52 msv Assigned To abv => gka
2015-05-08 16:02 gka Note Added: 0040790
2015-05-08 16:02 gka Assigned To gka => bugmaster
2015-05-08 16:02 gka Status resolved => reviewed
2015-05-08 16:16 Roman Lygin Note Added: 0040794
2015-05-08 16:20 apv Assigned To bugmaster => apv
2015-05-08 17:00 git Note Added: 0040804
2015-05-08 17:00 apv Note Added: 0040805
2015-05-08 17:06 abv Note Added: 0040806
2015-05-08 17:06 abv Severity minor => text
2015-05-08 17:06 abv Summary [6.9.0 Regression] ShapeConstruct_ProjectCurveOnSurface builds infinite line instead of bounded curve => ShapeConstruct_ProjectCurveOnSurface builds infinite line instead of bounded curve
2015-05-12 17:29 apv Note Added: 0040835
2015-05-12 17:29 apv Assigned To apv => bugmaster
2015-05-12 17:29 apv Status reviewed => tested
2015-05-12 17:29 apv Test case number => Not needed
2015-05-15 15:38 bugmaster Changeset attached => occt master 56e26740
2015-05-15 15:38 bugmaster Status tested => verified
2015-05-15 15:38 bugmaster Resolution open => fixed
2015-05-29 14:19 bugmaster Target Version 7.1.0 => 7.0.0
2015-08-14 11:01 git Note Added: 0044282
2015-08-26 11:11 abv Target Version 7.0.0 => 6.9.1
2015-10-16 14:56 aiv Status verified => closed
2015-10-23 20:51 aiv Fixed in Version => 6.9.1

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker