cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Daniella1985
Contributor

How to bevel around the edges of tiles

I can only do the top side, I can't handle the other three sides. Can I just input the cutting angle? The black one is a cube. I also want to cut it, how do I use it? I don't know how to use those commands

 

3D

    ! 磁磚群組
IF chamfer_t > 0 THEN
        ADDZ  B + 0.001
        CUTPLANE{2} -45
        DEL 1
    ENDIF
    IF chamfer_b > 0 THEN
        ADDZ  0 - 0.001
        CUTPLANE{2} 45
        DEL 1
    ENDIF
    IF chamfer_r > 0 THEN
        ADD taw_end - chamfer_r, 0, 0
        CUTPLANE{2} 45
        DEL 1
    ENDIF
    IF chamfer_l > 0 THEN
        ADD tax + chamfer_l, 0, 0
        CUTPLANE{2} -45
       DEL 1
    ENDIF

    group "w_tiles"
        MATERIAL sur_mat
x_phase = tile_offset_x - INT(tile_offset_x / (tw + gv)) * (tw + gv)
        y_phase = tile_offset_y - INT(tile_offset_y / (th + gh)) * (th + gh)
        x_start = x_phase - INT((x_phase - tax + tw + gv) / (tw + gv)) * (tw + gv)
        y_start = y_phase - INT((y_phase - tay + th + gh) / (th + gh)) * (th + gh)
        nx2 = INT((taw_end - x_start + gv) / (tw + gv)) + 1
        ny2 = INT((tah_end - y_start + gh) / (th + gh)) + 1
        FOR j = 0 TO ny2 - 1
            FOR i = 0 TO nx2 - 1
                x = x_start + i * (tw + gv)
                z = y_start + j * (th + gh)
                x_cut_start = MAX(x, tax)
                z_cut_start = MAX(z, tay)
                tw_cut2 = MIN(x + tw, taw_end) - x_cut_start
                th_cut2 = MIN(z + th, tah_end) - z_cut_start
                IF tw_cut2 > 0 AND th_cut2 > 0 THEN
                ADD x_cut_start, 0, z_cut_start
                BLOCK tw_cut2, tile_t, th_cut2
                DEL 1
            ENDIF
            NEXT i
        NEXT j
    endgroup

    ! 洞口切割
    IF hole_r_on_1 OR hole_r_on_2 OR hole_r_on_3 OR hole_r_on_4 OR hole_r_on_5 OR hole_r_on_6 THEN
        group "w_holes"
            IF hole_r_on_1 THEN
                ADD hole_r_x_1, tile_t, hole_r_y_1
                ROTX 90
                PRISM_ 5, tile_t * 3,
                0,           0,           15,
                hole_r_w_1,  0,           15,
                hole_r_w_1,  hole_r_h_1,  15,
                0,           hole_r_h_1,  15,
                0,           0,           -1
                DEL 2
            ENDIF
            IF hole_r_on_2 THEN
                ADD hole_r_x_2, tile_t, hole_r_y_2
                ROTX 90
                PRISM_ 5, tile_t * 3,
                0,           0,           15,
                hole_r_w_2,  0,           15,
                hole_r_w_2,  hole_r_h_2,  15,
                0,           hole_r_h_2,  15,
                0,           0,           -1
                DEL 2
            ENDIF
            IF hole_r_on_3 THEN
                ADD hole_r_x_3, tile_t, hole_r_y_3
                ROTX 90
                PRISM_ 5, tile_t * 3,
                0,           0,           15,
                hole_r_w_3,  0,           15,
                hole_r_w_3,  hole_r_h_3,  15,
                0,           hole_r_h_3,  15,
                0,           0,           -1
                DEL 2
            ENDIF
            IF hole_r_on_4 THEN
                ADD hole_r_x_4, tile_t, hole_r_y_4
                ROTX 90
                PRISM_ 5, tile_t * 3,
                0,           0,           15,
                hole_r_w_4,  0,           15,
                hole_r_w_4,  hole_r_h_4,  15,
                0,           hole_r_h_4,  15,
                0,           0,           -1
                DEL 2
            ENDIF
            IF hole_r_on_5 THEN
                ADD hole_r_x_5, tile_t, hole_r_y_5
                ROTX 90
                PRISM_ 5, tile_t * 3,
                0,           0,           15,
                hole_r_w_5,  0,           15,
                hole_r_w_5,  hole_r_h_5,  15,
                0,           hole_r_h_5,  15,
                0,           0,           -1
                DEL 2
            ENDIF
            IF hole_r_on_6 THEN
                ADD hole_r_x_6, tile_t, hole_r_y_6
                ROTX 90
                PRISM_ 5, tile_t * 3,
                0,           0,           15,
                hole_r_w_6,  0,           15,
                hole_r_w_6,  hole_r_h_6,  15,
                0,           hole_r_h_6,  15,
                0,           0,           -1
                DEL 2
            ENDIF
        endgroup
        placegroup subgroup("w_tiles", "w_holes")
        killgroup "w_tiles"
        killgroup "w_holes"
    ELSE
        placegroup "w_tiles"
        killgroup "w_tiles"
    ENDIF
    IF chamfer_on THEN
        IF chamfer_t > 0 THEN
            ADDZ tah_end - chamfer_t
            CUTPLANE{2} 45
            DEL 1
    ENDIF
        IF chamfer_b > 0 THEN
            ADDZ tay + chamfer_b
            CUTPLANE{2} -45
            DEL 1
        ENDIF
        IF chamfer_r > 0 THEN
            ADD taw_end - chamfer_r, 0, 0
            CUTPLANE{2} 45
            DEL 1
        ENDIF
        IF chamfer_l > 0 THEN
            ADD tax + chamfer_l, 0, 0
            CUTPLANE{2} -45
            DEL 1
        ENDIF​

 

