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
<PackageReferenceInclude="RhinoCommon"Version="7.0.20314.3001"Condition="'$(TargetFramework)' == 'net48'"PrivateAssets="all"ExcludeAssets="runtime" /> <!--should be the same version as Rhino.Scripting and Rhino.Scripting.Extension -->
66
66
<PackageReferenceInclude="RhinoCommon"Version="8.19.25132.1001"Condition="'$(TargetFramework)' == 'net7.0'"PrivateAssets="all"ExcludeAssets="runtime" /><!--should be the same version as Rhino.Scripting and Rhino.Scripting.Extension -->
RhinoScriptingFSharpException.Raise "Rhino.Scripting.FSharp:.Plane.createThreePoints failed. The points are colinear by less than 1.0 degree, origin %s and xPt %s and yPt %s" origin.AsString xPt.AsString yPt.AsString
238
+
RhinoScriptingFSharpException.Raise "Rhino.Scripting.FSharp:.Plane.createThreePoints failed. The points are collinear by less than 1.0 degree, origin %s and xPt %s and yPt %s" origin.AsString xPt.AsString yPt.AsString
RhinoScriptingFSharpException.Raise "Rhino.Scripting.FSharp:.Plane.createOriginNormalXaxis failed. The vectors are colinear by less than 1.0 degrees, origin %s and normal %s and normal%s" origin.AsString normal.AsString xAxis.AsString
295
+
RhinoScriptingFSharpException.Raise "Rhino.Scripting.FSharp:.Plane.createOriginNormalXaxis failed. The vectors are collinear by less than 1.0 degrees, origin %s and normal %s and xAxis%s" origin.AsString normal.AsString xAxis.AsString
304
296
lety= Vector3d.cross (nu, xu)
305
297
letx= Vector3d.cross (y, nu)
306
298
Plane(origin, x.Unitized, y.Unitized)
@@ -387,7 +379,7 @@ module AutoOpenPlane=
387
379
// let z = Vector3d.transformRigid m pl.ZAxis
388
380
// Plane (o, x, y, z)
389
381
390
-
/// Rotate Plane 180 Degrees around Z-axis if the Y-axis orientation does not match World Y (pl.Yax.Y < 0.0)
382
+
/// Rotate Plane 180 Degrees around Z-axis if the Y-axis orientation does not match World Y (pl.YAxis.Y < 0.0).
391
383
/// To ensure that Y is always positive. For example for showing Text.
392
384
static member inlinerotateZ180IfYNegative(pl:Plane)=
393
385
if pl.YAxis.Y <0.0then Plane.rotateOnZ180 pl else pl
@@ -425,8 +417,8 @@ module AutoOpenPlane=
425
417
Some <|((pl.Origin - ln.From)* z)/ nenner
426
418
427
419
428
-
/// Returns the line parameter and the X and Y parameters on the Plane. as tuple (pLn, pPlX, pPlY).
429
-
/// The parameters is the intersection point of the infinite Line with the Plane.
420
+
/// Returns the line parameter and the X and Y parameters on the Plane as tuple (pLn, pPlX, pPlY).
421
+
/// The parameter is the intersection point of the infinite Line with the Plane.
430
422
/// Returns None if they are parallel or coincident.
/// Returns a boolean indicating wether X, Y and Z are exactly 0.0.
32
+
/// Returns a boolean indicating whether X, Y and Z are exactly 0.0.
34
33
member inlinept.IsOrigin=
35
34
pt.X =0.0&& pt.Y =0.0&& pt.Z=0.0
36
35
37
36
/// Returns a boolean indicating if any of X, Y and Z is not exactly 0.0.
38
37
member inlinep.IsNotOrigin=
39
38
p.X <>0.0|| p.Y <>0.0|| p.Z <>0.0
40
39
41
-
/// Returns a boolean indicating wether the absolute value of X, Y and Z is each less than the given tolerance.
40
+
/// Returns a boolean indicating whether the absolute value of X, Y and Z is each less than the given tolerance.
42
41
member inlinept.IsAlmostOrigin tol =
43
-
abs pt.X < tol && abs pt.Y < tol
42
+
abs pt.X < tol && abs pt.Y < tol&& abs pt.Z < tol
44
43
45
44
/// Returns new 3D point with new X coordinate, Y and Z stay the same.
46
45
member inlinept.WithX x =
47
46
Point3d (x, pt.Y, pt.Z)
48
47
49
-
/// Returns a new 3D vector with new y coordinate, X and Z stay the same.
48
+
/// Returns a new 3D point with new Y coordinate, X and Z stay the same.
50
49
member inlinept.WithY y =
51
50
Point3d (pt.X, y, pt.Z)
52
51
53
-
/// Returns a new 3D vector with new z coordinate, X and Y stay the same.
52
+
/// Returns a new 3D point with new Z coordinate, X and Y stay the same.
54
53
member inlinept.WithZ z =
55
54
Point3d (pt.X, pt.Y, z)
56
55
@@ -143,14 +142,14 @@ module AutoOpenPnt =
143
142
144
143
/// A separate function to compose the error message that does not get inlined.
145
144
[<Obsolete("Not actually obsolete but just hidden. (Needs to be public for inlining of the functions using it.)")>]
146
-
memberp.FailedAngle360InXYTo(fromPt:Point3d,toPt:Point3d)= RhinoScriptingFSharpException.Raise "Rhino.Scripting.FSharp:Point3d.closestPointOnLine: Line is too short for fromPt %O to %O and %O" fromPt toPt p
145
+
memberp.FailedClosestPointOnLine(fromPt:Point3d,toPt:Point3d)= RhinoScriptingFSharpException.Raise "Rhino.Scripting.FSharp:Point3d.ClosestPointOnLine: Line is too short for fromPt %O to %O and testPt%O" fromPt toPt p
147
146
148
147
/// Get closest point on finite line to test point.
149
148
member inlinetestPt.ClosestPointOnLine(fromPt:Point3d,toPt:Point3d)=
150
149
letdir= testPt - fromPt
151
150
letv= toPt - fromPt
152
151
letlenSq= v.LengthSq
153
-
if isTooTinySq(lenSq)then testPt.FailedAngle360InXYTo(fromPt, toPt)
152
+
if isTooTinySq(lenSq)then testPt.FailedClosestPointOnLine(fromPt, toPt)
154
153
letdot= Vector3d.dot (v, dir)/ lenSq
155
154
if dot <=0.0then fromPt
156
155
elif dot >=1.0then toPt
@@ -166,7 +165,7 @@ module AutoOpenPnt =
166
165
letv= toPt - fromPt
167
166
letlenSq= v.LengthSq
168
167
if isTooTinySq(lenSq)then testPt.FailedDistanceToLine(fromPt, toPt)
169
-
letdot= Vector3d.dot (v, dir)/v.LengthSq
168
+
letdot= Vector3d.dot (v, dir)/lenSq
170
169
if dot <=0.0then testPt.DistanceTo fromPt
171
170
elif dot >=1.0then testPt.DistanceTo toPt
172
171
else testPt.DistanceTo (fromPt + v * dot)
@@ -302,7 +301,9 @@ module AutoOpenPnt =
302
301
/// If the returned vector has length zero then the points are in one line.
static memberfailedDistPt(fromPt:Point3d,dirPt:Point3d,distance:float)= RhinoScriptingFSharpException.Raise "Rhino.Scripting.FSharp:Point3d.distPt: distance form %O to %O is too small to scale to distance: %g" fromPt dirPt distance
304
+
/// A separate function to compose the error message that does not get inlined.
305
+
[<Obsolete("Not actually obsolete but just hidden. (Needs to be public for inlining of the functions using it.)")>]
306
+
static memberfailedDistPt(fromPt:Point3d,dirPt:Point3d,distance:float)= RhinoScriptingFSharpException.Raise "Rhino.Scripting.FSharp:Point3d.distPt: distance from %O to %O is too small to scale to distance: %g" fromPt dirPt distance
306
307
307
308
/// Returns a point that is at a given distance from a 3D point in the direction of another point.
308
309
static member inlinedistPt(fromPt:Point3d,dirPt:Point3d,distance:float):Point3d =
0 commit comments