50 std::string
const &net_spf_file);
104 void SetSize(
double d)
override;
165 void Print()
override;
A class for representing a shape using a neural network-based signed distance function (SDF).
Definition shape_netsdf.hpp:26
STLModel GetSTLModel(int num_nodes=200) override
Generate an STL model of the NetSDF object.
Definition shape_netsdf.cpp:119
void UpdateShapeProperties() override
Update the shape properties of the NetSDF object.
Definition shape_netsdf.cpp:68
RegressionNet net_spf_model
Definition shape_netsdf.hpp:30
NetSDF()
Default constructor.
Definition shape_netsdf.cpp:10
Shape * Clone() const override
Clone the NetSDF object.
Definition shape_netsdf.cpp:117
Vec3d SurfacePoint(Vec3d const &pos) override
Compute the surface point closest to a given position on the NetSDF object.
Definition shape_netsdf.cpp:165
RegressionNet net_sdf_model
Definition shape_netsdf.hpp:29
nlohmann::json PackJson() override
Pack the NetSDF object into a JSON structure.
Definition shape_netsdf.cpp:32
double alpha
Definition shape_netsdf.hpp:33
void Print() override
Print information about the NetSDF object.
Definition shape_netsdf.cpp:179
void Init()
Initialize the NetSDF object.
Definition shape_netsdf.cpp:23
~NetSDF()
Destructor.
Definition shape_netsdf.cpp:177
void SetSize(double d) override
Set the size of the NetSDF object.
Definition shape_netsdf.cpp:112
void UpdateSurfaceNodes() override
Update the surface nodes of the NetSDF object.
Definition shape_netsdf.cpp:43
double SignedDistance(Vec3d const &pos) const override
Compute the signed distance from a given position to the surface of the NetSDF object.
Definition shape_netsdf.cpp:152
void InitFromModelFiles(std::string const &net_sdf_file, std::string const &net_spf_file)
Initialize the NetSDF object from pre-trained neural network models.
Definition shape_netsdf.cpp:15
void InitFromJson(nlohmann::json const &js) override
Initialize the NetSDF object from a JSON structure.
Definition shape_netsdf.cpp:37
A class that represents a feedforward neural network for regression.
Definition regression_net.hpp:21
Class for working with STL models.
Definition stl_model.hpp:17
This class represents different types of shapes and performs various calculations on them.
Definition shape.hpp:15
Definition bond_entry.hpp:7
pos
Definition json_serilization.hpp:19
std::array< double, 3 > Vec3d
Definition utils_macros.hpp:18