Loopy GetVirtualObjects()

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

On 11/06/2009 at 17:11, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   R10-R11 
Platform:   Windows  ;   Mac OSX  ; 
Language(s) :     C++  ;

---------
It seems to do with SendModelingCommand(). I am NOT using MCOMMAND_MAKEEDITABLE or MCOMMAND_CURRENTSTATETOOBJECT. But I use it for MCOMMAND_SPLIT, MCOMMAND_DELETE (polygons), MCOMMAND_SUBDIVIDE, and ID_MODELING_MATRIX_EXTRUDE_TOOL.

Currently, the only commands that are always called are ID_MODELING_MATRIX_EXTRUDE_TOOL and MCOMMAND_DELETE. Commenting out the MCOMMAND_DELETE has the result immediately returning. Does MCOMMAND_DELETE do something that sets the dirty flag and how do I delete polygons otherwise (and quickly!) if this is the case?

And what would I do about splitting and subdividing if they have the same issues? Sort of a royal p.i.t.a. if I have to do available complex operations using my own algorithms.

Thanks,

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

On 14/06/2009 at 18:08, xxxxxxxx wrote:

After more testing, it seems to be a limit in how many polygons are involved in the operations. After a certain point (like 20,000 polygons or more for me), GetVirtualObjects() gets caught in a loop and just keeps trying to generate. Any dirty flags should be being set on cloned representations (and never the original objects) which, from my reading, should never cause a generator to see the input as dirty.

I've tried the very same algorithm (with CSTO to get the polygonized objects) in a tag with a button to do the same thing and it worked everytime - and many times faster than the generator object (!!!!). Even a high-polygon object (Michael 4) with 66830 polygons, subdivided!, which results in 267320 polygons to work on took about 10 seconds this way doing random polygon matrix extrusions. I've sat on a non-subdivided extrusion with the generator for 2+ minutes and it required some action (rotate editor view, scroll over main menu items) to force it to finish.

Atom.cpp was used as a template, I've read the docs on GetVirtualObjects(), GetAndSetHierarchyClone(), and threading, I've scoured both this forum and archived forum and no idea how to get this to work properly. I don't care how long it takes to generate - as long it is generating one time and finishing.

Matthias, hopefully you have received my zipped project. If not or I should send it to another email, please inform.

Thanks,