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

Line are invisible for AddBoundingBox with opacity

Niteen 11 years ago updated by Lucas Silva 11 years ago 7
We have create the model in helix3Dviewport and added AddBoundingBox into this view port.
my issues is when i zoom-in and zoom-out the model the AddBoundingBox lines are not displayed completely , it is displayed in dotted lines .
we have user the AddBoundingBox function with parameter rect3D and opacity is 2.

here is my code..

Private Function CreateDice(ByVal rect3D As Rect3D, ByVal brush As Brush) As ModelVisual3D
Dim diceMesh = New MeshBuilder() diceMesh.AddBoundingBox(rect3D, 2)
Dim GeometryModel3D = New GeometryModel3D()
GeometryModel3D.Geometry = diceMesh.ToMesh(True)
GeometryModel3D.Material = MaterialHelper.CreateMaterial(brush)
Dim ModelVisual3D = New ModelVisual3D()
ModelVisual3D.Content = GeometryModel3D
Return ModelVisual3D

End Function


how to resolve this lines issue..

0

Drawing arrows

Anonymous 12 years ago 0
This discussion was imported from CodePlex

AnotherBor wrote at 2014-01-03 14:58:

Hi,

I have a question about LineVisual3D.
Is there a way to add tiny arrow head at the end of the line segment(s)?

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

I think this must be implemented in a new class similar to the LinesVisual3D. Each segment should then be defined by 3 triangles, and the 3 extra coordinates should be calculated a similar way as in LineGeometryBuilder.CreatePositions

AnotherBor wrote at 2014-01-08 02:18:

Yeah I figured that out but was just hoping so much that you say something like "there is this innocent looking property which you could use to..." :D
I checked how LineGeometryBuilder does the computations and it's beyond what I can tackle in my time frame allotted for this.

a5r wrote at 2014-01-08 22:21:

Petzold line class has this functionality. Maybe you can reuse it for your own needs.

AnotherBor wrote at 2014-01-09 04:45:

Yes it is an option but if I remember well Petzold line class is about 25% slower than Helix (with lines only, compared in the PointsAndLinesDemo by looking at the FPS counter).
I will try it out if arrows become a must in my project. For now lines are ok.

everytimer wrote at 2014-07-21 09:19:

Could someone provide an example using Petzold line to display a visual arrow? Thank you very much
0
Answered

How to remove center target symbole

Anonymous 12 years ago updated by Sarah Lauren 3 months ago 3
This discussion was imported from CodePlex

wakes wrote at 2014-06-05 14:21:

Dear all,
I have suind demo of this toolkit in one of my project but in a collaborative application form, the center target which appears when you touch or click with mouse is enoying people sometimes.

Is there a way to hide this symbola as well as the box at bottom right corner ?

thanks
regards

Der_Meister wrote at 2014-08-25 09:48:

ShowCameraTarget="False" ShowViewCube="False"
0

Transparent without colour problem

Anonymous 12 years ago 0
This discussion was imported from CodePlex

duongthaiha wrote at 2013-05-01 12:42:

Hi
I am new to Helix and trying to create a simple box with transparent at run time with C#. I can see the box showing with transparency but there is no colour on the box. I dont know if i did anything wrong in my small piece of code:
        Objects = new ObservableCollection<Visual3D>();
        Objects.Add(new GridLinesVisual3D());
        var color = Color.FromArgb(0x80, Colors.Red.R, Colors.Red.G, Colors.Red.B);

        var b = new BoxVisual3D()
            {
                Width = 10,
                Length = 10,
                Height = 10,

            };

        var brush = new SolidColorBrush();
        brush.Color = color;
        b.Fill = brush;
        Objects.Add(b);

Thank you very much in advance.
Best regards

objo wrote at 2013-05-08 15:37:

  1. Did you add lights to your model?
  2. I checked the BoxVisual3D class with
<ht:BoxVisual3D Width="10" Height="10" Length="10" Fill="#80FF0000"/>
and this works fine

Note that you cannot get 100% correct visualization of transparency for a box in WPF...

You could also use the ChangeAlpha extension method: b.Fill = new SolidColorBrush(Colors.Red.ChangeAlpha(0x80))
0

Current position

Anonymous 12 years ago 0
This discussion was imported from CodePlex

eugenco wrote at 2012-06-10 16:00:

What is current position property and how to work with it.

0

Click Rotation

Anonymous 12 years ago 0
This discussion was imported from CodePlex

chimou wrote at 2013-05-14 18:52:

First of all I would like to thank you for this great job.
In my scene i have tow superposed CubeVisual3D like this :
<ht:CubeVisual3D x:Name="plateau" Width="140" Length="180" Height="15" Center="0 0 -5" TopFace="False" BottomFace="False" Fill="SteelBlue">
            <ht:CubeVisual3D.Children>
                <ht:GridLinesVisual3D Width="140" Length="180" MinorDistance="5" Center="0 0 -11" Fill="SteelBlue"></ht:GridLinesVisual3D>
            </ht:CubeVisual3D.Children>
        </ht:CubeVisual3D>

        <ht:CubeVisual3D x:Name="Cover" Width="140" Length="180" Height="15" Center="0 0 10" TopFace="False" BottomFace="False" Fill="#4C58ABF0">                
            <ht:CubeVisual3D.Children>
                <ht:GridLinesVisual3D Width="140" Length="180" MinorDistance="5" Center="0 0 17" Fill="SteelBlue" Thickness="1"></ht:GridLinesVisual3D>
            </ht:CubeVisual3D.Children>

        </ht:CubeVisual3D>
