Skip to content

Eigen3 #183

wants to merge 45 commits into from

2 participants

openscad member

This allows OpenSCAD to build against Eigen3 or Eigen2, whichever is available.

The point is to maybe have a way to build with clang on Mac OSX (see issue #174)

  1. EIGEN2DIR environment variable has been replaced with EIGENDIR (although EIGEN2DIR is still read, for backwards compatability with any old scripts/websites)
  2. #ifdefs detect which eigen version and use appropriate code
  3. eigen::Transform3d -> eigen::Affine3d
  4. "Using namespace boost::filesystem" appears to conflict with eigen3 in some cases. Switched to using 'namespace fs = boost::filesystem' and prepending fs:: to all relevant functions.
  5. cwise() moved to array()
  6. qmake and cmake build rewritten to detect both eigen3 / eigen2
  7. dependency scripts rewritten to favor eigen3, but also allow eigen2 if needed.

see also

tests pass with %100 on gcc 4.6 / linux 64bit / software renderer
1 test fails under clang / linux 32 bit, but im not sure if its related to eigen3 directly (see issue #182 )

kintel and others added some commits May 27, 2012
@kintel kintel Enable running the test in a non-accelerated environment 2f446ce
@kintel kintel No need to link OpenCSG with Qt f7a6742
@kintel kintel Goldfeather fix for Mac OS X Lion, also for tests fa7dfe2
@kintel kintel Support for building under Lion a8f5a8f
@kintel kintel Force gcc under Lion fa872b9
@kintel kintel Merge branch 'value' into lion 4a16b03
@kintel kintel Support building using the LLVM compiler also on Snow Leopard, for te…
@kintel kintel Support building using the LLVM compiler also on Snow Leopard, for te…
@kintel kintel Merged with master dfa7d80
@kintel kintel Merge branch 'master' into lion
@kintel kintel Merge branch 'master' into lion
@kintel kintel fixed conflict ff10729
@kintel kintel Upgraded CGAL to 4.0.2 8fbda9b
@kintel kintel Updated Macports dependencies bbb0538
@kintel kintel Merge branch 'master' into lion 548a568
@kintel kintel Merge remote-tracking branch 'origin/issue148' into lion 1026be9
@kintel kintel Merge branch 'master' into lion
@kintel kintel Merge branch 'master' into lion 6960d58
@kintel kintel Merge branch 'master' into lion 2291995
@kintel kintel Merge branch 'master' into lion f07e298
@kintel kintel Merge branch 'master' into lion e059146
@kintel kintel Merge branch 'master' into lion f3dcc20
@kintel kintel Merge branch 'master' into lion 11ffcd2
@donbright donbright initial rework to enable eigen3 per issue #174.
1. enable eigen3 in qmake build system
2. convert Transform3d and cwise() per the eigen2->eigen3 porting faq online
3. get rid of 'using namespace boost::filesystem' as it conflicts with eigen3
@donbright donbright more eigen3 fixes.
1. finish converting 'using namespace boost::filsystem' to 'namespace fs = boost::filesystem'.

2. initial version of changes to CMakelists.txt for the regression test
@donbright donbright modify build system to auto-detect eigen3, and fallback to eigen2 c4d6858
@donbright donbright alter Mac OSX dependencies build script to get eigen version 3.1.1
This still allows the building of eigen, 2.0.17 just change the version
number at the bottom of the file.

Eigen3 requires an 'out of source' build.
@donbright donbright restore commented-out build commands 526ed73
@donbright donbright fix bug in build script for boost e7ebf47
@donbright donbright update eigen version in README. dont use alignment in dxfdata vector. 7a2f91e
@donbright donbright make EIGEN_DONT_ALIGN flag work. also remove warnings when using clang. aa2c67d
@donbright donbright debugging failed test: throwntogethertest polygons d656f55
@donbright donbright more debug 8f17a48
@donbright donbright Revert "more debug"
This reverts commit 8f17a48.
@donbright donbright Revert "Revert "more debug""
This reverts commit 4ef470b.
@donbright donbright Revert "Revert "Revert "more debug"""
This reverts commit 94de600.
@donbright donbright cleaning up for pull request 17e9fe2
@donbright donbright Merge branch 'master' of into eigen3 ca03eec
@donbright donbright cleanup for pull request 702525f
@donbright donbright rewrite Eigen detection in CMakelists. cleanup files for pull request. a904531
@donbright donbright look for EIGENDIR env var. (also look for EIGEN2DIR for backwards com…
@donbright donbright fix small bugs in eigen build scripts fc945bf
@donbright donbright cleanup 765f1a9
@donbright donbright commented on the diff Aug 19, 2012
@@ -157,7 +168,8 @@ endif()
-# Eigen2
+# Eigen
openscad member
donbright added a note Aug 19, 2012

it would be possible to just set all the 'HINTS' and do one 'find_path' but i have seen find_path be very buggy in various situations and perferred to keep the calls to find_path extremely simple and straightforward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
openscad member

can confirm this has nothing to do with eigen3, because it happens also on eigen2 (boost 1.50 linux 64 bit, gcc 4.6 compiler)

openscad member
kintel commented Aug 20, 2012

I'm doing some tests under Mac OS X Lion, so I'm pushing a few related changes to this branch..

@kintel kintel closed this Aug 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.