Invisible Cylinder Objects ?!?



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

    On 29/04/2004 at 07:35, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.200 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hi,   again a strange Problem.
    When generating primitive Objects with GeneratePrimitive(GetActiveDocument(), Ocapsule, bc, 10.0, false, NULL);
    all primitive Objects derived from Ocylinder (so Ocapsule etc.) generated in Cinema are invisible. Additionally the User then cannot edit the y - Coordinate of the Dimension.
    The generation of Cubes or so works fine. what went wrong?
    My Code:
    BaseContainer bc;
      BaseObject * object = GeneratePrimitive(GetActiveDocument(), Ocapsule, bc, 10.0, false, NULL);
      Vector vr;
      vr.x = 10.0;
      vr.y = 10.0;
      vr.z = 10.0;
      object->SetPos(vr);
      vr.x = 1;
      vr.y = 1;
      vr.z = 1;
      object->SetScale(vr);
      GetActiveDocument()->InsertObject(object, NULL, NULL, TRUE);
      EventAdd(EVENT_FORCEREDRAW);
     
    Thank You!



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

    On 01/05/2004 at 17:33, xxxxxxxx wrote:

    You need to set a few parameters in the bc before GeneratePrimitive(). See PrimitiveObject or Ocapsule.res (and the files it includes) for which IDs to use. (If C.O.F.F.E.E. doesn't recognize the IDs you can copy them from the corresponding Ocapsule.h file.)



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

    On 04/05/2004 at 01:06, xxxxxxxx wrote:

    Well I code in C++ with SDK 8.206 -
    so I think this is not the sollution. Can anyone help me with this please?



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

    On 04/05/2004 at 05:38, xxxxxxxx wrote:

    Sorry, I don't know why I thought it was C.O.F.F.E.E. However, I still think that you might have to set some parameters. Specifically, adding these lines to your code fixed the problem:

        
        
        bc.SetReal(PRIM_CAPSULE_RADIUS, 50.0);  
        bc.SetReal(PRIM_CAPSULE_HEIGHT, 200.0);  
        bc.SetLong(PRIM_CAPSULE_HSUB, 1);  
        bc.SetLong(PRIM_CAPSULE_FSUB, 1);  
        bc.SetLong(PRIM_CAPSULE_SEG, 2);
    


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

    On 04/05/2004 at 12:48, xxxxxxxx wrote:

    Hi,
    I fixed it...
    For anyone interested: GeneratePrimitive does not work with Ocylinder but you can create any Objects by
    BaseObject * MyCylinder = BasObject::Alloc(Ocylinder);


Log in to reply