Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ Python/*_wrap.*
Binaries
CMakeFiles
.vs
Scripts
Scripts
bin
1 change: 1 addition & 0 deletions Core/mymath.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#pragma once

#include <cmath>
#include <algorithm>
#include <assert.h>
#include <stdlib.h>
#include <memory.h>
Expand Down
25 changes: 2 additions & 23 deletions GUI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,7 @@ LINK_DIRECTORIES(${VTK_LIBRARY_DIRS} )
IF(UNIX)
ADD_DEFINITIONS("`pkg-config --cflags gtk+-2.0`")
ADD_DEFINITIONS("`wx-config --cflags`")
TARGET_LINK_LIBRARIES(TexGenGUI
TexGenRenderer
TexGenCore
vtkGraphics
vtkFiltering
vtkCommon
vtkRendering
vtkWidgets
vtkftgl
vtksys
vtkexpat
vtkNetCDF
LatinHypercube
TARGET_LINK_LIBRARIES(${VTK_LIBRARIES}
${wxWidgets_LIBRARIES}
#optimized ${PYTHON_LIBRARIES})
${PYTHON_LIBRARIES})
Expand All @@ -80,16 +68,7 @@ IF(WIN32)
TexGenCore
opengl32
glu32
${VTK_LIBRARY_DIRS}/vtkGraphics
${VTK_LIBRARY_DIRS}/vtkFiltering
${VTK_LIBRARY_DIRS}/vtkCommon
${VTK_LIBRARY_DIRS}/vtkRendering
${VTK_LIBRARY_DIRS}/vtkWidgets
${VTK_LIBRARY_DIRS}/vtkftgl
${VTK_LIBRARY_DIRS}/vtksys
${VTK_LIBRARY_DIRS}/vtkexpat
${VTK_LIBRARY_DIRS}/vtknetcdf
${VTK_LIBRARY_DIRS}/vtkhdf5
${VTK_LIBRARIES}
${wxWidgets_LIBRARIES}
optimized ${PYTHON_LIBRARIES}
comctl32
Expand Down
7 changes: 5 additions & 2 deletions GUI/CustomWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "vtkCallbackCommand.h"
#include "vtkCellPicker.h"

vtkCxxRevisionMacro(vtkCustomWidget, "$Revision: 1.0 $");
#include "vtkAutoInit.h"
VTK_MODULE_INIT(vtkRenderingOpenGL); // VTK was built with vtkRenderingOpenGL
VTK_MODULE_INIT(vtkInteractionStyle);

vtkStandardNewMacro(vtkCustomWidget);

vtkCustomWidget::vtkCustomWidget()
Expand All @@ -45,7 +48,7 @@ vtkCustomWidget::vtkCustomWidget()
// pArrow->SetShaftResolution(8);
// pArrow->SetTipResolution(8);
vtkPolyDataMapper* pPolyDataMapper = vtkPolyDataMapper::New();
pPolyDataMapper->SetInput(pArrow->GetOutput());
pPolyDataMapper->SetInputData(pArrow->GetOutput());
vtkActor* pActor = vtkActor::New();
pActor->SetMapper(pPolyDataMapper);
pActor->SetScale(2);
Expand Down
2 changes: 1 addition & 1 deletion GUI/CustomWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class vtkCustomWidget : public vtk3DWidget
// Instantiate the object.
static vtkCustomWidget *New();

vtkTypeRevisionMacro(vtkCustomWidget, vtk3DWidget);
vtkTypeMacro(vtkCustomWidget, vtk3DWidget);
// void PrintSelf(ostream& os, vtkIndent indent) {;}

// Description:
Expand Down
6 changes: 1 addition & 5 deletions GUI/PrecompiledHeaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
=============================================================================*/

#ifdef WIN32
# include <wx/wxprec.h>
#else
# include <wx/wx.h>
#endif
#include <wx/wx.h>

