Skip to content

fixed offsetPolyline for polyline with only 1 chain (2 vertices)#481

Merged
ABSitf merged 2 commits intomasterfrom
i1119_fix_offsetPolyline
Sep 9, 2022
Merged

fixed offsetPolyline for polyline with only 1 chain (2 vertices)#481
ABSitf merged 2 commits intomasterfrom
i1119_fix_offsetPolyline

Conversation

@ABSitf
Copy link
Contributor

@ABSitf ABSitf commented Sep 8, 2022

No description provided.

for ( auto& cont : contours )
{
if ( cont.size() == 2 )
cont.push_back( cont.back() );
Copy link
Contributor

@Fedr Fedr Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a code comment why we duplicate back() point for 2-point contours. If it is a workaround for the next function, then probably better to fix it instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reworked

@ABSitf ABSitf merged commit dd93865 into master Sep 9, 2022
@ABSitf ABSitf deleted the i1119_fix_offsetPolyline branch September 9, 2022 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants