diff --git a/python/src/graphics/figures/codac2_py_Figure2D.cpp b/python/src/graphics/figures/codac2_py_Figure2D.cpp index d72d33c1..aedc6482 100644 --- a/python/src/graphics/figures/codac2_py_Figure2D.cpp +++ b/python/src/graphics/figures/codac2_py_Figure2D.cpp @@ -136,6 +136,16 @@ void export_Figure2D(py::module& m) VOID_FIGURE2D_DRAW_AUV_CONST_VECTOR_REF_FLOAT_CONST_STYLEPROPERTIES_REF, "x"_a, "size"_a, "s"_a=StyleProperties()) + // Pavings + + .def("draw_paving", (void(Figure2D::*)(const PavingOut&,const StyleProperties&,const StyleProperties&))&Figure2D::draw_paving, + VOID_FIGURE2D_DRAW_PAVING_CONST_PAVINGOUT_REF_CONST_STYLEPROPERTIES_REF_CONST_STYLEPROPERTIES_REF, + "p"_a, "boundary_style"_a=StyleProperties::boundary(), "outside_style"_a=StyleProperties::outside()) + + .def("draw_paving", (void(Figure2D::*)(const PavingInOut&,const StyleProperties&,const StyleProperties&,const StyleProperties&))&Figure2D::draw_paving, + VOID_FIGURE2D_DRAW_PAVING_CONST_PAVINGINOUT_REF_CONST_STYLEPROPERTIES_REF_CONST_STYLEPROPERTIES_REF_CONST_STYLEPROPERTIES_REF, + "p"_a, "boundary_style"_a=StyleProperties::boundary(), "outside_style"_a=StyleProperties::outside(), "inside_style"_a=StyleProperties::inside()) + ; py::class_ exported_default_view(m, "DefaultView", DEFAULTVIEW_MAIN); diff --git a/src/core/paver/codac2_pave.cpp b/src/core/paver/codac2_pave.cpp index b1ee89e4..81c5cff1 100644 --- a/src/core/paver/codac2_pave.cpp +++ b/src/core/paver/codac2_pave.cpp @@ -14,6 +14,11 @@ using namespace codac2; namespace codac2 { + PavingOut pave(const IntervalVector& x, std::shared_ptr> c, double eps) + { + return pave(x, *c, eps); + } + PavingOut pave(const IntervalVector& x, const CtcBase& c, double eps) { assert_release(eps > 0.); @@ -48,6 +53,11 @@ namespace codac2 return p; } + PavingInOut pave(const IntervalVector& x, std::shared_ptr s, double eps) + { + return pave(x, *s, eps); + } + PavingInOut pave(const IntervalVector& x, const SepBase& s, double eps) { assert_release(eps > 0.); diff --git a/src/core/paver/codac2_pave.h b/src/core/paver/codac2_pave.h index 82f4ea44..0f8c890c 100644 --- a/src/core/paver/codac2_pave.h +++ b/src/core/paver/codac2_pave.h @@ -18,7 +18,9 @@ namespace codac2 { // eps: accuracy of the paving algorithm, the undefined boxes will have their max_diam <= eps + PavingOut pave(const IntervalVector& x, std::shared_ptr> c, double eps); PavingOut pave(const IntervalVector& x, const CtcBase& c, double eps); + PavingInOut pave(const IntervalVector& x, std::shared_ptr s, double eps); PavingInOut pave(const IntervalVector& x, const SepBase& s, double eps); template diff --git a/src/graphics/3rd/ipe/codac2_Figure2D_IPE.cpp b/src/graphics/3rd/ipe/codac2_Figure2D_IPE.cpp index 64aa7143..b9349c99 100644 --- a/src/graphics/3rd/ipe/codac2_Figure2D_IPE.cpp +++ b/src/graphics/3rd/ipe/codac2_Figure2D_IPE.cpp @@ -77,7 +77,7 @@ void Figure2D_IPE::center_viewbox([[maybe_unused]] const Vector& c, [[maybe_unus std::string ipe_str(const Color& c) { - return " codac_color_" + c.hex_str().substr(1); + return c.hex_str().substr(1); } int ipe_opacity(const Color& c)