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

Show edges with another color

mapa 4 years ago updated 4 years ago 8

Hello,

i am very new to Helix.

it works fine to simple load an *.stl file.


i want to change the color of edges, to better see the triangles .

how i can do this?

Here is the starting code, I think i have to do something here but I do not know what to highlight the edges with another color, black for examble.

what I have to do? i am not able to find a solution in the forum, but i think it is not about the forum it is about that i am very new to helix and do not know what to do...

regards, mapa


System.Windows.Media.Media3D.Model3D newModel3D;
System.Windows.Media.Media3D.Material mat = new System.Windows.Media.Media3D.DiffuseMaterial(System.Windows.Media.Brushes.LightGray);
newModelImporter.DefaultMaterial = mat;
newModel3D = newModelImporter.Load(GetStlFile());

viewer3D = new System.Windows.Media.Media3D.ModelVisual3D();
viewer3D.Content = newModel3D;
............

0

CAR RECOVERY ABU DHABI 24 HOURS

see bas transport 4 years ago updated by ไอยดา สุรีวงค์ 4 years ago 1

Sports Recovery, Battery Changing, Basement Pullout, Towing Service. We Are Best In Here With Our Best And Affordable Service All Over Abu Dhabi. 24/7 customer service. Available On-Call. Services: 24 X 7 Hours Open, Quick And Fast Service.

https://www.seebastransport.com https://www.google.com/maps/place//data=!4m2!3m1!1s0x3e5e38b8ebf4b625:0x9e3d9c9ebc6e1bd?source=g.page.share M01, C271, MBZ City, Musaffah, Abu Dhabi, P.O BOX: 130689, +971 5 44 10 81 81

0

Render object in predefined order

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

Hello,

I try to implement my custom shader technique; In order to get it works, every objects in the scene must be preprocessed in this way: object geometry is split in two part, one part (let's called A) has its own shader, vertex/index buffers, primitivetopology, also the other part (let's called B) has its own shader, buffers.

Now, to apply this technique correctly, I have to render A first and the B in this order. This must be done for every objects so, for example, if I have 3 objects in scene I have to render: A1 B1 A2 B2 A3 B3.
How could manage this in Helix? I think about create two nodes (one for A and one for B) and append both as child of an "empty" parent-Object node

0

Is there a function to get the world coordinates of a nested transform?

Dirt-e 5 years ago updated 5 years ago 0

I have a bunch of nested transforms. Think of it like a matchbox inside a shoebox inside a suitcase inside a room.

I can move the objects around and see the results in 3D. All fine!!!! If I move the suitcase, then the shoebox and the matchbox move with it. Awesome!

Now I need to know the distance of the matchbox to the wall. Which means I have to determine the world coordinates of the matchbox. Is there a function that gives me the coordinates of an object expressed in its most "ancestral" ancestors coordinate system? Or will I have to traverse all transformations involved manually?

0

Rendering to bitmap (whether from screen or off-screen)

wotnot 5 years ago updated by WooAja 3 years ago 9

I am trying to generate a bitmap from a HelixViewport3D and have encountered a few problems.

The first problem is that I cannot find a way to render off-screen. There are a few references to this online and as far as I can see it does not have a built-in solution.

As a workaround (and not a great one) I have proceeded to render to the screen where the user can see it, with the intention of creating a bitmap from that rendered image. I now have the problem that an image exported from the content on screen (e.g. using Viewport3DHelper.SaveBitmap, or other methods) is blank if I call it immediately. I presume this is because Helix Toolkit is rendering asynchronously(??) That is how it seems to be behaving. If I plot first, and then grab the image separately by clicking a button, then it works, which suggests to me that it is a timing problem.

There is no built-in OnRendered event. Is there a way I can get notification when viewport rendering has finished? ...or (preferred) not need to have it on screen in the first place?

0

PointVisual3 not displaying points

KRajan 5 years ago updated 5 years ago 0

Hi, I'm new to WPF and Helixtool kit. I wrote this code to display points cloud. The datatable contains around 100000 points and I do not see any points getting created. Appreciate any help. Thanks. 

Public Sub Create3Dviewport()

Dim pointsTable As DataTable = Get3DPoints() 'Get all point coordinates

Dim Pt3DList As Point3DCollection = New Point3DCollection

Dim pts As PointsVisual3D = New PointsVisual3D

Dim Vp3D = New Viewport3D()

Dim hVp3D = New HelixViewport3D()

For Each dr As DataRow In pointsTable.Rows

Dim pt As Point3D = New Point3D(dr(0), dr(1), dr(2))

Pt3DList.Add(pt)

Next

pts.Points = Pt3DList

pts.Size = 10

hVp3D.Children.Add(pts)

Vp3D = hVp3D.Viewport

PlotGrid.Children.Add(Vp3D)

End Sub

0

In xaml, <Viewbox> as a container for <Viewport3DX ...> causes scenes to be blurry.

John 5 years ago 0

When using a Windows.UI.Xaml.Controls.Viewbox as a parent container for a hx:Viewport3DX the hx:Element3DPresenter's Content is blurry.

In the original code from Examples/FileLoadDemo project, a Grid is used as the parent container and the image remains sharp. Below is a small edit version from the Examples/FileLoadDemo project.

<Viewbox>

<hx:Viewport3DX

    EffectsManager="{Binding EffectsManager}"

    ... >

   <hx:Element3DPresenter Content="{Binding GroupModel}" />

 </hx:Viewport3DX>

</Viewbox>


Is there a property that needs to be set to keep the image sharp while using a Viewbox?


Thank you.



0

3d model size

Terry Chan 5 years ago updated by anonymous 5 years ago 1

Is it possible to measure and display 3D model size in mm unit?

Thanks

0

Cutting and showing the result in a Viewport | MeshGeometry3D to MeshVisual3D

FloP 5 years ago updated 5 years ago 1

Hi,
i have a problem with Cutting my objects and then showing them.
For the moment i just use the simple Helixtoolkit.Wpf.

To show them i use the MeshVisual3D whicht worked just fine.
Now i want to slice my object multiple times but therefore i need a MeshGeometry3D, which i can create.
My problem now is, how do i achieve that?
I couldnt find a way to convert my MeshGeometry3D to a MeshVisual3D or to a GeometryModel3D (which i think i could use to generate my MeshVisual3D). I also tried to convert it via MeshGeometryHelper which i also couldnt find a way to do it.

So the main question would be, how do i add my MeshGeometry3D to my HelixViewport3D?

I am sorry, if this is a simple question, but i couldnt find an answer yet.

What i do at the moment is as a bad workaround (but at least i can see something) is to convert the Points to Lines like this:

MeshGeometry3D cutted = MeshGeometryHelper.Cut(_compound, cutPlane, new Vector3D(0, 0, 1));
LinesVisual3D lines = new LinesVisual3D();
lines.Thickness = 3;
lines.Points = cutted.Positions;
lines.Color = System.Windows.Media.Colors.Orange;
_3DWindow.MainViewPort.Children.Add(lines);

But that is not really what i want.

0

teaching material

dwsf 5 years ago updated by nick 4 years ago 1

Hi!
who is know, where can I find teaching material?