Classes | |
| struct | IntersectingElement |
| IntersectingElement. More... | |
| struct | SurfacePatch |
| struct | ModelCutId |
| class | ModelCut2index |
| Keep conversion from VCutAOIs to Index and vice versa Model_index .. contour(or hole) poin from ExPolygons Index .. continous number. More... | |
| struct | ProjectionDistance |
| To select surface near projection distance. More... | |
| struct | Visitor |
| Track source of intersection Help for anotate inner and outer faces. More... | |
| struct | ClosePoint |
| struct | SearchData |
| struct | Source |
| struct | IntersectionSources |
| Corefine visitor Store intersection source for vertices of constrained edge of tm1 Must be used with corefine flag no modification of tm2. More... | |
| struct | SurfacePatchEx |
Typedefs | |
| using | Project = Emboss::IProjection |
| using | Project3d = Emboss::IProject3d |
| using | EpicKernel = CGAL::Exact_predicates_inexact_constructions_kernel |
| using | CutMesh = CGAL::Surface_mesh<EpicKernel::Point_3> |
| using | CutMeshes = std::vector<CutMesh> |
| using | VI = CGAL::SM_Vertex_index |
| using | HI = CGAL::SM_Halfedge_index |
| using | EI = CGAL::SM_Edge_index |
| using | FI = CGAL::SM_Face_index |
| using | P3 = CGAL::Epick::Point_3 |
| using | EdgeShapeMap = CutMesh::Property_map<EI, IntersectingElement> |
| using | FaceShapeMap = CutMesh::Property_map<FI, IntersectingElement> |
| using | VertexShapeMap = CutMesh::Property_map<VI, const IntersectingElement *> |
| using | FaceTypeMap = CutMesh::Property_map<FI, FaceType> |
| using | CvtVI2VI = CutMesh::Property_map<VI, VI> |
| using | ReductionMap = CvtVI2VI |
| using | EdgeBoolMap = CutMesh::Property_map<EI, bool> |
| using | CutAOI = std::pair<std::vector<FI>, std::vector<HI>> |
| using | CutAOIs = std::vector<CutAOI> |
| using | VCutAOIs = std::vector<CutAOIs> |
| using | Loop = std::vector<VI> |
| using | Loops = std::vector<Loop> |
| using | SurfacePatches = std::vector<SurfacePatch> |
| using | ProjectionDistances = std::vector<ProjectionDistance> |
| using | VDistances = std::vector<ProjectionDistances> |
| using | PointNormal = std::pair<Vec3d, Vec3d> |
| using | PointNormals = std::array<PointNormal, 4> |
| using | IsOnSides = std::vector<std::array<bool, 4>> |
| using | Sources = std::vector<Source> |
| using | VertexSourceMap = CutMesh::Property_map<VI, Source> |
| using | SurfacePatchesEx = std::vector<SurfacePatchEx> |
| using | BBS = std::vector<BoundingBoxf3> |
| using | Primitive = CGAL::AABB_face_graph_triangle_primitive<CutMesh> |
| using | Traits = CGAL::AABB_traits_3<EpicKernel, Primitive> |
| using | Ray = EpicKernel::Ray_3 |
| using | Tree = CGAL::AABB_tree<Traits> |
| using | Trees = std::vector<Tree> |
Enumerations | |
| enum class | FaceType { inside , outside , not_constrained , inside_processed } |
| Flag for faces in CGAL mesh. More... | |
Functions | |
| void | set_skip_for_out_of_aoi (std::vector< bool > &skip_indicies, const indexed_triangle_set &its, const Project &projection, const BoundingBox &shapes_bb) |
| Set true for indices out of area of interest. | |
| void | set_skip_by_angle (std::vector< bool > &skip_indicies, const indexed_triangle_set &its, const Project3d &projection, double max_angle=89.) |
| Set true for indicies outward and almost parallel together. Note: internally calculate normals. | |
| Vec3d | to_vec3d (const P3 &p) |
| CutMesh | to_cgal (const indexed_triangle_set &its, const std::vector< bool > &skip_indicies, bool flip=false) |
| Convert triangle mesh model to CGAL Surface_mesh Filtrate out opposite triangles Add property map for source face index. | |
| CutMesh | to_cgal (const ExPolygons &shapes, const Project &projection) |
| Covert 2d shape (e.g. Glyph) to CGAL model NOTE: internaly create edge_shape_map .. Property map to store conversion from edge to contour face_shape_map .. Property map to store conversion from face to contour. | |
| bool | exist_duplicit_vertex (const CutMesh &mesh) |
| void | create_reduce_map (ReductionMap &reduction_map, const CutMesh &meshes) |
| Create map to reduce unnecesary triangles, Triangles are made by divided quad to two triangles on side of cutting shape mesh Note: also use from mesh (have to be created) face_type_map .. Type of shape inside / outside vert_shape_map .. Source of outline vertex. | |
| CutAOIs | cut_from_model (CutMesh &cgal_model, const ExPolygons &shapes, CutMesh &cgal_shape, float projection_ratio, const ExPolygonsIndices &s2i) |
| Create AOIs(area of interest) on model surface. | |
| Loops | create_loops (const std::vector< HI > &outlines, const CutMesh &mesh) |
| Create closed loops of contour vertices created from open half edges. | |
| SurfacePatches | diff_models (VCutAOIs &cuts, CutMeshes &cut_models, CutMeshes &models, const Project3d &projection) |
| Differenciate other models. | |
| bool | is_over_whole_expoly (const CutAOI &cutAOI, const ExPolygon &shape, const CutMesh &mesh) |
| Checking whether patch is uninterrupted cover of whole expolygon it belongs. | |
| bool | is_over_whole_expoly (const SurfacePatch &patch, const ExPolygons &shapes, const VCutAOIs &cutAOIs, const CutMeshes &meshes) |
| Checking whether patch is uninterrupted cover of whole expolygon it belongs. | |
| Polygons | unproject_loops (const SurfacePatch &patch, const Project &projection, Vec2d &depth_range) |
| Unptoject points from outline loops of patch. | |
| ExPolygon | to_expoly (const SurfacePatch &patch, const Project &projection, Vec2d &depth_range) |
| Unproject points from loops and create expolygons. | |
| VDistances | calc_distances (const SurfacePatches &patches, const CutMeshes &models, const CutMesh &shapes_mesh, size_t count_shapes_points, float projection_ratio) |
| Calculate distances for SurfacePatches outline points NOTE: each model has to have "vert_shape_map" .. Know source of new vertices. | |
| ProjectionDistances | choose_best_distance (const VDistances &distances, const ExPolygons &shapes, const Point &start, const ExPolygonsIndices &s2i, const SurfacePatches &patches) |
| Select distances in similar depth between expolygons. | |
| std::vector< bool > | select_patches (const ProjectionDistances &best_distances, const SurfacePatches &patches, const ExPolygons &shapes, const BoundingBox &shapes_bb, const ExPolygonsIndices &s2i, const VCutAOIs &cutAOIs, const CutMeshes &meshes, const Project &projection) |
| Create mask for patches. | |
| void | append (SurfaceCut &sc, SurfaceCut &&sc_add) |
| Merge two surface cuts together Added surface cut will be consumed. | |
| SurfaceCut | patch2cut (SurfacePatch &patch) |
| Convert patch to indexed_triangle_set. | |
| SurfaceCut | merge_patches (SurfacePatches &patches, const std::vector< bool > &mask) |
| Merge masked patches to one surface cut. | |
| bool | is_out_of (const Vec3d &v, const PointNormal &point_normal) |
| Check. | |
| bool | is_all_on_one_side (const Vec3i32 &t, const IsOnSides &is_on_sides) |
| Check if triangle t has all vertices out of any plane. | |
| bool | is_face_inside (HI hi, const CutMesh &mesh, const CutMesh &shape_mesh, const VertexShapeMap &vertex_shape_map, const ExPolygonsIndices &shape2index) |
| Distiquish face type for half edge. | |
| void | set_face_type (FaceTypeMap &face_type_map, const CutMesh &mesh, const VertexShapeMap &vertex_shape_map, const EdgeBoolMap &ecm, const CutMesh &shape_mesh, const ExPolygonsIndices &shape2index) |
| Face with constrained edge are inside/outside by type of intersection Other set to not_constrained(still it could be inside/outside). | |
| void | flood_fill_inner (const CutMesh &mesh, FaceTypeMap &face_type_map) |
| Change FaceType from not_constrained to inside For neighbor(or neighbor of neighbor of ...) of inside triangles. Process only not_constrained triangles. | |
| void | collect_surface_data (std::queue< FI > &process, std::vector< FI > &faces, std::vector< HI > &outlines, FaceTypeMap &face_type_map, const CutMesh &mesh) |
| Collect connected inside faces Collect outline half edges. | |
| CutAOIs | create_cut_area_of_interests (const CutMesh &mesh, const ExPolygons &shapes, FaceTypeMap &face_type_map) |
| Create areas from mesh surface. | |
| float | calc_distance (const P3 &p, uint32_t pi, const CutMesh &shapes_mesh, float projection_ratio) |
| Calculate projection distance of point [in mm]. | |
| float | calc_size_sq (const Point &p) |
| SearchData | create_search_data (const ExPolygons &shapes, const std::vector< bool > &mask) |
| uint32_t | get_closest_point_index (const SearchData &sd, size_t line_idx, const Vec2d &hit_point, const ExPolygons &shapes, const ExPolygonsIndices &s2i) |
| uint32_t | find_closest_point_index (const Point &p, const ExPolygons &shapes, const ExPolygonsIndices &s2i, const std::vector< bool > &mask) |
| std::pair< uint32_t, uint32_t > | find_closest_point_pair (const ExPolygons &shapes, const std::vector< bool > &done_shapes, const ExPolygonsIndices &s2i, const std::vector< bool > &mask) |
| const ProjectionDistance * | get_closest_projection (const ProjectionDistances &distance, float wanted_distance) |
| void | fill_polygon_distances (const ProjectionDistance &pd, uint32_t index, const ExPolygonsIndex &id, ProjectionDistances &result, const ExPolygon &shape, const VDistances &distances) |
| void | fill_shape_distances (uint32_t start_index, const ProjectionDistance *start_pd, ProjectionDistances &result, const ExPolygonsIndices &s2i, const ExPolygon &shape, const VDistances &distances) |
| ClosePoint | find_close_point (const Point &p, ProjectionDistances &result, std::vector< bool > &finished_shapes, const ExPolygonsIndices &s2i, const ExPolygons &shapes) |
| const VI | default_vi (std::numeric_limits< uint32_t >::max()) |
| void | create_face_types (FaceTypeMap &map, const CutMesh &tm1, const CutMesh &tm2, const EdgeBoolMap &ecm, const VertexSourceMap &sources) |
| Create map1 and map2. | |
| bool | clip_cut (SurfacePatch &cut, CutMesh clipper) |
| Implement 'cut' Minus 'clipper', where clipper is reverse input Volume NOTE: clipper will be modified (corefined by cut) !!! | |
| BoundingBoxf3 | bounding_box (const CutAOI &cut, const CutMesh &mesh) |
| BoundingBoxf3 | bounding_box (const CutMesh &mesh) |
| BoundingBoxf3 | bounding_box (const SurfacePatch &ecut) |
| SurfacePatch | create_surface_patch (const std::vector< FI > &fis, CutMesh &mesh, const ReductionMap *rmap=nullptr) |
| Create patch. | |
| BBS | create_bbs (const VCutAOIs &cuts, const CutMeshes &cut_models) |
| Create bounding boxes for AOI. | |
| Trees | create_trees (const CutMeshes &models) |
| Create AABB trees for check when patch is whole inside of model. | |
| bool | has_bb_intersection (const BoundingBoxf3 &bb, size_t model_index, const BBS &bbs, const ModelCut2index &m2i) |
| Check whether bounding box has intersection with model. | |
| bool | is_patch_inside_of_model (const SurfacePatch &patch, const Tree &tree, const Project3d &projection) |
| Only for model without intersection Use ray (in projection direction) from a point from patch and count intersections: pair .. outside | odd .. inside. | |
| uint32_t | get_shape_point_index (const CutAOI &cut, const CutMesh &model) |
| Return some shape point index which identify shape NOTE: Used to find expolygon index. | |
| SurfacePatch | separate_patch (const std::vector< FI > &fis, SurfacePatch &patch, const CvtVI2VI &cvt_from) |
| Separate triangles singned with number n. | |
| void | divide_patch (size_t i, SurfacePatchesEx &patches) |
| Separate connected triangles into it's own patches new patches are added to back of input patches. | |
| void | collect_open_edges (SurfacePatches &patches) |
| Fill outline in patches by open edges. | |
| void | insert_edges (Triangulation::HalfEdges &edges, uint32_t &offset, const Polygon &polygon, const Triangulation::Changes &changes) |
| void | insert_edges (Triangulation::HalfEdges &edges, uint32_t &offset, const Polygon &polygon) |
| bool | has_bidirectional_constrained (const Triangulation::HalfEdges &constrained) |
| bool | is_unique (const Points &points) |
| bool | has_self_intersection (const Points &points, const Triangulation::HalfEdges &constrained_half_edges) |
| static void | clear (IconManager::Icons &icons) |
| static const std::vector< std::pair< int, bool > > & | get_states (IconManager::RasterType type) |
| static void | draw_transparent_icon (const IconManager::Icon &icon) |
Variables | |
| const std::string | edge_shape_map_name = "e:IntersectingElement" |
| const std::string | face_shape_map_name = "f:IntersectingElement" |
| const std::string | vert_shape_map_name = "v:IntersectingElement" |
| const std::string | face_type_map_name = "f:side" |
| const std::string | patch_source_name = "v:patch_source" |
| const std::string | vertex_reduction_map_name = "v:reduction" |
| const std::string | is_constrained_edge_name = "e:is_constrained" |
| const std::string | vertex_source_map_name = "v:SourceIntersecting" |
| struct priv::SurfacePatch |
| Class Members | ||
|---|---|---|
| size_t | aoi_id | |
| BoundingBoxf3 | bb | |
| bool | is_whole_aoi = true | |
| Loops | loops | |
| CutMesh | mesh | |
| size_t | model_id | |
| size_t | shape_id = 0 | |
| struct priv::ProjectionDistance |
| struct priv::ClosePoint |
| struct priv::SearchData |
| struct priv::Source |
| Class Members | ||
|---|---|---|
| HI | hi | |
| int | sdim =0 | |
| struct priv::SurfacePatchEx |
| Class Members | ||
|---|---|---|
| bool | full_inside = false | |
| bool | just_cliped = false | |
| SurfacePatch | patch | |
| using priv::BBS = std::vector<BoundingBoxf3> |
| using priv::CutAOI = std::pair<std::vector<FI>, std::vector<HI>> |
| using priv::CutAOIs = std::vector<CutAOI> |
| using priv::CutMesh = CGAL::Surface_mesh<EpicKernel::Point_3> |
| using priv::CutMeshes = std::vector<CutMesh> |
| using priv::CvtVI2VI = CutMesh::Property_map<VI, VI> |
| using priv::EdgeBoolMap = CutMesh::Property_map<EI, bool> |
| using priv::EdgeShapeMap = CutMesh::Property_map<EI, IntersectingElement> |
| using priv::EI = CGAL::SM_Edge_index |
| using priv::EpicKernel = CGAL::Exact_predicates_inexact_constructions_kernel |
| using priv::FaceShapeMap = CutMesh::Property_map<FI, IntersectingElement> |
| using priv::FaceTypeMap = CutMesh::Property_map<FI, FaceType> |
| using priv::FI = CGAL::SM_Face_index |
| using priv::HI = CGAL::SM_Halfedge_index |
| using priv::IsOnSides = std::vector<std::array<bool, 4>> |
| using priv::Loop = std::vector<VI> |
| using priv::Loops = std::vector<Loop> |
| using priv::P3 = CGAL::Epick::Point_3 |
| using priv::PointNormal = std::pair<Vec3d, Vec3d> |
| using priv::PointNormals = std::array<PointNormal, 4> |
| using priv::Primitive = CGAL::AABB_face_graph_triangle_primitive<CutMesh> |
| using priv::Project = Emboss::IProjection |
| using priv::Project3d = Emboss::IProject3d |
| using priv::ProjectionDistances = std::vector<ProjectionDistance> |
| using priv::Ray = EpicKernel::Ray_3 |
| using priv::ReductionMap = CvtVI2VI |
| using priv::Sources = std::vector<Source> |
| using priv::SurfacePatches = std::vector<SurfacePatch> |
| using priv::SurfacePatchesEx = std::vector<SurfacePatchEx> |
| using priv::Traits = CGAL::AABB_traits_3<EpicKernel, Primitive> |
| using priv::Tree = CGAL::AABB_tree<Traits> |
| using priv::Trees = std::vector<Tree> |
| using priv::VCutAOIs = std::vector<CutAOIs> |
| using priv::VDistances = std::vector<ProjectionDistances> |
| using priv::VertexShapeMap = CutMesh::Property_map<VI, const IntersectingElement *> |
| using priv::VertexSourceMap = CutMesh::Property_map<VI, Source> |
| using priv::VI = CGAL::SM_Vertex_index |
|
strong |
Flag for faces in CGAL mesh.
| Enumerator | |
|---|---|
| inside | |
| outside | |
| not_constrained | |
| inside_processed | |
| void priv::append | ( | SurfaceCut & | sc, |
| SurfaceCut && | sc_add ) |
Merge two surface cuts together Added surface cut will be consumed.
References Slic3r::append(), Slic3r::SurfaceCut::contours, Slic3r::its_merge(), and Slic3r::offset().
Referenced by merge_patches().
| BoundingBoxf3 priv::bounding_box | ( | const CutAOI & | cut, |
| const CutMesh & | mesh ) |
References to_vec3d().
Referenced by bounding_box(), create_bbs(), divide_patch(), and separate_patch().
| BoundingBoxf3 priv::bounding_box | ( | const CutMesh & | mesh | ) |
References to_vec3d().
| BoundingBoxf3 priv::bounding_box | ( | const SurfacePatch & | ecut | ) |
References bounding_box(), and priv::SurfacePatch::mesh.
| float priv::calc_distance | ( | const P3 & | p, |
| uint32_t | pi, | ||
| const CutMesh & | shapes_mesh, | ||
| float | projection_ratio ) |
Calculate projection distance of point [in mm].
| p | Point to calc distance |
| pi | Index of point on contour |
| shapes_mesh | Model of cutting shape |
| projection_ratio | Ratio for best projection distance |
Referenced by calc_distances().
| priv::VDistances priv::calc_distances | ( | const SurfacePatches & | patches, |
| const CutMeshes & | models, | ||
| const CutMesh & | shapes_mesh, | ||
| size_t | count_shapes_points, | ||
| float | projection_ratio ) |
Calculate distances for SurfacePatches outline points NOTE: each model has to have "vert_shape_map" .. Know source of new vertices.
| patches | Part of surface |
| models | Vertices position |
| shapes_mesh | Mesh created by shapes |
| count_shapes_points | Count of contour points in shapes |
| projection_ratio | Define best distnace |
References priv::IntersectingElement::attr, calc_distance(), patch_source_name, priv::IntersectingElement::shape_point_index, priv::IntersectingElement::undefined, and vert_shape_map_name.
Referenced by Slic3r::cut_surface().
| float priv::calc_size_sq | ( | const Point & | p | ) |
Referenced by fill_shape_distances(), and find_close_point().
| priv::ProjectionDistances priv::choose_best_distance | ( | const VDistances & | distances, |
| const ExPolygons & | shapes, | ||
| const Point & | start, | ||
| const ExPolygonsIndices & | s2i, | ||
| const SurfacePatches & | patches ) |
Select distances in similar depth between expolygons.
| distances | All distances - Vector distances for each shape point |
| shapes | Vector of letters |
| start | Pivot for start projection in 2d |
| s2i | Convert index to addresss inside of shape |
| patches | Cutted parts from surface |
References priv::ProjectionDistance::aoi_index, Slic3r::count_points(), Slic3r::ExPolygonsIndices::cvt(), priv::ProjectionDistance::distance, fill_shape_distances(), find_closest_point_index(), find_closest_point_pair(), get_closest_projection(), and Slic3r::ExPolygonsIndices::get_count().
Referenced by Slic3r::cut_surface().
|
static |
References count.
Referenced by Slic3r::GUI::IconManager::~IconManager(), and Slic3r::GUI::IconManager::init().
| bool priv::clip_cut | ( | SurfacePatch & | cut, |
| CutMesh | clipper ) |
Implement 'cut' Minus 'clipper', where clipper is reverse input Volume NOTE: clipper will be modified (corefined by cut) !!!
| cut | differ from |
| clipper | differ what |
References priv::SurfacePatch::mesh.
Referenced by diff_models().
| void priv::collect_open_edges | ( | SurfacePatches & | patches | ) |
Fill outline in patches by open edges.
| patches | Input/Output meshes with open edges |
References create_loops().
Referenced by diff_models().
| void priv::collect_surface_data | ( | std::queue< FI > & | process, |
| std::vector< FI > & | faces, | ||
| std::vector< HI > & | outlines, | ||
| FaceTypeMap & | face_type_map, | ||
| const CutMesh & | mesh ) |
Collect connected inside faces Collect outline half edges.
| process | Queue of face to process - find connected |
| faces | [Output] collected Face indices from mesh |
| outlines | [Output] collected Halfedge indices from mesh |
| face_type_map | Use flag inside / outside NOTE: Modify in function: inside -> inside_processed |
| mesh | mesh to process |
References inside, inside_processed, and outside.
Referenced by create_cut_area_of_interests().
| std::vector< BoundingBoxf3 > priv::create_bbs | ( | const VCutAOIs & | cuts, |
| const CutMeshes & | cut_models ) |
Create bounding boxes for AOI.
| cuts | Cutted AOI from models |
| cut_models | Source points of cuts |
References bounding_box(), and count.
Referenced by diff_models().
| priv::CutAOIs priv::create_cut_area_of_interests | ( | const CutMesh & | mesh, |
| const ExPolygons & | shapes, | ||
| FaceTypeMap & | face_type_map ) |
Create areas from mesh surface.
| mesh | Model |
| shapes | Cutted shapes |
| face_type_map | Define Triangles of interest. Edge between inside / outside. NOTE: Not const because it need to flag proccessed faces |
References collect_surface_data(), and inside.
Referenced by cut_from_model().
| void priv::create_face_types | ( | FaceTypeMap & | map, |
| const CutMesh & | tm1, | ||
| const CutMesh & | tm2, | ||
| const EdgeBoolMap & | ecm, | ||
| const VertexSourceMap & | sources ) |
Create map1 and map2.
| map | Convert tm1.face to type |
| tm1 | Corefined mesh |
| tm2 | Source of intersection |
| ecm1 | Identify constrainde edge |
| sources | Convert tm1.face to type |
References priv::Source::hi, inside, not_constrained, outside, and priv::Source::sdim.
| priv::Loops priv::create_loops | ( | const std::vector< HI > & | outlines, |
| const CutMesh & | mesh ) |
Create closed loops of contour vertices created from open half edges.
| outlines | Unsorted half edges |
| mesh | Source mesh for half edges |
Referenced by collect_open_edges().
| void priv::create_reduce_map | ( | ReductionMap & | reduction_map, |
| const CutMesh & | meshes ) |
Create map to reduce unnecesary triangles, Triangles are made by divided quad to two triangles on side of cutting shape mesh Note: also use from mesh (have to be created) face_type_map .. Type of shape inside / outside vert_shape_map .. Source of outline vertex.
| reduction_map | Reduction map from vertex to vertex, when key == value than no reduction |
| faces | Faces of one |
| mesh | Input object |
Append reduction or change existing one.
| hi | HalEdge between outside and inside face. Target vertex will be reduced, source vertex left |
[[maybe_unused]] &face_type_map, &is_reducible_vertex are need only in debug
References priv::IntersectingElement::edge_2, priv::IntersectingElement::get_type(), is_constrained_edge_name, to_vec3d(), and vert_shape_map_name.
Referenced by diff_models().
| priv::SearchData priv::create_search_data | ( | const ExPolygons & | shapes, |
| const std::vector< bool > & | mask ) |
References Slic3r::AABBTreeLines::build_aabb_tree_over_indexed_lines(), priv::SearchData::cvt, priv::SearchData::lines, and priv::SearchData::tree.
Referenced by find_closest_point_index(), and find_closest_point_pair().
| priv::SurfacePatch priv::create_surface_patch | ( | const std::vector< FI > & | fis, |
| CutMesh & | mesh, | ||
| const ReductionMap * | rmap = nullptr ) |
Create patch.
| fis | Define patch faces |
| mesh | Source of fis NOTE: Need temporary add property map for convert vertices |
| rmap | Options to reduce vertices from fis. NOTE: Used for skip vertices made by diagonal edge in rectangle of shape side |
References patch_source_name.
Referenced by diff_models(), and separate_patch().
| priv::Trees priv::create_trees | ( | const CutMeshes & | models | ) |
Create AABB trees for check when patch is whole inside of model.
| models | Source for trees |
| priv::CutAOIs priv::cut_from_model | ( | CutMesh & | cgal_model, |
| const ExPolygons & | shapes, | ||
| CutMesh & | cgal_shape, | ||
| float | projection_ratio, | ||
| const ExPolygonsIndices & | s2i ) |
Create AOIs(area of interest) on model surface.
| cgal_model | Input model converted to CGAL NOTE: will be extended by corefine edge |
| shapes | 2d contours |
| cgal_shape | [const]Model made by shapes NOTE: Can't be definde as const because of corefine function input definition, but it is. |
| projection_ratio | Wanted projection distance |
| s2i | Convert index to shape point from ExPolygons |
References create_cut_area_of_interests(), edge_shape_map_name, face_shape_map_name, face_type_map_name, flood_fill_inner(), is_constrained_edge_name, not_constrained, set_face_type(), and vert_shape_map_name.
Referenced by Slic3r::cut_surface().
| const VI priv::default_vi | ( | std::numeric_limits< uint32_t > | ::max() | ) |
| priv::SurfacePatches priv::diff_models | ( | VCutAOIs & | cuts, |
| CutMeshes & | cut_models, | ||
| CutMeshes & | models, | ||
| const Project3d & | projection ) |
Differenciate other models.
| cuts | Patches from meshes |
| cut_models | Source points for Cutted AOIs NOTE: Create Reduction map as mesh property - clean on end |
| models | Original models without cut modifications used for differenciation NOTE: Clip function modify Mesh |
| projection | Define projection direction |
References priv::SurfacePatch::aoi_id, priv::SurfacePatch::bb, clip_cut(), collect_open_edges(), create_bbs(), create_reduce_map(), create_surface_patch(), divide_patch(), priv::SurfacePatchEx::full_inside, priv::ModelCut2index::get_count(), get_shape_point_index(), has_bb_intersection(), is_patch_inside_of_model(), priv::SurfacePatch::is_whole_aoi, priv::SurfacePatchEx::just_cliped, priv::SurfacePatch::model_id, priv::SurfacePatchEx::patch, priv::SurfacePatch::shape_id, and vertex_reduction_map_name.
Referenced by Slic3r::cut_surface().
| void priv::divide_patch | ( | size_t | i, |
| SurfacePatchesEx & | patches ) |
Separate connected triangles into it's own patches new patches are added to back of input patches.
| i | index into patches |
| patches | In/Out Patches |
References priv::SurfacePatch::bb, bounding_box(), priv::SurfacePatch::is_whole_aoi, priv::SurfacePatchEx::just_cliped, priv::SurfacePatch::mesh, priv::SurfacePatchEx::patch, patch_source_name, and separate_patch().
Referenced by diff_models().
|
static |
References Slic3r::GUI::IconManager::Icon::br, Slic3r::GUI::draw(), Slic3r::GUI::IconManager::Icon::is_valid(), Slic3r::GUI::IconManager::Icon::size, and Slic3r::GUI::IconManager::Icon::tl.
Referenced by Slic3r::GUI::clickable().
| bool priv::exist_duplicit_vertex | ( | const CutMesh & | mesh | ) |
Referenced by to_cgal().
| void priv::fill_polygon_distances | ( | const ProjectionDistance & | pd, |
| uint32_t | index, | ||
| const ExPolygonsIndex & | id, | ||
| ProjectionDistances & | result, | ||
| const ExPolygon & | shape, | ||
| const VDistances & | distances ) |
References Slic3r::ExPolygon::contour, priv::ProjectionDistance::distance, get_closest_projection(), Slic3r::ExPolygon::holes, and Slic3r::MultiPoint::points.
Referenced by fill_shape_distances().
| void priv::fill_shape_distances | ( | uint32_t | start_index, |
| const ProjectionDistance * | start_pd, | ||
| ProjectionDistances & | result, | ||
| const ExPolygonsIndices & | s2i, | ||
| const ExPolygon & | shape, | ||
| const VDistances & | distances ) |
References calc_size_sq(), Slic3r::ExPolygonsIndices::cvt(), priv::ClosePoint::dist_sq, Slic3r::empty(), fill_polygon_distances(), priv::ClosePoint::index, and Slic3r::MultiPoint::points.
Referenced by choose_best_distance().
| priv::ClosePoint priv::find_close_point | ( | const Point & | p, |
| ProjectionDistances & | result, | ||
| std::vector< bool > & | finished_shapes, | ||
| const ExPolygonsIndices & | s2i, | ||
| const ExPolygons & | shapes ) |
References calc_size_sq(), Slic3r::ExPolygon::contour, Slic3r::ExPolygonsIndices::cvt(), Slic3r::ExPolygon::holes, and Slic3r::MultiPoint::points.
| uint32_t priv::find_closest_point_index | ( | const Point & | p, |
| const ExPolygons & | shapes, | ||
| const ExPolygonsIndices & | s2i, | ||
| const std::vector< bool > & | mask ) |
References Slic3r::cast(), create_search_data(), Slic3r::ExPolygonsIndices::cvt(), Slic3r::ExPolygonsIndex::expolygons_index, get_closest_point_index(), Slic3r::ExPolygonsIndex::hole_index(), Slic3r::ExPolygonsIndex::is_contour(), priv::SearchData::lines, Slic3r::AABBTreeIndirect::Tree< ANumDimensions, ACoordType >::nodes(), Slic3r::ExPolygonsIndex::point_index, Slic3r::AABBTreeLines::squared_distance_to_indexed_lines(), and priv::SearchData::tree.
Referenced by choose_best_distance().
| std::pair< uint32_t, uint32_t > priv::find_closest_point_pair | ( | const ExPolygons & | shapes, |
| const std::vector< bool > & | done_shapes, | ||
| const ExPolygonsIndices & | s2i, | ||
| const std::vector< bool > & | mask ) |
References Slic3r::ExPolygon::contour, count, Slic3r::count_points(), create_search_data(), get_closest_point_index(), Slic3r::ExPolygonsIndices::get_count(), Slic3r::ExPolygon::holes, and Slic3r::AABBTreeLines::squared_distance_to_indexed_lines().
Referenced by choose_best_distance().
| void priv::flood_fill_inner | ( | const CutMesh & | mesh, |
| FaceTypeMap & | face_type_map ) |
Change FaceType from not_constrained to inside For neighbor(or neighbor of neighbor of ...) of inside triangles. Process only not_constrained triangles.
| mesh | Corefined mesh |
| face_type_map | In/Out map with faces type |
References inside, and not_constrained.
Referenced by cut_from_model().
| uint32_t priv::get_closest_point_index | ( | const SearchData & | sd, |
| size_t | line_idx, | ||
| const Vec2d & | hit_point, | ||
| const ExPolygons & | shapes, | ||
| const ExPolygonsIndices & | s2i ) |
References Slic3r::Linef::a, Slic3r::Linef::b, Slic3r::ExPolygon::contour, priv::SearchData::cvt, Slic3r::ExPolygonsIndices::cvt(), Slic3r::ExPolygon::holes, priv::SearchData::lines, and Slic3r::MultiPoint::size().
Referenced by find_closest_point_index(), and find_closest_point_pair().
| const priv::ProjectionDistance * priv::get_closest_projection | ( | const ProjectionDistances & | distance, |
| float | wanted_distance ) |
Referenced by choose_best_distance(), and fill_polygon_distances().
Return some shape point index which identify shape NOTE: Used to find expolygon index.
| cut | Used to search source shapes poin |
| model |
References priv::IntersectingElement::shape_point_index, and vert_shape_map_name.
Referenced by diff_models().
|
static |
References Slic3r::GUI::IconManager::color, Slic3r::GUI::IconManager::color_wite_gray, Slic3r::GUI::IconManager::gray_only_data, and Slic3r::GUI::IconManager::white_only_data.
Referenced by Slic3r::GUI::IconManager::init().
| bool priv::has_bb_intersection | ( | const BoundingBoxf3 & | bb, |
| size_t | model_index, | ||
| const BBS & | bbs, | ||
| const ModelCut2index & | m2i ) |
Check whether bounding box has intersection with model.
| bb | Bounding box to check |
| model_index | Model to check with |
| bbs | All bounding boxes from VCutAOIs |
| m2i | Help index into VCutAOIs |
References priv::ModelCut2index::get_count(), priv::ModelCut2index::get_offsets(), and Slic3r::BoundingBox3Base< PointType >::intersects().
Referenced by diff_models().
|
inline |
Referenced by Slic3r::Triangulation::triangulate().
|
inline |
References Slic3r::get_intersections().
Referenced by Slic3r::Triangulation::triangulate().
|
inline |
References Slic3r::offset(), and Slic3r::MultiPoint::points.
|
inline |
References Slic3r::offset(), and Slic3r::MultiPoint::points.
Referenced by Slic3r::Triangulation::triangulate(), Slic3r::Triangulation::triangulate(), Slic3r::Triangulation::triangulate(), and Slic3r::Triangulation::triangulate().
Check if triangle t has all vertices out of any plane.
| t | Triangle |
| is_on_sides | Flag is vertex index out of plane |
| bool priv::is_face_inside | ( | HI | hi, |
| const CutMesh & | mesh, | ||
| const CutMesh & | shape_mesh, | ||
| const VertexShapeMap & | vertex_shape_map, | ||
| const ExPolygonsIndices & | shape2index ) |
Distiquish face type for half edge.
| hi | Define face |
| mesh | Mesh to process |
| shape_mesh | Vertices of mesh made by shapes |
| vertex_shape_map | Keep information about source of created vertex |
| shape2index | |
| shape2index | Convert index to shape point from ExPolygons |
References priv::IntersectingElement::attr, Slic3r::ExPolygonsIndices::cvt(), priv::IntersectingElement::face_1, priv::IntersectingElement::face_2, priv::IntersectingElement::get_type(), priv::IntersectingElement::is_first(), priv::IntersectingElement::is_last(), Slic3r::ExPolygonsIndex::point_index, priv::IntersectingElement::shape_point_index, and priv::IntersectingElement::undefined.
Referenced by set_face_type().
| bool priv::is_out_of | ( | const Vec3d & | v, |
| const PointNormal & | point_normal ) |
Check.
| side | |
| v | |
| point_normals |
References Slic3r::dot().
Referenced by set_skip_for_out_of_aoi().
| bool priv::is_over_whole_expoly | ( | const CutAOI & | cutAOI, |
| const ExPolygon & | shape, | ||
| const CutMesh & | mesh ) |
Checking whether patch is uninterrupted cover of whole expolygon it belongs.
References priv::IntersectingElement::attr, priv::IntersectingElement::edge_1, priv::IntersectingElement::face_1, priv::IntersectingElement::get_type(), priv::IntersectingElement::is_first(), priv::IntersectingElement::is_last(), Slic3r::opposite(), priv::IntersectingElement::shape_point_index, priv::IntersectingElement::undefined, and vert_shape_map_name.
Referenced by is_over_whole_expoly(), and select_patches().
| bool priv::is_over_whole_expoly | ( | const SurfacePatch & | patch, |
| const ExPolygons & | shapes, | ||
| const VCutAOIs & | cutAOIs, | ||
| const CutMeshes & | meshes ) |
Checking whether patch is uninterrupted cover of whole expolygon it belongs.
| patch | Part of surface to check |
| shape | Source shape |
References priv::SurfacePatch::aoi_id, is_over_whole_expoly(), priv::SurfacePatch::is_whole_aoi, priv::SurfacePatch::model_id, and priv::SurfacePatch::shape_id.
| bool priv::is_patch_inside_of_model | ( | const SurfacePatch & | patch, |
| const Tree & | tree, | ||
| const Project3d & | projection ) |
Only for model without intersection Use ray (in projection direction) from a point from patch and count intersections: pair .. outside | odd .. inside.
| patch | Patch to check |
| tree | Model converted to AABB tree |
| projection | Define direction of projection |
References count, priv::SurfacePatch::mesh, Slic3r::Emboss::IProject3d::project(), and to_vec3d().
Referenced by diff_models().
|
inline |
Referenced by Slic3r::Triangulation::triangulate().
| SurfaceCut priv::merge_patches | ( | SurfacePatches & | patches, |
| const std::vector< bool > & | mask ) |
Merge masked patches to one surface cut.
| patches | All patches NOTE: Not const because One needs to add property for Convert indices |
| mask | Mash for using patch |
References append(), and patch2cut().
| SurfaceCut priv::patch2cut | ( | SurfacePatch & | patch | ) |
Convert patch to indexed_triangle_set.
| patch | Part of surface |
References Slic3r::contour(), Slic3r::SurfaceCut::contours, priv::SurfacePatch::loops, and priv::SurfacePatch::mesh.
Referenced by merge_patches().
| std::vector< bool > priv::select_patches | ( | const ProjectionDistances & | best_distances, |
| const SurfacePatches & | patches, | ||
| const ExPolygons & | shapes, | ||
| const BoundingBox & | shapes_bb, | ||
| const ExPolygonsIndices & | s2i, | ||
| const VCutAOIs & | cutAOIs, | ||
| const CutMeshes & | meshes, | ||
| const Project & | projection ) |
Create mask for patches.
| best_distances | For each point selected closest distance |
| patches | All patches |
| shapes | Shape to cut |
| shapes_bb | Bound of shapes |
| s2i | |
| cutAOIs | |
| meshes | |
| projection |
References Slic3r::BoundingBoxBase< PointType, APointsType >::center(), Slic3r::ExPolygonsIndices::cvt(), Slic3r::diff_ex(), Slic3r::SVG::draw(), Slic3r::SVG::draw_text(), Slic3r::get_extents(), Slic3r::intersection(), Slic3r::intersection_ex(), is_over_whole_expoly(), Slic3r::offset_ex(), Slic3r::BoundingBoxBase< PointType, APointsType >::size(), to_expoly(), Slic3r::union_ex(), and Slic3r::Yes.
Referenced by Slic3r::cut_surface().
| priv::SurfacePatch priv::separate_patch | ( | const std::vector< FI > & | fis, |
| SurfacePatch & | patch, | ||
| const CvtVI2VI & | cvt_from ) |
Separate triangles singned with number n.
| fis | Face indices owned by separate patch |
| patch | Original patch NOTE: Can't be const. For indexing vetices need temporary add property map |
| cvt_from | conversion map |
References priv::SurfacePatch::aoi_id, priv::SurfacePatch::bb, bounding_box(), create_surface_patch(), priv::SurfacePatch::mesh, priv::SurfacePatch::model_id, patch_source_name, and priv::SurfacePatch::shape_id.
Referenced by divide_patch().
| void priv::set_face_type | ( | FaceTypeMap & | face_type_map, |
| const CutMesh & | mesh, | ||
| const VertexShapeMap & | vertex_shape_map, | ||
| const EdgeBoolMap & | ecm, | ||
| const CutMesh & | shape_mesh, | ||
| const ExPolygonsIndices & | shape2index ) |
Face with constrained edge are inside/outside by type of intersection Other set to not_constrained(still it could be inside/outside).
| face_type_map | [Output] property map with type of faces |
| mesh | Mesh to process |
| vertex_shape_map | Keep information about source of created vertex |
| ecm | Dynamic Edge Constrained Map of bool |
| shape_mesh | Vertices of mesh made by shapes |
| shape2index | Convert index to shape point from ExPolygons |
References inside, is_face_inside(), and outside.
Referenced by cut_from_model().
| void priv::set_skip_by_angle | ( | std::vector< bool > & | skip_indicies, |
| const indexed_triangle_set & | its, | ||
| const Project3d & | projection, | ||
| double | max_angle = 89. ) |
Set true for indicies outward and almost parallel together. Note: internally calculate normals.
| skip_indicies | Flag to convert triangle to cgal |
| its | model |
| projection | Direction to measure angle |
| max_angle | Maximal allowed angle between opposit normal and projection direction [in DEG] |
References Slic3r::its_face_normal(), M_PI, and Slic3r::Emboss::IProject3d::project().
Referenced by Slic3r::cut_surface().
| void priv::set_skip_for_out_of_aoi | ( | std::vector< bool > & | skip_indicies, |
| const indexed_triangle_set & | its, | ||
| const Project & | projection, | ||
| const BoundingBox & | shapes_bb ) |
Set true for indices out of area of interest.
| skip_indicies | Flag to convert triangle to cgal |
| its | model |
| projection | Convert 2d point to pair of 3d points |
| shapes_bb | 2d bounding box define AOI |
References Slic3r::Emboss::IProjection::create_front_back(), is_out_of(), Slic3r::BoundingBoxBase< PointType, APointsType >::max, Slic3r::BoundingBoxBase< PointType, APointsType >::min, Slic3r::normal(), and Slic3r::range().
Referenced by Slic3r::cut_surface(), and Slic3r::its_cut_AoI().
| priv::CutMesh priv::to_cgal | ( | const ExPolygons & | shapes, |
| const Project & | projection ) |
Covert 2d shape (e.g. Glyph) to CGAL model NOTE: internaly create edge_shape_map .. Property map to store conversion from edge to contour face_shape_map .. Property map to store conversion from face to contour.
| shapes | 2d shapes to project |
| projection | Define transformation 2d point into 3d |
References Slic3r::count_points(), Slic3r::Emboss::IProjection::create_front_back(), priv::IntersectingElement::edge_1, priv::IntersectingElement::edge_2, edge_shape_map_name, exist_duplicit_vertex(), priv::IntersectingElement::face_1, priv::IntersectingElement::face_2, face_shape_map_name, priv::IntersectingElement::set_is_first(), priv::IntersectingElement::set_is_last(), priv::IntersectingElement::set_type(), and priv::IntersectingElement::undefined.
| priv::CutMesh priv::to_cgal | ( | const indexed_triangle_set & | its, |
| const std::vector< bool > & | skip_indicies, | ||
| bool | flip = false ) |
Convert triangle mesh model to CGAL Surface_mesh Filtrate out opposite triangles Add property map for source face index.
| its | Model |
| skip_indicies | Flags that triangle should be skiped |
| flip | When true triangle will flip normal |
References Slic3r::f().
Referenced by Slic3r::cut_surface().
| ExPolygon priv::to_expoly | ( | const SurfacePatch & | patch, |
| const Project & | projection, | ||
| Vec2d & | depth_range ) |
Unproject points from loops and create expolygons.
| patch | Patch to convert on expolygon |
| projection | Convert 3d point to 2d |
| depth_range | Range of unprojected points x .. min, y .. max value |
References Slic3r::ExPolygon::contour, Slic3r::pftEvenOdd, Slic3r::MultiPoint::size(), Slic3r::union_ex(), and unproject_loops().
Referenced by select_patches().
Referenced by bounding_box(), bounding_box(), create_reduce_map(), is_patch_inside_of_model(), and unproject_loops().
| Polygons priv::unproject_loops | ( | const SurfacePatch & | patch, |
| const Project & | projection, | ||
| Vec2d & | depth_range ) |
Unptoject points from outline loops of patch.
| patch | Contain loops and vertices |
| projection | Know how to project from 3d to 2d |
| depth_range | Range of unprojected points x .. min, y .. max value |
References count, priv::SurfacePatch::loops, priv::SurfacePatch::mesh, to_vec3d(), and Slic3r::Emboss::IProjection::unproject().
Referenced by to_expoly().
| const std::string priv::edge_shape_map_name = "e:IntersectingElement" |
Referenced by cut_from_model(), and to_cgal().
| const std::string priv::face_shape_map_name = "f:IntersectingElement" |
Referenced by cut_from_model(), and to_cgal().
| const std::string priv::face_type_map_name = "f:side" |
Referenced by cut_from_model().
| const std::string priv::is_constrained_edge_name = "e:is_constrained" |
Referenced by create_reduce_map(), and cut_from_model().
| const std::string priv::patch_source_name = "v:patch_source" |
Referenced by calc_distances(), create_surface_patch(), divide_patch(), and separate_patch().
| const std::string priv::vert_shape_map_name = "v:IntersectingElement" |
Referenced by calc_distances(), create_reduce_map(), cut_from_model(), get_shape_point_index(), and is_over_whole_expoly().
| const std::string priv::vertex_reduction_map_name = "v:reduction" |
Referenced by diff_models().
| const std::string priv::vertex_source_map_name = "v:SourceIntersecting" |