This is the discussion forum for Helix Toolkit.
For bugs and new features, use the issue tracker located at GitHub.
Also try the chat room!
0

PointsVisual3D different Point Colors

Anonymous 12 years ago 0
This discussion was imported from CodePlex

Dave_evaD wrote at 2012-10-01 18:20:

Hi,

i have a PointsVisual3D object and I would like to use different colors for the points. As objo mentioned in this post, creating different materials (by creating different PointsVisual3D subobjects) for each point is too slow in rendering. But I don't understand what objo means by "This only supports a single color, but can be extended to support a material containing a 'palette' of colors (then you can set different colors for each point by texture coordinates)." Could you explain it to me or give me an example?

Kind regards, Dave_evaD


govert wrote at 2012-10-01 21:36:

I have some pieces that might get you started:

You can create a small bitmap with one row of colors, maybe like this:

 

		// Creates a bitmap that has a single row containing single pixels with the given colors.
		// At most 256 colors.
		public static BitmapSource GetColorsBitmap(IList<Color> colors)
		{
			if (colors == null) throw new ArgumentNullException("colors");
			if (colors.Count > 256) throw new ArgumentOutOfRangeException("More than 256 colors");

			int size = colors.Count;
			for (int j = colors.Count; j < 256; j++)
			{
				colors.Add(Colors.White);
			}

			var palette = new BitmapPalette(colors);
			byte[] pixels = new byte[size];
			for (int i = 0; i < size; i++)
			{
				pixels[i] = (byte)i;
			}

			var bm = BitmapSource.Create(size, 1, 96, 96, PixelFormats.Indexed8, palette, pixels, 1 * size);
			bm.Freeze();
			return bm;
		}

 

Then your model might use this Bitmap as its Brush (only two colors used here):

 

	BitmapSource bm = Mesh3DUtil.GetColorsBitmap(new List<Color> { BaseColor, SelectedColor });
	ImageBrush ib = new ImageBrush(bm) { ViewportUnits = BrushMappingMode.Absolute, Viewport = new Rect(0, 0, 1, 1) };  // Matches the pixels in the bitmap.
        GeometryModel3D model = new GeometryModel3D() { Geometry = mesh, Material = new DiffuseMaterial(ib) };

And then for the TextureCoordinates you pick points halfway along the Bitmap:

 

    mesh.TextureCoordinates.Add(new Point(0.5, 0.5));

 

This is for each little mesh of triangles that forms the little sphere for a point.


Dave_evaD wrote at 2012-10-01 22:00:

Hi govert,

thank you for your reply. I think I've finally understood what the ImageBrush idea is about. But there remains a problem:

As far as I see, I can't set the material/brush for the PointsVisual3D object since it is set in a private method in ScreenSpaceVisual3D. Furthermore I can't access the TextureCoordinates.

Looks like I have to modify the code a bit. I hope the license allows that ;)

 


Dave_evaD wrote at 2012-10-02 23:21:

Hi govert,

is there a way to use more than 256 colors? I've found nothing for an ImageBrush, what about a BitmapCacheBrush?


govert wrote at 2012-10-02 23:37:

The 256 color limitation might just be a result of the PixelFormat I chose in the BitmapSource.Create call. So if you pick another PixelFormat it might work with more colors. I don't think it has anything to do with the ImageBrush itself. I don't know anything about BitmapCacheBrush, but that seems like a performance optimisation.

This was done a few years ago, though, and I remember that getting the Bitmap and the colors to work right was rather fiddly. You have to get into this stuff a bit: http://msdn.microsoft.com/en-us/magazine/cc534995.aspx.


Dave_evaD wrote at 2012-10-02 23:53:

I tried changing the PixelFormat but the restriction comes from the BitmapPalette. Here's what I found out up to now:

You could use a Brush that draws an ImageSource or a Visual.

If you want to use the ImageSource, you have certain possibilities:

