To find the perimeter of triangle \( \triangle CDE \) when the lengths \( CF \), \( BD \), and \( EG \) are given as tangent segments from points \( C \), \( D \), and \( E \) to the incircle of the triangle, we'll use the properties of tangent segments.
Given:
- \( CF = 15 \) cm (let’s denote this length as \( a \)),
- \( BD = 12 \) cm (we denote this as \( b \)),
- \( EG = 4 \) cm (denote this as \( c \)).
In a tangent segment, the length from a point outside the circle to the point of tangency is equal for both tangents drawn from that point. Therefore, we can set the following:
- Let \( CE = CF = a = 15 \) cm,
- Let \( CD = BD = b = 12 \) cm,
- Let \( DE = EG = c = 4 \) cm.
Now, the sides of triangle \( CDE \) can be represented in terms of the lengths of the tangent segments:
- Side \( CD = CE = a = 15 \) cm,
- Side \( DE = EG + GD = c + b = 4 + 12 = 16 \) cm,
- Side \( CE = CF + FE = a + c = 15 + 4 = 19 \) cm.
To compute the perimeter \( P \) of triangle \( CDE \): \[ P = CD + DE + CE = 15 + 16 + 19 \] Calculating this: \[ P = 15 + 16 + 19 = 50 \text{ cm}. \]
Therefore, the perimeter of triangle \( \triangle CDE \) is \( \boxed{50} \) cm.