// Prevent python.h from adding python24_d.lib to the linker in debug mode (that library does not exist)
/*#ifdef WIN32
Expand Down
3 changes: 1 addition & 2 deletions GUI/TexGenMainFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2600,8 +2600,7 @@ void CTexGenMainFrame::OnOptions(wxCommandEvent& event)

void CTexGenMainFrame::LaunchSurvey()
{
wxStandardPaths paths;
wxString path = paths.GetUserConfigDir();
wxString path = wxStandardPaths::Get().GetUserConfigDir();
wxString Filename = path + wxT("/.count.txt");

if ( !wxFileExists( Filename ) )
Expand Down
40 changes: 22 additions & 18 deletions GUI/wxVTKRenderWindowInteractor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@
#include "PrecompiledHeaders.h"
#include "wxVTKRenderWindowInteractor.h"

#include "vtkAutoInit.h"
VTK_MODULE_INIT(vtkRenderingOpenGL); // VTK was built with vtkRenderingOpenGL
VTK_MODULE_INIT(vtkRenderingFreeType);

//This is needed for vtk 3.1 :
#ifndef VTK_MAJOR_VERSION
# include "vtkVersion.h"
#endif

#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
# include "vtkCommand.h"
#else
# include "vtkInteractorStyle.h"
Expand Down Expand Up @@ -268,7 +272,7 @@ void wxVTKRenderWindowInteractor::OnTimer(wxTimerEvent& WXUNUSED(event))
if (!Enabled)
return;

#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
InvokeEvent(vtkCommand::TimerEvent, NULL);
#else
Expand Down Expand Up @@ -359,7 +363,7 @@ void wxVTKRenderWindowInteractor::OnSize(wxSizeEvent& WXUNUSED(event))
return;
}

#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
InvokeEvent(vtkCommand::ConfigureEvent, NULL);
#endif
//this will check for Handle
Expand All @@ -372,7 +376,7 @@ void wxVTKRenderWindowInteractor::OnMotion(wxMouseEvent &event)
{
return;
}
#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
SetEventInformationFlipY(event.GetX(), event.GetY(),
event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);

Expand All @@ -391,7 +395,7 @@ void wxVTKRenderWindowInteractor::OnEnter(wxMouseEvent &event)
return;
}

#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
SetEventInformationFlipY(event.GetX(), event.GetY(),
event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
Expand All @@ -411,7 +415,7 @@ void wxVTKRenderWindowInteractor::OnLeave(wxMouseEvent &event)
return;
}

#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
SetEventInformationFlipY(event.GetX(), event.GetY(),
event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
Expand All @@ -431,7 +435,7 @@ void wxVTKRenderWindowInteractor::OnKeyDown(wxKeyEvent &event)
return;
}

#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
int keycode = event.GetKeyCode();
char key = '\0';
Expand Down Expand Up @@ -460,7 +464,7 @@ void wxVTKRenderWindowInteractor::OnKeyUp(wxKeyEvent &event)
return;
}

#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
int keycode = event.GetKeyCode();
char key = '\0';
Expand Down Expand Up @@ -489,14 +493,14 @@ void wxVTKRenderWindowInteractor::OnButtonDown(wxMouseEvent &event)
}
ActiveButton = event.GetEventType();

#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
SetEventInformationFlipY(event.GetX(), event.GetY(),
event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
#endif

if(event.RightDown())
{
#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
InvokeEvent(vtkCommand::RightButtonPressEvent, NULL);
#else
Expand All @@ -507,7 +511,7 @@ void wxVTKRenderWindowInteractor::OnButtonDown(wxMouseEvent &event)
}
else if(event.LeftDown())
{
#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
InvokeEvent(vtkCommand::LeftButtonPressEvent, NULL);
#else
Expand All @@ -518,7 +522,7 @@ void wxVTKRenderWindowInteractor::OnButtonDown(wxMouseEvent &event)
}
else if(event.MiddleDown())
{
#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
InvokeEvent(vtkCommand::MiddleButtonPressEvent, NULL);
#else
Expand Down Expand Up @@ -548,14 +552,14 @@ void wxVTKRenderWindowInteractor::OnButtonUp(wxMouseEvent &event)
return;
}

#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
SetEventInformationFlipY(event.GetX(), event.GetY(),
event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
#endif

if(ActiveButton == wxEVT_RIGHT_DOWN)
{
#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
InvokeEvent(vtkCommand::RightButtonReleaseEvent, NULL);
#else
Expand All @@ -566,7 +570,7 @@ void wxVTKRenderWindowInteractor::OnButtonUp(wxMouseEvent &event)
}
else if(ActiveButton == wxEVT_LEFT_DOWN)
{
#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
InvokeEvent(vtkCommand::LeftButtonReleaseEvent, NULL);
#else
Expand All @@ -577,7 +581,7 @@ void wxVTKRenderWindowInteractor::OnButtonUp(wxMouseEvent &event)
}
else if(ActiveButton == wxEVT_MIDDLE_DOWN)
{
#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
// new style
InvokeEvent(vtkCommand::MiddleButtonReleaseEvent, NULL);
#else
Expand All @@ -597,7 +601,7 @@ void wxVTKRenderWindowInteractor::OnButtonUp(wxMouseEvent &event)
void wxVTKRenderWindowInteractor::OnMouseWheel(wxMouseEvent& event)
{
// Mouse wheel was only added after VTK 4.4 (I think...)
#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2)
// new style
//Set vtk event information ... The numebr of wheel rotations is stored in
//the x varible. y varible is zero
Expand Down Expand Up @@ -640,7 +644,7 @@ void wxVTKRenderWindowInteractor::Render()
{
RenderWindow->Render();
}
#if VTK_MAJOR_VERSION == 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2)
#if VTK_MAJOR_VERSION >= 5 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 2)
else if(GetHandleHack())
{
//this means the user has reparented us; let's adapt to the
Expand Down
2 changes: 1 addition & 1 deletion GUI/wxVTKRenderWindowInteractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class wxSizeEvent;
#if defined(__WXGTK__) && defined(USE_WXGLCANVAS)
class VTK_RENDERING_EXPORT wxVTKRenderWindowInteractor : public wxGLCanvas, public vtkRenderWindowInteractor
#else
class VTK_RENDERING_EXPORT wxVTKRenderWindowInteractor : public wxWindow, public vtkRenderWindowInteractor
class wxVTKRenderWindowInteractor : public wxWindow, public vtkRenderWindowInteractor
#endif //__WXGTK__
{
DECLARE_DYNAMIC_CLASS(wxVTKRenderWindowInteractor)
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
TexGen is a geometric textile modelling software package to be used for obtaining engineering properties of woven textiles and textile composites. More information about the project can be found here http://texgen.sourceforge.net

## Building Code
Instructions for building TexGen from source can be found here http://texgen.sourceforge.net/index.php/Compiling_from_Source
Original Instructions for building TexGen from source can be found here http://texgen.sourceforge.net/index.php/Compiling_from_Source

Latest specific install instructions:

1. [Windows 10 install](mddocs/WindowsInstall.md)
1. [Ubuntu 18.04 LTS install](mddocs/UbuntuBionicInstall.md)

## Executables
Windows executables and release tarballs can be found here https://sourceforge.net/projects/texgen/
40 changes: 2 additions & 38 deletions Renderer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,7 @@ IF(UNIX)
SET_TARGET_PROPERTIES(TexGenRenderer PROPERTIES LINK_FLAGS "-Wl,-rpath,${VTK_DIR}/bin -L${VTK_DIR}/bin")
TARGET_LINK_LIBRARIES(TexGenRenderer
TexGenCore
vtkGraphics
vtkFiltering
vtkCommon
vtkRendering
vtkHybrid
vtkIO
vtkWidgets
vtkzlib
vtkfreetype
vtkftgl
vtkpng
vtkImaging
vtkjpeg
vtktiff
vtksys
vtkexpat
vtkNetCDF
vtkhdf5
vtkmetaio
${VTK_LIBRARIES}
)
ENDIF(UNIX)

Expand All @@ -52,24 +34,6 @@ INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS})
IF(WIN32)
TARGET_LINK_LIBRARIES(TexGenRenderer
TexGenCore opengl32 glu32
${VTK_LIBRARY_DIRS}/vtkGraphics
${VTK_LIBRARY_DIRS}/vtkFiltering
${VTK_LIBRARY_DIRS}/vtkCommon
${VTK_LIBRARY_DIRS}/vtkRendering
${VTK_LIBRARY_DIRS}/vtkHybrid
${VTK_LIBRARY_DIRS}/vtkIO
${VTK_LIBRARY_DIRS}/vtkWidgets
${VTK_LIBRARY_DIRS}/vtkzlib
${VTK_LIBRARY_DIRS}/vtkfreetype
${VTK_LIBRARY_DIRS}/vtkftgl
${VTK_LIBRARY_DIRS}/vtkpng
${VTK_LIBRARY_DIRS}/vtkImaging
${VTK_LIBRARY_DIRS}/vtkjpeg
${VTK_LIBRARY_DIRS}/vtktiff
${VTK_LIBRARY_DIRS}/vtksys
${VTK_LIBRARY_DIRS}/vtkexpat
${VTK_LIBRARY_DIRS}/vtknetcdf
${VTK_LIBRARY_DIRS}/vtkhdf5
${VTK_LIBRARY_DIRS}/vtkmetaio
${VTK_LIBRARIES}
)
ENDIF(WIN32)
Loading