DiscussionsIssue archiveModeling Data and Algorithms

Archived discussion

Geom2dAPI_InterCurveCurve with Geom2d_OffsetCurve

Modeling Data and AlgorithmsMon, 10/27/2014 - 18:272 replies

Browse this forum
QuestionAuthor

Hello,

I've got an issue when using Geom2dAPI_InterCurveCurve with Geom2d_OffsetCurve. This is a simplified version of what I'm doing: am I missing something?

Handle( Geom2d_Line ) hLine1 = new Geom2d_Line( gp_Pnt2d( 1.0, 0.0 ), gp_Dir2d( 0.0, 1.0 ) );

Handle( Geom2d_Line ) hLine2 = new Geom2d_Line( gp_Pnt2d( 0.0, 1.0 ), gp_Dir2d( 1.0, 0.0 ) );

//This works fine
Geom2dAPI_InterCurveCurve oTest1( hLine1, hLine1, Precision::Confusion() );

Handle( Geom2d_OffsetCurve ) hOffsetLine1 = new Geom2d_OffsetCurve( hLine1, 0.3 );
Handle( Geom2d_OffsetCurve ) hOffsetLine2 = new Geom2d_OffsetCurve( hLine2, 0.3 );

//This throws Standard_DomainError exception.
Geom2dAPI_InterCurveCurve oTest2( hOffsetLine1, hOffsetLine2, Precision::Confusion() );

Please let me know if this type of question should be posted elsewhere.

Cheers,
Author

Discussion

2 archived replies

Posts are displayed in their archived order.

01Commenter-1

Hello Author,

Just a guess, it may be that offset curves must be limited (in your case they are infinite) for intersection to work. Try to run in debug mode and step into the code to see the actual reason.

For the future, consider posting questions of this kind to forum at www.opencascade.org.

Commenter-1

02Author

Thanks for the info :)