Do you mean the computer’s clock is wrong? This example is really about converting between GMT and local time. It can’t adjust the clock.

You can use the SetSystemTime API function to adjust the system time. To see how to get the current time from the NIST atomic clock, see Get the current time from the NIST server in C#.

If the system’s locale is wrong, you can make your program use another one. See the example Display sample formats for different locales in C#.

But changing the system settings is something that you should probably do by using the system tools not C#.

]]>It seems that my figure musst be adjusted to the camera view, Could you explain how i can change the scale in order to get the figure in the MainWindow.

You can change the scale by moving the camera closer or farther from the objects in the scene. Or you can scale the projected image to fit. It’s often worthwhile to allow the user to adjust the camera to get a good fit.

By the way i have no function to get the points, but just points.

One approach is to create a grid and use interpolation to guess where each point should be based on the values of the closest known data points. Basically take a weighted average of th nearby points. That’s described in my book WPF 3d. (Chapter 26.)

Alternatively you could use the data points to set the closest grid values and leave the other grid values at 0 or whatever the “ground level” is. That would be easier and might produce a reasonable result if you have a lots of data points.

]]>Ah, yes. That would do it. You can use the same mesh for multiple sides, but then you need to make different sides use different parts of the same texture, and that takes some extra planning and work. Usually it’s easiest to use separate meshes for objects that use different colors or textures.

]]>Thank for help anyway. ðŸ™‚ ]]>

I don’t see anything obvious. You might try looking at this example to see if it helps.

Make a 3D cube with pictures on its sides with XAML and C#

If that doesn’t help, then if you zip up your project and email it to me, I’ll take a look.

]]>For now, I did one side. If I do other side previously was deleted? Or hidden?

What I am doing wrong?

Dim p0zad As Point3D = New Point3D(cuboid.X, cuboid.Y, cuboid.Z)

Dim p1zad As Point3D = New Point3D(cuboid.X, cuboid.Y + cuboid.Height, cuboid.Z)

Dim p2zad As Point3D = New Point3D(cuboid.X + cuboid.Width, cuboid.Y, cuboid.Z)

Dim p3zad As Point3D = New Point3D(cuboid.X + cuboid.Width, cuboid.Y + cuboid.Height, cuboid.Z)

mesh.Positions = New Point3DCollection()

mesh.Positions.Add(p0zad)’ 0

mesh.Positions.Add(p1zad)’ 1

mesh.Positions.Add(p2zad)’ 2

mesh.Positions.Add(p3zad)’ 3

mesh.Positions.Add(p0zad)’ 4

mesh.Positions.Add(p1zad)’ 5

mesh.Positions.Add(p2zad)’ 6

mesh.Positions.Add(p3zad)’ 7

mesh.TriangleIndices.Add(0)

mesh.TriangleIndices.Add(3)

mesh.TriangleIndices.Add(1)

mesh.TriangleIndices.Add(0)

mesh.TriangleIndices.Add(2)

mesh.TriangleIndices.Add(3)

mesh.TriangleIndices.Add(4)

mesh.TriangleIndices.Add(5)

mesh.TriangleIndices.Add(7)

mesh.TriangleIndices.Add(4)

mesh.TriangleIndices.Add(7)

mesh.TriangleIndices.Add(6)

mesh.TextureCoordinates.Add(New Point(0, 1))

mesh.TextureCoordinates.Add(New Point(0, 0))

mesh.TextureCoordinates.Add(New Point(1, 1))

mesh.TextureCoordinates.Add(New Point(1, 0))

mesh.TextureCoordinates.Add(New Point(1, 1))

mesh.TextureCoordinates.Add(New Point(1, 0))

mesh.TextureCoordinates.Add(New Point(0, 1))

mesh.TextureCoordinates.Add(New Point(0, 0))

Dim tb As TextBlock = New TextBlock(New Run(cuboid.Width))

tb.Foreground = New SolidColorBrush(Colors.Red)

Dim mat As DiffuseMaterial = New DiffuseMaterial()

mat.Brush = New VisualBrush(tb)

Dim model1 As GeometryModel3D = New GeometryModel3D(mesh2, mat)

model_group.Children.Add(model1)

SelectableModels.Add(model1)

For back side of the cube I am using same code with little correction:

Dim p0 As Point3D = New Point3D(cuboid.X, cuboid.Y, cuboid.Z + cuboid.Depth)

Dim p1 As Point3D = New Point3D(cuboid.X, cuboid.Y + cuboid.Height, cuboid.Z + cuboid.Depth)

Dim p2 As Point3D = New Point3D(cuboid.X + cuboid.Width, cuboid.Y, cuboid.Z + cuboid.Depth)

Dim p3 As Point3D = New Point3D(cuboid.X + cuboid.Width, cuboid.Y + cuboid.Height, cuboid.Z + cuboid.Depth)

Yes, that post sums it up well.

]]>