DiscussionsIssue archiveDraw Harness and Samples

Archived discussion

Making a floor

Draw Harness and SamplesFri, 08/21/2020 - 13:391 reply

Browse this forum
QuestionAuthor

I would like to add a floor having, with alternating black and white tiles, so basically showing like a chess board.

Input parameters are tile size and number of tiles in each direction.

I was thinking of creating a mesh (BRepMeshData_Model ) and use BRepBuilderAPI_MakeFace with AddFace?

How can I set the color for each tile?

Is there a better approach? Anybody know of any samples?

 

Author

 

Discussion

1 archived reply

Posts are displayed in their archived order.

01Commenter-1

I would like make somthing like :

//this is a 2d routine. 

for(int i=0; i<10; i++){
    for(int j=0; j<10; j++){
        
         if(i %2==0 && j %2==0){
              //tiles are white
         } else {
              //tiles are black
      } 
    }
}