It looks like I'll have to use the visual studio compiler for c extensions in sketchup.
There is an MS specific config file and no other counterparts for borland etc.
ThirdParty\include\ruby\2.0\win32\i386-mswin32_100\ruby\config.h
It looks like I'll have to use the visual studio compiler for c extensions in sketchup.
There is an MS specific config file and no other counterparts for borland etc.
ThirdParty\include\ruby\2.0\win32\i386-mswin32_100\ruby\config.h
good article - it has already answered some of my questions.
I'm just currently playing around to see how far I can take this. Even though I'm licensed with XE4 I prefer the ease of use of C++Builder 6.
I can successfully import libraries from SU8, SU2013, SU2014 and SU2015
The sample code to write an skp file works with SU2013, SU2014 and SU2015 but not SU8
It appears the library is significantly smaller for SU8, therefore there must be a lot missing.
I'm thinking that it might be time to drop SU7 and SU8
I can remove lots of libraries from CBuilder by simply unchecking things. I can also build microsoft compatible DLL's if needed (change the calling convention)
I've only been playing around with interfacing with SU for the last 3 days. I should have a handle on it by early next week.
Now for Swig and C++Builder 6
I also have it compiling win32 code in C++Builder 6 - but I did use the XE4 implib.exe
Instead of using all runtime libraries you can compile a self contained exe - quite a bit larger. Then all you need is borlands memory manager as a runtime.
I've got an XE4 C++ compiler working with slapi.dll for windows X86 but so far only with WritingToAskpFile source code.
The key bit was to create an XE4 compatible lib file by running implib.exe with the correct calling convention. Implib.exe comes packaged with XE4.
implib.exe -a slapi.lib slapi.dll
The -a is for cdecl calling convention which is MS default
I will try with the X64 and see what it takes for Mac OSX versions
There are a number of advantages at least for me to use XE4
I know this is still very preliminary - but I am excited by the possibilities
The stdafx.h file contains
#include <SDKDDKVer.h>
#include <afx.h>
#include <afxole.h>
I've run into issues with taking the fist or second Mac Address out of ifconfig or ipconfig /all.
I've changed the code to look at the entire file and then to step through it line by line and treat it as a bit of a state machine.
Thanks to pgarmyn and Driven I think I've got some code that will work. They both helped with files as have a handful of other people.
With windows I've tested files in English, French, Russian and some with VMWare set up.
With OSX I've just tested in English.
I've just read all of this - very helpful and interesting.
Years ago I had a project that had to work with 3 compilers, CE, Visual C++ and C++Builder and I had a single code base.
I ended up learning new optimization procedures which when used right from the start created no extra work. For CE and risc processors you must design data structures that are memory aligned. This not only runs fine on cisc - it is automatically optimized. The key bit here is that if a 4 byte int crosses a memory boundary then cisc does 2 fetches and stitches it together, risc simply crashes.
I created a tList object that works with all 3 compilers. You can treat a tList as an array or a hash or a set. You can pass in objects and perform binary tree searches on any member of the object by simply passing it a function pointer to your own custom compare function. This is useful when you want many sort combinations on a single collection. This is a quicksort implementation.
How the tList works is it is essentially an array of pointers. The array is in contiguous memory. The array grows in a very specific way and is moved if you run out of free contiguous memory. When the tList object is first created you can provide an initial number of elements that you want thus avoiding repeated calls to malloc and avoiding moving memory. When sorting just the list of pointers sort - the collected objects stay where they are.
Here is a compare function that sorts on 2 fields. If first field is a tie then sort on second field
The void pointer is cast as the type of object that you collect in the tList.
fIndex is 1 or -1 which changes the sort from ascending to descending
int __fastcall CompareCabsCabinet( void * Item1, void * Item2 )
{
int res;
tCab *v1 = ( tCab *) Item1;
tCab *v2 = ( tCab *) Item2;
res = strcmp( v1->Description.c_str(), v2->Description.c_str() );
if ( res == 0 )
res = v1->CabNumber - v2->CabNumber;
return fIndex * res;
}
//---------------------------------------------------------------------------
When I wrote a GIS rendering engine I used a tList for all the points. I added a quad tree for static map data and an rtree for dynamic gps points.
I ended up with virtually instant renderings with a million points.
I fixed the link error and have SUEX_HelloWorld working.
I also have WritingToAskpFile working.
skp_to_xml and xml_to_skp do not compile. They require afx.h and afxole.h which did not ship with Visual C++ 2010 express.
I haven't tried licensed_ruby_extension nor TextureMapping
Jolran - thanks for the tip about the compiler and I will read your link. I'm going to need to play with the XCode compiler as well. So far I haven't found out what the costs will be.
There is a visual studio 2012 express but I don't see a link from microsoft for visual c++ 2011 express.
I've got it compiling - how do I get it to actually run.
I'm a C++ programmer from way back however I haven't worked with Visual Studio for many years.
I've just installed Visual Studio 2010 Express and installed the examples.
I've also downloaded the SDK. Where should the SDK go?
Additionally I am experiencing a link error when trying to build SUEX_HelloWorld and SUEX_UsingSWIG
I'm guessing that the compiler can't find the SDK.
I see that slapi.dll started shipping with SU8 to now.
I'm thinking there should be a slapi.lib file.
Hi Tig - I used Douglas Peucker Algorithms back in the early 1990's with GIS. Actually it reduces the geometry through simplicity but doesn't actually increase the smoothness. My first experience with these was with Arc GIS and Map Objects etc. The overall process is to eliminate vertex that are very close to the prior vertex but do so without overly reducing the accuracy of the GIS path.
We used it before the US eliminated military GPS selective availability in 2007. After dropping SA and with the more storage and processing power we opted to reduce our reliance upon Douglas Peucker.
3D text component uses text to name the text.
3D text component stores settings so they are what they were last time.
I like the fact that we can edit 3D text. It means we can store a component with dictionary attributes and then edit the text.
Roland,
Send me your user ID and I will extend your trial.
This is a progressive flare - where the treads at the center get progressively larger.
There are a few things that I had to deal with.
I found it easier to put the dynamic attributes in a nested group as opposed to the outside group. This way you can rotate the entire door and jamb to fit it into the door opening and you don't have to keep changing the dynamic rotz. These doors can be copied, flipped and or rotated while preserving the desired angles of rotation.
I might be interested.
What kind of plugin do you want to develop?
You can send me an email or private message if you wish.
gkernan@telus.net
I have added a simple pivot hinge to any door - you choose.
You provide a value for the pivot point.
I use that value to move the rotation point precisely the value you picked from the end of the door.
Then I center it by simply dividing the door thickness by 2
I know some pivot hinges use offsets - this one currently does not.