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

Tubidy mobile Video Search

tube 7 years ago updated by anonymous 6 years ago 1

Tubidy Mobile Music, free video clip and opens the doors wide and use many of the facilities you about your interests, which allows a highly reliable site. You can benefit from this site free music and videos you can watch. Tubidy remaining featured or in the background, makes the transition with the new style with the striking currents. Baroque, extreme music, electronic music, swing, rap, popular, metal, fuak, rock, pop, hip-hop style are just a few of many other types of music such as this.Tubidy MP3 music download any music you want can be a member of the site you can reach with your system.

0

Unable to run WPF.SharpDX demos

Van 7 years ago updated 7 years ago 1

I am trying to evaluate helixtoolkit for use in an existing WPF application. I cloned the repo and compiled everything, but when I try to execute any of the WPF.SharpDX examples I get an error message in the application:


System.InvalidOperationException: Cannot call this method without a back buffer.
   at System.Windows.Interop.D3DImage.AddDirtyRect(Int32Rect dirtyRect)
   at HelixToolkit.Wpf.SharpDX.DPFCanvas.UpdateAndRender() in C:\helix-toolkit\Source\HelixToolkit.Wpf.SharpDX\Controls\DPFCanvas.cs:line 753


However, I think this is a bit misleading. When I look at the code, it is failing on line 102 of DX11ImageSource:


this.renderTarget = new Texture(DX11ImageSource.device, target.Description.Width, target.Description.Height, 1, Usage.RenderTarget, format, Pool.Default, ref handle);      

With the following exception thrown: 


'SharpDX.SharpDXException' in SharpDX.dll
HRESULT: [0x80070057], Module: [General], ApiCode: [E_INVALIDARG/Invalid Arguments], Message: The parameter is incorrect.


I even tried making my own possibly simpler project and using NuGet to import the helixtoolkit libraries and I get the same error. At home I can execute everything on my personal computer so it appears to be some (mis)configuration on my work laptop. Both machines are Windows 10, using VS2017 with AFAIK updated drivers. I'm not sure where to go from here to diagnose the error.


I have also tried Microsoft's WPF DirectX Extensions (https://github.com/Microsoft/WPFDXInterop) and it works properly. Finally, I tried compiling SharpDX but it doesn't include any sample code for me to run. If anyone has any suggestions, I'd love to hear them.

0

Problem with transparent background at TextVisual3D

MarioR 7 years ago 0

Hello,

is it correctly that the TextVisual3D only display the transparent backgorund from last insert TextVisual3D?



        <helix:HelixViewport3D ZoomExtentsWhenLoaded="True" ShowCoordinateSystem="True"  CameraMode="Inspect">
            <helix:SunLight />
            <helix:TextVisual3D Position="1,-1,1" Text="Hello"  Foreground="Aqua" Background="Transparent" UpDirection="0,0,1"  Height="1"/>
            <helix:GridLinesVisual3D Width="10" Length="10" MinorDistance="1" MajorDistance="1" Thickness="0.01"/>
            <helix:SphereVisual3D Center="0,0,0" Radius="0.5" />
            <helix:EllipsoidVisual3D Center="3,3,3" RadiusX="2" RadiusY="3" RadiusZ="4" />
        </helix:HelixViewport3D>

Image 97




        <helix:HelixViewport3D ZoomExtentsWhenLoaded="True" ShowCoordinateSystem="True"  CameraMode="Inspect">
            <helix:SunLight />
            <helix:GridLinesVisual3D Width="10" Length="10" MinorDistance="1" MajorDistance="1" Thickness="0.01"/>
            <helix:SphereVisual3D Center="0,0,0" Radius="0.5" />
            <helix:EllipsoidVisual3D Center="3,3,3" RadiusX="2" RadiusY="3" RadiusZ="4" />
            <helix:TextVisual3D Position="1,-1,1" Text="Hello"  Foreground="Aqua" Background="Transparent" UpDirection="0,0,1"  Height="1"/>
        </helix:HelixViewport3D>

Image 98



