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

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

Dirt-e 4 years ago updated 4 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?

0

3D model rendering from within C#

MylesDawson 5 years ago 0

On a project we have a user can configure a window to be manufactured. They are able to input many parameters like dimensions, openings, colour, handle, etc. We have a requirement to render a 3D model/CAD image or video of a configured window and make this available to the user.

I am looking for advice on how to approach this. Are there SDKs that you can pass a template file to and then pass in variables for things like the width, height and colour? Frustratingly we have seen this done with other similar systems but are at a loss on how to approach it. thankyou

0

Designing a 3D scene editor

AveryDawson 5 years ago 0

I'm making a personal project in which I want to make a 3D scene editor, using c#.

The idea is to have floating tool windows in which you can drag items into a 3D visor. The objects dragged could have annimations.

I thinking in using Unitity to do this, but I wonder if there is other alternatives better suited for this task.

Thanks you guys!!

0

Probably wrong color in DefaultStaticMeshBatchingBuffer?

Christof Rezk Salama 5 years ago updated by nick 4 years ago 1
Hi guys,

first of all, let me thank you for your impressive work on Helix Toolkit.

When looking throught the batches mesh part, it was unclear to my, why in HelixToolkit.UWP.DefaultStaticMeshBatchingBuffer, line 74, the emissive color of the PhongMaterialCore is used instead of the ambient color.

Line 74:    var ambient = material.EmissiveColor.EncodeToFloat();

It looks like a simple copy-and-paste error.

Cordially,
Christof