commit adbcc21439c9fd46080612e5135d3e0a2c94cb89
Author: Miro Hrončok <m...@hroncok.cz>
Date:   Tue Sep 23 14:40:13 2014 +0200

    Patch for current admesh

 slic3r-clear-error.patch |   36 ++++++++++++++++++++++++++++++++++++
 slic3r.spec              |   10 ++++++----
 2 files changed, 42 insertions(+), 4 deletions(-)
---
diff --git a/slic3r-clear-error.patch b/slic3r-clear-error.patch
new file mode 100644
index 0000000..57eb469
--- /dev/null
+++ b/slic3r-clear-error.patch
@@ -0,0 +1,36 @@
+diff --git a/xs/src/TriangleMesh.cpp b/xs/src/TriangleMesh.cpp
+index dc47832..14e9449 100644
+--- a/xs/src/TriangleMesh.cpp
++++ b/xs/src/TriangleMesh.cpp
+@@ -29,6 +29,7 @@ TriangleMesh::TriangleMesh(const TriangleMesh &other)
+ {
+     this->stl.heads = NULL;
+     this->stl.tail  = NULL;
++    this->stl.error = other.stl.error;
+     if (other.stl.facet_start != NULL) {
+         this->stl.facet_start = 
(stl_facet*)calloc(other.stl.stats.number_of_facets, sizeof(stl_facet));
+         std::copy(other.stl.facet_start, other.stl.facet_start + 
other.stl.stats.number_of_facets, this->stl.facet_start);
+@@ -125,6 +126,7 @@ TriangleMesh::repair() {
+     // fill_holes
+     if (stl.stats.connected_facets_3_edge < stl.stats.number_of_facets) {
+         stl_fill_holes(&stl);
++        stl_clear_error(&stl);
+     }
+     
+     // normal_directions
+@@ -248,6 +250,7 @@ TriangleMesh::split() const
+         mesh->stl.stats.type = inmemory;
+         mesh->stl.stats.number_of_facets = facets.size();
+         mesh->stl.stats.original_num_facets = 
mesh->stl.stats.number_of_facets;
++        stl_clear_error(&mesh->stl);
+         stl_allocate(&mesh->stl);
+         
+         int first = 1;
+@@ -349,6 +352,7 @@ TriangleMesh::to_SV() {
+ 
+ void TriangleMesh::ReadFromPerl(SV* vertices, SV* facets)
+ {
++    stl.error = 0;
+     stl.stats.type = inmemory;
+     
+     // count facets and allocate memory
diff --git a/slic3r.spec b/slic3r.spec
index 9aaaeba..a6eca9d 100644
--- a/slic3r.spec
+++ b/slic3r.spec
@@ -20,10 +20,11 @@ Patch0:         %{name}-buildpl.patch
 Patch1:         %{name}-nowarn-datadir.patch
 Patch2:         %{name}-english-locale.patch
 Patch3:         %{name}-linker.patch
+Patch4:         %{name}-clear-error.patch
 
 %if %with_clipper
 # Unbundle clipper
-Patch4:         %{name}-clipper.patch
+Patch5:         %{name}-clipper.patch
 %endif
 
 Source1:        %{name}.desktop
@@ -62,7 +63,7 @@ BuildRequires:  perl(XML::SAX::ExpatXS)
 BuildRequires:  polyclipping-devel
 %endif
 
-BuildRequires:  admesh-devel >= 0.97.5
+BuildRequires:  admesh-devel >= 0.98.1
 BuildRequires:  boost-devel
 BuildRequires:  desktop-file-utils
 BuildRequires:  poly2tri-devel
@@ -85,9 +86,10 @@ for more information.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %if %with_clipper
-%patch4 -p1
+%patch5 -p1
 # Remove bundled clipper
 rm xs/src/clipper.*pp
 %endif
@@ -150,7 +152,7 @@ cp %{SOURCE2} 
%{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
 
 %check
 cd xs
-./Build test
+./Build test verbose=1
 cd -
 SLIC3R_NO_AUTO=1 perl Build.PL installdirs=vendor
 # the --gui runs no tests, it only checks requires
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

Reply via email to