Operating system used: Windows


image.png

1 Solution

Accepted Solutions
rudl
Booster

*) For cutplane perpendicular to xy: cutplane{2} needs 2 parameters according to the manual

*) cutplane needs a cutend, and all geometry should be between. See examples in manual
*) Not sure why the bottom cut doesn't work. My guess probably object is moved up and the cutplane is below:

 

ADD x_cut_start, 0, z_cut_start
BLOCK tw_cut2, tile_t, th_cut2
DEL 1

 

*) would avoid cutplanes and booleans in general if possible, depending on the situation.

Go to post

9 Replies 9
rudl
Booster

*) For cutplane perpendicular to xy: cutplane{2} needs 2 parameters according to the manual

*) cutplane needs a cutend, and all geometry should be between. See examples in manual
*) Not sure why the bottom cut doesn't work. My guess probably object is moved up and the cutplane is below:

 

ADD x_cut_start, 0, z_cut_start
BLOCK tw_cut2, tile_t, th_cut2
DEL 1

 

*) would avoid cutplanes and booleans in general if possible, depending on the situation.

Lingwisyer
Guru

Should not your bottom cutplane have an extra 180? I found it easier to manipulate a basic cutplanes and rotate those with basic transformations instead...

AC22-29 AUS 3200Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | 7800X3D | 32GB | RTX5070TI
Daniella1985
Contributor

I have a new project: how to cut a 3D floor at a 45-degree angle, like a floor tool. I'm having trouble; I've failed many times with the syntax.

 

Daniella1985_0-1781573223372.png

 

group "tiles"
MATERIAL sur_mat
x_phase = tile_offset_x - INT(tile_offset_x / (tw + gv)) * (tw + gv)
y_phase = tile_offset_y - INT(tile_offset_y / (th + gh)) * (th + gh)
tile_tax = tax
tile_tay = tay
tile_taw_end = taw_end
tile_tah_end = tah_end
cut_tax = tax
cut_tay = tay
cut_taw_end = taw_end
cut_tah_end = tah_end
IF chamfer_on THEN
cut_tax = cut_tax - chamfer_l
cut_tay = cut_tay - chamfer_b
cut_taw_end = cut_taw_end + chamfer_r
cut_tah_end = cut_tah_end + chamfer_t
ENDIF
x_start = x_phase - INT((x_phase - tile_tax + tw + gv) / (tw + gv)) * (tw + gv)
y_start = y_phase - INT((y_phase - tile_tay + th + gh) / (th + gh)) * (th + gh)
nx2 = INT((tile_taw_end - x_start + gv) / (tw + gv)) + 1
ny2 = INT((tile_tah_end - y_start + gh) / (th + gh)) + 1
FOR j = 0 TO ny2 - 1
FOR i = 0 TO nx2 - 1
x = x_start + i * (tw + gv)
y = y_start + j * (th + gh)
x_cut_start = MAX(x, cut_tax)
y_cut_start = MAX(y, cut_tay)
tw_cut2 = MIN(x + tw, cut_taw_end) - x_cut_start
th_cut2 = MIN(y + th, cut_tah_end) - y_cut_start
IF tw_cut2 > 0 AND th_cut2 > 0 THEN
ADD x_cut_start, y_cut_start, 0
IF chamfer_on AND chamfer_t > 0 AND y_cut_start + th_cut2 >= tah_end - 0.001 THEN
ch = MIN(chamfer_t, th_cut2)
PRISM_ 5, tt,
0, 0, 15,
tw_cut2, 0, 15,
tw_cut2, th_cut2-ch, 15,
tw_cut2-ch, th_cut2, 15,
0, th_cut2, -1
ELSE
BLOCK tw_cut2, th_cut2, tt
ENDIF
DEL 1
ENDIF
NEXT i
NEXT j
endgroup

 

