# Operazioni booleane geometriche

*Intersect*, *Trim* e *SelectTrim* vengono utilizzati principalmente nella geometria dimensionale minore come punti, curve e superfici. La geometria solida, invece, presenta un insieme aggiuntivo di metodi per la modifica della forma dopo la costruzione, sottraendo il materiale in modo simile a *Trim* e combinando gli elementi insieme per formare un intero più grande.

### Unione

Il metodo *Unione* utilizza due oggetti solidi e crea un singolo oggetto solido partendo dallo spazio coperto da entrambi gli oggetti. Lo spazio sovrapposto tra oggetti viene combinato nella forma finale. In questo esempio si combina una sfera e un cuboide in un'unica forma solida sfera-cubo:

```js
s1 = Sphere.ByCenterPointRadius(
    CoordinateSystem.Identity().Origin, 6);

s2 = Sphere.ByCenterPointRadius(
    CoordinateSystem.Identity().Origin.Translate(4, 0,
    0), 6);

combined = s1.Union(s2);
```

### Differenza

Il metodo *Difference*, come *Trim*, sottrae il contenuto del solido strumento di input dal solido di base. In questo esempio, viene ritagliata una piccola rientranza da una sfera:

```js
s = Sphere.ByCenterPointRadius(
    CoordinateSystem.Identity().Origin, 6);

tool = Sphere.ByCenterPointRadius(
    CoordinateSystem.Identity().Origin.Translate(10, 0,
    0), 6);

result = s.Difference(tool);
```

### Interseca

Il metodo *Intersect* restituisce il solido sovrapposto tra due input solidi. Nel seguente esempio, *Difference* è stato modificato in *Intersect* e il solido risultante è il vuoto mancante inizialmente ritagliato:

```js
s = Sphere.ByCenterPointRadius(
    CoordinateSystem.Identity().Origin, 6);

tool = Sphere.ByCenterPointRadius(
    CoordinateSystem.Identity().Origin.Translate(10, 0,
    0), 6);

result = s.Intersect(tool);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://primer2.dynamobim.org/it/8_coding_in_dynamo/8-2_geometry-with-design-script/9-geometric-booleans.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
