Page 1 of 1

wireframe width of draw3d

Posted: Sat May 16, 2009 8:47 am
by 10547489
TeeChart Pro 8.04
C++ Builder 2007


TeeOpenGL-DrawStyle = tcsWire

I draw some Cylinders on TDraw3D.
Draw3D1->Canvas->Pen-Width = 1;
Draw3D1->Canvas->Cylinder(....)

this is ok.

but,
Draw3D1->Canvas->Pen-Width = 1;
Draw3D1->Canvas->Cylinder(....)

Draw3D1->Canvas->Pen-Width = 5;
Draw3D1->Canvas->MoveTo3D(...);
Draw3D1->Canvas->LineTo3D(...)

after rotate cylinder, wire width is thicked.

so,
Draw3D1->Canvas->Pen-Width = 1;
Draw3D1->Canvas->Cylinder(....)

Draw3D1->Canvas->Pen-Width = 5;
Draw3D1->Canvas->MoveTo3D(...);
Draw3D1->Canvas->LineTo3D(...)
Draw3D1->Canvas->Pen-Width = 1;

this is also same.

How to change wire width?

Posted: Mon May 18, 2009 8:12 am
by yeray
Hi JKLee,

I've tested it and it seems to work fine for me here. Please, could you send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Posted: Thu May 21, 2009 12:02 am
by 10547489
my source code.
only drawTarget drawing is Ok.
but DrawTarget and DrawTestResult drawing Image is not Ok.
Why do this? I don't know.
wire frame line's thick change.
you can check my posted archive file.

Code: Select all

void __fastcall Tfrm3DScan::DrawTarget(TCanvas3D *c)
{
	c->Brush->Style = bsSolid;
	c->Brush->Color = clGray;
	c->Pen->Style   = psClear;
	c->Pen->Color   = clBlack;
	c->Pen->Width   = 1;

	c->Cylinder(false,0, 100, -200, -100, -50, 50,true);
	c->Cylinder(true,-200, -200, 200, 200, -70, 70,true);
}


void __fastcall Tfrm3DScan::DrawTestResult(TCanvas3D *c)
{
	if(!FTestData) return;

	c->Pen->Style = psSolid;
	c->Pen->Width = 5;

//draw color line........
c->MoveTo3D(dz, dy, dx);
c->LineTo3D(dz, dy, dx);
}


void __fastcall Tfrm3DScan::Draw3D1Paint(TObject *Sender, const TRect &ARect)
{
	TCanvas3D *c = Draw3D1->Canvas;

	c->RotationCenter.X = c->XCenter;
	c->RotationCenter.Y = 0;
	c->RotationCenter.Z = 0;

	DrawTarget(c);

	DrawTestResult(c);
}

Posted: Thu May 21, 2009 10:34 am
by yeray
Hi JKLee,

Thank you for the code snipped, but it would be really helpful if you could send us a simple example project we can run "as-is" to reproduce the problem here.