Multiple SULoops for 1 Face?

Hey guys,

Is it possible to make a single face with 2 outer loops?

Say if I have a rectangle and I have to make 2 loops of triangle form a single face, what would be the best possible approach?

I have 4 vertex point which intersects with one another that prevents me from doing it in a single loop.
For example:

[0] 200, 50, 0
[1] 0, 0, 0
[2] 0, 50, 0
[3] 0, 0, 200

My best possible approach was using nested for loops to iterate 2 halfs of a rectangle in order of: [0] [1] [2], [1] [0] [3].

However, that method is not appropriate in the context of more complicated objects like a hexagon or a model.

A face can only have one outer loop.

Do you have some visuals to illustrate what we’re dealing with here?

For starters I assume you have a typo in your post, since point 3 is not coplanar with the others! Perhaps you meant 200,0,0?

That aside, I also don’t understand what you are trying to do. Do you want a rectangle? If so, why are your points ordered the way you gave ([0] - [1] is a diagonal)? A rectangle split in half by a diagonal is not a single Face with two loops, it is two triangular Faces with a common Edge on the diagonal.

Hi,

Using some sample examples of the SketchUp SDK, I was able to export .skp files in both XML and binary files containing the vertex information (x,y,z positions, normals, etc) of each vertex point of a shape in sketchUp.

Suppose that I now draw a simple rectangle in sketchUp, as shown below:

Reading the binary files and converting it directly will give me an output of:

The output result is a bit messy at the moment but if you notice the first x,y,z values under each “FaceInfo.vertices - struct” line, you would notice that these translates to vertex points of the shape drawn. Namely:

Vertex [0] will be at position { 215.98, 197.47, 0 }
Vertex [1] will be at position { -63.39, 12.16, 0 }
Vertex [2] will be at position { -63.39, 197.47, 0 }
Vertex [3] will be at position { 215.98, 12.16, 0 }

My intention is to use this information and re-create the image using these information into a .skp file format.

Note that, I am now trying to make conversion from binary-to-skp independent from skp-to-binary (eg: if you were to give me a bunch of binary codes in the same format in which it is stored, without prior knowledge of the original image, my program should be able to recreate the original image based on the binary data)

Like what @slbaumgartner said, the points [0] and [1] form a diagonal line which splits the image in two triangles. Since this vertex point information is read exactly the way how it is meant to be stored in the Slapi SDK struct codes provided, I assume that these positions should not be changed but rather I have to make some sense on the triangle orders provided. { 0, 1 , 2, 1, 0 , 3 }

Since all types of shapes can be formed by a combination of 1 or more triangles, my interpretation of the triangle order would be { 0, 1, 2} forms one part of the rectangle while { 1, 0 , 3} forms another.

So far my best attempt is:

And the outcome:

Which is inevitably wrong in several ways:
1.) Information of the vertex points are hardcoded.
2.) I am making 2 separate faces for an image that originally consist of 1 face

No. 1 can be easily solved, that is my part.

What I do need help with is issue No. 2 and I suspect triangle order do help in solving the issue depending on how you interpret the patterns generated.

@tt_su
Thank you for clarifying. I will now try a different approach.

Edit #1:
After some exploring, I realised the vertices were produced as a result of tessellation of the original image. Trying to figure out how to reverse the tessellation