Index: matlab/AddPcbrndVia.m =================================================================== --- matlab/AddPcbrndVia.m (revision 29979) +++ matlab/AddPcbrndVia.m (revision 29980) @@ -39,8 +39,8 @@ % here is do the math for converting [x, y] to [x, y, z] with z offsets for % start and stop layer thickness. -start_point = [ points(1,1), points(2,1), start.layer.zbottom ]; -stop_point = [ points(1,1), points(2,1), stop.layer.ztop ]; +stop_point = [ points(1,1), points(2,1), start.layer.ztop ]; +start_point = [ points(1,1), points(2,1), stop.layer.zbottom ]; % unlike the other public functions in pcb2csx this currently doesn't obey any % changes on 2D vs 3D copper layers.