当前位置: 首页>>代码示例>>C++>>正文


C++ Polygons::end方法代码示例

本文整理汇总了C++中Polygons::end方法的典型用法代码示例。如果您正苦于以下问题:C++ Polygons::end方法的具体用法?C++ Polygons::end怎么用?C++ Polygons::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Polygons的用法示例。


在下文中一共展示了Polygons::end方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

void
Polygon::simplify(double tolerance, Polygons &polygons) const
{
    Polygons pp = this->simplify(tolerance);
    polygons.reserve(polygons.size() + pp.size());
    polygons.insert(polygons.end(), pp.begin(), pp.end());
}
开发者ID:valterfc,项目名称:Slic3r,代码行数:7,代码来源:Polygon.cpp

示例2: union_ex

Slic3r::ExPolygons
union_ex(const Slic3r::Surfaces &subject, bool safety_offset)
{
    Polygons pp;
    for (Slic3r::Surfaces::const_iterator s = subject.begin(); s != subject.end(); ++s) {
        Polygons spp = *s;
        pp.insert(pp.end(), spp.begin(), spp.end());
    }
    return union_ex(pp, safety_offset);
}
开发者ID:jiripech,项目名称:Slic3r,代码行数:10,代码来源:ClipperUtils.cpp

示例3:

ClipperLib::Paths Slic3rMultiPoints_to_ClipperPaths(const Polygons &input)
{
    ClipperLib::Paths retval;
    for (Polygons::const_iterator it = input.begin(); it != input.end(); ++it)
        retval.emplace_back(Slic3rMultiPoint_to_ClipperPath(*it));
    return retval;
}
开发者ID:prusa3d,项目名称:Slic3r,代码行数:7,代码来源:ClipperUtils.cpp

示例4:

Slic3r::Polygons
union_(const Slic3r::ExPolygons &subject1, const Slic3r::ExPolygons &subject2, bool safety_offset)
{
    Polygons pp;
    for (Slic3r::ExPolygons::const_iterator it = subject1.begin(); it != subject1.end(); ++it) {
        Polygons spp = *it;
        pp.insert(pp.end(), spp.begin(), spp.end());
    }
    for (Slic3r::ExPolygons::const_iterator it = subject2.begin(); it != subject2.end(); ++it) {
        Polygons spp = *it;
        pp.insert(pp.end(), spp.begin(), spp.end());
    }
    Polygons retval;
    union_(pp, &retval, safety_offset);
    return retval;
}
开发者ID:jiripech,项目名称:Slic3r,代码行数:16,代码来源:ClipperUtils.cpp

示例5: polygons_append

inline void polygons_append(Polygons &dst, const ExPolygons &src) 
{ 
    dst.reserve(dst.size() + number_polygons(src));
    for (ExPolygons::const_iterator it = src.begin(); it != src.end(); ++ it) {
        dst.push_back(it->contour);
        dst.insert(dst.end(), it->holes.begin(), it->holes.end());
    }
}
开发者ID:jiripech,项目名称:Slic3r,代码行数:8,代码来源:ExPolygon.hpp

示例6: to_polygons

inline Polygons to_polygons(const ExPolygon &src)
{
    Polygons polygons;
    polygons.reserve(src.holes.size() + 1);
    polygons.push_back(src.contour);
    polygons.insert(polygons.end(), src.holes.begin(), src.holes.end());
    return polygons;
}
开发者ID:jiripech,项目名称:Slic3r,代码行数:8,代码来源:ExPolygon.hpp

示例7: polygons_append

// Append a vector of Surfaces at the end of another vector of polygons.
inline void polygons_append(Polygons &dst, const SurfacesPtr &src)
{
    dst.reserve(dst.size() + number_polygons(src));
    for (SurfacesPtr::const_iterator it = src.begin(); it != src.end(); ++ it) {
        dst.push_back((*it)->expolygon.contour);
        dst.insert(dst.end(), (*it)->expolygon.holes.begin(), (*it)->expolygon.holes.end());
    }
}
开发者ID:gringer,项目名称:Slic3r,代码行数:9,代码来源:Surface.hpp

