• 大小: 2.75MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-14
  • 语言: 其他
  • 标签:

资源简介

3D打印时需要把STL文件通过切片生成G代码,Slic3r-master.rar是比较流行的一款切片软件。

资源截图

代码片段和文件信息

#include “BoundingBox.hpp“
#include 

namespace Slic3r {

template 
BoundingBoxbase::BoundingBoxbase(const std::vector &points)
{
    if (points.empty()) CONFESS(“Empty point set supplied to BoundingBoxbase constructor“);
    typename std::vector::const_iterator it = points.begin();
    this->min.x = this->max.x = it->x;
    this->min.y = this->max.y = it->y;
    for (++it; it != points.end(); ++it) {
        this->min.x = std::min(it->x this->min.x);
        this->min.y = std::min(it->y this->min.y);
        this->max.x = std::max(it->x this->max.x);
        this->max.y = std::max(it->y this->max.y);
    }
}
template BoundingBoxbase::BoundingBoxbase(const std::vector &points);
template BoundingBoxbase::BoundingBoxbase(const std::vector &points);

template 
BoundingBox3base::BoundingBox3base(const std::vector &points)
    : BoundingBoxbase(points)
{
    if (points.empty()) CONFESS(“Empty point set supplied to BoundingBox3base constructor“);
    typename std::vector::const_iterator it = points.begin();
    this->min.z = this->max.z = it->z;
    for (++it; it != points.end(); ++it) {
        this->min.z = std::min(it->z this->min.z);
        this->max.z = std::max(it->z this->max.z);
    }
}
template BoundingBox3base::BoundingBox3base(const std::vector &points);

BoundingBox::BoundingBox(const Lines &lines)
{
    Points points;
    for (Lines::const_iterator line = lines.begin(); line != lines.end(); ++line) {
        points.push_back(line->a);
        points.push_back(line->b);
    }
    *this = BoundingBox(points);
}

void
BoundingBox::polygon(Polygon* polygon) const
{
    polygon->points.clear();
    polygon->points.resize(4);
    polygon->points[0].x = this->min.x;
    polygon->points[0].y = this->min.y;
    polygon->points[1].x = this->max.x;
    polygon->points[1].y = this->min.y;
    polygon->points[2].x = this->max.x;
    polygon->points[2].y = this->max.y;
    polygon->points[3].x = this->min.x;
    polygon->points[3].y = this->max.y;
}

template  void
BoundingBoxbase::scale(double factor)
{
    this->min.scale(factor);
    this->max.scale(factor);
}
template void BoundingBoxbase::scale(double factor);
template void BoundingBoxbase::scale(double factor);
template void BoundingBoxbase::scale(double factor);

template  void
BoundingBoxbase::merge(const PointClass &point)
{
    this->min.x = std::min(point.x this->min.x);
    this->min.y = std::min(point.y this->min.y);
    this->max.x = std::max(point.x this->max.x);
    this->max.y = std::max(point.y this->max.y);
}
template void BoundingBoxbase::merge(const Point &point);
template void BoundingBoxbase::merge(const Pointf &point);

template  void
BoundingBoxbase::merge(const Bou

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件         96  2014-06-19 11:07  Slic3r-master\.gitignore

     文件        137  2014-06-19 11:07  Slic3r-master\.travis.yml

     文件       5049  2014-06-19 11:07  Slic3r-master\Build.PL

     文件       1667  2014-06-19 11:07  Slic3r-master\CONTRIBUTING.md

     文件      14569  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Config.pm

     文件       1169  2014-06-19 11:07  Slic3r-master\lib\Slic3r\ExPolygon.pm

     文件       1567  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Extruder.pm

     文件        245  2014-06-19 11:07  Slic3r-master\lib\Slic3r\ExtrusionLoop.pm

     文件         73  2014-06-19 11:07  Slic3r-master\lib\Slic3r\ExtrusionPath\Collection.pm

    ..AD...         0  2014-06-19 11:07  Slic3r-master\lib\Slic3r\ExtrusionPath

     文件        411  2014-06-19 11:07  Slic3r-master\lib\Slic3r\ExtrusionPath.pm

     文件        130  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Fill\ArchimedeanChords.pm

     文件       2261  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Fill\base.pm

     文件       2518  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Fill\Concentric.pm

     文件        335  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Fill\Flowsnake.pm

     文件        120  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Fill\HilbertCurve.pm

     文件       5324  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Fill\Honeycomb.pm

     文件        150  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Fill\Line.pm

     文件        155  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Fill\OctagramSpiral.pm

     文件       1667  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Fill\PlanePath.pm

     文件       4778  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Fill\Rectilinear.pm

    ..AD...         0  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Fill

     文件       9756  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Fill.pm

     文件        337  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Flow.pm

     文件       5824  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Format\AMF\Parser.pm

    ..AD...         0  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Format\AMF

     文件       4159  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Format\AMF.pm

     文件        880  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Format\OBJ.pm

     文件        880  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Format\STL.pm

    ..AD...         0  2014-06-19 11:07  Slic3r-master\lib\Slic3r\Format

............此处省略2081个文件信息

评论

共有 条评论

相关资源