-You could draw a Drawing which offers the possibility to draw an ImageSource (among others which I don't think about that they will be useful)

-You could draw a Direct3D image which does not seem to be what I want

-You could draw a BitmapSource (which has certain subtypes as shown in your link). But each of them has a BitmapPalette which is restricted to 256 colors

If you want to use a Visual, you also have different options:

-A Viewport3DVisual does not seem to be the right thing

-You can draw a Drawing which results in drawing an ImageSource

-You can draw a UIElement. Maybe I could use a Canvas on which I have drawn an Image before, but I wonder whether there is no way to use an Image or Bitmap (not BitmapSource) directly?


govert wrote at 2012-10-03 00:12:

I don't think you have to use an indexed Bitmap format with a fixed palette. You should be able to use one of the other Bitmap formats which give the color of each pixel ? I'd expect WPF to handle most of these formats fine when used with an ImageBrush. You just have to figure out how to encode the actual Bitmap data - maybe first make some bitmaps in Paint or something, and see if you can map those colors into TextureCoordinates.


Dave_evaD wrote at 2012-10-03 00:50:

Hi,

you were right, I realized that I didn't have to use the palette. I use the Bgra32-Format now.

Thanks for your tips.

0

Wanting to importing VRML

Anonymous 12 years ago 0
This discussion was imported from CodePlex

BradSoft wrote at 2012-04-20 15:33:

Hi, I want to import a wrl (vrml) file. Has any one have some experience with the import of this format?
And may be give me some tips and tricks where to start?


objo wrote at 2012-04-20 21:24:

glgweeke has started a vrml97 fork of this library! 

VRML97

BradSoft wrote at 2012-04-20 22:20:

Thanks that is what I was looking for.


glgweeke wrote at 2012-06-20 18:53:

Hi,

i make some improvements to the importer and commit it into the trunk.

You can import now complex wrl Files with DEF- and USE-cases.

The speed is better too.

I will be glad to get some feedback.


objo wrote at 2012-06-21 09:09:

great, I will look at it when you have committed the new source to the fork!


BradSoft wrote at 2012-06-21 09:45:

Hi,

Nice I had to use DEF and USE cases and implemented my own implementation for that to get my files work.

I also ran into the problem that the translations of nested levels didn't work right.
I implemented a fix for this to use matrix calculations for the translations and rotations.

And i run into the problem with nested levels. The method you use now is sometimes skipping information that it should use.

The last thing I changed was the material color, but this is also related with the problem above that the nested information is not read right.

How can I send you my files so you can have a look at what I fixed and how you can use it for your code?
I tested it with a lot of files also from the web that I found and most I can read good now.
Try this to import this is a small part of a file i had to import

#VRML V2.0 utf8

# Produced by 3D Studio MAX VRML97 exporter, Version 14, Revision 1,21
# Date: Tue Apr 10 20:44:16 2012

DEF Block:bci_licht2007 Transform {
  translation 9.708e+004 3400 -1.562e+005
  rotation 0 -1 0 -3.142
  children [
    DEF Layer:CSi_palletiser Transform {
      translation -382.5 52.54 65
      children [
        Shape {
          appearance Appearance {
            material Material {
              diffuseColor 1 0.498 0
            }
          }
          geometry DEF Layer:CSi_palletiser-FACES IndexedFaceSet {
            ccw TRUE
            solid TRUE
            coord DEF Layer:CSi_palletiser-COORD Coordinate { point [
              -347.5 -87.54 253.3, -332.5 -87.54 253.3, -332.5 -87.54 245.5,
              -317.9 -87.54 245.5, -317.9 -87.54 -375.5, -332.5 -87.54 -375.5,
              -332.5 -87.54 -383.3, -347.5 -87.54 -383.3, -334.5 -95.04 253.3,
              -334.5 -95.04 245.5, -321.9 -102.3 245.5, -321.9 -102.3 -375.5,
              -334.5 -95.04 -375.5, -334.5 -95.04 -383.3, -340 -100.5 253.3,
              -340 -100.5 245.5, -332.7 -113.2 245.5, -332.7 -113.2 -375.5,
              -340 -100.5 -375.5, -340 -100.5 -383.3, -347.5 -102.5 253.3,
              -347.5 -102.5 245.5, -347.5 -117.1 245.5, -347.5 -117.1 -375.5,
              -347.5 -102.5 -375.5, -347.5 -102.5 -383.3, -355 -100.5 253.3,
              -355 -100.5 245.5, -362.3 -113.2 245.5, -362.3 -113.2 -375.5,
              -355 -100.5 -375.5, -355 -100.5 -383.3, -360.5 -95.04 253.3,
              -360.5 -95.04 245.5, -373.1 -102.3 245.5, -373.1 -102.3 -375.5,
              -360.5 -95.04 -375.5, -360.5 -95.04 -383.3, -362.5 -87.54 253.3,
              -362.5 -87.54 245.5, -377.1 -87.54 245.5, -377.1 -87.54 -375.5,
              -362.5 -87.54 -375.5, -362.5 -87.54 -383.3, -360.5 -80.04 253.3,
              -360.5 -80.04 245.5, -373.1 -72.75 245.5, -373.1 -72.75 -375.5,
              -360.5 -80.04 -375.5, -360.5 -80.04 -383.3, -355 -74.55 253.3,
              -355 -74.55 245.5, -362.3 -61.92 245.5, -362.3 -61.92 -375.5,
              -355 -74.55 -375.5, -355 -74.55 -383.3, -347.5 -72.54 253.3,
              -347.5 -72.54 245.5, -347.5 -57.96 245.5, -347.5 -57.96 -375.5,
              -347.5 -72.54 -375.5, -347.5 -72.54 -383.3, -340 -74.55 253.3,
              -340 -74.55 245.5, -332.7 -61.92 245.5, -332.7 -61.92 -375.5,
              -340 -74.55 -375.5, -340 -74.55 -383.3, -334.5 -80.04 253.3,
              -334.5 -80.04 245.5, -321.9 -72.75 245.5, -321.9 -72.75 -375.5,
              -334.5 -80.04 -375.5, -334.5 -80.04 -383.3, -373.1 -102.3 220,
              -362.3 -113.2 220, -373.1 -102.3 217, -362.3 -113.2 217,
              -347.5 -117.1 220, -347.5 -117.1 217, -332.7 -113.2 220,
              -332.7 -113.2 217, -321.9 -102.3 220, -321.9 -102.3 217,
              -317.9 -87.54 220, -317.9 -87.54 217, -321.9 -72.75 220,
              -321.9 -72.75 217, -332.7 -61.92 220, -332.7 -61.92 217,
              -347.5 -57.96 220, -347.5 -57.96 217, -308.5 -57.96 220,
              -308.5 -57.96 217, -308.5 -221 220, -308.5 -221 217,
              -343.2 -221 220, -343.2 -221 217, -382.5 -107 220,
              -382.5 -107 217, -382.5 -104 220, -382.5 -104 217,
              -380.5 -102 220, -380.5 -102 217, -327.2 -113.5 245,
              -332.7 -113.2 245, -327.2 -113.5 220, -332.7 -113.2 220,
              -321.9 -102.3 245, -321.9 -102.3 220, -317.9 -87.54 245,
              -317.9 -87.54 220, -321.9 -72.75 245, -321.9 -72.75 220,
              -332.7 -61.92 245, -332.7 -61.92 220, -327.2 -61.54 245,
              -327.2 -61.54 220, -295.5 -61.54 245, -295.5 -61.54 220,
              -274.9 -77.69 245, -274.9 -77.69 220, -274.9 -97.39 245,
              -274.9 -97.39 220, -295.5 -113.5 245, -295.5 -113.5 220,
              -362.3 -113.2 -350, -373.1 -102.3 -350, -362.3 -113.2 -347,
              -373.1 -102.3 -347, -347.5 -117.1 -350, -347.5 -117.1 -347,
              -332.7 -113.2 -350, -332.7 -113.2 -347, -321.9 -102.3 -350,
              -321.9 -102.3 -347, -317.9 -87.54 -350, -317.9 -87.54 -347,
              -321.9 -72.75 -350, -321.9 -72.75 -347, -332.7 -61.92 -350,
              -332.7 -61.92 -347, -347.5 -57.96 -350, -347.5 -57.96 -347,
              -308.5 -57.96 -350, -308.5 -57.96 -347, -308.5 -221 -350,
              -308.5 -221 -347, -343.2 -221 -350, -343.2 -221 -347,
              -382.5 -107 -350, -382.5 -107 -347, -382.5 -104 -350,
              -382.5 -104 -347, -380.5 -102 -350, -380.5 -102 -347,
              -332.7 -113.2 -375, -327.2 -113.5 -375, -332.7 -113.2 -350,
              -327.2 -113.5 -350, -321.9 -102.3 -375, -321.9 -102.3 -350,
              -317.9 -87.54 -375, -317.9 -87.54 -350, -321.9 -72.75 -375,
              -321.9 -72.75 -350, -332.7 -61.92 -375, -332.7 -61.92 -350,
              -327.2 -61.54 -375, -327.2 -61.54 -350, -295.5 -61.54 -375,
              -295.5 -61.54 -350, -274.9 -77.69 -375, -274.9 -77.69 -350,
              -274.9 -97.39 -375, -274.9 -97.39 -350, -295.5 -113.5 -375,
              -295.5 -113.5 -350, 347.5 -87.54 253.3, 332.5 -87.54 253.3,
              332.5 -87.54 245.5, 317.9 -87.54 245.5, 317.9 -87.54 -375.5,
              332.5 -87.54 -375.5, 332.5 -87.54 -383.3, 347.5 -87.54 -383.3,
              334.5 -95.04 253.3, 334.5 -95.04 245.5, 321.9 -102.3 245.5,
              321.9 -102.3 -375.5, 334.5 -95.04 -375.5, 334.5 -95.04 -383.3,
              340 -100.5 253.3, 340 -100.5 245.5, 332.7 -113.2 245.5,
              332.7 -113.2 -375.5, 340 -100.5 -375.5, 340 -100.5 -383.3,
              347.5 -102.5 253.3, 347.5 -102.5 245.5, 347.5 -117.1 245.5,
              347.5 -117.1 -375.5, 347.5 -102.5 -375.5, 347.5 -102.5 -383.3,
              355 -100.5 253.3, 355 -100.5 245.5, 362.3 -113.2 245.5,
              362.3 -113.2 -375.5, 355 -100.5 -375.5, 355 -100.5 -383.3,
              360.5 -95.04 253.3, 360.5 -95.04 245.5, 373.1 -102.3 245.5,
              373.1 -102.3 -375.5, 360.5 -95.04 -375.5, 360.5 -95.04 -383.3,
              362.5 -87.54 253.3, 362.5 -87.54 245.5, 377.1 -87.54 245.5,
              377.1 -87.54 -375.5, 362.5 -87.54 -375.5, 362.5 -87.54 -383.3,
              360.5 -80.04 253.3, 360.5 -80.04 245.5, 373.1 -72.75 245.5,
              373.1 -72.75 -375.5, 360.5 -80.04 -375.5, 360.5 -80.04 -383.3,
              355 -74.55 253.3, 355 -74.55 245.5, 362.3 -61.92 245.5,
              362.3 -61.92 -375.5, 355 -74.55 -375.5, 355 -74.55 -383.3,
              347.5 -72.54 253.3, 347.5 -72.54 245.5, 347.5 -57.96 245.5,
              347.5 -57.96 -375.5, 347.5 -72.54 -375.5, 347.5 -72.54 -383.3,
              340 -74.55 253.3, 340 -74.55 245.5, 332.7 -61.92 245.5,
              332.7 -61.92 -375.5, 340 -74.55 -375.5, 340 -74.55 -383.3,
              334.5 -80.04 253.3, 334.5 -80.04 245.5, 321.9 -72.75 245.5,
              321.9 -72.75 -375.5, 334.5 -80.04 -375.5, 334.5 -80.04 -383.3,
              362.3 -113.2 220, 373.1 -102.3 220, 362.3 -113.2 217,
              373.1 -102.3 217, 347.5 -117.1 220, 347.5 -117.1 217,
              332.7 -113.2 220, 332.7 -113.2 217, 321.9 -102.3 220,
              321.9 -102.3 217, 317.9 -87.54 220, 317.9 -87.54 217,
              321.9 -72.75 220, 321.9 -72.75 217, 332.7 -61.92 220,
              332.7 -61.92 217, 347.5 -57.96 220, 347.5 -57.96 217,
              308.5 -57.96 220, 308.5 -57.96 217, 308.5 -221 220,
              308.5 -221 217, 343.2 -221 220, 343.2 -221 217,
              382.5 -107 220, 382.5 -107 217, 382.5 -104 220,
              382.5 -104 217, 380.5 -102 220, 380.5 -102 217,
              332.7 -113.2 245, 327.2 -113.5 245, 332.7 -113.2 220,
              327.2 -113.5 220, 321.9 -102.3 245, 321.9 -102.3 220,
              317.9 -87.54 245, 317.9 -87.54 220, 321.9 -72.75 245,
              321.9 -72.75 220, 332.7 -61.92 245, 332.7 -61.92 220,
              327.2 -61.54 245, 327.2 -61.54 220, 295.5 -61.54 245,
              295.5 -61.54 220, 274.9 -77.69 245, 274.9 -77.69 220,
              274.9 -97.39 245, 274.9 -97.39 220, 295.5 -113.5 245,
              295.5 -113.5 220, 373.1 -102.3 -350, 362.3 -113.2 -350,
              373.1 -102.3 -347, 362.3 -113.2 -347, 347.5 -117.1 -350,
              347.5 -117.1 -347, 332.7 -113.2 -350, 332.7 -113.2 -347,
              321.9 -102.3 -350, 321.9 -102.3 -347, 317.9 -87.54 -350,
              317.9 -87.54 -347, 321.9 -72.75 -350, 321.9 -72.75 -347,
              332.7 -61.92 -350, 332.7 -61.92 -347, 347.5 -57.96 -350,
              347.5 -57.96 -347, 308.5 -57.96 -350, 308.5 -57.96 -347,
              308.5 -221 -350, 308.5 -221 -347, 343.2 -221 -350,
              343.2 -221 -347, 382.5 -107 -350, 382.5 -107 -347,
              382.5 -104 -350, 382.5 -104 -347, 380.5 -102 -350,
              380.5 -102 -347, 327.2 -113.5 -375, 332.7 -113.2 -375,
              327.2 -113.5 -350, 332.7 -113.2 -350, 321.9 -102.3 -375,
              321.9 -102.3 -350, 317.9 -87.54 -375, 317.9 -87.54 -350,
              321.9 -72.75 -375, 321.9 -72.75 -350, 332.7 -61.92 -375,
              332.7 -61.92 -350, 327.2 -61.54 -375, 327.2 -61.54 -350,
              295.5 -61.54 -375, 295.5 -61.54 -350, 274.9 -77.69 -375,
              274.9 -77.69 -350, 274.9 -97.39 -375, 274.9 -97.39 -350,
              295.5 -113.5 -375, 295.5 -113.5 -350, 90.5 -156.5 350.8,
              -25 -156.5 350.8, -25 -156.5 220, 90.5 -156.5 220,
              90.5 -51.34 350.8, -25 -51.34 350.8, -25 -51.34 220,
              90.5 -51.34 220, 17.5 -51.34 303.3, -17.5 -51.34 303.3,
              -41 -45.04 303.3, -41 -6.043 303.3, -54.83 -6.043 303.3,
              -55 200 303.3, -34 221 303.3, 17.5 221 303.3, -12.82 -51.34 285.8,
              -33.16 -45.04 274, -33.16 -6.043 274, -45.14 -6.043 267.1,
              -45.29 200 267, -27.1 221 277.5, -0.002472 -51.34 273,
              -11.75 -45.04 252.6, -11.75 -6.043 252.6, -18.66 -6.043 240.7,
              -18.75 200 240.5, -8.25 221 258.7, 17.5 -51.34 268.3,
              17.5 -45.04 244.8, 17.5 -6.043 244.8, 17.5 -6.043 231,
              17.5 200 230.8, 17.5 221 251.8, 35 -51.34 273,
              46.75 -45.04 252.6, 46.75 -6.043 252.6, 53.66 -6.043 240.7,
              53.75 200 240.5, 43.25 221 258.7, 47.82 -51.34 285.8,
              68.16 -45.04 274, 68.16 -6.043 274, 80.14 -6.043 267.1,
              80.29 200 267, 62.1 221 277.5, 52.5 -51.34 303.3,
              76 -45.04 303.3, 76 -6.043 303.3, 89.83 -6.043 303.3,
              90 200 303.3, 69 221 303.3, 47.82 -51.34 320.8,
              68.16 -45.04 332.5, 68.16 -6.043 332.5, 80.14 -6.043 339.5,
              80.29 200 339.5, 62.1 221 329, 35 -51.34 333.6,
              46.75 -45.04 354, 46.75 -6.043 354, 53.66 -6.043 365.9,
              53.75 200 366.1, 43.25 221 347.9, 17.5 -51.34 338.3,
              17.5 -45.04 361.8, 17.5 -6.043 361.8, 17.5 -6.043 375.6,
              17.5 200 375.8, 17.5 221 354.8, -0.002472 -51.34 333.6,
              -11.75 -45.04 354, -11.75 -6.043 354, -18.66 -6.043 365.9,
              -18.75 200 366.1, -8.25 221 347.9, -12.82 -51.34 320.8,
              -33.16 -45.04 332.5, -33.16 -6.043 332.5, -45.14 -6.043 339.5,
              -45.29 200 339.5, -27.1 221 329, -56.5 1.957 243.3,
              -146.5 1.957 243.3, -146.5 1.957 383.3, -56.5 1.957 383.3,
              -56.5 184 243.3, -146.5 184 243.3, -146.5 184 383.3,
              -56.5 184 383.3, -308.5 -221 220, 308.5 -221 220,
              308.5 -221 -350, -308.5 -221 -350, -308.5 -57.96 220,
              308.5 -57.96 220, 308.5 -57.96 -350, -308.5 -57.96 -350]
            }
            coordIndex [
              0, 1, 0, -1, 0, 1, 8, -1, 1, 2, 8, -1, 8, 2, 9, -1,
              2, 3, 9, -1, 9, 3, 10, -1, 3, 4, 10, -1, 10, 4, 11, -1,
              4, 5, 11, -1, 11, 5, 12, -1, 5, 6, 12, -1, 12, 6, 13, -1,
              6, 7, 13, -1, 0, 8, 14, -1, 8, 9, 14, -1, 14, 9, 15, -1,
              9, 10, 15, -1, 15, 10, 16, -1, 10, 11, 16, -1,
              16, 11, 17, -1, 11, 12, 17, -1, 17, 12, 18, -1,
              12, 13, 18, -1, 18, 13, 19, -1, 13, 7, 19, -1,
              0, 14, 20, -1, 14, 15, 20, -1, 20, 15, 21, -1,
              15, 16, 21, -1, 21, 16, 22, -1, 16, 17, 22, -1,
              22, 17, 23, -1, 17, 18, 23, -1, 23, 18, 24, -1,
              18, 19, 24, -1, 24, 19, 25, -1, 19, 7, 25, -1,
              0, 20, 26, -1, 20, 21, 26, -1, 26, 21, 27, -1,
              21, 22, 27, -1, 27, 22, 28, -1, 22, 23, 28, -1,
              28, 23, 29, -1, 23, 24, 29, -1, 29, 24, 30, -1,
              24, 25, 30, -1, 30, 25, 31, -1, 25, 7, 31, -1,
              0, 26, 32, -1, 26, 27, 32, -1, 32, 27, 33, -1,
              27, 28, 33, -1, 33, 28, 34, -1, 28, 29, 34, -1,
              34, 29, 35, -1, 29, 30, 35, -1, 35, 30, 36, -1,
              30, 31, 36, -1, 36, 31, 37, -1, 31, 7, 37, -1,
              0, 32, 38, -1, 32, 33, 38, -1, 38, 33, 39, -1,
              33, 34, 39, -1, 39, 34, 40, -1, 34, 35, 40, -1,
              40, 35, 41, -1, 35, 36, 41, -1, 41, 36, 42, -1,
              36, 37, 42, -1, 42, 37, 43, -1, 37, 7, 43, -1,
              0, 38, 44, -1, 38, 39, 44, -1, 44, 39, 45, -1,
              39, 40, 45, -1, 45, 40, 46, -1, 40, 41, 46, -1,
              46, 41, 47, -1, 41, 42, 47, -1, 47, 42, 48, -1,
              42, 43, 48, -1, 48, 43, 49, -1, 43, 7, 49, -1,
              0, 44, 50, -1, 44, 45, 50, -1, 50, 45, 51, -1,
              45, 46, 51, -1, 51, 46, 52, -1, 46, 47, 52, -1,
              52, 47, 53, -1, 47, 48, 53, -1, 53, 48, 54, -1,
              48, 49, 54, -1, 54, 49, 55, -1, 49, 7, 55, -1,
              0, 50, 56, -1, 50, 51, 56, -1, 56, 51, 57, -1,
              51, 52, 57, -1, 57, 52, 58, -1, 52, 53, 58, -1,
              58, 53, 59, -1, 53, 54, 59, -1, 59, 54, 60, -1,
              54, 55, 60, -1, 60, 55, 61, -1, 55, 7, 61, -1,
              0, 56, 62, -1, 56, 57, 62, -1, 62, 57, 63, -1,
              57, 58, 63, -1, 63, 58, 64, -1, 58, 59, 64, -1,
              64, 59, 65, -1, 59, 60, 65, -1, 65, 60, 66, -1,
              60, 61, 66, -1, 66, 61, 67, -1, 61, 7, 67, -1,
              0, 62, 68, -1, 62, 63, 68, -1, 68, 63, 69, -1,
              63, 64, 69, -1, 69, 64, 70, -1, 64, 65, 70, -1,
              70, 65, 71, -1, 65, 66, 71, -1, 71, 66, 72, -1,
              66, 67, 72, -1, 72, 67, 73, -1, 67, 7, 73, -1,
              0, 68, 1, -1, 68, 69, 1, -1, 1, 69, 2, -1, 69, 70, 2, -1,
              2, 70, 3, -1, 70, 71, 3, -1, 3, 71, 4, -1, 71, 72, 4, -1,
              4, 72, 5, -1, 72, 73, 5, -1, 5, 73, 6, -1, 73, 7, 6, -1,
              74, 75, 76, -1, 75, 77, 76, -1, 75, 78, 77, -1,
              78, 79, 77, -1, 78, 80, 79, -1, 80, 81, 79, -1,
              80, 82, 81, -1, 82, 83, 81, -1, 82, 84, 83, -1,
              84, 85, 83, -1, 84, 86, 85, -1, 86, 87, 85, -1,
              86, 88, 87, -1, 88, 89, 87, -1, 88, 90, 89, -1,
              90, 91, 89, -1, 90, 92, 91, -1, 92, 93, 91, -1,
              92, 94, 93, -1, 94, 95, 93, -1, 94, 96, 95, -1,
              96, 97, 95, -1, 96, 98, 97, -1, 98, 99, 97, -1,
              98, 100, 99, -1, 100, 101, 99, -1, 100, 102, 101, -1,
              102, 103, 101, -1, 102, 74, 103, -1, 74, 76, 103, -1,
              74, 98, 75, -1, 74, 102, 98, -1, 102, 100, 98, -1,
              98, 96, 75, -1, 94, 80, 96, -1, 92, 84, 94, -1,
              90, 88, 92, -1, 88, 86, 92, -1, 86, 84, 92, -1,
              84, 82, 94, -1, 82, 80, 94, -1, 80, 78, 96, -1,
              78, 75, 96, -1, 101, 103, 99, -1, 103, 76, 99, -1,
              79, 97, 77, -1, 79, 81, 97, -1, 97, 81, 95, -1,
              81, 83, 95, -1, 87, 93, 85, -1, 87, 89, 93, -1,
              89, 91, 93, -1, 93, 95, 85, -1, 97, 99, 77, -1,
              99, 76, 77, -1, 95, 83, 85, -1, 104, 105, 106, -1,
              105, 107, 106, -1, 105, 108, 107, -1, 108, 109, 107, -1,
              108, 110, 109, -1, 110, 111, 109, -1, 110, 112, 111, -1,
              112, 113, 111, -1, 112, 114, 113, -1, 114, 115, 113, -1,
              114, 116, 115, -1, 116, 117, 115, -1, 116, 118, 117, -1,
              118, 119, 117, -1, 118, 120, 119, -1, 120, 121, 119, -1,
              120, 122, 121, -1, 122, 123, 121, -1, 122, 124, 123, -1,
              124, 125, 123, -1, 124, 104, 125, -1, 104, 106, 125, -1,
              105, 104, 108, -1, 104, 124, 108, -1, 108, 124, 110, -1,
              124, 122, 110, -1, 122, 120, 110, -1, 116, 112, 118, -1,
              116, 114, 112, -1, 112, 110, 118, -1, 118, 110, 120, -1,
              106, 109, 125, -1, 106, 107, 109, -1, 109, 111, 125, -1,
              113, 119, 111, -1, 115, 117, 113, -1, 117, 119, 113, -1,
              119, 121, 111, -1, 121, 123, 111, -1, 123, 125, 111, -1,
              126, 127, 128, -1, 127, 129, 128, -1, 130, 126, 131, -1,
              126, 128, 131, -1, 132, 130, 133, -1, 130, 131, 133, -1,
              134, 132, 135, -1, 132, 133, 135, -1, 136, 134, 137, -1,
              134, 135, 137, -1, 138, 136, 139, -1, 136, 137, 139, -1,
              140, 138, 141, -1, 138, 139, 141, -1, 142, 140, 143, -1,
              140, 141, 143, -1, 144, 142, 145, -1, 142, 143, 145, -1,
              146, 144, 147, -1, 144, 145, 147, -1, 148, 146, 149, -1,
              146, 147, 149, -1, 150, 148, 151, -1, 148, 149, 151, -1,
              152, 150, 153, -1, 150, 151, 153, -1, 154, 152, 155, -1,
              152, 153, 155, -1, 127, 154, 129, -1, 154, 155, 129, -1,
              154, 127, 150, -1, 154, 150, 152, -1, 130, 148, 126, -1,
              130, 132, 148, -1, 148, 132, 146, -1, 132, 134, 146, -1,
              138, 144, 136, -1, 138, 140, 144, -1, 140, 142, 144, -1,
              144, 146, 136, -1, 148, 150, 126, -1, 150, 127, 126, -1,
              146, 134, 136, -1, 128, 129, 151, -1, 128, 151, 149, -1,
              128, 149, 131, -1, 153, 151, 155, -1, 131, 149, 133, -1,
              145, 137, 147, -1, 143, 141, 145, -1, 141, 139, 145, -1,
              139, 137, 145, -1, 137, 135, 147, -1, 135, 133, 147, -1,
              147, 133, 149, -1, 155, 151, 129, -1, 156, 157, 158, -1,
              157, 159, 158, -1, 160, 156, 161, -1, 156, 158, 161, -1,
              162, 160, 163, -1, 160, 161, 163, -1, 164, 162, 165, -1,
              162, 163, 165, -1, 166, 164, 167, -1, 164, 165, 167, -1,
              168, 166, 169, -1, 166, 167, 169, -1, 170, 168, 171, -1,
              168, 169, 171, -1, 172, 170, 173, -1, 170, 171, 173, -1,
              174, 172, 175, -1, 172, 173, 175, -1, 176, 174, 177, -1,
              174, 175, 177, -1, 157, 176, 159, -1, 176, 177, 159, -1,
              156, 160, 157, -1, 157, 160, 176, -1, 164, 170, 162, -1,
              166, 168, 164, -1, 168, 170, 164, -1, 170, 172, 162, -1,
              172, 174, 162, -1, 174, 176, 162, -1, 162, 176, 160, -1,
              158, 159, 161, -1, 175, 163, 177, -1, 175, 173, 163, -1,
              173, 171, 163, -1, 163, 171, 165, -1, 167, 165, 169, -1,
              169, 165, 171, -1, 163, 161, 177, -1, 161, 159, 177, -1,
              178, 179, 178, -1, 178, 179, 186, -1, 179, 180, 186, -1,
              186, 180, 187, -1, 180, 181, 187, -1, 187, 181, 188, -1,
              181, 182, 188, -1, 188, 182, 189, -1, 182, 183, 189, -1,
              189, 183, 190, -1, 183, 184, 190, -1, 190, 184, 191, -1,
              184, 185, 191, -1, 178, 186, 192, -1, 186, 187, 192, -1,
              192, 187, 193, -1, 187, 188, 193, -1, 193, 188, 194, -1,
              188, 189, 194, -1, 194, 189, 195, -1, 189, 190, 195, -1,
              195, 190, 196, -1, 190, 191, 196, -1, 196, 191, 197, -1,
              191, 185, 197, -1, 178, 192, 198, -1, 192, 193, 198, -1,
              198, 193, 199, -1, 193, 194, 199, -1, 199, 194, 200, -1,
              194, 195, 200, -1, 200, 195, 201, -1, 195, 196, 201, -1,
              201, 196, 202, -1, 196, 197, 202, -1, 202, 197, 203, -1,
              197, 185, 203, -1, 178, 198, 204, -1, 198, 199, 204, -1,
              204, 199, 205, -1, 199, 200, 205, -1, 205, 200, 206, -1,
              200, 201, 206, -1, 206, 201, 207, -1, 201, 202, 207, -1,
              207, 202, 208, -1, 202, 203, 208, -1, 208, 203, 209, -1,
              203, 185, 209, -1, 178, 204, 210, -1, 204, 205, 210, -1,
              210, 205, 211, -1, 205, 206, 211, -1, 211, 206, 212, -1,
              206, 207, 212, -1, 212, 207, 213, -1, 207, 208, 213, -1,
              213, 208, 214, -1, 208, 209, 214, -1, 214, 209, 215, -1,
              209, 185, 215, -1, 178, 210, 216, -1, 210, 211, 216, -1,
              216, 211, 217, -1, 211, 212, 217, -1, 217, 212, 218, -1,
              212, 213, 218, -1, 218, 213, 219, -1, 213, 214, 219, -1,
              219, 214, 220, -1, 214, 215, 220, -1, 220, 215, 221, -1,
              215, 185, 221, -1, 178, 216, 222, -1, 216, 217, 222, -1,
              222, 217, 223, -1, 217, 218, 223, -1, 223, 218, 224, -1,
              218, 219, 224, -1, 224, 219, 225, -1, 219, 220, 225, -1,
              225, 220, 226, -1, 220, 221, 226, -1, 226, 221, 227, -1,
              221, 185, 227, -1, 178, 222, 228, -1, 222, 223, 228, -1,
              228, 223, 229, -1, 223, 224, 229, -1, 229, 224, 230, -1,
              224, 225, 230, -1, 230, 225, 231, -1, 225, 226, 231, -1,
              231, 226, 232, -1, 226, 227, 232, -1, 232, 227, 233, -1,
              227, 185, 233, -1, 178, 228, 234, -1, 228, 229, 234, -1,
              234, 229, 235, -1, 229, 230, 235, -1, 235, 230, 236, -1,
              230, 231, 236, -1, 236, 231, 237, -1, 231, 232, 237, -1,
              237, 232, 238, -1, 232, 233, 238, -1, 238, 233, 239, -1,
              233, 185, 239, -1, 178, 234, 240, -1, 234, 235, 240, -1,
              240, 235, 241, -1, 235, 236, 241, -1, 241, 236, 242, -1,
              236, 237, 242, -1, 242, 237, 243, -1, 237, 238, 243, -1,
              243, 238, 244, -1, 238, 239, 244, -1, 244, 239, 245, -1,
              239, 185, 245, -1, 178, 240, 246, -1, 240, 241, 246, -1,
              246, 241, 247, -1, 241, 242, 247, -1, 247, 242, 248, -1,
              242, 243, 248, -1, 248, 243, 249, -1, 243, 244, 249, -1,
              249, 244, 250, -1, 244, 245, 250, -1, 250, 245, 251, -1,
              245, 185, 251, -1, 178, 246, 179, -1, 246, 247, 179, -1,
              179, 247, 180, -1, 247, 248, 180, -1, 180, 248, 181, -1,
              248, 249, 181, -1, 181, 249, 182, -1, 249, 250, 182, -1,
              182, 250, 183, -1, 250, 251, 183, -1, 183, 251, 184, -1,
              251, 185, 184, -1, 252, 253, 254, -1, 253, 255, 254, -1,
              256, 252, 257, -1, 252, 254, 257, -1, 258, 256, 259, -1,
              256, 257, 259, -1, 260, 258, 261, -1, 258, 259, 261, -1,
              262, 260, 263, -1, 260, 261, 263, -1, 264, 262, 265, -1,
              262, 263, 265, -1, 266, 264, 267, -1, 264, 265, 267, -1,
              268, 266, 269, -1, 266, 267, 269, -1, 270, 268, 271, -1,
              268, 269, 271, -1, 272, 270, 273, -1, 270, 271, 273, -1,
              274, 272, 275, -1, 272, 273, 275, -1, 276, 274, 277, -1,
              274, 275, 277, -1, 278, 276, 279, -1, 276, 277, 279, -1,
              280, 278, 281, -1, 278, 279, 281, -1, 253, 280, 255, -1,
              280, 281, 255, -1, 280, 253, 276, -1, 280, 276, 278, -1,
              256, 274, 252, -1, 256, 258, 274, -1, 274, 258, 272, -1,
              258, 260, 272, -1, 264, 270, 262, -1, 264, 266, 270, -1,
              266, 268, 270, -1, 270, 272, 262, -1, 274, 276, 252, -1,
              276, 253, 252, -1, 272, 260, 262, -1, 254, 255, 277, -1,
              254, 277, 275, -1, 254, 275, 257, -1, 279, 277, 281, -1,
              257, 275, 259, -1, 271, 263, 273, -1, 269, 267, 271, -1,
              267, 265, 271, -1, 265, 263, 271, -1, 263, 261, 273, -1,
              261, 259, 273, -1, 273, 259, 275, -1, 281, 277, 255, -1,
              282, 283, 284, -1, 283, 285, 284, -1, 286, 282, 287, -1,
              282, 284, 287, -1, 288, 286, 289, -1, 286, 287, 289, -1,
              290, 288, 291, -1, 288, 289, 291, -1, 292, 290, 293, -1,
              290, 291, 293, -1, 294, 292, 295, -1, 292, 293, 295, -1,
              296, 294, 297, -1, 294, 295, 297, -1, 298, 296, 299, -1,
              296, 297, 299, -1, 300, 298, 301, -1, 298, 299, 301, -1,
              302, 300, 303, -1, 300, 301, 303, -1, 283, 302, 285, -1,
              302, 303, 285, -1, 282, 286, 283, -1, 283, 286, 302, -1,
              290, 296, 288, -1, 292, 294, 290, -1, 294, 296, 290, -1,
              296, 298, 288, -1, 298, 300, 288, -1, 300, 302, 288, -1,
              288, 302, 286, -1, 284, 285, 287, -1, 301, 289, 303, -1,
              301, 299, 289, -1, 299, 297, 289, -1, 289, 297, 291, -1,
              293, 291, 295, -1, 295, 291, 297, -1, 289, 287, 303, -1,
              287, 285, 303, -1, 304, 305, 306, -1, 305, 307, 306, -1,
              305, 308, 307, -1, 308, 309, 307, -1, 308, 310, 309, -1,
              310, 311, 309, -1, 310, 312, 311, -1, 312, 313, 311, -1,
              312, 314, 313, -1, 314, 315, 313, -1, 314, 316, 315, -1,
              316, 317, 315, -1, 316, 318, 317, -1, 318, 319, 317, -1,
              318, 320, 319, -1, 320, 321, 319, -1, 320, 322, 321, -1,
              322, 323, 321, -1, 322, 324, 323, -1, 324, 325, 323, -1,
              324, 326, 325, -1, 326, 327, 325, -1, 326, 328, 327, -1,
              328, 329, 327, -1, 328, 330, 329, -1, 330, 331, 329, -1,
              330, 332, 331, -1, 332, 333, 331, -1, 332, 304, 333, -1,
              304, 306, 333, -1, 304, 328, 305, -1, 304, 332, 328, -1,
              332, 330, 328, -1, 328, 326, 305, -1, 324, 310, 326, -1,
              322, 314, 324, -1, 320, 318, 322, -1, 318, 316, 322, -1,
              316, 314, 322, -1, 314, 312, 324, -1, 312, 310, 324, -1,
              310, 308, 326, -1, 308, 305, 326, -1, 331, 333, 329, -1,
              333, 306, 329, -1, 309, 327, 307, -1, 309, 311, 327, -1,
              327, 311, 325, -1, 311, 313, 325, -1, 317, 323, 315, -1,
              317, 319, 323, -1, 319, 321, 323, -1, 323, 325, 315, -1,
              327, 329, 307, -1, 329, 306, 307, -1, 325, 313, 315, -1,
              334, 335, 336, -1, 335, 337, 336, -1, 335, 338, 337, -1,
              338, 339, 337, -1, 338, 340, 339, -1, 340, 341, 339, -1,
              340, 342, 341, -1, 342, 343, 341, -1, 342, 344, 343, -1,
              344, 345, 343, -1, 344, 346, 345, -1, 346, 347, 345, -1,
              346, 348, 347, -1, 348, 349, 347, -1, 348, 350, 349, -1,
              350, 351, 349, -1, 350, 352, 351, -1, 352, 353, 351, -1,
              352, 354, 353, -1, 354, 355, 353, -1, 354, 334, 355, -1,
              334, 336, 355, -1, 335, 334, 338, -1, 334, 354, 338, -1,
              338, 354, 340, -1, 354, 352, 340, -1, 352, 350, 340, -1,
              346, 342, 348, -1, 346, 344, 342, -1, 342, 340, 348, -1,
              348, 340, 350, -1, 336, 339, 355, -1, 336, 337, 339, -1,
              339, 341, 355, -1, 343, 349, 341, -1, 345, 347, 343, -1,
              347, 349, 343, -1, 349, 351, 341, -1, 351, 353, 341, -1,
              353, 355, 341, -1, 356, 359, 357, -1, 359, 358, 357, -1,
              360, 361, 363, -1, 361, 362, 363, -1, 356, 357, 360, -1,
              357, 361, 360, -1, 359, 363, 358, -1, 363, 362, 358, -1,
              356, 360, 359, -1, 360, 363, 359, -1, 357, 358, 361, -1,
              358, 362, 361, -1, 364, 365, 364, -1, 364, 365, 372, -1,
              365, 366, 372, -1, 372, 366, 373, -1, 366, 367, 373, -1,
              373, 367, 374, -1, 367, 368, 374, -1, 374, 368, 375, -1,
              368, 369, 375, -1, 375, 369, 376, -1, 369, 370, 376, -1,
              376, 370, 377, -1, 370, 371, 377, -1, 364, 372, 378, -1,
              372, 373, 378, -1, 378, 373, 379, -1, 373, 374, 379, -1,
              379, 374, 380, -1, 374, 375, 380, -1, 380, 375, 381, -1,
              375, 376, 381, -1, 381, 376, 382, -1, 376, 377, 382, -1,
              382, 377, 383, -1, 377, 371, 383, -1, 364, 378, 384, -1,
              378, 379, 384, -1, 384, 379, 385, -1, 379, 380, 385, -1,
              385, 380, 386, -1, 380, 381, 386, -1, 386, 381, 387, -1,
              381, 382, 387, -1, 387, 382, 388, -1, 382, 383, 388, -1,
              388, 383, 389, -1, 383, 371, 389, -1, 364, 384, 390, -1,
              384, 385, 390, -1, 390, 385, 391, -1, 385, 386, 391, -1,
              391, 386, 392, -1, 386, 387, 392, -1, 392, 387, 393, -1,
              387, 388, 393, -1, 393, 388, 394, -1, 388, 389, 394, -1,
              394, 389, 395, -1, 389, 371, 395, -1, 364, 390, 396, -1,
              390, 391, 396, -1, 396, 391, 397, -1, 391, 392, 397, -1,
              397, 392, 398, -1, 392, 393, 398, -1, 398, 393, 399, -1,
              393, 394, 399, -1, 399, 394, 400, -1, 394, 395, 400, -1,
              400, 395, 401, -1, 395, 371, 401, -1, 364, 396, 402, -1,
              396, 397, 402, -1, 402, 397, 403, -1, 397, 398, 403, -1,
              403, 398, 404, -1, 398, 399, 404, -1, 404, 399, 405, -1,
              399, 400, 405, -1, 405, 400, 406, -1, 400, 401, 406, -1,
              406, 401, 407, -1, 401, 371, 407, -1, 364, 402, 408, -1,
              402, 403, 408, -1, 408, 403, 409, -1, 403, 404, 409, -1,
              409, 404, 410, -1, 404, 405, 410, -1, 410, 405, 411, -1,
              405, 406, 411, -1, 411, 406, 412, -1, 406, 407, 412, -1,
              412, 407, 413, -1, 407, 371, 413, -1, 364, 408, 414, -1,
              408, 409, 414, -1, 414, 409, 415, -1, 409, 410, 415, -1,
              415, 410, 416, -1, 410, 411, 416, -1, 416, 411, 417, -1,
              411, 412, 417, -1, 417, 412, 418, -1, 412, 413, 418, -1,
              418, 413, 419, -1, 413, 371, 419, -1, 364, 414, 420, -1,
              414, 415, 420, -1, 420, 415, 421, -1, 415, 416, 421, -1,
              421, 416, 422, -1, 416, 417, 422, -1, 422, 417, 423, -1,
              417, 418, 423, -1, 423, 418, 424, -1, 418, 419, 424, -1,
              424, 419, 425, -1, 419, 371, 425, -1, 364, 420, 426, -1,
              420, 421, 426, -1, 426, 421, 427, -1, 421, 422, 427, -1,
              427, 422, 428, -1, 422, 423, 428, -1, 428, 423, 429, -1,
              423, 424, 429, -1, 429, 424, 430, -1, 424, 425, 430, -1,
              430, 425, 431, -1, 425, 371, 431, -1, 364, 426, 432, -1,
              426, 427, 432, -1, 432, 427, 433, -1, 427, 428, 433, -1,
              433, 428, 434, -1, 428, 429, 434, -1, 434, 429, 435, -1,
              429, 430, 435, -1, 435, 430, 436, -1, 430, 431, 436, -1,
              436, 431, 437, -1, 431, 371, 437, -1, 364, 432, 365, -1,
              432, 433, 365, -1, 365, 433, 366, -1, 433, 434, 366, -1,
              366, 434, 367, -1, 434, 435, 367, -1, 367, 435, 368, -1,
              435, 436, 368, -1, 368, 436, 369, -1, 436, 437, 369, -1,
              369, 437, 370, -1, 437, 371, 370, -1, 438, 441, 439, -1,
              441, 440, 439, -1, 442, 443, 445, -1, 443, 444, 445, -1,
              438, 439, 442, -1, 439, 443, 442, -1, 441, 445, 440, -1,
              445, 444, 440, -1, 438, 442, 441, -1, 442, 445, 441, -1,
              439, 440, 443, -1, 440, 444, 443, -1, 446, 449, 447, -1,
              449, 448, 447, -1, 450, 451, 453, -1, 451, 452, 453, -1,
              446, 447, 450, -1, 447, 451, 450, -1, 449, 453, 448, -1,
              453, 452, 448, -1, 446, 450, 449, -1, 450, 453, 449, -1,
              447, 448, 451, -1, 448, 452, 451, -1]
            }
        }
      ]
    },
    DEF Layer:TRANSPORT Transform {
      translation -382.5 -25.62 0
      children [
        Shape {
          appearance Appearance {
            material Material {
              diffuseColor 1 1 1
            }
          }
          geometry DEF Layer:TRANSPORT-FACES IndexedFaceSet {
            ccw TRUE
            solid TRUE
            coord DEF Layer:TRANSPORT-COORD Coordinate { point [
              378.5 -25.62 -225, 382.2 -14.28 -225, 381.8 -2.362 -225,
              377.4 8.739 -225, 369.6 17.74 -225, 359.2 23.59 -225,
              347.5 25.62 -225, -347.5 25.62 -225, -359.2 23.59 -225,
              -369.6 17.74 -225, -377.4 8.739 -225, -381.8 -2.362 -225,
              -382.2 -14.28 -225, -378.5 -25.62 -225, 378.5 -25.62 225,
              382.2 -14.28 225, 381.8 -2.362 225, 377.4 8.739 225,
              369.6 17.74 225, 359.2 23.59 225, 347.5 25.62 225,
              -347.5 25.62 225, -359.2 23.59 225, -369.6 17.74 225,
              -377.4 8.739 225, -381.8 -2.362 225, -382.2 -14.28 225,
              -378.5 -25.62 225]
            }
            coordIndex [
              0, 1, 14, -1, 14, 1, 15, -1, 1, 2, 15, -1, 15, 2, 16, -1,
              2, 3, 16, -1, 16, 3, 17, -1, 3, 4, 17, -1, 17, 4, 18, -1,
              4, 5, 18, -1, 18, 5, 19, -1, 5, 6, 19, -1, 19, 6, 20, -1,
              6, 7, 20, -1, 20, 7, 21, -1, 7, 8, 21, -1, 21, 8, 22, -1,
              8, 9, 22, -1, 22, 9, 23, -1, 9, 10, 23, -1, 23, 10, 24, -1,
              10, 11, 24, -1, 24, 11, 25, -1, 11, 12, 25, -1,
              25, 12, 26, -1, 12, 13, 26, -1, 26, 13, 27, -1]
            }
        }
      ]
    },
    DEF Block:ptobci Transform {
      translation -730 -35 318.3
      rotation 0 0 1 -3.142
      children [
        DEF Layer:TRANSPORT_0 Transform {
          translation 47.5 45 50.45
          children [
            Shape {
              appearance Appearance {
                material Material {
                  diffuseColor 1 1 1
                }
              }
              geometry DEF Layer:TRANSPORT_0-FACES IndexedFaceSet {
                ccw FALSE
                solid TRUE
                coord DEF Layer:TRANSPORT_0-COORD Coordinate { point [
                  126.5 129 -43.75, -126.5 129 -43.75, -126.5 129 43.75,
                  126.5 129 43.75, 126.5 -129 -43.75, -126.5 -129 -43.75,
                  -126.5 -129 43.75, 126.5 -129 43.75]
                }
                coordIndex [
                  0, 3, 1, -1, 3, 2, 1, -1, 4, 5, 7, -1, 5, 6, 7, -1,
                  0, 1, 4, -1, 1, 5, 4, -1, 3, 7, 2, -1, 7, 6, 2, -1,
                  0, 4, 3, -1, 4, 7, 3, -1, 1, 2, 5, -1, 2, 6, 5, -1]
                }
            }
          ]
        },
      ]
    }
  ]
}


objo wrote at 2012-06-21 10:48:

> How can I send you my files so you can have a look at what I fixed and how you can use it for your code?

create a fork from  https://hg.codeplex.com/forks/glgweeke/vrml97, apply your changes and send a pull request!


glgweeke wrote at 2012-06-27 21:10:

Sorry,

that it takes so long to push the files into to repository. But I get an error (Bad Gateway 255 or so).

So i push only the one vrml.cs file and not the complete merge repository. That works.

Your .wrl file can be display well.

0

Automatically move manipulator

Arjan 11 years ago 0
I have created a small example with a "robot" containing rotating axes.
With the three manipulators I can move the axis of the robot.
But I'm looking for a way to move the manipulators when the robot moves.
So when axis 1 of the robot moves you see all the 'stacked' objects moving but not the manipulators.
How can I achieve this?

Here is my source code:
SphereVisual3D sphereAxis1 = new SphereVisual3D();
sphereAxis1.Fill = new SolidColorBrush(Colors.Blue);
sphereAxis1.Center = new System.Windows.Media.Media3D.Point3D(0, 0, 0);
sphereAxis1.Radius = 1.0;
hvpMain.Children.Add(sphereAxis1);


RotateManipulator manipulatorAxis1 = new RotateManipulator();
manipulatorAxis1.Color = Colors.Blue;
manipulatorAxis1.Bind(sphereAxis1);
manipulatorAxis1.Axis = new System.Windows.Media.Media3D.Vector3D(0, 0, 1);
manipulatorAxis1.Diameter = 3.5;
manipulatorAxis1.InnerDiameter = 2.5;
hvpMain.Children.Add(manipulatorAxis1);


PipeVisual3D pipe1 = new PipeVisual3D();
pipe1.Fill = new SolidColorBrush(Colors.Orange);
pipe1.Diameter = 5.0;
pipe1.Point1 = new System.Windows.Media.Media3D.Point3D(0, 0, -1);
pipe1.Point2 = new System.Windows.Media.Media3D.Point3D(0, 0, 0);
sphereAxis1.Children.Add(pipe1);


PipeVisual3D pipe2 = new PipeVisual3D();
pipe2.Fill = new SolidColorBrush(Colors.Orange);
pipe2.Diameter = 2.0;
pipe2.Point1 = new System.Windows.Media.Media3D.Point3D(0, 0, 0);
pipe2.Point2 = new System.Windows.Media.Media3D.Point3D(0, 0, 2);
pipe1.Children.Add(pipe2);


SphereVisual3D sphereAxis2 = new SphereVisual3D();
sphereAxis2.Fill = new SolidColorBrush(Colors.Blue);
sphereAxis2.Center = new System.Windows.Media.Media3D.Point3D(0, 0, 2);
sphereAxis2.Radius = 1.0;
pipe2.Children.Add(sphereAxis2);


RotateManipulator manipulatorAxis2 = new RotateManipulator();
manipulatorAxis2.Pivot = new System.Windows.Media.Media3D.Point3D(0, 0, 2);
manipulatorAxis2.Axis = new System.Windows.Media.Media3D.Vector3D(0, 1, 0);
manipulatorAxis2.Color = Colors.Green;
manipulatorAxis2.Bind(sphereAxis2);
manipulatorAxis2.Position = new System.Windows.Media.Media3D.Point3D(0, 0, 2);
manipulatorAxis2.Diameter = 3.5;
manipulatorAxis2.InnerDiameter = 2.5;
hvpMain.Children.Add(manipulatorAxis2);


PipeVisual3D pipe3 = new PipeVisual3D();
pipe3.Fill = new SolidColorBrush(Colors.Orange);
pipe3.Diameter = 2.0;
pipe3.Point1 = new System.Windows.Media.Media3D.Point3D(0, 0, 2);
pipe3.Point2 = new System.Windows.Media.Media3D.Point3D(0, 0, 7);
sphereAxis2.Children.Add(pipe3);


SphereVisual3D sphereAxis3 = new SphereVisual3D();
sphereAxis3.Fill = new SolidColorBrush(Colors.Blue);
sphereAxis3.Center = new System.Windows.Media.Media3D.Point3D(0, 0, 7);
sphereAxis3.Radius = 1.0;
pipe3.Children.Add(sphereAxis3);


RotateManipulator manipulatorAxis3 = new RotateManipulator();
manipulatorAxis3.Pivot = new System.Windows.Media.Media3D.Point3D(0, 0, 7);
manipulatorAxis3.Axis = new System.Windows.Media.Media3D.Vector3D(0, 1, 0);
manipulatorAxis3.Color = Colors.Green;
manipulatorAxis3.Bind(sphereAxis3);
manipulatorAxis3.Position = new System.Windows.Media.Media3D.Point3D(0, 0, 7);
manipulatorAxis3.Diameter = 3.5;
manipulatorAxis3.InnerDiameter = 2.5;
hvpMain.Children.Add(manipulatorAxis3);


PipeVisual3D pipe4 = new PipeVisual3D();
pipe4.Fill = new SolidColorBrush(Colors.Orange);
pipe4.Diameter = 2.0;
pipe4.Point1 = new System.Windows.Media.Media3D.Point3D(0, 0, 7);
pipe4.Point2 = new System.Windows.Media.Media3D.Point3D(7, 0, 7);
sphereAxis3.Children.Add(pipe4);

Kind regards,

Arjan
0

DataTemplate3D for custom ModelVisual3D Xml/View

Michael Powell 12 years ago updated 12 years ago 4
I've got a custom ModelVisual3D, literally I extended into a Xml/View to build a model. I will likely have several of these animals, but each of them are a ModelVisual3D.

I am studying the WPF DataTemplate example, and it is interesting, data template acts as a kind of bridge into the 3D model?

I'm not sure what CreateItem is all about, except possibly a convention integrating with the sister ItemsVisual3D?

I wouldn't have such a thing in my model. In fact, I'm not sure I would potentially have one data template per model in the view, the content of which is the view instance?

It's making some sense grasping the connecting tissue.

Thank you...
0
Under review

How to render grass and chalk lines easily

Michael Powell 12 years ago updated 12 years ago 3
Hello,

I am taking a look at some options how to render grass, for instance as a texture, overlaid on a model, like a RectangleVisual3D and/or polygonal-surface, for instance, then in such a way that I can also render chalk lines, identify some material, etc, that simulates chalk lines, in both lines (or small rectangles themselves), and for font-materials (if there were such a thing? haven't done the research there, yet...).

I've found some tutorials how to work through apps like Paint.NET, GIMP, etc, in order to crank out some grass textures. Basically what's I would consider low to low/medium end quality. Not really looking for medium/high to high end quality at this point for this purpose, nothing even remotely like a Cinema 4D, for instance.

I am also taking a look at Unity3D for potential options there, they can generate grass, but this looks more like a full-fledged game-style development environment. Which might be along the lines what I'd like to do, especially with simulation for sprites, physics, etc. I'm not positive, SharpDX an analog to Unity3D, but it came up looking for grass and related effects.

Anyhow, for now, looking for the configuration aspects and what I can accomplish with a simpler-generated model.

Thank you...

Best regards,

Michael
0

ModelViewer Example

Anonymous 12 years ago updated by anonymous 8 years ago 1
This discussion was imported from CodePlex

xion wrote at 2012-04-04 00:26:

Hi Objo,

fine work all the Helix stuff! Keep it up, please!

I've noticed differences in displaying .obj files, exported from 3dsmax, between the downloadable compiled example of ModelViewer(Nov2011) and the example in the current source dowload package.

The already compiled version displays the .obj file pretty well, including transparency.
The non-compiled recommended source version fails to display some objects correctly.

There's a bunch of code commented out. When I remove the comments some of the code is buggy (list1, fileModelVisual3D.Children)

Could you please give a feedback on it?

Thanks and regards, xion.


objo wrote at 2012-04-05 01:32:

hi xion, can you provide some simple .obj test files that renders incorrectly? We have tried to solve some texture/transparency bugs since the november version, but there is probably some work left... Also, some features of the .obj format (smoothing groups?) are not yet supported.


xion wrote at 2012-04-06 17:29:

Yes I can provide the .obj file. Send you a p.m. with a downloadlink.


objo wrote at 2012-04-07 23:13:

Thanks, I think I found the bug - the "Tr" setting in the material file should set the material opacity to 1-Tr.


xion wrote at 2012-04-08 00:35:

Thats interesting! Is it a buggy .mtl file? I used the latest 3dsmax design to export the file.

Expression Blend (MS) has the same problems on import these obj/mtl files.


objo wrote at 2012-04-08 00:39:

sorry, I thought the error was in the helix interpreter, but then I checked the spec:

d alphadefines the transparency of the material to be alpha. The default is 1.0 (not transparent at all) Some formats use Tr instead of d;Tr alphadefines the transparency of the material to be alpha. The default is 1.0 (not transparent at all). Some formats use d instead of Tr;
Your file has d=1 and Tr=0 for the same material - which should be an error.
I can add a "SkipTransparencyValues" property on the importer if this is a common error for files exported from 3dsmax.

objo wrote at 2012-04-08 01:08:

I have added a "SkipTransparencyValues" property to the "ObjReader". I also added support for smoothing groups.


xion wrote at 2012-04-08 11:44:

Thank you! 2012.2.2.1.46 shows all materials correctly. Thats great!

In 3dsmax the transparency value is called Opacity, which is set to 100% if the material is non-transparent. Maybe here's the clue.


objo wrote at 2012-04-08 13:05:

Good! 

Opacity 100% should be exported as d = 1.0 or Tr = 1.0 if the wikipedia spec is correct. I think the exporter you are using will export d=1.0 and Tr=0.0.

See http://en.wikipedia.org/wiki/Material_Template_Library

0

TubeVisual3D and Material

Anonymous 12 years ago 0
This discussion was imported from CodePlex

jacobya wrote at 2012-01-12 23:19:

Hi,

Let me first start off by saying thank you very much for your efforts and for sharing this code, it is a tremendous piece of software and exceptionally well written.  I'm wondering if you can give me your advice on how to accomplish the following: 

I'm using the TubeVisual3D class to represent a pipe and what I'd like to do is draw a colored circle at a specific location on the surface of the pipe.  Any suggestions on how this could be done, is there something in the existing library that would allow me to do this?  I'm currently looking at using the Material attribute of the TubeVisual3D to accomplish this, but I'm not sure if this is the best approach.

Again, thanks very much, great work.

Jason


objo wrote at 2012-01-13 19:47:

You could do this by a rendering the circle to a bitmap and use that as a texture. But the edge of the circle will not look very sharp when zooming close, and it could be challenging to calculate the right texture coordinates.

I think it would be better to render the circle(s) as a separate mesh slightly outside the tube, but then the challenge is to calculate the 3D coordinates... Look at how the tangents and normals are calculated in the tube implementation, I hope this can help!


jacobya wrote at 2012-01-13 20:56:

Hi objo,

Thanks for the advice, I will look at rendering the circle as a separate mesh slightly outside the tube.  I seem to be having difficulty applying a Material to the TubeVisual3D class.  Am I doing something wrong here?  In this case the tube shows up completely green:

<Window x:Class="PipeDemo.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ht="clr-namespace:HelixToolkit.Wpf;assembly=HelixToolkit.Wpf"
     Title="Pipe Demo" Height="480" Width="640">
	<Window.Resources>
		<MaterialGroup x:Key="dm1">
			<DiffuseMaterial>
				<DiffuseMaterial.Brush>
					<LinearGradientBrush StartPoint="0, 0.5" EndPoint="1, 0.5">
						<LinearGradientBrush.GradientStops>
							<GradientStop Color="Yellow" Offset="0" />
							<GradientStop Color="Red" Offset=".25" />
							<GradientStop Color="Blue" Offset=".50" />
							<GradientStop Color="LimeGreen" Offset=".75" />

						</LinearGradientBrush.GradientStops>
					</LinearGradientBrush>
				</DiffuseMaterial.Brush>
			</DiffuseMaterial>
		</MaterialGroup>
	</Window.Resources>
	<Grid>
		<ht:HelixViewport3D ZoomExtentsWhenLoaded="True" PanGesture="LeftClick"  >
			<ht:SunLight  />
			<ht:GridLinesVisual3D/>
			<ht:TubeVisual3D Path="{Binding Pipe}" Diameter="5" IsPathClosed="False" Material="{StaticResource dm1}" BackMaterial="{StaticResource dm1}" />
		</ht:HelixViewport3D>
	</Grid>
</Window>

 and my code:

public IList<Point3D> Pipe { get; set; }
		
public Window1()
{
	InitializeComponent();
	Pipe = this.CreatePath();
	DataContext = this;
}



private IList<Point3D> CreatePath()
{
	List<Point3D> list = new List<Point3D>();
	for (int i = -5; i < 5; i++)
	{
		list.Add(new Point3D(i * 10, 0, 5));
	}
	return list;
}

 



objo wrote at 2012-01-13 21:10:

I see the TubeVisual3D is not currently supporting texture coordinates. 

I will add a Values property where you can set the texture X (u) coordinates. The Y value (around the tube) is difficult to define and will simply be linear from 0 to 1.

You can also create the tube geometry by MeshBuilder.AddTube (where you also can specify the diameters along the tube).


jacobya wrote at 2012-01-19 03:53:

Hi objo,

Thanks for adding the TextureCoordinates property to the TubeVisual3D class, I also see that you added a Diameters property as well.  I'm still not sure how to apply a texture to a TubeVisual3D though, would it be possible for you to give me a very simple example?  I basically want to apply a RadialGradientBrush to a TubeVisual3D, any advice you can provide is greatly appreciated.

Thanks


objo wrote at 2012-01-19 10:53:

see the "StreamLinesDemo" example. It is currently using MeshBuilder.AddTube, but could now be rewritten to use the TubeVisual3D. The example uses a linear gradient brush (hue colours) in the material, and uses the streamline velocities (scaled to [0,1]) as "values" (first texture coordinate). It is difficult to control the position of the texture around the tube (second texture coordinate) (unless we specify a normal direction for each point of the path), so I am currently only using "1-dimensional" textures.

0

Using MeshBuilder for bounding box in MVVM

Anonymous 12 years ago 0
This discussion was imported from CodePlex

ahmad_luqman wrote at 2013-04-02 15:06:

I want to create a bounding box in helix view port in MVVM.

My ViewModel has this:
var size = 6000;
var axesMeshBuilder = new HelixToolkit.Wpf.MeshBuilder();
var bb = new Rect3D(-1 * size / 2, -1 * size / 2, -1*size, size, size, size);
axesMeshBuilder.AddBoundingBox(bb, 10);
Box = axesMeshBuilder.ToMesh();
Which sets the Geometry3d type Box property in ViewModel:
public Geometry3D Box { get; set; }
And the Xaml View has:
         <h:HelixViewport3D>
            <h:SunLight />
            <ModelVisual3D>
                <ModelVisual3D.Content>
                    <GeometryModel3D Geometry="{Binding Box}" Material="{h:Material Black}"/>
                </ModelVisual3D.Content>
            </ModelVisual3D>
        </h:HelixViewport3D>
This works but unit tests on ViewModel fails with exception:
System.ServiceModel.CommunicationObjectAbortedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it has been Aborted.
This is because I am setting the MeshBuilder in View Model. Ideally this logic should be in Xaml View. Can you suggest how can I move the MeshBuilder logic to XAML and bind to Rect3d?

Something like this:
         <h:HelixViewport3D>
            <h:SunLight />
            <ModelVisual3D>
                <ModelVisual3D.Content>
                    <GeometryModel3D Material="{h:Material Black}">
                        <!--Mesh Builder logic here -->
                    <GeometryModel3D />
                </ModelVisual3D.Content>
            </ModelVisual3D>
        </h:HelixViewport3D>
In case if the above answer is no we can't do that, alternatively how can we draw similar bounding box following MVVM?

ahmad_luqman wrote at 2013-04-02 15:40:

I think I got it.
This works:
<h:BoundingBoxVisual3D Diameter="10" BoundingBox="{Binding Box}" Fill="White"/>
Thanks for the cool library.
0

importing Geometry3D

Anonymous 12 years ago updated by anonymous 9 years ago 0
This discussion was imported from CodePlex

medecai wrote at 2012-04-23 17:56:

 

Hey there,

first of all, i want to thank you for providing such an awesome Toolkit!

Second I have a question concerning the ModelImporter. I was using the beta (helixToolkit-release) for some time now and it was possible to import Geometry3D data by:

  private Geometry3D LoadGeoFromFile(string objPath)
        {
            Model3DGroup group = ModelImporter.Load(objPath);
            GeometryModel3D model = group.Children[0] as GeometryModel3D;
           
            return model.Geometry;

        }

I could afterwards bind the Geometry in Wpf like

 <helix:HelixViewport3D>
                <ModelVisual3D>
                    <helix:DefaultLights/>
                    <ModelVisual3D.Content>
                        <GeometryModel3D Geometry="{Binding TestFile}" Changed="GeometryModel3D_Changed">
                            <GeometryModel3D.Material>
                                <DiffuseMaterial>
                                    <DiffuseMaterial.Brush>
                                        <SolidColorBrush Color="Gray"/>
                                    </DiffuseMaterial.Brush>
                                </DiffuseMaterial>
                            </GeometryModel3D.Material>
                        </GeometryModel3D>
                        
                    </ModelVisual3D.Content>
                </ModelVisual3D>
            </helix:HelixViewport3D> 

and was therefore able to display the geometry just with a plain brush (to improve performance). Right now I tried
the newest source code (to check if loading times etc. improved) but the described procedure isn't working anymore.
The ViewPort only shows parts of the whole model at best.
Did something substantial change which could forbid this way of doing it or is it just a minor thing which I am not seeing ('cause
I am still starting to learn programming)?

Cheers

Mede

 

objo wrote at 2012-04-25 07:08:

What kind of file are you importing? It should still be possible to extract the geometry from the returned Model3D, but I don't think you should depend on this being in Children[0] (an imported file could contain more than one GeometryModel3D).


medecai wrote at 2012-04-25 13:19:

 

Obj.-Files exportet by blender. And you are, of course, completely right concerning the number of geometries in the file. Which is most likely the problem of most models not be shown correctly . For me it seemed to be the easiest way to include lots of models/geometries and be able to transform them in relation to each other by binding (in Wpf), like moving an arm for example. Somehow it was working just fine for the beta-release of helix toolkit.

Seems that I have to find out how I can bind to different models and transform them the correct way =)

 

EDIT: I found a workaround:

 

private Geometry3D LoadFromFile(string objPath)
        {
            Model3DGroup group = ModelImporter.Load(objPath);
            MeshBuilder TestMesh = new MeshBuilder(false, false);


            foreach (var m in group.Children)
            {
                var mGeo = m as GeometryModel3D;
                var mesh = (MeshGeometry3D)((Geometry3D)mGeo.Geometry);
                if (mesh!=null) TestMesh.Append(mesh);
            }
            return TestMesh.ToMesh();

        }

Seems to work fine. Or am I again missing something?

 

Btw. Again: this toolkit is just great! Whenever I think I just don't now how the hell I should accomplish something I find again some nice method to help. =)

0

How to clone a Helix UIElement...?

Anonymous 12 years ago 0
This discussion was imported from CodePlex

BogusException wrote at 2014-08-22 20:08:

How can I change this stock (non-Helix) function to work with things like CubeVisual3D?

Right now I get

Value of type 'Helixtoolkit.Wpf.CubeVisual3D' cannot be converted to 'System.Windows.UIElement'. ...which makes sense. Any thoughts?
  • To Be Clear: I don't want to change the cube's type at all, but merely be able to clone it in the way below, returning the correct UIElement equivalent in the Helix namespace...*
    Public Function CloneElement(ByVal orig As UIElement) As UIElement
        If orig Is Nothing Then
            Return (Nothing)
        End If
        Dim s As String = System.Windows.Markup.XamlWriter.Save(orig)
        Dim stringReader As New StringReader(s)
        Dim xmlReader As XmlReader = XmlTextReader.Create(stringReader, New XmlReaderSettings())
        Return CType(System.Windows.Markup.XamlReader.Load(xmlReader), UIElement)
    End Function
The call to this function looks like this (pardon this editor's formatting):
Task.Factory.StartNew(
    Function() { 
        Dispatcher.BeginInvoke(New Action(Sub()
            Dim clone As CubeVisual3D = CType(CloneElement(cube1), CubeVisual3D)
            Messenger.Default.Send(Of HelixToolkit.Wpf.CubeVisual3D)(cube1) ' sends to AddAChildMvvm()
    End Sub))})
It's a threading problem, and the Function creates an instance of the cube in thsi thread, not the thread it was originally created under/in.

Thanks!

pat
:)