Examples:
- point = Geom::Point3d.new(1,2,3)
+ point = Geom::Point3d.new(1, 2, 3)
x = point.x
@@ -4032,7 +4159,7 @@
Examples:
- point = Geom::Point3d.new(1,2,3)
+ point = Geom::Point3d.new(1, 2, 3)
x = point.x = 2
@@ -4133,7 +4260,7 @@
Examples:
- point = Geom::Point3d.new(1,2,3)
+ point = Geom::Point3d.new(1, 2, 3)
y = point.y
@@ -4203,7 +4330,7 @@
Examples:
- point = Geom::Point3d.new(1,2,3)
+ point = Geom::Point3d.new(1, 2, 3)
y = point.y = 2
@@ -4304,7 +4431,7 @@
Examples:
- point = Geom::Point3d.new(1,2,3)
+ point = Geom::Point3d.new(1, 2, 3)
z = point.z
@@ -4374,7 +4501,7 @@
Examples:
- point = Geom::Point3d.new(1,2,3)
+ point = Geom::Point3d.new(1, 2, 3)
z = point.z = 2
diff --git a/Geom/PolygonMesh.html b/Geom/PolygonMesh.html
index f369174..d709502 100644
--- a/Geom/PolygonMesh.html
+++ b/Geom/PolygonMesh.html
@@ -209,7 +209,7 @@ Examples:
entities = Sketchup.active_model.active_entities
-face = entities.grep(Sketchup::Face).first
+face = entities.add_face([1, 1, 1], [1, 2, 1], [2, 2, 1])
mesh = face.mesh
@@ -537,7 +537,7 @@
- #polygon_at(index) ⇒ Array<Geom::Point3d>?
+ #polygon_at(index) ⇒ Array<Integer>?
@@ -740,9 +740,9 @@
#initialize ⇒ Geom::PolygonMesh
- #initialize(numpts) ⇒ Geom::PolygonMesh
+ #initialize(number_points) ⇒ Geom::PolygonMesh
- #initialize(numpts, numpolys) ⇒ Geom::PolygonMesh
+ #initialize(number_points, number_polygons) ⇒ Geom::PolygonMesh
@@ -802,7 +802,7 @@ Examples:
- #initialize(numpts) ⇒ Geom::PolygonMesh
+ #initialize(number_points) ⇒ Geom::PolygonMesh
@@ -815,7 +815,7 @@
Examples:
- numpts
+ number_points
(Integer)
@@ -837,7 +837,7 @@ Examples:
- #initialize(numpts, numpolys) ⇒ Geom::PolygonMesh
+ #initialize(number_points, number_polygons) ⇒ Geom::PolygonMesh
@@ -850,7 +850,7 @@
Examples:
- numpts
+ number_points
(Integer)
@@ -866,7 +866,7 @@ Examples:
- numpolys
+ number_polygons
(Integer)
@@ -1102,8 +1102,7 @@ Examples:
mesh = Geom::PolygonMesh.new
-mesh.add_point(Geom::Point3d.new(0, 0, 0))
+mesh.add_point(Geom::Point3d.new(0, 0, 0))
mesh.add_point(Geom::Point3d.new(1, 0, 0))
mesh.add_point(Geom::Point3d.new(1, 1, 0))
polygon_index = mesh.add_polygon(1, 2, 3)
@@ -1168,8 +1167,7 @@ Examples:
mesh = Geom::PolygonMesh.new
-mesh.add_point(Geom::Point3d.new(0, 0, 0))
+mesh.add_point(Geom::Point3d.new(0, 0, 0))
mesh.add_point(Geom::Point3d.new(1, 0, 0))
mesh.add_point(Geom::Point3d.new(1, 1, 0))
polygon_index = mesh.add_polygon([1, 2, 3])
@@ -1392,7 +1390,7 @@ Examples:
mesh = Geom::PolygonMesh.new
point = Geom::Point3d.new(0, 1, 2)
mesh.add_point(point)
-num = mesh.count_points
+number_points = mesh.count_points
@@ -1466,7 +1464,7 @@
Examples:
point2 = Geom::Point3d.new(1, 0, 2)
point3 = Geom::Point3d.new(2, 0, 1)
mesh.add_polygon(point1, point2, point3)
-
nump = mesh.count_polygons
+
number_polygons = mesh.count_polygons
@@ -1543,9 +1541,14 @@
Examples:
- flags = 4
@@ -1905,7 +1908,7 @@
Examples:
↑
- #polygon_at(index) ⇒ Array<Geom::Point3d>?
+ #polygon_at(index) ⇒ Array<Integer>?
@@ -1986,7 +1989,7 @@ Examples:
- (Array<Geom::Point3d>, nil)
+ (Array<Integer>, nil)
@@ -2153,7 +2156,14 @@
Examples:
- polygons = polygonmesh.polygons
+ mesh = Geom::PolygonMesh.new
+mesh.add_point([0, 0, 0])
+mesh.add_point([1, 0, 0])
+mesh.add_point([1, 1, 0])
+
+mesh.add_polygon(1, 2, 3)
+mesh.add_polygon(-1, 3, 2)
+polygons = mesh.polygons
@@ -2362,27 +2372,26 @@ Examples:
mesh = Geom::PolygonMesh.new(4)
-point1 = Geom::Point3d.new(0, 0, 0)
+point1 = Geom::Point3d.new(0, 0, 0)
point2 = Geom::Point3d.new(9, 0, 0)
point3 = Geom::Point3d.new(9, 9, 0)
point4 = Geom::Point3d.new(0, 9, 0)
-uv1 = Geom::Point3d.new(0, 0, 0)
-uv2 = Geom::Point3d.new(2, 0, 0)
-uv3 = Geom::Point3d.new(2, 2, 0)
-uv4 = Geom::Point3d.new(0, 2, 0)
-index1 = mesh.add_point(point1)
+
+uv_point1 = Geom::Point3d.new(0, 0, 0)
+uv_point2 = Geom::Point3d.new(2, 0, 0)
+uv_point3 = Geom::Point3d.new(2, 2, 0)
+uv_point4 = Geom::Point3d.new(0, 2, 0)
+
+index1 = mesh.add_point(point1)
index2 = mesh.add_point(point2)
index3 = mesh.add_point(point3)
index4 = mesh.add_point(point4)
-mesh.set_uv(index1, uv1, true)
-mesh.set_uv(index2, uv2, true)
-mesh.set_uv(index3, uv3, true)
-mesh.set_uv(index4, uv4, true)
-mesh.add_polygon(index1, index2, index3)
+mesh.set_uv(index1, uv_point1, true)
+mesh.set_uv(index2, uv_point2, true)
+mesh.set_uv(index3, uv_point3, true)
+mesh.set_uv(index4, uv_point4, true)
+
+mesh.add_polygon(index1, index2, index3)
mesh.add_polygon(index1, index3, index4)
@@ -2511,11 +2520,12 @@ Examples:
point1 = Geom::Point3d.new(100, 200, 300)
-tr = Geom::Transformation.new(point1)
+transformation = Geom::Transformation.new(point1)
mesh = Geom::PolygonMesh.new
point2 = Geom::Point3d.new(0, 1, 2)
mesh.add_point(point2)
-mesh.transform!(tr)
+mesh.transform!(transformation)
@@ -2617,7 +2627,12 @@
Examples:
- point = mesh.uv_at(1, true)
+ mesh = Geom::PolygonMesh.new
+index = mesh.add_point([2, 2, 2])
+uv_point = Geom::Point3d.new(1, 1, 0)
+
+mesh.set_uv(index, uv_point, true)
+point = mesh.uv_at(index, true)
@@ -2735,9 +2750,20 @@
Examples:
- mesh = face.mesh(1 | 2)
-uvs = mesh.uvs(true)
+ model = Sketchup.active_model
+entity = model.active_entities
+
+face = entity.add_face([1, 1, 1], [1, 3, 1], [3, 3, 1])
+mesh = face.mesh(1 | 2)
+
+uv_point1 = Geom::Point3d.new(0, 0, 0)
+uv_point2 = Geom::Point3d.new(1, 0, 0)
+uv_point3 = Geom::Point3d.new(1, 1, 0)
+mesh.set_uv(1, uv_point1, true)
+mesh.set_uv(2, uv_point2, true)
+mesh.set_uv(3, uv_point3, true)
+
+uv_points = mesh.uvs(true)
diff --git a/Geom/Transformation.html b/Geom/Transformation.html
index 28b7bc8..4f86f89 100644
--- a/Geom/Transformation.html
+++ b/Geom/Transformation.html
@@ -710,7 +710,18 @@ Examples:
point = Geom::Point3d.new(10, 20, 30)
-tr = Geom::Transformation.new(point)
+transformation = Geom::Transformation.new(point)
+
+
+ origin = Geom::Point3d.new(10, 10, 10)
+zaxis = Geom::Vector3d.new(1, 2, 3)
+transformation = Geom::Transformation.new(origin, zaxis)
+
+
+ origin = Geom::Point3d.new(1, 1, 1)
+axis = Geom::Vector3d.new(1, 0, 0)
+angle = 45.degrees transformation = Geom::Transformation.new(origin, axis, angle)
@@ -1180,7 +1191,7 @@ Examples:
tr = Geom::Transformation.axes(ORIGIN, X_AXIS, Z_AXIS, Y_AXIS.reverse)
+transformation = Geom::Transformation.axes(ORIGIN, X_AXIS, Z_AXIS, Y_AXIS.reverse)
@@ -1388,7 +1399,7 @@
The interpolate method is used to create a new transformation that is the result of interpolating between two other transformations.
-Parameter is a weight (between `0.0` and `1.0`) that identifies whether to favor `transformation1` or `transformation2`.
+Parameter weight is a value (between 0.0 and 1.0) that represents the percentage given to `transformation1` and `transformation2`.
@@ -1400,14 +1411,14 @@ Examples:
origin = Geom::Point3d.new(0, 0, 0)
-x = Geom::Vector3d.new(0, 1, 0)
-y = Geom::Vector3d.new(1, 0, 0)
-z = Geom::Vector3d.new(0, 0, 1)
+xaxis = Geom::Vector3d.new(0, 1, 0)
+yaxis = Geom::Vector3d.new(1, 0, 0)
+zaxis = Geom::Vector3d.new(0, 0, 1)
point = Geom::Point3d.new(10, 20, 30)
-t1 = Geom::Transformation.new(point)
-t2 = Geom::Transformation.axes(origin, x, y, z)
-t3 = Geom::Transformation.interpolate(t1, t2, 0.25)
+transformation1 = Geom::Transformation.new(point)
+transformation2 = Geom::Transformation.axes(origin, xaxis, yaxis, zaxis)
+new_transformation = Geom::Transformation.interpolate(transformation1, transformation2, 0.25)
@@ -1423,7 +1434,7 @@ Examples:
- transform1
+ transformation1
(Geom::Transformation)
@@ -1434,7 +1445,7 @@ Examples:
- transform2
+ transformation2
(Geom::Transformation)
@@ -1454,7 +1465,7 @@ Examples:
—
-
A value between 0.0 and 1.0 (see comments).
+
A value between 0.0 and 1.0.
@@ -1656,7 +1667,7 @@ Examples:
point = Geom::Point3d.new(20, 30, 0)
scale = 10
-tr = Geom::Transformation.scaling(point, scale)
+transformation = Geom::Transformation.scaling(point, scale)
@@ -2011,7 +2022,7 @@ Examples:
vector = Geom::Vector3d.new(0, 1, 0)
-tr = Geom::Transformation.translation(vector)
+transformation = Geom::Transformation.translation(vector)
@@ -2173,9 +2184,9 @@ Examples:
point1 = Geom::Point3d.new(10, 20, 30)
point2 = Geom::Point3d.new(2, 2, 2)
-tr = Geom::Transformation.new(point1)
-point3 = tr * point2
+transformation = Geom::Transformation.new(point1)
+new_point = transformation * point2
@@ -2504,8 +2515,8 @@ Examples:
point = Geom::Point3d.new(10, 20, 30)
-tr1 = Geom::Transformation.new(point)
-tr2 = tr1.clone
+transformation = Geom::Transformation.new(point)
+new_transformation = transformation.clone
@@ -2578,22 +2589,22 @@ Examples:
point = Geom::Point3d.new(10, 20, 30)
-tr = Geom::Transformation.new(point)
-status = tr.identity?
+transformation = Geom::Transformation.new(point)
+status = transformation.identity?
- tr = Geom::Transformation.new(ORIGIN)
-status = tr.identity?
+ transformation = Geom::Transformation.new(ORIGIN)
+status = transformation.identity?
- tr = Geom::Transformation.new
-status = tr.identity?
+ transformation = Geom::Transformation.new
+status = transformation.identity?
- matrix = transformation.to_a.each_slice(4).inject { |str, row|"#{str}\r\n#{row}"}
+puts matrix
@@ -3225,8 +3289,8 @@ Examples:
point = Geom::Point3d.new(10, 20, 30)
-tr = Geom::Transformation.new(point)
-x = tr.xaxis
+transformation = Geom::Transformation.new(point)
+x = transformation.xaxis
@@ -3291,8 +3355,8 @@ Examples:
point = Geom::Point3d.new(10, 20, 30)
-tr = Geom::Transformation.new(point)
-x = tr.yaxis
+transformation = Geom::Transformation.new(point)
+y = transformation.yaxis
@@ -3357,8 +3421,8 @@ Examples:
point = Geom::Point3d.new(10, 20, 30)
-tr = Geom::Transformation.new(point)
-x = tr.zaxis
+transformation = Geom::Transformation.new(point)
+z = transformation.zaxis
diff --git a/Geom/Transformation2d.html b/Geom/Transformation2d.html
index 4e46cc9..73dfd8f 100644
--- a/Geom/Transformation2d.html
+++ b/Geom/Transformation2d.html
@@ -571,7 +571,9 @@
Examples:
- tr = Geom::Transformation2d.new({1.0, 0.0, 0.0, 1.0, 1.0, 1.0})
+ transformation1 = Geom::Transformation2d.new
+
+transformation2 = Geom::Transformation2d.new([1.0, 0.0, 0.0, 1.0, 1.0, 1.0])
@@ -823,9 +825,9 @@
Examples:
- point = Geom::Point3d.new(20, 30, 0)
+ point = Geom::Point2d.new(20, 30)
scale = 10
-tr = Geom::Transformation2d.scaling(point, scale)
+transformation = Geom::Transformation2d.scaling(point, scale)
@@ -1140,7 +1142,7 @@ Examples:
vector = Geom::Vector2d.new(0, 1)
-tr = Geom::Transformation2d.translation(vector)
+transformation = Geom::Transformation2d.translation(vector)
@@ -1272,7 +1274,7 @@
#*(transformation) ⇒ Geom::Transformation2d
- #*(point) ⇒ Array<Float, Float>
+ #*(point) ⇒ Array(Float, Float)
@@ -1298,9 +1300,9 @@ Examples:
point1 = Geom::Point2d.new(5, 10)
point2 = Geom::Point2d.new(2, 2)
-tr = Geom::Transformation2d.new(point1)
-point3 = tr * point2
+transformation = Geom::Transformation2d.translation(point1)
+new_point = transformation * point2
@@ -1438,7 +1440,7 @@ Examples: