Skip to content

Commit

Permalink
Fix bool default value
Browse files Browse the repository at this point in the history
  • Loading branch information
ondratu committed Nov 5, 2024
1 parent eb1a4fe commit 245b4db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion stl2dat.cxx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// 05/11/2024 1.41 Fix bool default value
// 31/10/2024 1.40 Add option -swapyz (same orientation as in stl)
// 31/10/2024 Fix bug in stl_edge::dump
// 25/02/2023 1.32 Fix bug in -scalemm.
Expand Down Expand Up @@ -51,7 +52,7 @@

using namespace std;

#define version "1.40"
#define version "1.41"

static double ag_lim;
static double ag_lim_q;
Expand Down
20 changes: 10 additions & 10 deletions stl2dat.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class stl_prim
stl_lin transfo;
std::string name;
int color;
bool cw; // for bfc
bool cw = false; // for bfc

stl_prim() {};
stl_prim(int col)
Expand Down Expand Up @@ -77,7 +77,7 @@ class stl_surf
public:
int count;
stl_prim * prim;
bool adj_cyl;
bool adj_cyl = false;

stl_surf();
virtual surf_type type() { return(t_surf); };
Expand All @@ -98,7 +98,7 @@ class stl_cylinder : public stl_surf
double radius;
double height;
stl_v normal;
bool cw; // for bfc
bool cw = false; // for bfc

stl_cylinder( const stl_v & od, const stl_v & vd, double radius, double height);
virtual surf_type type() { return(t_cylinder); };
Expand Down Expand Up @@ -183,7 +183,7 @@ class stl_curv
public:
int count;
stl_prim * prim;
bool adj_cyl;
bool adj_cyl = false;

stl_curv();

Expand Down Expand Up @@ -214,7 +214,7 @@ class stl_facet
stl_facet * adjacent[4]; // the facet adjacent on edge[n]
stl_vertex * vertex[4]; // the vertices
stl_surf * surf; // primitive surface
bool printed;
bool printed = false;
double m_surface;
int precision;

Expand Down Expand Up @@ -264,8 +264,8 @@ class stl_edge
int linetype; // ldraw line type 2 or 5
int coords[2]; // number of vertex in facet adjacent[i]
stl_vertex * vertex[2]; // the vertices
bool printed;
bool deleted;
bool printed = false;
bool deleted = false;
int color;
int nbr_edge;

Expand Down Expand Up @@ -296,8 +296,8 @@ class stl_vertex
public:
stl_v coords;
stl_edge_list * edge_list;
bool deleted;
bool to_remove;
bool deleted = false;
bool to_remove = false;
int precision;
stl_edge * edge_to_remove;

Expand Down Expand Up @@ -344,7 +344,7 @@ class stl_file
stl_prim_list * last_prim;
stl_surf_list * surf_list;
stl_curv_list * curv_list;
bool stl_bin;
bool stl_bin = false;

public:
stl_file(const char * filename);
Expand Down

0 comments on commit 245b4db

Please sign in to comment.