LDraw.org Discussion Forums
Rectifier and Intersector updated - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: Parts Author Tools (https://forums.ldraw.org/forum-24.html)
+--- Thread: Rectifier and Intersector updated (/thread-4042.html)



Rectifier and Intersector updated - Philippe Hurbain - 2012-03-27

Rectifier (now verion 1.7) has been updated to manage direct color (code courtesy of Nils Schmidt). This version also prevents creation of quads with too flat angles (see this).

Intersector (now version 1.4) uses dynamic memory allocation to manage bigger files. I corrected a bug that caused triangles to disappear. Unfortunately another bug remains, I have not found the root cause but when this occurs the message "*** problem during retriangulation ***" is displayed. Prescaling may help in this case.


Re: Rectifier and Intersector updated - Steffen - 2012-03-27

Thanks fot this update, Philo!

I would like to ask for a small feature in your awesome tools, maybe...:
could it be possible to add an inlining mechanism to those of them which
operate on atoms (lines, triangles, quads) only?
I recently found it very tedious to have to do the inlining manually in LDDP prior to using them.
To me, that would be a great addition.


Re: Rectifier and Intersector updated - Philippe Hurbain - 2012-03-28

Well... I have created functions to inline subparts parts in my latest tools written in C++, but my early tools were written in pure C, and I'm not so keen to rewrite them. But you may either use Mikeheide's Inliner or my own Edger2 (see method in documentation, near page bottom)


Re: Rectifier and Intersector updated - Travis Cobbs - 2012-03-29

Many times, renaming a .c file to .cpp will allow you to compile it as C++ with relatively few changes. Some C code requires a lot of fixes, though. So, depending on what your C++ code looks like, you may be able to access it from your C code by doing that.


Re: Rectifier and Intersector updated - Tim Gould - 2012-03-29

As I recall you also need to surround the header files with:

#ifdef __cplusplus
extern "C" {
#endif

at the top, and for the bottom:

#ifdef __cplusplus
}
#endif


Re: Rectifier and Intersector updated - Steffen - 2012-03-29

remember to put this _into_ that header, not outside.
otherwise, you'll get linker errors when mixing C and C++.


Re: Rectifier and Intersector updated - Philippe Hurbain - 2012-03-29

Actually the problem is not there: old programs do not have the proper structures to deal with the recent tools inlining functions, it's not a simple recompilation issue!


Re: Rectifier and Intersector updated - Tim Gould - 2012-03-29

Philippe \Philo\" Hurbain Wrote:Actually the problem is not there: old programs do not have the proper structures to deal with the recent tools inlining functions, it's not a simple recompilation issue!

This reminds me of my old programs Sad And why I never converted them to C++

Tim