How to get number of cut tiles in a room using revit api?

How to get number of cut tiles in a room using revit api?

prasannamurumkar
Advocate Advocate
1,939 Views
12 Replies
Message 1 of 13

How to get number of cut tiles in a room using revit api?

prasannamurumkar
Advocate
Advocate

 want to get number of tiles in a room using api.

After getting number of tiles want to get the cut tiles in percentage of tiles.

collected rooms in floor plan is their any way to get the tiles?

 

 

 

0 Likes
1,940 Views
12 Replies
Replies (12)
Message 2 of 13

jeremytammik
Autodesk
Autodesk

This is an interesting task.

 

I am not aware of any support for this in the Revit API right out of the box.

 

Is this functionality provided by the Revit end user interface?

 

The API hardly ever provides functionality that is not available in the end user interface.

 

If not, you can definitely implement something yourself to retrieve the exact area that you wish to cover with tiles and run some kind of partitioning and optimisation algorithm on it to achieve the task you describe.

 

Here are some interesting links regarding this topic:

 

 

Please do let us know how you end up solving this.

 

Thank you!

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 13

jeremytammik
Autodesk
Autodesk

Another idea: 

 

  • Implement a family instance representing one tile.
  • Use the Revit 2021 generative design functionality to place a maximum number of tiles on the desired surface.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 13

jeremytammik
Autodesk
Autodesk

Do remember to appropriately align the polygon surface you wish to fill (or tile).

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 6 of 13

RPTHOMAS108
Mentor
Mentor

Not to complicate the issue but is this tiles with grout tolerance allowance between the tiles?

 

If I were thinking of how I would do it then I'd place the tiles as solids in a given grid arrangement overlapping the room boundary, get the total volume of this grid arrangement = Vol1

Cut the room shape out of this tile arrangement to get the volume again = Vol2

You can then get the volume inside the room by deducting Vol2 from Vol1.

Separate out the disjoined solids in Vol2 (I believe there is a function for that).

 

Then you can also identify the cut tiles around the perimeter of the room in Vol2 because each of those have a volume less than a tile. This is the inverse volume so you deduct each of these from the tile size to give you each partial tile size and it's location. I speak in terms of volumes because volume are easy to determine from solids and then you can divide by tile thickness.

 

Also I'm using the inverse because I know the boundary of the room to use for deducting from the overall set. I could do it the other way around (deduct the excess from around the room) but I would have to allow a border around the room to ensure all the excess tiles are deducted and this seems slightly more complicated in determining that border width (probably a tile size plus an allowance).

 

I think where you start the tiling becomes arbitrary in a sense because rarely in reality are tiles set out on site to such precision. I imagine you usually start from the centre and work your way out to the edges so it gives the impression of symmetry.  I'm wondering how many variations you'd get by changing the tile offset i.e. if all the tiles are the same size do you cover the variations by offsetting through the tile unit dimensions? Do you then discount arrangements that lead to impractical tile sizes?

 

In the end what area of tiles do you need to fill a room of 10m2? Workmanship will play a large part in how many tiles you need so costs are usually not that specific. It'll likely be 10m2 worth of tiles + tolerance because I can't sell you half tiles (you cut them). Also I'll sell you boxes of 20 tiles not individual ones. Then there is colour variations in tiles perhaps you have a pettern and you want to know how many of each colour?

Message 7 of 13

prasannamurumkar
Advocate
Advocate

Thank you for reply.will let you know once done.

0 Likes
Message 8 of 13

prasannamurumkar
Advocate
Advocate

Thank you for reply.we are notconsidering tolerance part,colour of diiferent tiles as of now

i am thinking to do some different way.

(Assming room is rectanular in our task) for this POC. for current work

I will get centre of rectangle.

then i will fire ref.intersector to both direction(x,y).

i know size of tiles(width,height).divide reference intersector by length.i will get no of tiles in that line.

if multiply by room dimension get total tiles.

 

If reference intersector is not divide equally then last tiles are cut tiles i will get total cut tiles by multiplying with length of room.

 

 

 

0 Likes
Message 9 of 13

RPTHOMAS108
Mentor
Mentor

Sounds like an approach but I'm not sure you need a ReferenceIntersector for a rectangular room?

 