If flip in view from backside is transparency not work on other TextVisual3D.


        <helix:HelixViewport3D ZoomExtentsWhenLoaded="True" ShowCoordinateSystem="True"  CameraMode="Inspect">
            <helix:SunLight />
            <helix:GridLinesVisual3D Width="10" Length="10" MinorDistance="1" MajorDistance="1" Thickness="0.01"/>
            <helix:SphereVisual3D Center="0,0,0" Radius="0.5" />
            <helix:EllipsoidVisual3D Center="3,3,3" RadiusX="2" RadiusY="3" RadiusZ="4" />
            <helix:TextVisual3D Position="1,1,1" Text="Hello"  Foreground="Aqua" Background="Transparent" UpDirection="0,0,1"  Height="1"/>
            <helix:TextVisual3D Position="0.5,1.5,1" Text="Hello"  Foreground="Aqua" Background="Transparent" UpDirection="0,0,1"  Height="1"/>
        </helix:HelixViewport3D>

Image 99

How can i fix it?

regards Mario


0

helixViewport3D

Anonymous8 7 years ago 0

how can I get rid of the box with the letters U and L in the bottom right corner of helixViewPort3D control? 


Image 96


0

SurfacePlotDemo: Points set to Double.NaN cause view cutted

MarcoA 7 years ago updated by ไอยดา สุรีวงค์ 4 years ago 2

I am trying to change the SurfacePlotDemo in which I want to not show a portion of the Points of the Rectangular Mesh. I tried to set the Points to Double.NaN and I can see the surface without the points but the view looks like cutted. The points that I want to exclude are excluded correctly, but the view seems to be cutted at some view angles.



If I rotate the camera the surface is shown correctly
Image 94

Here is the code

  public Point3D[,] CreateDataArray(Func<double, double, double> f)
        {
            var data = new Point3D[Rows, Columns];
            for (int i = 0; i < Rows; i++)
                for (int j = 0; j < Columns; j++)
                {
                    var pt = GetPointFromIndex(i, j);
                    data[i, j] = new Point3D(pt.X, pt.Y, f(pt.X, pt.Y)*10);

                    if (i >= 0 && i < 10 && j >=0 && j < 100)
                    {
                        data[i, j] = new Point3D(double.NaN, double.NaN, double.NaN);
                    }

                }
            return data;
        }


Is the only change with respect to the original example.
If I don't set any point to Double.NaN I see the surface correctly shown at any angle.


I am doing this on Windows 10 64bit, if I try on Win7 32 bit the cutting doesn't happen.


Questions:


Is setting points to NaN the correct way to not create parts of the regular mesh?


Are there any instructions to avoid this cutting?




Regards


Marco

0

HelixViewPort3D: How to Adjust FrameRate

Petar 2013 8 years ago 0

How to improve WPF 3D rendering performance with adjusting FrameRate?

0

Combining Contours

Nathan Smela 8 years ago updated by ไอยดา สุรีวงค์ 4 years ago 1

Heya All,


I want the total contour of a mesh as if viewing from top-down on the z axis.  I grab a contour every 1 mm on the z axis, and then move all points to 0 z-axis.  Is there a method to contour around these points?


private void AddContours(MeshGeometry3D mesh)
        {
            //abort if the mesh is invalid
            if (mesh == null || mesh.TriangleIndices.Count < 3)
                return;


            var bounds = mesh.Bounds;


            List<Point3D> pointmap = new List<Point3D>(); //collects all the points from contouring


            //setting the contour plane

            Point3D plane = new Point3D();
            Vector3D normal = new Vector3D(0,0,1);


            //cycles through the mesh, grabbing a contour at each z interval
            //combines all on 0 on the z-axis
            for (double z = 0.1; z < bounds.SizeZ; z += 0.1)
            {
                plane = new Point3D(0, 0, z);
                var segments = MeshGeometryHelper.GetContourSegments(mesh, plane, normal).ToList(); //calculates the contour 

                foreach (var point in segments)
                   pointmap.Add(new Point3D(point.X, point.Y, 0));
            }


           //convert pointmap to a contour


           //done converting contour

         

            var mb = new MeshBuilder(true, false);
            mb.CreateNormals = false;
            mb.AddPolygon(contour);
            
            var model = mb.ToMesh();


            DisplayModel();
        }


0

Error in SampleProject - Helix Toolkit

P S V Ramaraju 8 years ago updated by anonymous 5 years ago 3

When I am trying one of the example name - SimpleDemo in Helix Toolkit I am getting Invalid Markup. The code is this: It is exactly the same in the helix toolkit project.


Code:


MainWindow.xaml: 


