Read one point Selection and...



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

    On 23/03/2005 at 03:32, xxxxxxxx wrote:

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

    ---------
    Hello to all !!

    Two question:

    1. how i can read point position of one saved point selection (set selection)?

    2. How i can read the mirror axis of the simmetry object?

    Tnx in advance for the answer !



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

    On 24/03/2005 at 10:32, xxxxxxxx wrote:

    1. You need to get the selection tag of the object.

    First get the first tag.
    Then get through all tags with GetNext() and check if it is a PointSelectionTag.

    Sth like (pseudocode) :

    var found = FALSE;  
    var tag = obj->GetFirstTag(); if(!tag) return;  
    while(tag!=NULL) //or tag!=DA_NIL  
    {  
        if(tag->GetType()==PointSelectionTag){  
           found = TRUE;  
           break;  
        }  
        tag = tag->GetNext();  
    }  
    if(!found) return;
    

    if found is true, the tag is a pointselection tag. you can now get the selected points and go through the point array.

    var sel = tag->GetSelection(); if(!sel) return;  
      
    var i;  
    for (i = 0; i < obj->GetPointCount(); i++)  
    {  
    if (select->IsSelected(i))  
    {  
        //This is the point position  
        var p = obj->GetPoint(i);  
    }  
    }
    
    1. the mirror axis is the position of the symmtry object.
      Get it from the global matrix:
    var m = obj->GetMg();  
    var m_axis = m->GetV0();
    

    HTH
    Katachi



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

    On 25/03/2005 at 00:02, xxxxxxxx wrote:

    Tnx to all Katachi !! :))


Log in to reply