For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Render geometry given vertices and triangle indices

Timur Vizaev's picture
Forums: 

How to generate (and render) a geometry using OpenCASCADE if my inputs are an array of vertices (a collection of points (X, Y, Z)) and an array of triangle indices (specifying how those vertices are connected to form triangles or faces)?

My inputs

----------------------------------------------------------------

Example of vertices: (7) [X, Y, Z]

[10.1, 5, 7] --> index = 0

[-1, 5.7, 3]

[0.3, -5, 6]

[14, 5.4, 7]

[-10.1, 5, 2]

[12.1, 5, 9]

[3.4, -5, 7.9] --> index = 6

Example of triangle indices:

0, 3, 2, 0, 1, 2, 0, 6, 5

These indices should be grouped by 3: (0, 3, 2) (0, 1, 2) (0, 6, 5) to build triangles by using vertices provided.

How to build these structure by using OpenCASCADE?

Thank you.