You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Euclid/Euclid.docc/ConstructingMeshes.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,10 @@ Euclid offers a number of helper methods to quickly create complex geometry.
13
13
The simplest way to create a ``Mesh`` is to start with an existing primitive, such as a cube or sphere.
14
14
The following primitive types are available in Euclid, and are defined as static constructor methods on ``Mesh``:
15
15
16
-
-``Mesh/cube(center:size:faces:material:)-imdm`` - A cubic ``Mesh`` (or cuboid, if you specify different values for the width, height and/or depth).
16
+
-``Mesh/cube(center:size:faces:wrapMode:material:)-8t5q8`` - A cubic ``Mesh`` (or cuboid, if you specify different values for the width, height and/or depth).
17
17
-``Mesh/sphere(radius:slices:stacks:poleDetail:faces:wrapMode:material:)`` - A spherical `Mesh`.
18
18
-``Mesh/cylinder(radius:height:slices:poleDetail:faces:wrapMode:material:)`` - A cylindrical `Mesh`.
19
-
-``Mesh/cone(radius:height:slices:poleDetail:addDetailAtBottomPole:faces:wrapMode:material:)`` - A conical ``Mesh``.
19
+
-``Mesh/cone(radius:height:slices:stacks:poleDetail:addDetailAtBottomPole:faces:wrapMode:material:)`` - A conical ``Mesh``.
20
20
21
21
All `Mesh` instances are made of flat polygons.
22
22
Since true curves cannot be represented using straight edges, the `sphere`, `cylinder` and `cone` primitives are approximations.
@@ -77,10 +77,10 @@ CSG is another powerful tool for creating intricate geometry.
77
77
CSG allows you to perform boolean operations (logical AND, OR, etc.) on solid shapes.
78
78
The following CSG operations are defined as methods on the ``Mesh`` type:
79
79
80
-
-``Mesh/subtract(_:isCancelled:)`` - Subtracts the volume of one `Mesh` from another.
81
-
-``Mesh/xor(_:isCancelled:)-swift.type.method`` - Produces a shape representing the non-overlapping parts of the input `Mesh`es (this is useful for rendering text glyphs).
80
+
-``Mesh/subtracting(_:isCancelled:)`` - Subtracts the volume of one `Mesh` from another.
81
+
-``Mesh/symmetricDifference(_:isCancelled:)-swift.type.method`` - Produces a shape representing the non-overlapping parts of the input `Mesh`es (this is useful for rendering text glyphs).
82
82
-``Mesh/union(_:isCancelled:)-swift.method`` - Combines two intersecting `Mesh`es, removing internal faces and leaving only the outer shell around both shapes (logical OR).
83
-
-``Mesh/intersection(_:isCancelled:)`` - Returns a single ``Mesh`` representing the common volume of two intersecting ``Mesh``es (logical AND).
83
+
-``Mesh/intersection(_:isCancelled:)-swift.method`` - Returns a single ``Mesh`` representing the common volume of two intersecting ``Mesh``es (logical AND).
84
84
-``Mesh/stencil(_:isCancelled:)-swift.method`` - This effectively "paints" part of one ``Mesh`` with the material from another.
85
85
86
86
All CSG operations require ``Mesh``es that are "watertight", that is they have no holes in their surface.
@@ -95,4 +95,4 @@ The ``Path/text(_:width:detail:)`` method produces an array of 2D ``Path`` that
95
95
Alternatively, the ``Mesh/text(_:font:width:depth:detail:material:)`` constructor directly produces an extruded 3D text model from a `String` or `AttributedString`.
96
96
97
97
Each glyph in the input string maps to a single ``Path`` in the result, but these ``Path``s may contain nested subpaths.
98
-
Glyphs formed from multiple subpaths will be filled using the even-odd rule (equivalent to an `xor` between the individually filled or extruded subpaths).
98
+
Glyphs formed from multiple subpaths will be filled using the even-odd rule (equivalent to using `symmetricDifference` with the individually filled or extruded subpaths).
0 commit comments