#include "libslic3r/CAD/CadDocument.hpp"#include "libslic3r/I18N.hpp"#include "libslic3r/format.hpp"#include "libslic3r/Point.hpp"#include "libslic3r/CAD/SketchEngine.hpp"#include "libslic3r/CAD/GeometryEngine.hpp"#include "libslic3r/CAD/SketchConstraints.hpp"#include "libslic3r/CAD/SketchSolver.hpp"#include "libslic3r/CAD/SketchImport.hpp"#include <Standard_Handle.hxx>#include <TopAbs_ShapeEnum.hxx>#include <Standard_TypeDef.hxx>#include <TopAbs_State.hxx>#include <array>#include <Standard_Failure.hxx>#include <BRepBuilderAPI_MakeWire.hxx>#include <BRepExtrema_DistShapeShape.hxx>#include <BRepBuilderAPI_MakeEdge.hxx>#include <BRepBuilderAPI_MakeFace.hxx>#include <BRepBuilderAPI_MakePolygon.hxx>#include <BRepAlgoAPI_Fuse.hxx>#include <BRepAlgoAPI_Cut.hxx>#include <BRepAlgoAPI_Common.hxx>#include <BRepAlgoAPI_Defeaturing.hxx>#include <BRepAlgoAPI_BooleanOperation.hxx>#include <BRepOffsetAPI_MakePipe.hxx>#include <BRepOffsetAPI_MakePipeShell.hxx>#include <BRepOffsetAPI_MakeThickSolid.hxx>#include <BRepBuilderAPI_Sewing.hxx>#include <BRepBuilderAPI_MakeSolid.hxx>#include <ShapeAnalysis_FreeBounds.hxx>#include <BRepOffsetAPI_MakeOffsetShape.hxx>#include <BRepOffsetAPI_MakeFilling.hxx>#include <BRepOffsetAPI_DraftAngle.hxx>#include <Bnd_Box.hxx>#include <BRepBndLib.hxx>#include <functional>#include <exception>#include <cstdint>#include <cereal/cereal.hpp>#include <cereal/details/helpers.hpp>#include <gp_Pln.hxx>#include <NCollection_List.hxx>#include <BRepPrimAPI_MakeCylinder.hxx>#include <BRepPrimAPI_MakeCone.hxx>#include <BRepPrimAPI_MakeRevol.hxx>#include <BRepCheck_Analyzer.hxx>#include <BRepLib.hxx>#include <BRepAdaptor_Curve.hxx>#include <BRepAdaptor_Surface.hxx>#include <GeomAbs_SurfaceType.hxx>#include <GeomAbs_CurveType.hxx>#include <BRep_Tool.hxx>#include <Geom_CylindricalSurface.hxx>#include <Geom_ConicalSurface.hxx>#include <Geom2d_TrimmedCurve.hxx>#include <GeomAbs_Shape.hxx>#include <GC_MakeSegment2d.hxx>#include <TopoDS_Edge.hxx>#include <TopoDS_Face.hxx>#include <TopAbs.hxx>#include <TopoDS_Shell.hxx>#include <TopoDS_Solid.hxx>#include <TopoDS_Compound.hxx>#include <BRep_Builder.hxx>#include <TopAbs_Orientation.hxx>#include <TopoDS.hxx>#include <TopExp_Explorer.hxx>#include <gp_Circ.hxx>#include <gp_Ax2.hxx>#include <gp_Ax3.hxx>#include <gp_Pnt2d.hxx>#include <gp_Vec.hxx>#include <gp_Trsf.hxx>#include <STEPControl_Writer.hxx>#include <STEPControl_StepModelType.hxx>#include <IFSelect_ReturnStatus.hxx>#include <gp_Ax1.hxx>#include <BRepBuilderAPI_Transform.hxx>#include <BRepGProp.hxx>#include <GProp_GProps.hxx>#include <cmath>#include <cctype>#include <cstdio>#include <gp_XY.hxx>#include <initializer_list>#include <math.h>#include <map>#include <memory>#include <set>#include <stdexcept>#include <algorithm>#include <sstream>#include <cereal/archives/binary.hpp>#include <cereal/types/array.hpp>#include <BRepTools.hxx>#include <BRepClass_FaceClassifier.hxx>#include <BRepLProp_SLProps.hxx>#include <GeomAPI_ProjectPointOnSurf.hxx>#include <Poly_Triangulation.hxx>#include <Precision.hxx>#include <string>#include <vector>#include <utility>#include "libslic3r/Color.hpp"#include "libslic3r/TriangleMesh.hpp"Go to the source code of this file.
Classes | |
| struct | Slic3r::HoleStdEntry |
| struct | Slic3r::anonymous_namespace{CadDocument.cpp}::FaceProbe |
Namespaces | |
| namespace | Slic3r |
| |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/ | |
| namespace | Slic3r::anonymous_namespace{CadDocument.cpp} |
Functions | |
| static TopoDS_Wire | Slic3r::make_helix_wire (const gp_Ax3 &axis, double radius, double pitch, double height) |
| static TopoDS_Wire | Slic3r::make_helix_spine (const CadFeature &f, std::string &err) |
| static TopoDS_Wire | Slic3r::make_thread_v (const gp_Pnt &origin, const gp_Dir &xdir, const gp_Dir &zdir, double base_r, double apex_r, double pitch) |
| static TopoDS_Wire | Slic3r::make_thread_profile (const gp_Pnt &origin, const gp_Dir &xdir, const gp_Dir &zdir, double radius, double pitch, double depth, bool internal) |
| static double | Slic3r::eval_expr (const std::string &src, const std::map< std::string, double > &vars) |
| static std::map< std::string, double > | Slic3r::evaluate_variables (const std::map< std::string, std::string > &variables) |
| static void | Slic3r::assign_field (CadFeature &f, const std::string &field, double value) |
| static Vec2d | Slic3r::sample_entity_2d (const SketchEntity &e, double t) |
| bool | Slic3r::solve_sketch_entities (std::vector< SketchEntity > &entities, const std::vector< SketchEntityConstraintDef > &constraints) |
| static const HoleStdEntry * | Slic3r::hole_std_lookup (const std::string &desig) |
| static void | Slic3r::project_edges_to_entities (const std::vector< TopoDS_Edge > &edges, const SketchPlane &plane, bool construction, std::vector< SketchEntity > &out) |
| static SketchPlane | Slic3r::offset_angle_plane (const SketchPlane &base, double offset, double angle_deg, int axis) |
| static SketchPlane | Slic3r::frame_from (const Vec3d &origin, const Vec3d &normal) |
| static int | Slic3r::pick_body (int ref, int nb) |
| template<class Visit> | |
| static void | Slic3r::for_each_body_ref (CadFeature &f, Visit &&visit) |
| static CadFeature::BodyId | Slic3r::body_id_of (const std::vector< CadBody > &v, int i) |
| static int | Slic3r::find_body (const std::vector< CadBody > &v, const CadFeature::BodyId &id) |
| static void | Slic3r::settle_body_refs (CadFeature &f, const std::vector< CadBody > &v, bool running) |
| template<class Visit> | |
| static void | Slic3r::for_each_datum_ref (CadFeature &f, Visit &&visit) |
| static void | Slic3r::stage_history_change (std::vector< CadFeature > &features, const std::function< int(int)> &map_feature, const std::function< bool(int)> &enabled_after) |
| static bool | Slic3r::commit_or_rollback (CadDocument &doc, std::vector< CadFeature > &snapshot) |
| template<class Visit> | |
| static void | Slic3r::for_each_feature_ref (CadFeature &f, Visit &&visit) |
| static std::string | Slic3r::open_loop_message (const CadFeature &sketch, const std::string &head=_u8L("sketch entities do not form a closed loop")) |
| static gp_Ax1 | Slic3r::revolve_axis_of (const CadFeature &f, const CadFeature &sk) |
| static TopoDS_Shape | Slic3r::compound_of (const std::vector< CadBody > &bodies) |
| static TriangleMesh | Slic3r::tessellate_bodies (const std::vector< CadBody > &bodies, std::vector< int > &tri_face, std::vector< int > &tri_body, std::vector< TriangleMesh > &body_meshes, double lin, double ang) |
| static double | Slic3r::solid_volume (const TopoDS_Shape &s) |
| std::vector< FaceProbe > | Slic3r::anonymous_namespace{CadDocument.cpp}::face_probes (const std::vector< CadBody > &bodies) |
| bool | Slic3r::anonymous_namespace{CadDocument.cpp}::outward_normal (const TopoDS_Face &face, double u, double v, gp_Dir &n) |
| bool | Slic3r::anonymous_namespace{CadDocument.cpp}::interior_point (const TopoDS_Face &face, gp_Pnt &p, gp_Dir &n) |
| bool | Slic3r::anonymous_namespace{CadDocument.cpp}::on_boundary (const std::vector< FaceProbe > &probes, const gp_Pnt &p, const gp_Dir &n) |
| std::string | Slic3r::brep_to_string (const TopoDS_Shape &s) |
| TopoDS_Shape | Slic3r::brep_from_string (const std::string &d) |
Variables | |
| static const HoleStdEntry | Slic3r::kHoleStdTable [] |
| static constexpr int | Slic3r::kBodyRefCount = 10 |
| static constexpr int | Slic3r::kBodyGone = -1000 |
| constexpr double | Slic3r::anonymous_namespace{CadDocument.cpp}::kOnFaceTol = 1e-4 |