<Window x:Class="SimpleDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:HelixToolkit="clr-namespace:HelixToolkit.Wpf;assembly=HelixToolkit.Wpf"
        xmlns:local="clr-namespace:SimpleDemo"
        Title="SimpleDemo" Height="480" Width="640">
    <Window.DataContext>
        <local:MainViewModel/>
    </Window.DataContext>
    <Grid>
        <!-- The HelixViewport3D supports camera manipulation, and can be used just like the Viewport3D -->
        <HelixToolkit:HelixViewport3D ZoomExtentsWhenLoaded="True">

            <!-- Remember to add light to the scene -->
            <HelixToolkit:SunLight/>
            
            <!-- The content of this visual is defined in MainViewModel.cs -->
            <ModelVisual3D Content="{Binding Model}"/>

            <!-- You can also add elements here in the xaml -->
            <HelixToolkit:GridLinesVisual3D Width="8" Length="8" MinorDistance="1" MajorDistance="1" Thickness="0.01"/>

        </HelixToolkit:HelixViewport3D>
    </Grid>
</Window>


MainWindow.cs


// --------------------------------------------------------------------------------------------------------------------
// <copyright file="MainViewModel.cs" company="Helix Toolkit">
//   Copyright (c) 2014 Helix Toolkit contributors
// </copyright>
// <summary>
//   Provides a ViewModel for the Main window.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace SimpleDemo
{
    using System.Windows.Media;
    using System.Windows.Media.Media3D;

    using HelixToolkit.Wpf;

    /// <summary>
    /// Provides a ViewModel for the Main window.
    /// </summary>
    public class MainViewModel
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="MainViewModel"/> class.
        /// </summary>
        public MainViewModel()
        {
            // Create a model group
            var modelGroup = new Model3DGroup();

            // Create a mesh builder and add a box to it
            var meshBuilder = new MeshBuilder(false, false);
            meshBuilder.AddBox(new Point3D(0, 0, 1), 1, 2, 0.5);
            meshBuilder.AddBox(new Rect3D(0, 0, 1.2, 0.5, 1, 0.4));

            // Create a mesh from the builder (and freeze it)
            var mesh = meshBuilder.ToMesh(true);

            // Create some materials
            var greenMaterial = MaterialHelper.CreateMaterial(Colors.Green);
            var redMaterial = MaterialHelper.CreateMaterial(Colors.Red);
            var blueMaterial = MaterialHelper.CreateMaterial(Colors.Blue);
            var insideMaterial = MaterialHelper.CreateMaterial(Colors.Yellow);

            // Add 3 models to the group (using the same mesh, that's why we had to freeze it)
            modelGroup.Children.Add(new GeometryModel3D { Geometry = mesh, Material = greenMaterial, BackMaterial = insideMaterial });
            modelGroup.Children.Add(new GeometryModel3D { Geometry = mesh, Transform = new TranslateTransform3D(-2, 0, 0), Material = redMaterial, BackMaterial = insideMaterial });
            modelGroup.Children.Add(new GeometryModel3D { Geometry = mesh, Transform = new TranslateTransform3D(2, 0, 0), Material = blueMaterial, BackMaterial = insideMaterial });

            // Set the property, which will be bound to the Content property of the ModelVisual3D (see MainWindow.xaml)
            this.Model = modelGroup;
        }

        /// <summary>
        /// Gets or sets the model.
        /// </summary>
        /// <value>The model.</value>
        public Model3D Model { get; set; }
    }
}


Can someone help me in getting through this?

0

Loading .OBJ 3D files

P S V Ramaraju 8 years ago updated by anonymous 6 years ago 6

Hello!!! I am using helix tool kit for one of my visual studio project i.e, loading 3D models. With that I am able to successfully load stl files. Is it possible to load 3d .OBJ files?? Thanks in advance.

0

I put some useful Helix3D functions in a handy DLL

PUPPICAD 8 years ago updated by ไอยดา สุรีวงค์ 4 years ago 1

These functions extend Helix 3D functionality in the areas of Point3D processing, loft generation and saving to STL. They were developed over three years of working on the PUPPI Toolkit and PUPPICAD. Since Helix was a great help to us, we would like to give back by releasing this free library which we plan to update as more functions are developed.


Get the H3DExtensions library and sample project free here:

http://pupi.co/index.php/h3dextensions