Barry Kelly
Moderator

CPRISM_{2}, CPRISM_{3} & CPRISM_{4} will allow you to set materials and an angle to each edge of the PRISM.

No need for cutplanes.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Lingwisyer
Guru

As long as you are pivoting from the x-y plane?

AC22-29 AUS 3200Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | 7800X3D | 32GB | RTX5070TI
Barry Kelly
Moderator

The edge angle originate from the top surface of the prism.

0 is vertical.

Positive figure extends base out.

Negative angle shrinks base in.

BarryKelly_1-1781660377598.png

As Daniella is modelling individual tiles, a bit of clever scripting will be needed to control the edge of each tile, so only the outer tiles are affected.

I would model one big slab for all of the tiles and then add lines to represent the individual tiles.

Or model individual tiles in a loop (as has been done) and add cutplanes outside of that loop to cut the overall mass of tiles.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
AllanP
Expert

There is an easier way to bevel each tile.

FPRISM_
FPRISM_ top_material, bottom_material, side_material, hill_material,
n, thickness, angle, hill_height,
x1, y1, s1,
...
xn, yn, sn

 

 

Similar to the PRISM_ command, with the additional hill_material, angle and hill_height parameters for forming a ramp on the top.
hill_material: the side material of the ramp part.
angle: the inclination angle of the ramp side edges.
Restriction: 0 <= angle < 90.
If angle = 0, the hill side edges seen from an orthogonal view form a quarter circle with the current resolution (see the RADIUS command,
the RESOL command and the TOLER command).
hill_height: the height of the ramp. Note that the thickness parameter represents the whole height of the prism.

si: status code that allows you to control the visibility of polygon edges and side surfaces. You can also define holes and create segments
and arcs in the polyline using special constraints.
Restriction of parameters:
n >= 3, hill_height < thickness
See Status Codes for details.

AllanP_0-1781670927742.png

 

RESOL 10
FPRISM_ "Roof Tile", "Brick-Red", "Brick-White", "Roof Tile",
4, 1.5, 0, 1.0, !angle = 0 (which gives curved edge)
0, 0, 15,
5, 0, 15,
5, 4, 15,
0, 4, 15

AllanP_1-1781670970003.png

 

FPRISM_ "Roof Tile", "Brick-Red", "Brick-White",
"Roof Tile",
10, 2, 45, 1,
0, 0, 15,
6, 0, 15,
6, 5, 15,
0, 5, 15,
0, 0, -1,
1, 2, 15,
4, 2, 15,
4, 4, 15,
1, 4, 15,
1, 2, -1

AllanP_2-1781671021377.png

I hope this helps.

I have been using ArchiCAD continually since ArchiCAD 4.5
Member of Architalk since 2003, but missed the migration from Architalk to Graphisoft Communities. Melbourne, Australia
Lingwisyer
Guru

Only works if you are wanting to bevel all of your top corners the same amount. Given that they have toggle for each of the four sides, I assume this is not the case so FPRISM_ will not work...

AC22-29 AUS 3200Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win11 | 7800X3D | 32GB | RTX5070TI

If the bevel angle is about to be equal...then why not use the FPRISM_ or HPRISM_ commands? (EDIT: sorry did not notice the whole passage about them above)

I used that for my tiling objects/accesories.

Basic Shapes | GRAPHISOFT GDL Center

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!