Foro de Soporte Allplan

[Pregunta] UV-Koordinaten bei Polyhedron3D analog SmartPart-Funktion BODY / TEVE ? [Guardado]


Hallo

bei den SmartParts kann man mittels den Funktionen BODY und TEVE eine 3D-Fläche mit UV-Koordinaten erstellen. Leider ist die Performance bei «grossen» Smartparts nicht sehr befriedigend.

Daher wollte ich mein Projekt mit den leistungsfähigeren PythonParts umsetzten.
Wie es aber scheint, bietet die Klasse AllplanGeo.Polyhedron3D keine Möglichkeit UV-Koordinaten zuzuweisen. Bleibt dies in der Zukunft auch so? Ober besteht die Hoffnung, dass UV-Koordinaten implementiert werden?

Gruss und Dank
Hansruedi

Show solution Hide solution

Die Verwendung von UV-Koordinaten ist bereits seit langem implementiert.

Die Zuweisung passiert über die Klasse TextureMapping.

siehe ETC\Examples\PythonParts\BasisExamples\UVTextureMapping.pyp

texture_mapping = AllplanBasisElements.TextureMapping ()

if use_uv_mapping:
   # define UV texture mapping for cuboid
   coords = AllplanUtil.VecDoubleList()
   coords[:] = [0.25, 0.33, 0.25, 0.66, 0.50, 0.66, 0.50, 0.33,
                0.25, 0.33, 0.00, 0.33, 0.00, 0.66, 0.25, 0.66,
                0.25, 0.66, 0.25, 1.00, 0.50, 1.00, 0.50, 0.66,
                0.25, 0.00, 0.25, 0.33, 0.50, 0.33, 0.50, 0.00,
                0.50, 0.33, 0.50, 0.66, 0.75, 0.66, 0.75, 0.33,
                0.75, 0.33, 0.75, 0.66, 1.00, 0.66, 1.00, 0.33]

   texture_mapping = AllplanBasisElements.TextureMapping (coords)

self.model_ele_list.append(
   AllplanBasisElements.ModelElement3D(
   self.com_prop, self.texture, texture_mapping, AllplanGeo.Polyhedron3D.CreateCuboid(1000,2000,3000)))

Adjuntos (2)

Type: image/png
Descargado 36 veces
Size: 59,32 KiB
Type: image/png
Descargado 50 veces
Size: 95,22 KiB

Die Verwendung von UV-Koordinaten ist bereits seit langem implementiert.

Die Zuweisung passiert über die Klasse TextureMapping.

siehe ETC\Examples\PythonParts\BasisExamples\UVTextureMapping.pyp

texture_mapping = AllplanBasisElements.TextureMapping ()

if use_uv_mapping:
   # define UV texture mapping for cuboid
   coords = AllplanUtil.VecDoubleList()
   coords[:] = [0.25, 0.33, 0.25, 0.66, 0.50, 0.66, 0.50, 0.33,
                0.25, 0.33, 0.00, 0.33, 0.00, 0.66, 0.25, 0.66,
                0.25, 0.66, 0.25, 1.00, 0.50, 1.00, 0.50, 0.66,
                0.25, 0.00, 0.25, 0.33, 0.50, 0.33, 0.50, 0.00,
                0.50, 0.33, 0.50, 0.66, 0.75, 0.66, 0.75, 0.33,
                0.75, 0.33, 0.75, 0.66, 1.00, 0.66, 1.00, 0.33]

   texture_mapping = AllplanBasisElements.TextureMapping (coords)

self.model_ele_list.append(
   AllplanBasisElements.ModelElement3D(
   self.com_prop, self.texture, texture_mapping, AllplanGeo.Polyhedron3D.CreateCuboid(1000,2000,3000)))

Adjuntos (2)

Type: image/png
Descargado 36 veces
Size: 59,32 KiB
Type: image/png
Descargado 50 veces
Size: 95,22 KiB

Danke!
Manchmal sieht man den Wald vor lauter Bäumen nicht. ;)


https://connect.allplan.com/ utiliza cookies  -  Aqui

Acéptalo