Skip to content

Commit

Permalink
Merge branch 'codac2_dev' of ssh://github.com/codac-team/codac into c…
Browse files Browse the repository at this point in the history
…odac2_dev
  • Loading branch information
SimonRohou committed Dec 6, 2024
2 parents d4b7a35 + 639b848 commit 6875f2f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
10 changes: 10 additions & 0 deletions python/src/graphics/figures/codac2_py_Figure2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_<DefaultView> exported_default_view(m, "DefaultView", DEFAULTVIEW_MAIN);
Expand Down
10 changes: 10 additions & 0 deletions src/core/paver/codac2_pave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ using namespace codac2;

namespace codac2
{
PavingOut pave(const IntervalVector& x, std::shared_ptr<const CtcBase<IntervalVector>> c, double eps)
{
return pave(x, *c, eps);
}

PavingOut pave(const IntervalVector& x, const CtcBase<IntervalVector>& c, double eps)
{
assert_release(eps > 0.);
Expand Down Expand Up @@ -48,6 +53,11 @@ namespace codac2
return p;
}

PavingInOut pave(const IntervalVector& x, std::shared_ptr<const SepBase> s, double eps)
{
return pave(x, *s, eps);
}

PavingInOut pave(const IntervalVector& x, const SepBase& s, double eps)
{
assert_release(eps > 0.);
Expand Down
2 changes: 2 additions & 0 deletions src/core/paver/codac2_pave.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<const CtcBase<IntervalVector>> c, double eps);
PavingOut pave(const IntervalVector& x, const CtcBase<IntervalVector>& c, double eps);
PavingInOut pave(const IntervalVector& x, std::shared_ptr<const SepBase> s, double eps);
PavingInOut pave(const IntervalVector& x, const SepBase& s, double eps);

template<typename Y>
Expand Down
2 changes: 1 addition & 1 deletion src/graphics/3rd/ipe/codac2_Figure2D_IPE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6875f2f

Please sign in to comment.