Detect Ngones or Get edges on a PolygonObject



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 09/06/2011 at 21:41, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   10 
    Platform:   Windows  ;   
    Language(s) :   C.O.F.F.E.E  ;

    ---------
    Hi !
    I learn OpenGL programming, and I try to create an exporter for my custom format.
    I need to support Ngones, and try to get this information in COFFEE. Anywhere in the SDK i found informations on edges.
    Is it possible to Get a list of all the edges of a PolygonObject ?
    Is it possible to get the vertices count of a Ngone?

    Do I need to go in C++ ?

    ...sorry for my bad english.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 09/06/2011 at 22:46, xxxxxxxx wrote:

    C++ or Python, I'm afraid.  COFFEE doesn't have support for handling edges and ngons.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 10/06/2011 at 02:10, xxxxxxxx wrote:

    Ngons are not supported at all in COFFEE. For edges you have to create your own edge structure by going through the polygons.

    The C++ API offers access to edges and Ngons.

    cheers,
    Matthias



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 10/06/2011 at 19:58, xxxxxxxx wrote:

    Arghhh
    Thanks for your answers.

    The problem with C++ is that it's hard, just to have a base project working :frowning2:. But the first time I tried programming for C4D, I was a very beginner in programmation, but now, (I'm always a beginner), I work with VB.Net and I understand more the programming concepts in general.

    I'm going to try once again to create a base menu plugin with C++

    If I stick with COFFEE and must create my own edge structure, I imagine we can't get neighbor information for polygons directly with COFFEE SDK ?

    Thanks !



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 11/06/2011 at 01:34, xxxxxxxx wrote:

    I've got some basic tutorials on developing C++ plugins that you might find useful, including a command (menu) plugin. You can find them at this link.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 11/06/2011 at 12:16, xxxxxxxx wrote:

    Hi spedler, and thanks for your tutorial ! I have already read some of them (creating a plugin from scratch), but I am stopped by a step (loading properties sheet in Visual Studio.Can't find files in api_lib directory).
    Actually, I can create my plugin only by add it to the SDK sample project. What I would really need is how to create a C++ plugin in a single file without Visual Studio and all his projects files and configuration that'is hard to understand when you come from .Net world.

    I will read your tuts once again, maybe I made mistakes.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 11/06/2011 at 12:47, xxxxxxxx wrote:

    When starting from scratch, copy the cinema4dsdk .vcproj or .xcodeproj into a new plugin folder for your project and remove all of the example files from the solution.  Then you can put your .cpp and .h files into the project, rename the project, and edit the Properties of the project.  The api_lib directory is under the Cinema 4D 'resource' directory.  That is where you'll find most of the headers and res/str files you'll be using (including the c4d.h header which must be included).

    Visual Studio for Windows and XCode for MacOSX.  These are your only choices.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 12/06/2011 at 08:55, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Hi spedler, and thanks for your tutorial ! I have already read some of them (creating a plugin from scratch), but I am stopped by a step (loading properties sheet in Visual Studio.Can't find files in api_lib directory).Actually, I can create my plugin only by add it to the SDK sample project. What I would really need is how to create a C++ plugin in a single file without Visual Studio and all his projects files and configuration that'is hard to understand when you come from .Net world.I will read your tuts once again, maybe I made mistakes.

    What version of CS are you using? The tut was written using VS2008, if you're using VS2010 there might be some issues. I've just bought VS2010 so I'll take a look and see if there are problems which need to be corrected.

    There's no such thing as a modern C++ compiler that produces and uses only a single file AFAIK. It's difficult to see how that could ever work. VS makes it easy as it can be - take a look at the compiler command line in the project properties, and imagine what it was like when coders had to enter that manually!



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 12/06/2011 at 17:48, xxxxxxxx wrote:

    I'm using VS 2008 and C4D R10, and the first time I tried to compile the project, all was good and I have no changes to do.
    I looked at the project properties and tried to understand what properties to set up for starting from scratch. As you say, the command line are a little intimidating.
    As I come from Visual Basic .Net world, that's very hard for me to understand all of that.

    I know that it will be very hard to write code in only one file, but for a minimal example, it would be easier.

    Since 2 days now, I play with the SDK samples, and I can add my own menu plugin. Now I try to delete others plugs files from the project without errors, and I start to understand the C++ syntaxe.

    Many thanks for your advices, and once again, sorry for my strange english 😉


Log in to reply