1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/******************************************************************************
Author: Joaquín Béjar García
Email: jb@taunais.com
Date: 26/8/24
******************************************************************************/
use crateChainError;
use Decimal;
use BTreeSet;
use ToSchema;
/// A result type for geometric point operations that may fail.
///
/// This type alias provides a consistent way to handle point generation operations
/// that could result in errors, encapsulating the resulting point or an error.
pub type ResultPoint<Point> = ;
/// Parameters for constructing geometric objects in different dimensions.
///
/// This enum provides configuration options for different dimensional spaces
/// when generating geometric objects through parametric equations or sampling.
/// It supports both 2D curves (with a single parameter t) and 3D surfaces
/// (with two parameters x and y).
/// Defines methods for constructing geometric objects.
///
/// This enum provides two primary approaches to creating geometric objects:
/// - Direct construction from a set of predefined points
/// - Parametric generation using a mathematical function
///
/// The generic parameters allow flexibility in the types of points and input parameters used:
/// - `Point`: The type representing a coordinate in the geometric space
/// - `Input`: The parameter type passed to parametric functions (typically `Decimal` for 2D or `(Decimal, Decimal)` for 3D)