You need to specify a group, which includes both fields. You imported both fields, but only saw the last one read.

Add the following before end

object "both" class group
member "tris" value "data-1"
member "quads" value "data-2"

In practice, you may see artifacts at the boundary between the two connection types. You may want to consider using a multigrid, which can also handle grid overlaps. However, all the connection types must be the same. You would have to decompose the quads to triangles prior to Import or you can use Refine within DX.


Please respond to [email protected]

Sent by: [EMAIL PROTECTED]

To: [email protected]
cc:
Subject: [opendx-users] Triangles and quadrangles in one grid



Hello,

I have the following problem.  I have a grid containing both triangles
and quadrangles and want that dx displays both.  As an example
consider the following data in image-mesh-2d.dx:

----------------------------------------------------------------
object 1 class array type float rank 1 shape 2 items 17 data follows
0.     0.25
0.25     0.25
0.     0.
0.25     0.
0.75     0.25
0.75     0.
1.     0.25
1.     0.
0.     0.75
0.25     0.75
0.75     0.75
1.     0.75
0.     1.
0.25     1.
0.75     1.
1.     1.
0.5     0.5
object 2 class array type int rank 1 shape 3 items 4 data follows
1 4 16
4 10 16
10 9 16
9 1 16
attribute "element type" string "triangles"
attribute "ref" string "positions"
object 3 class array type int rank 1 shape 4 items 8 data follows
0 1 2 3
1 4 3 5
4 6 5 7
8 9 0 1
10 11 4 6
12 13 8 9
13 14 9 10
14 15 10 11
attribute "element type" string "quads"
attribute "ref" string "positions"
object "data-1" class field
component "positions" value 1
component "connections" value 2
object "data-2" class field
component "positions" value 1
component "connections" value 3
end
----------------------------------------------------------------

I used the script

----------------------------------------------------------------
data = ""> data = "" "cache", 0);
connections = ShowConnections(data);
tubes = Tube(connections, 0.02);
camera = AutoCamera(tubes);
image = Render(tubes, camera);
image = Options(image, "cache", 0);
Display(image);
----------------------------------------------------------------

which, unfortunately, does not work (only the quadrangles are
displayed).

Can someone hint me to what I'm doing wrong here?

Thanks, Nicolas.


P.S.: By the way, herewith I want to thank IBM very much for this nice
tool.


Reply via email to