Changeset 512


Ignore:
Timestamp:
05/20/09 08:05:00 (16 years ago)
Author:
Mathieu Morlighem
Message:

fixed extrusion (second layer was skipped)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/extrude.m

    r510 r512  
    4848thickness3d=md.thickness; %thickness and bed for these grids
    4949bed3d=md.bed;
     50
    5051%Create the new layers
    51 for i=2:numlayers,
    52         x3d=[x3d; md.x]; %build the grids of the other layers
     52for i=1:numlayers-1,
     53        x3d=[x3d; md.x];
    5354        y3d=[y3d; md.y];
    54         z3d=[z3d; bed3d+thickness3d*(i/numlayers)^extrusionexponent]; %grids are distributed between bed and surface accordingly to the given exponent
     55        %grids are distributed between bed and surface accordingly to the given exponent
     56        z3d=[z3d; bed3d+thickness3d*(i/(numlayers-1))^extrusionexponent];
    5557end
    5658number_grids3d=size(x3d,1); %number of 3d grids for the non extruded part of the mesh
Note: See TracChangeset for help on using the changeset viewer.