FriedSodaWarrior has asked for the wisdom of the Perl Monks concerning the following question:

Hey everyone,

I'm completely new to Perl along with this related open source program. If my question isn't appropriate, will delete immediately. The question I'm asking is what exactly is this function or import used for:

use Slic3r::Geometry::Clipper qw(offset diff union union_ex intersecti +on offset_ex offset2 intersection_pl offset2_ex diff_pl diff_ex);

Originally I thought this was a pathway since my goal is to see how the intersection, union, etc works and then can be changed. However searching through the git:

https://github.com/slic3r/Slic3r/search?p=2&q=intersection&unscoped_q=intersection

I can't seem to find it, or perhaps I'm not looking correctly? The answers I have received previously or the ones I have found, haven't shown me indication of how I could modify these functions.

https://github.com/slic3r/Slic3r/blob/master/xs/src/libslic3r/ClipperUtils.hpp

https://github.com/slic3r/Slic3r/blob/master/xs/xsp/Clipper.xsp

Any help would be great, thanks.

2019-02-25 Athanasius added paragraph tags and linkified links

Replies are listed 'Best First'.
Re: Perl - Trying to understand intersection function
by NetWallah (Canon) on Feb 24, 2019 at 16:10 UTC
    Cross-posted on StackOverflow.

    The intersect method is coded in "c", as a part of the libslic3r implementation.

    There are multiple implementations, depending on which kind of object(s) you are intersecting.

    Other than the parameters used, documentation for that call seems non-existant.

                    As a computer, I find your faith in technology amusing.

      Thank you for explaining that, so am I unable to change the intersect method at all?