for this moment i rotate le outside CubeVisual3D called "Cover" like this :
<ht:BindableRotateManipulator x:Name="Rotation1" InnerDiameter="1" Diameter="5" Length="175" Position="0 70 2 " Color="SteelBlue"
                                      Value="{Binding CoverRotateValue}" 
                                      Axis="-1 0 0" AllowDrop="True" TargetTransform="{Binding ElementName=Cover, Path=Transform}">
I want please enable rotation by a click on the Cube called "Cover", Is It possible ??
thank you in advance

objo wrote at 2013-06-07 11:54:

CubeVisual3D is based on ModelVisual3D and does not support click events. I think you need to create a Visual3D based on ModelUIElement3D to handle mouse clicks on a cube.

Try setting IsHitTestVisible = false on the manipulator to disable it (but I think a "Enabled" property on the Manipulator class could be a good idea!)
0

Wireframe Cube using PipeVisual3D or LinesVisual3D ?

Kumaran M 12 years ago 0
I am trying to create a wire-frame cube using PipeVisual3D. Everything works fine.
I have to use 12 PipeVisual3D objects for a cube. But, if I use LinesVisual3D, then only one object is enough to draw that. 
but the LinesVisual3D is not getting refreshed automatically. I am using mouse drag/drop event to draw a wireframe cube. After drawn, I have to zoom in/out using mouse wheel to refresh the view to get the LinesVisual3D object.
but PipeVisual3D is drawn while moving the mouse.

so, how to auto draw or refresh the LinesVisual3D manually?
0

How to Configure HelixToolkit in our project

Anonymous 12 years ago 0
This discussion was imported from CodePlex

GhufranZahidi wrote at 2012-11-15 06:59:

Hi I am New to WPF 3D please tell me How to Build Helixtooll kit with our project


objo wrote at 2012-11-15 19:53:

I recommend using the Nuget package!

The main solution has been ugraded to VS2012 and .NET 4.5, but there is also a solution for VS2010 and .NET 4.0.

0

HelixToolkit.Wpf 'System.OutOfMemoryException' was thrown

Anonymous 12 years ago 0
This discussion was imported from CodePlex

Moez_rebai wrote at 2014-07-16 14:28:

Hello.
Sometimes i tried to add a Mesh3D to the Mesh property of a MeshVisual3D, I get this exception:
'System.OutOfMemoryException' was thrown'

The code
            MeshGeometry3D modeltodraw = new MeshGeometry3D();
            // fill modeltodraw 
            var originalMesh = new Mesh3D(modeltodraw.Positions, modeltodraw.TriangleIndices);
            var bounds = originalMesh.GetBounds();
            var l = Math.Max(bounds.Size.X, Math.Max(bounds.Size.Y, bounds.Size.Z));
            model1.Mesh = null;
            try
            {
                model1.Mesh = originalMesh;
            }
            catch (System.Exception ex)
            {
                System.Windows.Forms.MessageBox.Show( ex.Message);
            }
The Mesh3D seems to be a little bit huge :

Edges Count = 125631
Faces Count = 612956
Vertices Count = 125631

Any idea why i got this exception

Best Regards,

everytimer wrote at 2014-07-16 21:22:

I haven't used MeshVisual3D yet but I think it creates a geometry from your mesh. The geometry is made with cylinders and spheres for the vertices and edges. So each edge/vertex converts into several (maybe 10-50 times more complex). So I think it's normal for you to get that exception as your computer can't handle it.

If you really need to see your mesh I recommend LinesVisual3D. It's not the best but you will be able to see your huge mesh with that. Good luck

Moez_rebai wrote at 2014-07-17 09:25:

Thanks for your reply, but did you know how to create mesh from Positions and TriangleIndices using LinesVisual3D .

BogusException wrote at 2014-07-18 00:08:

@Moez_rebai,

Do you run Anvir, or even Task Manager to see which resources are expended? I think there is a memory debugger built into VS I read about, but never used. I use the threading one all the time, though. I think you can 'profile' your app, and it will show you over time how it is performing.

Check out the "ANALYZE" pull-down menu in VS, too!

pat
:)
0

Exporting images from diffrent views of a 3D object

Samuel Medhat 11 years ago updated by ไอยดา สุรีวงค์ 5 years ago 1

Hello,

I'm using ModelViewer example to view 3D objects and extract PNG images for them. Is there a way to modify it so that when I extract an image it automatically rotates the object for 45 degrees , export another image and so on untill it completes 360 degrees? I.e. 8 images will be automatically produced for different views for the object.

Sincerly,

Samuel Farid