55 std::string
const &latent_code_file,
int id);
109 void SetSize(
double d)
override;
171 void Print()
override;
174 int num_latent_code{0};
A class for representing a shape using a neural network-generated signed distance function and a late...
Definition shape_coded_netsdf.hpp:24
void UpdateSurfaceNodes() override
Update the surface nodes of the CodedNetSDF object.
Definition shape_coded_netsdf.cpp:51
void Print() override
Print information about the CodedNetSDF object.
Definition shape_coded_netsdf.cpp:214
void InitFromJson(nlohmann::json const &js) override
Initialize the CodedNetSDF object from a JSON structure.
Definition shape_coded_netsdf.cpp:45
CodedNetSDF()
Default constructor.
Definition shape_coded_netsdf.cpp:11
~CodedNetSDF()
Destructor.
Definition shape_coded_netsdf.cpp:212
VecXT< double > latent_code
The latent code used as input to the neural network model.
Definition shape_coded_netsdf.hpp:35
RegressionNet net_sdf_model
The neural network model used to generate the signed distance function.
Definition shape_coded_netsdf.hpp:30
void InitFromModelFiles(std::string const &net_sdf_file, std::string const &latent_code_file, int id)
Initialize the CodedNetSDF object from model files.
Definition shape_coded_netsdf.cpp:16
void UpdateShapeProperties() override
Update the shape properties of the CodedNetSDF object.
Definition shape_coded_netsdf.cpp:75
double SignedDistance(Vec3d const &pos) const override
Compute the signed distance from a given position to the surface of the CodedNetSDF object.
Definition shape_coded_netsdf.cpp:168
STLModel GetSTLModel(int num_nodes=200) override
Generate an STL model of the CodedNetSDF object.
Definition shape_coded_netsdf.cpp:126
Shape * Clone() const override
Clone the CodedNetSDF object.
Definition shape_coded_netsdf.cpp:124
void SetSize(double d) override
Set the size of the CodedNetSDF object.
Definition shape_coded_netsdf.cpp:119
void Init()
Initialize the CodedNetSDF object.
Definition shape_coded_netsdf.cpp:31
nlohmann::json PackJson() override
Pack the CodedNetSDF object into a JSON structure.
Definition shape_coded_netsdf.cpp:40
Vec3d SurfacePoint(Vec3d const &pos) override
Compute the surface point closest to a given position on the CodedNetSDF object.
Definition shape_coded_netsdf.cpp:184
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
std::vector< T > VecXT
Definition utils_macros.hpp:31
pos
Definition json_serilization.hpp:19
std::array< double, 3 > Vec3d
Definition utils_macros.hpp:18