Problem with parallel copy of an existing shape

HELLO,

I need to create a code which make the parallel copy of an existing shape, I use the "mdlElmdscr_copyParallel" function.

The original shape is created by the "mdlShape_create" function, it looks like this:

The result that I should get have to be like this:

But, this is what I really get:

this is an extract of the source code:

        
        Dpoint3d *pt = NULL;
	MSElement elm;
	DVec3d direction;
	double distance;
	MSElementDescr *solideDscrP = NULL, *trouDscrP = NULL, *elmDscrP = NULL;


	
	for( i = 0; i < nbXY_Ovoide; i++ )
	{
		pt[i].x = mdlCnv_masterUnitsToUors(  XY_Ovoide[i].x );
		pt[i].y = mdlCnv_masterUnitsToUors(  XY_Ovoide[i].y );
	}
	
	mdlShape_create( &elm, NULL, &pt[0], nbXY_Ovoide, 0 );

	if( mdlElmdscr_new( &trouDscrP, NULL, &elm ) == ERROR )
	return;			
	
	distance = mdlModelRef_getUorPerMaster (ACTIVEMODEL) * 0.1;
	mdlVec_fromXY (&direction, distance , 0.0);
				
	mdlElmdscr_copyParallel ( &solideDscrP , trouDscrP, &direction, distance, NULL);
	
	if( mdlElmdscr_createShapeWithHoles( &elmDscrP, solideDscrP, trouDscrP ) != SUCCESS )
		break;