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

Any Help

Anonymous 10 years ago 0
This discussion was imported from CodePlex

elkhalafy wrote at 2013-08-06 12:56:

peace on U

brothers, I want to create 3d modelling app with helix so can I do that with helix TK, or anyone know library for .net and compatible with Helix 3d TK for 3d modelling ?

I want anyone help me ,
Thanks,

elkhalafy wrote at 2013-08-09 14:03:

No answers ,

OK I want make modelling WPF 3D APIs with support of helix TK

Mrme wrote at 2013-08-12 15:52:

I can't see a question here. just go use helix and when you have troubles come back to ask
0

CompositionTarget.Render and ZoomExtents

Anonymous 10 years ago 0
This discussion was imported from CodePlex

Badgor wrote at 2013-11-01 19:43:

Hello,

This is probably a trivial problem, but I'm new to C# and WPF, and I've been scratching my head for some time now.
I'm using a CompositionTarget.Render, such that I can disable and re-enable some parts of the rendering (think I got this from the Points and Lines example).

Before I got all this to work, I used the Loaded += MainWindow_Loaded like in a lot of the examples. This included the ZoomExtents. A neat little feature.

I would like to know how I can incorporate this with the Compositiontarget.Render.

Some code below.
        public MainWindow()
        {
            InitializeComponent();
            DataContext = this;
            CompositionTarget.Rendering += this.OnCompositionTargetRendering;            
       }
        void OnCompositionTargetRendering(object sender, EventArgs e)
        {

            if (ShowEdges && lines == null)
            {
                lines = new LinesVisual3D { Color = Colors.Red };
                view.Children.Add(lines);
            }
            if (!ShowEdges && lines != null)
            {
                lines.IsRendering = false;
                view.Children.Remove(lines);
                lines = null;
            }
            if (ShowFaceNormals && faceNormals == null)
            {
                faceNormals = new LinesVisual3D {Color = Colors.Purple};
                view.Children.Add(faceNormals);
            }
            if (!ShowFaceNormals && faceNormals != null)
            {
                faceNormals.IsRendering = false;
                view.Children.Remove(faceNormals);
                faceNormals = null;
            }
            if (ShowFaces && faces==null)
            {
                faces = new ModelVisual3D
                {
                    Content = new GeometryModel3D
                    {
                        Material = Materials.Red,
                        BackMaterial = Materials.Blue
                    }
                };

                view.Children.Add(faces);
            }
            if (!ShowFaces && faces != null)
            {
                view.Children.Remove(faces);
                faces = null;
            }

            if (lines != null)
            {
                createWireframe();
            }
            if (faceNormals != null)
            {
                createFaceNormals();
            }
            if (faces != null)
            {
                createFaces();
            }
        }
0

PipeVisual3D is transparency issue

Anonymous 10 years ago updated by anonymous 5 years ago 0
This discussion was imported from CodePlex

Mrme wrote at 2013-11-04 14:26:

hi,
I added some models first and then added a PipeVisual3D , when I make the PipeVisual3D transparent by changing the Material and BackMaterial opacity, those models I added first appear just fine inside the pipe when I look from outside side, but if I added some models after I already add the PipeVisual3D, none of these appear , it looks transparent but it actually it is not , I would appreciate any clue

RobPerkins wrote at 2013-11-05 17:34:

You must manually control the order of the Visual3D elements which you add to the scene, since WPF doesn't do transparency in the same way as OpenGL or even DirectX.

Add your Visual3Ds in order of decreasing opacity to get the right effects.

Rob

Mrme wrote at 2013-11-05 18:43:

Thanks for your reply, Opacity is just for the PipeVisual3D, so the models are always with Opacity = 1, I don't have the choice here, the users want to be able to add some models/PipeVisual3D and delete them at any time, as I understood from your post , I have always to make sure that the models have to be as if they were added first, when I add a new model and change it's position on the tree,would that solve my problem ?
Thanks

RobPerkins wrote at 2013-11-06 15:02:

Yes, it's just as you described. WPF renders the elements in list order. Just make sure the elements with less opacity are last in the list.

At times, I do this by specifying one list of Visual3Ds for the opaque stuff, and a second list for the non-opaque, stuff, and lay that out in the XAML. That pretty much guarantees the right behavior.

Rob

a5r wrote at 2013-11-06 15:24:

maybe you can use ElementSortingHelper.SortModel(Point3D position, IList<Visual3D> model);
0

SharpDx version 2.5?

Anonymous 10 years ago 0
This discussion was imported from CodePlex

activity1 wrote at 2013-12-19 21:18:

Hi,
the fork for SharpDx is on version 2.4.0.
My need is to add DirectD2D1 library, but I only have it since 2.4.2. However, when I change Helix3D/SharpDx to either 2.4.2 or 2.5 (latter needs modifications in Helix.SharpDx), only a white page is rendered.
Q1: Is that normal? I am using Windows7.
Q2: Are there plans to update, or is that the reason why it is on old version?
Q3: Else, my problem is that I do not find the D2D1 lib for SharpDx 2.4.0 on the web, could somebody please help or advise.

Thanks a lot in advance,
Helix3D is a great help,
rüdiactivity

objo wrote at 2014-01-07 22:28:

pm knows more about this fork than myself.
Q2: I think we should follow the latest stable version of SharpDx
0

How to implement the VisualHelper.TraverseModel for loaded model

