Problem Graphic 3D

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
"Alias"
Newbie
Newbie
Posts: 10
Joined: Thu Aug 20, 2009 12:00 am

Re: Problem Graphic 3D

Post by "Alias" » Mon Jan 18, 2010 12:06 pm

Hi Yeray,
it's ok..

and about the elevation problem? is it in the wish list too?

thank you!

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem Graphic 3D

Post by Yeray » Mon Jan 18, 2010 2:44 pm

Hi Alias,

No, I don't still think that the elevation is showing any problem here. The problem is that using custom drawing you have to be careful with the order of the figures you are drawing. Take a look at this:

Code: Select all

            If (((tChart.Aspect.Elevation < 180) And (tChart.Aspect.Elevation > 0)) Or (tChart.Aspect.Elevation < -180)) Then
                'Parte de baixo
                g.Brush.Color = Color.Orange
                rect = New System.Drawing.Rectangle(Xcentro - 96, Ycentro + 22, 192, 43)
                g.Cone(True, rect, Zcentro - 96, Zcentro + 96, True, 100)

                ''Parte do meio
                g.Brush.Color = Color.Gray
                rect = New System.Drawing.Rectangle(Xcentro - 104, Ycentro + 10, 208, 12)
                g.Cone(True, rect, Zcentro - 104, Zcentro + 104, True, 100)

                'Parte de cima
                g.Brush.Color = Color.Orange
                rect = New System.Drawing.Rectangle(Xcentro - 96, Ycentro, 192, 10)
                g.Cone(True, rect, Zcentro - 96, Zcentro + 96, True, 100)

                Dim m(4) As Drawing.Point3D
                g.Brush.Color = Color.Yellow
                m(0) = New Steema.TeeChart.Drawing.Point3D(Xcentro - 50, Ycentro - 135, Zcentro) 'sup. dir.
                m(1) = New Steema.TeeChart.Drawing.Point3D(Xcentro - 50, Ycentro - 20, Zcentro) 'inf. dir.
                m(2) = New Steema.TeeChart.Drawing.Point3D(Xcentro - 100, Ycentro - 20, Zcentro) 'inf. esq.
                m(3) = New Steema.TeeChart.Drawing.Point3D(Xcentro - 100, Ycentro - 40, Zcentro) 'int. esq.
                m(4) = New Steema.TeeChart.Drawing.Point3D(Xcentro - 70, Ycentro - 135, Zcentro) 'sup. esq.
                g.Polygon(m)

                g.Pen.Width = 1
                'mastro
                g.Brush.Color = Color.Gainsboro
                rect = New System.Drawing.Rectangle(Xcentro - 50, Ycentro - 155, 8, 155)
                g.Cone(True, rect, Zcentro - 4, Zcentro + 4, True, 100)

                Dim p(3) As System.Drawing.Point
                p(0) = New System.Drawing.Point(Xcentro - 60, Ycentro - 155)
                p(1) = New System.Drawing.Point(Xcentro - 30, Ycentro - 155)
                p(2) = New System.Drawing.Point(Xcentro - 30, Ycentro - 155)
                p(3) = New System.Drawing.Point(Xcentro - 60, Ycentro - 155)
                g.Plane(Zcentro - 25, Zcentro + 25, p)

                g.Brush.Color = Color.White
                'est. met.
                rect = New System.Drawing.Rectangle(Xcentro - 55, Ycentro - 195, 4, 40)
                g.Cone(True, rect, Zcentro + 18, Zcentro + 22, True, 100)
                'gps
                rect = New System.Drawing.Rectangle(Xcentro - 39, Ycentro - 175, 4, 20)
                g.Cone(True, rect, Zcentro + 18, Zcentro + 22, True, 100)
                'sinalizador
                rect = New System.Drawing.Rectangle(Xcentro - 51, Ycentro - 190, 12, 35) '45
                g.Cone(True, rect, Zcentro - 6, Zcentro + 6, True, 100)
                '
                rect = New System.Drawing.Rectangle(Xcentro - 40, Ycentro - 165, 6, 10)
                g.Cone(True, rect, Zcentro - 23, Zcentro - 17, True, 100)
                'antena
                rect = New System.Drawing.Rectangle(Xcentro - 55, Ycentro - 200, 4, 45)
                g.Cone(True, rect, Zcentro - 22, Zcentro - 18, True, 100)
            Else
                g.Brush.Color = Color.White

                'antena
                rect = New System.Drawing.Rectangle(Xcentro - 55, Ycentro - 200, 4, 45)
                g.Cone(True, rect, Zcentro - 22, Zcentro - 18, True, 100)

                '
                rect = New System.Drawing.Rectangle(Xcentro - 40, Ycentro - 165, 6, 10)
                g.Cone(True, rect, Zcentro - 23, Zcentro - 17, True, 100)

                'sinalizador
                rect = New System.Drawing.Rectangle(Xcentro - 51, Ycentro - 190, 12, 35) '45
                g.Cone(True, rect, Zcentro - 6, Zcentro + 6, True, 100)

                'gps
                rect = New System.Drawing.Rectangle(Xcentro - 39, Ycentro - 175, 4, 20)
                g.Cone(True, rect, Zcentro + 18, Zcentro + 22, True, 100)

                'est. met.
                rect = New System.Drawing.Rectangle(Xcentro - 55, Ycentro - 195, 4, 40)
                g.Cone(True, rect, Zcentro + 18, Zcentro + 22, True, 100)

                Dim p(3) As System.Drawing.Point
                p(0) = New System.Drawing.Point(Xcentro - 60, Ycentro - 155)
                p(1) = New System.Drawing.Point(Xcentro - 30, Ycentro - 155)
                p(2) = New System.Drawing.Point(Xcentro - 30, Ycentro - 155)
                p(3) = New System.Drawing.Point(Xcentro - 60, Ycentro - 155)
                g.Plane(Zcentro - 25, Zcentro + 25, p)

                g.Pen.Width = 1
                'mastro
                g.Brush.Color = Color.Gainsboro
                rect = New System.Drawing.Rectangle(Xcentro - 50, Ycentro - 155, 8, 155)
                g.Cone(True, rect, Zcentro - 4, Zcentro + 4, True, 100)

                Dim m(4) As Drawing.Point3D
                g.Brush.Color = Color.Yellow
                m(0) = New Steema.TeeChart.Drawing.Point3D(Xcentro - 50, Ycentro - 135, Zcentro) 'sup. dir.
                m(1) = New Steema.TeeChart.Drawing.Point3D(Xcentro - 50, Ycentro - 20, Zcentro) 'inf. dir.
                m(2) = New Steema.TeeChart.Drawing.Point3D(Xcentro - 100, Ycentro - 20, Zcentro) 'inf. esq.
                m(3) = New Steema.TeeChart.Drawing.Point3D(Xcentro - 100, Ycentro - 40, Zcentro) 'int. esq.
                m(4) = New Steema.TeeChart.Drawing.Point3D(Xcentro - 70, Ycentro - 135, Zcentro) 'sup. esq.
                g.Polygon(m)

                'Parte de cima
                g.Brush.Color = Color.Orange
                rect = New System.Drawing.Rectangle(Xcentro - 96, Ycentro, 192, 10)
                g.Cone(True, rect, Zcentro - 96, Zcentro + 96, True, 100)

                ''Parte do meio
                g.Brush.Color = Color.Gray
                rect = New System.Drawing.Rectangle(Xcentro - 104, Ycentro + 10, 208, 12)
                g.Cone(True, rect, Zcentro - 104, Zcentro + 104, True, 100)

                'Parte de baixo
                g.Brush.Color = Color.Orange
                rect = New System.Drawing.Rectangle(Xcentro - 96, Ycentro + 22, 192, 43)
                g.Cone(True, rect, Zcentro - 96, Zcentro + 96, True, 100)
            End If
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply