Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 296 - [TV52015793] Contour Series FilledLevels problems. When you add values of Contour...
Summary: [TV52015793] Contour Series FilledLevels problems. When you add values of Con...
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: unspecified
Hardware: All All
: Normal major
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-20 17:11 EDT by sandra pazos
Modified: 2013-12-12 06:56 EST (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments
Fixed Contour filling (irregular grid) (111.40 KB, image/png)
2013-12-12 06:56 EST, david berneda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sandra pazos 2013-11-20 10:37:01 EST
Contour Series FilledLevels problems.
When you add values of Contour Series using a increment diferent than 1, and you active FilledLevels= true, the contour isn't  filled and its pen black 
Problem appears in .Net Version too, concretly in bug number(TF02015794) and it works in verion 8 of VCL.
I have made a simple code to reproduce the problem: 
unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, TeEngine, TeeSurfa, StdCtrls, ExtCtrls, TeeProcs, Chart;
type
  TForm1 = class(TForm)
    Chart1: TChart;
    Button1: TButton;
    Series1: TContourSeries;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var X,Z:Integer;
begin
  Chart1.View3D:=False;
  Series1.Brush.Style:=bsSolid;
  Series1.IrregularGrid:=true;
  Series1.Clear;
      For X:=1 To 10  do
      begin
          For Z:=1 To 5 do
          begin
                 Series1.AddXYZ(X, Random(100), Z*100);
          end;
      end;
end;
end.

 [created:2011-10-20T16:11:08.000+01:00 reported by:sandra@steema.com reported in version:]
Comment 1 david berneda 2013-12-04 10:10:38 EST
This problem is almost fixed with the latest sources.

There is a difference in the algorithm that calculates the contour level lines, and the one that calculates the polygons to fill each cell.

Latest source code solves this problem partially.
There is pending to make both algorithms exactly the same.

The difference is at TeeSurfa.pas unit, TLevelDifs.PointSect method.
The new "Interpolate" variable controls which calculation method to use.

When filling contour cells, Interpolate is currently False.
Comment 2 david berneda 2013-12-12 06:55:34 EST
This problem should be fixed in latest sources.
Please find attached picture showing the output of this test code.

The Contour filling algorithm has been rewritten and now it matches the same calculation code used to generate the contour level lines.

This same code is reused by TIsoSurfaceSeries to fill cells in 2D and 3D.

Also, a new Contour property has been added for easier usage:

ContourSeries1.Filled := True;

which is equivalent to:

ContourSeries1.Brush.Style := bsSolid;

(both ways do the same and are compatible)
Comment 3 david berneda 2013-12-12 06:56:27 EST
Created attachment 55 [details]
Fixed Contour filling (irregular grid)