WIP: Plater
This commit is contained in:
parent
746d06fe3e
commit
342b584399
18 changed files with 1104 additions and 43 deletions
|
@ -61,7 +61,7 @@ class ModelObject
|
|||
friend class Model;
|
||||
public:
|
||||
std::string name;
|
||||
std::string input_file;
|
||||
std::string input_file; // XXX: consider fs::path
|
||||
// Instances of this ModelObject. Each instance defines a shift on the print bed, rotation around the Z axis and a uniform scaling.
|
||||
// Instances are owned by this ModelObject.
|
||||
ModelInstancePtrs instances;
|
||||
|
@ -336,6 +336,7 @@ public:
|
|||
void swap(Model &other);
|
||||
~Model() { this->clear_objects(); this->clear_materials(); }
|
||||
|
||||
// XXX: use fs::path ?
|
||||
static Model read_from_file(const std::string &input_file, DynamicPrintConfig *config = nullptr, bool add_default_instances = true);
|
||||
static Model read_from_archive(const std::string &input_file, DynamicPrintConfig *config, bool add_default_instances = true);
|
||||
|
||||
|
|
|
@ -56,6 +56,11 @@ inline Vec2i64 to_2d(const Vec3i64 &pt3) { return Vec2i64(pt3(0), pt3(1)); }
|
|||
inline Vec2f to_2d(const Vec3f &pt3) { return Vec2f (pt3(0), pt3(1)); }
|
||||
inline Vec2d to_2d(const Vec3d &pt3) { return Vec2d (pt3(0), pt3(1)); }
|
||||
|
||||
// inline Vec3crd to_3d(const Vec2crd &pt2, coord_t z) { return Vec3crd(pt2(0), pt2(1), z); }
|
||||
// inline Vec3i64 to_3d(const Vec2i64 &pt2, int64_t z) { return Vec3i64(pt2(0), pt2(1), z); }
|
||||
// inline Vec3f to_3d(const Vec2f &pt2, float z) { return Vec3f (pt2(0), pt2(1), z); }
|
||||
// inline Vec3d to_3d(const Vec2d &pt2, double z) { return Vec3d (pt2(0), pt2(1), z); }
|
||||
|
||||
inline Vec2d unscale(coord_t x, coord_t y) { return Vec2d(unscale<double>(x), unscale<double>(y)); }
|
||||
inline Vec2d unscale(const Vec2crd &pt) { return Vec2d(unscale<double>(pt(0)), unscale<double>(pt(1))); }
|
||||
inline Vec2d unscale(const Vec2d &pt) { return Vec2d(unscale<double>(pt(0)), unscale<double>(pt(1))); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue