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

Get position of selected model?

B 2 years ago in Question • updated by Basil Paudel 2 years ago 1

Hi, Using the example RectSelection I have a 3d viewport in which I can select my objects, which are BoxVisual3D.

What I need to do, is return the 3d position of the selected object. I have:

  foreach (var model in models)
            {
                var geometryModel = model as GeometryModel3D;
                if (geometryModel != null)
                {
                    geometryModel.Material = geometryModel.BackMaterial = material;

                    
                    //do stuff 
                    UserControl1.Point1Position = model.Transform; 
                    
                    UserControl1.returnPoint.X = model.Transform.Value.M14;
                    UserControl1.returnPoint.Y = geometryModel.Transform.Value.M24;
                    UserControl1.returnPoint.Z = geometryModel.Transform.Value.M34;
                }
            }

But the values always return as 0. (I spawn the box myself, so i know they are not 0.
When I step through, there is a selected object, but the transform reads as all zeros. How can i get the positin of a BoxVisual3D?

Thanks.

Media3D WPF
0

Instancing

Piotr Tofiło 2 years ago in Question 0

Hi guys. I am really impressed by the instancing demo with boxes in SharpDX. I could use it in my project but I need to be able to set color of every box face individually. Does anybody know how should I approach it ? I could do it in WPF version but it looks tricky in this method. As there is a single model that is multiplied it is hard to apply various colors on every face. Any suggestion will be greatly appreciated.

SharpDX
0

What are the best powerbanks in India

Luckily Sharmaj 2 years ago in Question • updated by anonymous 1 year ago 1

Looking for best power bank in India ? You should check out that list to get more detailed overview on powerbanks.


0

Model showing Blue color

saqib 2 years ago in Question • updated by New1User 3 weeks ago 15

HI i have getting problem in model when i load my 3d model it shows blue color whereas my model has multiple color


here is my code


ModelVisual3D device3D;

private Model3D Display3d(string model)
{
Model3D device = null;
try
{
//Adding a gesture here
viewPort3d.RotateGesture = new MouseGesture(MouseAction.LeftClick);



//// Material material = new DiffuseMaterial(new SolidColorBrush(Colors.MediumOrchid));
// System.Windows.Media.Media3D.Material mat = MaterialHelper.CreateMaterial(
//new SolidColorBrush(Color.FromRgb(255, 255, 255)));
//Import 3D model file



////////////Material m = new DiffuseMaterial(new SolidColorBrush(Color.FromRgb(255,255,255)));




//ModelImporter import = new ModelImporter();
var importer = new HelixToolkit.Wpf.ModelImporter();
var point = importer.Load(model);
//Load the 3D model file
//// import.DefaultMaterial = material;
//////////////////////////////import.DefaultMaterial = m;
GeometryModel3D mode = point.Children[0] as GeometryModel3D;
Material m = new DiffuseMaterial(new SolidColorBrush(Color.FromRgb(255, 255, 255)));
//import.DefaultMaterial = mat;
//mat = import.DefaultMaterial;



//mode.Material = m;



// device = import.Load(model);
importer.DefaultMaterial = m;
device = point;







}
catch (Exception e)
{
// Handle exception in case can not file 3D model
MessageBox.Show("Exception Error : " + e.StackTrace);
}
return device;
}


and xaml code is here


xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:fyp2"
mc:Ignorable="d"
d:DesignHeight="350" d:DesignWidth="525">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="12*"/>
<RowDefinition Height="163*"/>
</Grid.RowDefinitions>



<h:HelixViewport3D x:Name="viewPort3d" ZoomExtentsWhenLoaded="True" Margin="149,10,10,10" Grid.RowSpan="2" >
<!-- Remember to add light to the scene -->



<h:DefaultLights/>
</h:HelixViewport3D>
<ListView x:Name="imageList" HorizontalAlignment="Left" Height="330" Margin="10,10,0,0" VerticalAlignment="Top" Width="134" SelectionChanged="imageList_SelectionChanged" Grid.RowSpan="2"/>



</Grid>

0

Planiranje selidbe - Selidbe Beograd Prevoz 011

Dianna Gron 2 years ago in Question 0

Gotovo nijedna selidba ne moze proci bez dosta nervoze, gomile stresa I velikog napora. Svuda oko Vas su kutije, namestaj, tehnicki uredjaji i Vi prosto ne znate kako da sve to spakujete I sredite. Dobra organizacija je zaista kljuc ka pozitivnom resenju I uspehu. Svaki korisni savet u tom trenutku je ogromna pomoci satisfakcija.


Vreme za pakovanje:


Ne cekajte poslednji momenat jer cete u tom slucaju napraviti pravu zbrku. Odlaganje stvari koje trenutno ne koristite u kutije ce Vam svakako biti od koristi. Zimska garderoba, razni ukrasni predmeti poput slika, vaza I drugih detalja koje mozete pazljivo uviti u te iste stvari ili stare novine kako bi ih dodatno zastitili prilikom nosenja.


Pomoc porodice I prijatelja:


Za ovu akciju angazujte sto vise osoba jer svaka raspoloziva ruka je dodatna pomoc a samim tim cete I mnogo brze zavrsiti ceo postupak.

Jake kutije od kartona su takodje jako vazne I potrudite se da nabavite sto je vise moguce. Mozda nije idealno vreme da bas u ovom trenutku kada treba da se preselite sredjujete vec postojece stvari I predmete ali to I te kako moze biti jako korisno za novi prostor u koji ulazite kako ponovo po coskovima ne biste gurali neke stvari koje svi zovemo „ako zatreba“ a gotovo nikada ih ne koristimo. Zato se bas u ovom momentu resite svakog starog casopisa, napuklih soljica, tanjira I sl.


Obavezno potrazite profesionalnu pomoc:


Za svaki veci predmet, namestaj, belu tehniku potrebno Vam je odgovarajuce vozilo kako biste sve to preneli u novi zivotni prostor. Sluzba za selidbe Beograd ce to obaviti brzo I efikasno tako da ne oklevajte I obavezno ih angazujte.

Sve u svemu selidba nije tako jednostavna stvar ali kad sve zavrsite bicete zasigurno zadovoljni I srecni sto ste sve zavrsili na najbolji moguci nacin. Ostaje Vam na kraju samo da uzivate.


Source: http://planet.infowars.com/uncategorized/selidba-bez-stresa
0

how do I get transformed point or mesh coordinates for a ModelVisual3D with Transforms?

PUPPICAD 2 years ago in Question • updated by anonymous 8 months ago 1

I'm writing an STL exporter, and , also, I noticed the obj exporter doesn't work in some cases, where one of the models had a transform.

So I'd like to be able to "hardcode" the transform.

0

Billboard transparency

Rodrigo Basniak 2 years ago in Question • updated by anonymous 8 months ago 1

Hi,

I create a new Billboard and set an image on it using a DifuseMaterial:


var material = new DiffuseMaterial(new ImageBrush(new BitmapImage(new Uri($"Images/target.png", UriKind.Relative))));
_billboard1.Material = material;

The image is a PNG file with transparency. But the transparent pixels are showing as white on the HelixViewport3D:



Are there any secrets when working with transparency or is it not supported?


Thanks,

Rodrigo

Media3D WPF
0

Visual Basic version of ModelViewer Example?

Alexander 2 years ago in Question • updated by Keystone Consulting Group 2 months ago 1

Hello.

Can someone please provide a Visual Basic version of the ModelViewer example in https://github.com/helix-toolkit/helix-toolkit/tree/master/Source/Examples/WPF/ModelViewer?

WPF
0

How to change center target in SharpDX?

Kumaran M 2 years ago in Question 0

In helix toolkit double right click can change the center target. How can I do the same in SharpDX?

SharpDX
0

How can I select 3d elements on ViewPort

Дмитро Шпак 2 years ago in Question • updated by Lucas Silva 2 years ago 1

I hawe ViewPort and many "TubeVisual3D" generated on it.

Is there a way to select and delete or edit this visuals?