Anonymous 10 years ago 0
This discussion was imported from CodePlex

mateovidro wrote at 2013-03-07 22:32:

Hi obj,
I try to use Visualhelper Class to subdivide the model graph of my imported model (.stl).
I try to use the Subdivision project and modify the UpdateModel(), but I get the triangle subdivision but not efect in the loaded model(Visual)
private void Load(string model) {
CurrentModel = ModelImporter.Load(model);

Visual3DHelper.TraverseModel<Model3D>(CurrentModel, ????);

I like the way to smoothing meshes but in code behind, loaded from database. Or any help!!

Thanks
0

Mesh reduction

Anonymous 10 years ago 0
This discussion was imported from CodePlex

pDeac wrote at 2014-08-20 14:49:

Hello,

Is there any build in support in Helix 3D for reducing the triangles of a mesh geometry ?

Thanks
Paul

objo wrote at 2014-08-22 21:55:

Sorry, no. Only the opposite :-)
We could add a feature request. Does anyone know how to do this?
0

Camera Controller - key board input for panning

Anonymous 10 years ago 0
This discussion was imported from CodePlex

Tungsten wrote at 2012-04-26 18:26:

Firstly, thank you for the great work.

 

My question relates to the behavior of the keyboard panning (shift-arrows).

Clicking left causes the camera to move to the right (model moves to the left).  I realize this is is just a difference in perspective, however feedback I have received indicates that this is counter-intuitive to them.  These folk are video game players in which the more common pan would yield the camera moving in the same direction.

 

Would it be possible to have an inversion property added?  I investigated stealing keyboard events or overriding gestures, but the camera controller is attaching itself to the keydown event directly.  The only option I found is to disable panning, however I still need panning to occur via addPanForce (which I invoke directly from an onscreen controller I created).

 

Thanks.


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

I added a LeftRightRotationSensitivity property. Try to set this to -1 to invert the keys. 


Tungsten wrote at 2012-04-27 00:17:

Thank you for the quick response.

 

The LeftRightPanSensitivity and UpDownPanSensivity are exactly what I need, however did you intend to not add the template bindings for all 5 new sensitivity properties (the 2 rotations were added).   I am applying the properties to the CameraController directly for now.


objo wrote at 2012-04-27 06:48:

Of course, I had forgotten the 3 last ones. Thank you, fix submitted.

0

Rotate camera

Anonymous 10 years ago updated by ไอยดา สุรีวงค์ 4 years ago 1
This discussion was imported from CodePlex

solcruiser wrote at 2011-12-12 15:03:

Hi,

how can i rotate the camera in per code?

i can't find any methods for that in CameraController.

(or schould i use wpf's RotateTransform3D)

greetz chris


objo wrote at 2011-12-13 18:46:

you can use the "AddRotateForce" method - that's what the keyboard bindings are using.

If you need more custom rotations, I suggest you create a Quaternion and do the rotations on the LookDirection and Camera Position.

You find the camera rotation transformations in the RotateHandler class.

0

error in deisgner: The type 'HelixToolkit:HelixViewport3D' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built

Anonymous 10 years ago 0
This discussion was imported from CodePlex

Noylene wrote at 2013-01-21 14:47:

why do I have this error when opening XAML designer in any example project, or creating my own (adding reference manually or with Nuget, doesn't matter)?

In editor IntelliSense 'knows'  namespace HelixToolkit but don't know anything inside it

Beside this, project compiles and runs

VS2010, .Net 4.0


mannest wrote at 2013-01-25 06:47:

I have same problem.

Did you build HelixToolkit.Wpf_NET40 project in x64 platform?

In my case, no problem in x86 platform built.

Anyway, I don't know how to solve that problem in x64 platform.


Noylene wrote at 2013-01-25 07:07:

No, it's x86, WinXP


JohnSourcer wrote at 2013-01-25 07:10:

It's a known problem and doesn't affect the build. There are several reports of this and workarounds/solutions. Most common seems to be issues with 64 bit vs 32 bit builds and dll's.

0

Help using Meshbuilder to create a line between two spheres

Anonymous 10 years ago 0
This discussion was imported from CodePlex

pyrrhicpk1 wrote at 2012-10-15 11:40:

Hi,

I am using the following code to draw a sphere in HelixViewport3D. Now I want to create a 3D line between two spheres. Any suggestions please.

Thanks

var meshBuilder = new MeshBuilder(false, false);
meshBuilder.AddSphere(new Point3D(0, 0, 0), 0.1f, 10, 10);
var mesh = meshBuilder.ToMesh(true);
modelGroup = new Model3DGroup();
var greenMaterial = MaterialHelper.CreateMaterial(Colors.Green);
var insideMaterial = MaterialHelper.CreateMaterial(Colors.Yellow);

            mygeometry = new GeometryModel3D();
            mygeometry.Material = greenMaterial;
            mygeometry.BackMaterial = insideMaterial;
            mygeometry.Geometry = mesh;

           modelGroup.Children.Add(mygeometry);    

           myModelVisual3D = new ModelVisual3D();
           myModelVisual3D.Content = modelGroup;

           myview.Children.Clear();
           myview.Children.Add(myModelVisual3D);


objo wrote at 2012-10-16 15:36:

use a cylinder? See MeshBuilder.AddCylinder

To draw a line, try LinesVisual3D.


pyrrhicpk1 wrote at 2012-10-17 03:58:

Thanks.

Much appreciate.