示例8: Polygons

SurfaceCollection::operator Polygons() const
{
    Polygons polygons;
    for (Surfaces::const_iterator surface = this->surfaces.begin(); surface != this->surfaces.end(); ++surface) {
        Polygons surface_p = surface->expolygon;
        polygons.insert(polygons.end(), surface_p.begin(), surface_p.end());
    }
    return polygons;
}
开发者ID:be3d,项目名称:Slic3r,代码行数:9,代码来源:SurfaceCollection.cpp

示例9:

std::string
SLAPrint::_SVG_path_d(const ExPolygon &expolygon) const
{
    std::string pd;
    const Polygons pp = expolygon;
    for (Polygons::const_iterator mp = pp.begin(); mp != pp.end(); ++mp) 
        pd += this->_SVG_path_d(*mp) + " ";
    return pd;
}
开发者ID:jeffkyjin,项目名称:Slic3r,代码行数:9,代码来源:SLAPrint.cpp

示例10:

Polygons
ExtrusionEntityCollection::grow() const
{
    Polygons pp;
    for (ExtrusionEntitiesPtr::const_iterator it = this->entities.begin(); it != this->entities.end(); ++it) {
        Polygons entity_pp = (*it)->grow();
        pp.insert(pp.end(), entity_pp.begin(), entity_pp.end());
    }
    return pp;
}
开发者ID:bjmckenz,项目名称:Slic3r,代码行数:10,代码来源:ExtrusionEntityCollection.cpp

示例11: Points

ExPolygonCollection::operator Points() const
{
    Points points;
    Polygons pp = *this;
    for (Polygons::const_iterator poly = pp.begin(); poly != pp.end(); ++poly) {
        for (Points::const_iterator point = poly->points.begin(); point != poly->points.end(); ++point)
            points.push_back(*point);
    }
    return points;
}
开发者ID:bjmckenz,项目名称:Slic3r,代码行数:10,代码来源:ExPolygonCollection.cpp

示例12:

void
SurfaceCollection::filter_by_type(SurfaceType type, Polygons* polygons)
{
    for (Surfaces::iterator surface = this->surfaces.begin(); surface != this->surfaces.end(); ++surface) {
        if (surface->surface_type == type) {
            Polygons pp = surface->expolygon;
            polygons->insert(polygons->end(), pp.begin(), pp.end());
        }
    }
}
开发者ID:be3d,项目名称:Slic3r,代码行数:10,代码来源:SurfaceCollection.cpp

示例13:

Polygons
ExtrusionLoop::grow() const
{
    Polygons pp;
    for (ExtrusionPaths::const_iterator path = this->paths.begin(); path != this->paths.end(); ++path) {
        Polygons path_pp = path->grow();
        pp.insert(pp.end(), path_pp.begin(), path_pp.end());
    }
    return pp;
}
开发者ID:born2b,项目名称:Slic3r,代码行数:10,代码来源:ExtrusionEntity.cpp

示例14:

void
SVG::draw(const ExPolygon &expolygon, std::string fill)
{
    this->fill = fill;
    
    std::string d;
    Polygons pp = expolygon;
    for (Polygons::const_iterator p = pp.begin(); p != pp.end(); ++p) {
        d += this->get_path_d(*p, true) + " ";
    }
    this->path(d, true);
}
开发者ID:2bright,项目名称:Slic3r,代码行数:12,代码来源:SVG.cpp

示例15: to_polylines

inline Polylines to_polylines(const Polygons &polys)
{
    Polylines polylines;
    polylines.assign(polys.size(), Polyline());
    size_t idx = 0;
    for (Polygons::const_iterator it = polys.begin(); it != polys.end(); ++ it) {
        Polyline &pl = polylines[idx ++];
        pl.points = it->points;
        pl.points.push_back(it->points.front());
    }
    assert(idx == polylines.size());
    return polylines;
}
开发者ID:jiripech,项目名称:Slic3r,代码行数:13,代码来源:Polygon.hpp


注:本文中的Polygons::end方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。