technodesigner

Digital design

Olivier Dewit
WPF 3D models layout

WPF 3D models layout

WPF 3D features do not provide a layout system likes Canvas, Grid, StackPanel and other 2D panels.

So I developed in Perspective 2.2 library a spatial layout mechanism for WPF 3D models, today available in 2 forms :

Space3D

Space3D defines a virtual container wherein the positioning of the 3D models is done by means of Space3D.X, Space3D.Y and Space3D.Z attached properties.

<p:Workshop3D Width="1200" Height="750">
  <p:Space3D>
    <p:Spherical3D  
      p:Space3D.X="0" p:Space3D.Y="0" p:Space3D.Z="0"/>
    <p:Spherical3D  
      p:Space3D.X="0" p:Space3D.Y="0" p:Space3D.Z="1"/>
    <p:Spherical3D  
      p:Space3D.X="1" p:Space3D.Y="0" p:Space3D.Z="1"/>
    <p:Spherical3D  
      p:Space3D.X="1" p:Space3D.Y="0" p:Space3D.Z="0"/>
    <p:Spherical3D  
      p:Space3D.X="0" p:Space3D.Y="1" p:Space3D.Z="0"/>
    <p:Spherical3D  
      p:Space3D.X="0" p:Space3D.Y="1" p:Space3D.Z="1"/>
    <p:Spherical3D  
      p:Space3D.X="1" p:Space3D.Y="1" p:Space3D.Z="1"/>
    <p:Spherical3D  
      p:Space3D.X="1" p:Space3D.Y="1" p:Space3D.Z="0"/>
  </p:Space3D>
</p:Workshop3D>

Space3D

Here is an other example, applied on a XY plan to CompositeBar3D models :

Space3D

BeeSpace3D

Amateur beekeeper, I wanted to reproduce with my computer the wax honeycombs that my bees make, without a computer ;)

BeeSpace3D operates on the same principle as Space3D, but only on an XY plane and with a honeycomb layout. Applied to a model of hexagonal section, the cellular structure of the honeycomb is particularly realistic :

BeeSpace3D

Téléchargement

Perspective

The source code of this article is on the Space3DDemo.xaml page of PerspectiveDemo.Wpf3D-dn4.0 project.



Powered by the Perspective WebApp - © Olivier Dewit - Lyon, Paris, France - Legal informations