Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

I made it build on Linux

  • Loading branch information...
commit 09bc775db56da299f7a6398e35b56165fd75e825 1 parent e2d44dc
danheeks authored
View
1  HeeksArt.cpp
@@ -106,7 +106,6 @@ void CHeeksArtApp::OnStartUp(CHeeksCADInterface* h, const wxString& dll_path)
// add menus and toolbars
wxFrame* frame = heeksCAD->GetMainFrame();
- wxAuiManager* aui_manager = heeksCAD->GetAuiManager();
// tool bars
heeksCAD->RegisterAddToolBars(AddToolBars);
View
3  Line.h
@@ -15,4 +15,5 @@ class Line
Line(const Point& P0, const Point& P1):p0(P0), p1(P1){}
};
-#endif
+#endif
+
View
74 Makefile
@@ -1,105 +1,89 @@
-#CCFLAGS=-Wall -fPIC -g -I "./" -I/home/dan/Desktop/wxGTK-2.8.9/buildgtk/lib/wx/include/gtk2-ansi-debug-2.8 -I/usr/include/wx-2.8 -D__WXGTK__ -DHEEKSCNC -D__WXDEBUG__ -DWXUSINGDLL
-CCFLAGS=-Wall -fPIC -g -I "./" -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D__WXGTK__ -DHEEKSCNC -DUNICODE -DWXUSINGDLL -DTIXML_USE_STL
+#CCFLAGS=-Wall -fPIC -g -I "./" -I/home/dan/Desktop/wxGTK-2.8.9/buildgtk/lib/wx/include/gtk2-ansi-debug-2.8 -I/usr/include/wx-2.8 -I$(HEEKSCADPATH) -D__WXGTK__ -DHEEKSART -D__WXDEBUG__ -DWXUSINGDLL
+CCFLAGS=-Wall -fPIC -g -I "./" -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -I$(HEEKSCADPATH) -D__WXGTK__ -DHEEKSART -DUNICODE -DWXUSINGDLL -DTIXML_USE_STL
#WX_LIB_LETTER=d
WX_LIB_LETTER=u
-#OBJECTS=HeeksCNC.o HeeksColor.o HeeksObj.o Interface.o NCCode.o ObjList.o OutputCanvas.o Profile.o Pocket.o Program.o ProgramCanvas.o PropertyCheck.o PropertyChoice.o PropertyColor.o PropertyDouble.o PropertyInt.o PropertyList.o PropertyString.o PropertyVertex.o PythonStuff.o strconv.o LeftAndRight.o MarkedObject.o ToolImage.o tinyxml.o tinystr.o tinyxmlerror.o tinyxmlparser.o ZigZag.o
-OBJECTS=HeeksCNC.o HeeksColor.o HeeksObj.o Interface.o NCCode.o ObjList.o OutputCanvas.o Profile.o Pocket.o Program.o ProgramCanvas.o PropertyCheck.o PropertyChoice.o PropertyColor.o PropertyDouble.o PropertyInt.o PropertyList.o PropertyString.o PropertyVertex.o PythonStuff.o strconv.o LeftAndRight.o MarkedObject.o ToolImage.o tinyxml.o tinyxmlerror.o tinyxmlparser.o ZigZag.o Adaptive.o
+OBJECTS=HeeksArt.o HeeksColor.o HeeksObj.o Interface.o Matrix.o Mesh.o MeshChild.o MeshEdge.o MeshFace.o MeshPosition.o MeshVertex.o ObjList.o Plane.o PropertyCheck.o PropertyChoice.o PropertyColor.o PropertyDouble.o PropertyInt.o PropertyList.o PropertyString.o PropertyVertex.o tinyxml.o tinyxmlerror.o tinyxmlparser.o ToolImage.o
-SHARED_LIBRARY=../libheekscnc.so.0.5.1
+SHARED_LIBRARY=./libheeksart.so.0.1.0
${SHARED_LIBRARY}: ${OBJECTS}
- gcc -shared -fPIC -Wl,-soname,libheekscnc.so.0 -o ${SHARED_LIBRARY} ${OBJECTS} -lstdc++ -lGLU -lGL -lwx_gtk2${WX_LIB_LETTER}_richtext-2.8 -lwx_gtk2${WX_LIB_LETTER}_aui-2.8 -lwx_gtk2${WX_LIB_LETTER}_xrc-2.8 -lwx_gtk2${WX_LIB_LETTER}_qa-2.8 -lwx_gtk2${WX_LIB_LETTER}_html-2.8 -lwx_gtk2${WX_LIB_LETTER}_adv-2.8 -lwx_gtk2${WX_LIB_LETTER}_core-2.8 -lwx_base${WX_LIB_LETTER}_xml-2.8 -lwx_base${WX_LIB_LETTER}_net-2.8 -lwx_base${WX_LIB_LETTER}-2.8 -lwx_gtk2${WX_LIB_LETTER}_gl-2.8
+ gcc -shared -fPIC -Wl,-soname,libheeksart.so.0 -o ${SHARED_LIBRARY} ${OBJECTS} -lstdc++ -lGLU -lGL -lwx_gtk2${WX_LIB_LETTER}_richtext-2.8 -lwx_gtk2${WX_LIB_LETTER}_aui-2.8 -lwx_gtk2${WX_LIB_LETTER}_xrc-2.8 -lwx_gtk2${WX_LIB_LETTER}_qa-2.8 -lwx_gtk2${WX_LIB_LETTER}_html-2.8 -lwx_gtk2${WX_LIB_LETTER}_adv-2.8 -lwx_gtk2${WX_LIB_LETTER}_core-2.8 -lwx_base${WX_LIB_LETTER}_xml-2.8 -lwx_base${WX_LIB_LETTER}_net-2.8 -lwx_base${WX_LIB_LETTER}-2.8 -lwx_gtk2${WX_LIB_LETTER}_gl-2.8
-HeeksCNC.o: HeeksCNC.cpp
+HeeksArt.o: HeeksArt.cpp
gcc -c $? ${CCFLAGS} -o $@
-HeeksColor.o: ../../interface/HeeksColor.cpp
+HeeksColor.o: $(HEEKSCADPATH)/interface/HeeksColor.cpp
gcc -c $? ${CCFLAGS} -o $@
-HeeksObj.o: ../../interface/HeeksObj.cpp
+HeeksObj.o: $(HEEKSCADPATH)/interface/HeeksObj.cpp
gcc -c $? ${CCFLAGS} -o $@
Interface.o: Interface.cpp
gcc -c $? ${CCFLAGS} -o $@
-LeftAndRight.o: ../../interface/LeftAndRight.cpp
+Matrix.o: Matrix.cpp
gcc -c $? ${CCFLAGS} -o $@
-MarkedObject.o: ../../interface/MarkedObject.cpp
+Mesh.o: Mesh.cpp
gcc -c $? ${CCFLAGS} -o $@
-NCCode.o: NCCode.cpp
+MeshChild.o: MeshChild.cpp
gcc -c $? ${CCFLAGS} -o $@
-ObjList.o: ../../interface/ObjList.cpp
+MeshEdge.o: MeshEdge.cpp
gcc -c $? ${CCFLAGS} -o $@
-OutputCanvas.o: OutputCanvas.cpp
+MeshFace.o: MeshFace.cpp
gcc -c $? ${CCFLAGS} -o $@
-Profile.o: Profile.cpp
+MeshPosition.o: MeshPosition.cpp
gcc -c $? ${CCFLAGS} -o $@
-Pocket.o: Pocket.cpp
+MeshVertex.o: MeshVertex.cpp
gcc -c $? ${CCFLAGS} -o $@
-Program.o: Program.cpp
+ObjList.o: $(HEEKSCADPATH)/interface/ObjList.cpp
gcc -c $? ${CCFLAGS} -o $@
-ProgramCanvas.o: ProgramCanvas.cpp
+Plane.o: Plane.cpp
gcc -c $? ${CCFLAGS} -o $@
-PropertyCheck.o: ../../interface/PropertyCheck.cpp
+PropertyCheck.o: $(HEEKSCADPATH)/interface/PropertyCheck.cpp
gcc -c $? ${CCFLAGS} -o $@
-PropertyChoice.o: ../../interface/PropertyChoice.cpp
+PropertyChoice.o: $(HEEKSCADPATH)/interface/PropertyChoice.cpp
gcc -c $? ${CCFLAGS} -o $@
-PropertyColor.o: ../../interface/PropertyColor.cpp
+PropertyColor.o: $(HEEKSCADPATH)/interface/PropertyColor.cpp
gcc -c $? ${CCFLAGS} -o $@
-PropertyDouble.o: ../../interface/PropertyDouble.cpp
+PropertyDouble.o: $(HEEKSCADPATH)/interface/PropertyDouble.cpp
gcc -c $? ${CCFLAGS} -o $@
-PropertyInt.o: ../../interface/PropertyInt.cpp
+PropertyInt.o: $(HEEKSCADPATH)/interface/PropertyInt.cpp
gcc -c $? ${CCFLAGS} -o $@
-PropertyList.o: ../../interface/PropertyList.cpp
+PropertyList.o: $(HEEKSCADPATH)/interface/PropertyList.cpp
gcc -c $? ${CCFLAGS} -o $@
-PropertyString.o: ../../interface/PropertyString.cpp
+PropertyString.o: $(HEEKSCADPATH)/interface/PropertyString.cpp
gcc -c $? ${CCFLAGS} -o $@
-PropertyVertex.o: ../../interface/PropertyVertex.cpp
+PropertyVertex.o: $(HEEKSCADPATH)/interface/PropertyVertex.cpp
gcc -c $? ${CCFLAGS} -o $@
-PythonStuff.o: PythonStuff.cpp
+tinyxml.o: $(HEEKSCADPATH)/tinyxml/tinyxml.cpp
gcc -c $? ${CCFLAGS} -o $@
-strconv.o: ../../interface/strconv.cpp
+tinyxmlerror.o: $(HEEKSCADPATH)/tinyxml/tinyxmlerror.cpp
gcc -c $? ${CCFLAGS} -o $@
-ToolImage.o: ../../interface/ToolImage.cpp
+tinyxmlparser.o: $(HEEKSCADPATH)/tinyxml/tinyxmlparser.cpp
gcc -c $? ${CCFLAGS} -o $@
-tinyxml.o: ../../tinyxml/tinyxml.cpp
- gcc -c $? ${CCFLAGS} -o $@
-
-#tinystr.o: ../../tinyxml/tinystr.cpp
-# gcc -c $? ${CCFLAGS} -o $@
-
-tinyxmlerror.o: ../../tinyxml/tinyxmlerror.cpp
- gcc -c $? ${CCFLAGS} -o $@
-
-tinyxmlparser.o: ../../tinyxml/tinyxmlparser.cpp
- gcc -c $? ${CCFLAGS} -o $@
-
-ZigZag.o: ZigZag.cpp
- gcc -c $? ${CCFLAGS} -o $@
-
-Adaptive.o: Adaptive.cpp
+ToolImage.o: $(HEEKSCADPATH)/interface/ToolImage.cpp
gcc -c $? ${CCFLAGS} -o $@
clean:
View
3  Matrix.h
@@ -17,4 +17,5 @@ class Matrix{
Point operator*(const Point& p)const;
};
-#endif
+#endif
+
View
7 Mesh.cpp
@@ -391,7 +391,7 @@ CMeshEdge* CMesh::AddEdge(CMeshVertex* v1, CMeshVertex* v2, const CMeshPosition&
if(second_face)*second_face = true;
}
else{
- wxMessageBox("Edge cannot have more than 2 faces!");
+ wxMessageBox(_("Edge cannot have more than 2 faces!"));
}
return edge;
@@ -433,7 +433,7 @@ class SetAllVNormals:public Tool{
const wxChar* GetTitle(){return _("Set All Vertex Normals");}
void Run(){
if(!mesh_for_tools->SetAllVertexNormals()){
- wxMessageBox("At least one vertex could not be normalized!");
+ wxMessageBox(_("At least one vertex could not be normalized!"));
}
}
};
@@ -629,7 +629,7 @@ static void add_triangle_to_object(const Point& vt0, const Point& vt1, const Poi
if(object_to_add_triangles_to == NULL)return;
// make a triangle
- float t[3][3] = {vt0.x, vt0.y, vt0.z, vt1.x, vt1.y, vt1.z, vt2.x, vt2.y, vt2.z};
+ float t[3][3] = {{vt0.x, vt0.y, vt0.z}, {vt1.x, vt1.y, vt1.z}, {vt2.x, vt2.y, vt2.z}};
heeksCAD->STLSolidAddTriangle(object_to_add_triangles_to, t[0]);
}
@@ -689,7 +689,6 @@ void CMesh::SetClickMarkPoint(MarkedObject* marked_object, const double* ray_sta
}
void CMesh::NormalizeAllVertices(){
- bool success = true;
std::map<CMeshPosition, CMeshVertex*>::iterator It;
for(It = m_vertices.begin(); It != m_vertices.end(); It++){
CMeshVertex* v = It->second;
View
2  MeshChild.h
@@ -7,7 +7,7 @@
#pragma once
-#include "interface\HeeksObj.h"
+#include "interface/HeeksObj.h"
#include "HeeksArtTypes.h"
class CMeshChild : public HeeksObj
View
20 MeshFace.cpp
@@ -208,11 +208,7 @@ void CMeshFace::MakeSureDisplayListExists(){
glNewList(m_gl_list, GL_COMPILE);
- CMesh* mesh = (CMesh*)(m_owner);
-
-#if !defined AVERAGE_NORMAL
glShadeModel(GL_SMOOTH);
-#endif
glBegin(GL_TRIANGLES);
GetSmoothTriangles(render_triangle_vertices2);
@@ -306,22 +302,6 @@ Point CMeshFace::direction_at_vertex(const CMeshVertex* v)const{
return (vc[0] + vc[1]).norm();
}
-static Point get_direction_given_av_norm_and_vector(const Point& avn, const Point& sv){
- Point cp = avn ^ sv;
- Point cp2 = cp ^ avn;
-
- double dp = cp2 * sv;
- if(dp<0)cp2 = -cp2;
- return cp2.norm();
-}
-
-static Point get_direction_given_av_norm_and_end_points(const Point& avn, const Point& p1, const Point& p2){
- Point sv(p1, p2);
-
- return get_direction_given_av_norm_and_vector(avn, sv);
-
-}
-
bool CMeshFace::Stretch(const double *p, const double* shift){
// stretch the vertex at "p" by a vector "shift"
Point vp(p);
View
3  MeshVertex.cpp
@@ -242,4 +242,5 @@ void CMeshVertex::DrawGripperSelectItems()
glVertex3d(p1.x, p1.y, p1.z);
}
glEnd();
-}
+}
+
View
3  Plane.h
@@ -21,4 +21,5 @@ class Plane {
Point Near(const Point& p)const{return -n * ((n * p) + d) + p;}
};
-#endif
+#endif
+
View
3  Point.h
@@ -32,4 +32,5 @@ class Point{
const double* GetPtr()const{return &x;}
double magn()const{return sqrt(x*x + y*y + z*z);}
const Point norm()const{double m = magn(); if(m < 0.0000000000001)return Point(0, 0, 0); return Point(*this)/m;}
-};
+};
+
Please sign in to comment.
Something went wrong with that request. Please try again.