Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with detecting bridge direction #1894

Closed
ledvinap opened this issue Apr 1, 2014 · 1 comment
Closed

Problem with detecting bridge direction #1894

ledvinap opened this issue Apr 1, 2014 · 1 comment
Milestone

Comments

@ledvinap
Copy link
Collaborator

ledvinap commented Apr 1, 2014

There is probem in _detect_bridge_direction in 1.1.0 (https://github.com/alexrj/Slic3r/blob/master/lib/Slic3r/Layer/Region.pm#L414):

my @clipped = @{intersection_pl([ map $_->split_at_first_point, @$grown ], [$lower->contour])};
# If the split_at_first_point() call above happens to split the polygon inside the clipping area
# we would get two consecutive polylines instead of a single one, so we use this ugly hack to 
# recombine them back into a single one in order to trigger the @edges == 2 logic below.

This assumption is not satisfied - clipper removes overlapping point even for path that is not closed, so one segment is missing in clipped polyline. Recombination test then fails and bridge direction is calculated incorrectly in same cases.

Here is possible test to illustrate issue (using pylyclip.t hollow rectangle expolygon):

    {
    my $intersection = intersection_pl([Slic3r::Polyline->new([110,110], [120,110], [120,120], [110,120], [110,110])], \@$expolygon);
    is $intersection->[0]->length, Slic3r::Polyline->new([110,110], [120,110], [120,120], [110,120], [110,110])->length,
            'line start and end can overlap';
    }

This object triggers problem (on both U bridges): http://www.thingiverse.com/thing:24238, here is my config: https://drive.google.com/file/d/0B9HM4UOKDQBLVW91ZGZON0pCclk (any config should work)

git rev-parse HEAD git rev-parse HEAD
017158c

@alranel
Copy link
Member

alranel commented Apr 4, 2014

Thank you very much for the diagnosis.

@alranel alranel added this to the 1.1.1 milestone Apr 4, 2014
This was referenced Apr 7, 2014
@alranel alranel closed this as completed Apr 22, 2014
supermerill pushed a commit that referenced this issue Nov 18, 2021
add location of libgmp-10.dll & libmpfr-4.dll
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

No branches or pull requests

2 participants