If room is rectangular then you just need to find the room boundaries with opposite or same vector direction and measure the distance between them to get your room size. Then it's just as you say dividing room dimension into tile dimension to give you a count. The remainder is then the portion of cut tile at either end:

 

5000 / 300 = 16.6666 recurring (16 full units)

0.6666 * 300 = 200 (rounded) so a strip of 100mm at each end to close the gap.

 

That kind of thing?

 

Grout tolerance likely means to artificially increase the tile size dimensions by the grout width. We do similar with reinforcement bars to get maximum spacing but we are then counting the gaps.

Message 10 of 13

jeremytammik
Autodesk
Autodesk

I edited our conversation and shared it on the blog for posterity:

 

https://thebuildingcoder.typepad.com/blog/2020/08/custom-parameters-and-tile-packing.html#3

 

I also added a link to Nest2d there, a very nice packing and nesting solution on GitHub that might be a very good choice for solving this kind of task.

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 11 of 13

thannaingoo.api
Advocate
Advocate

 

Key Features:
1. Floor Selection:
• Interactive Floor Selection: Seamlessly select floors within Revit using custom category filters, ensuring accurate and relevant data extraction.
2. Surface Pattern Extraction:
• SurfaceForegroundPatternId and BackgroundPatternId Extraction: Efficiently extract the surface foreground and background pattern IDs from floor materials to analyze the tile patterns used.
• Grid Size Calculation: Calculate the grid size based on the extracted patterns, enabling precise determination of tile dimensions and layout.
3. Tile Counting and Cutting Optimization:
• Full Tile and Cut Tile Counting: Accurately count the number of full tiles and cut tiles required for the project.
• Cutting Optimization: Determine the best way to cut full tiles to produce the required cut tiles, minimizing waste.
4. Rectangular Packing:
• Packing and Translation of Rectangles: Utilize the rectpack library to efficiently pack and translate tiles in X and Y directions.
• Visualization of Packing Layout: Visualize the packing layout to ensure optimal space usage.
5. Drafting View Creation:
• Visualization of Cutting Optimization: Automatically create a drafting view to visualize the cutting optimization with dimensions.
• Tiling Optimization with Number Text: Include numbered text references in the drafting view to indicate which tile goes where in the actual tiling placement.
• Usability in Sheets: The drafting view can be seamlessly integrated into Revit sheets, enhancing project documentation and communication.
6. Dynamo Visualization:
• Interactive Tiling Visualization: Use Dynamo to visualize tiling patterns and layouts interactively.
7. Excel Export:
• Full Tile and Cut Tile Data Export: Export detailed data of full tiles and cut tiles to Excel for further analysis and reporting.
Benefits:
• Efficiency: Reduce manual tasks, freeing up more time for creative and strategic work.
• Accuracy: Enhance precision in calculations and material estimations.
• Integration: Leverage the strengths of both Revit and Dynamo to create a seamless workflow.
• Visualization: Use Dynamo for interactive and real-time visualization of tiling layouts.
Further Insights:
• Random Color Generation and Surface Processing: For easy visual differentiation of elements.
• Dimension and Offset Calculations: For precise geometric operations.
• Detailed Tile Information: Providing essential information on tile sizes and quantities for both full and cut tiles.

 

 

 

 

 

Message 12 of 13

ctm_mka
Collaborator
Collaborator

unless you need to be super precise using the packing methodology, i think its a simple math exercise. you know the the area of any given room, and of a tile. so say 1,000 sq/m room, and a single tile, with grout tolerance is say 7 sq/m.

1000/7 = 142.85, so 142 whole tiles.

7 * .85, rounded up = 6 additional tiles.

Then 6 /148  total tiles (142+6) = .04, or 4% of the total tiles need to be cut.

Message 13 of 13

scgq425
Advocate
Advocate

Hi @prasannamurumkar :

i use the sweepLine Algorithm to cut tiles and calculate the count , in the application , allow user to set the paramater and check it .i upload this video to youtube ,  u can see thiswhich about it. 

https://youtu.be/QcAHcAOHPqA 

LanHui Xu 徐兰辉
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Blog
LinkedIn
Revit/CAD Development | Steel Product Manager

EESignature

0 Likes