mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 06:31:57 +08:00
fix:
../src/slic3r/GUI/Gizmos/GLGizmoSVG.hpp:66:159: required from here Eigen/src/Core/PlainObjectBase.h:751:29: error: invalid cast from type ‘double (*)(const char*) noexcept’ to type ‘Eigen::PlainObjectBase<Eigen::Matrix<double, 2, 1, 2> >::Scalar’ {aka ‘double’} 751 | m_storage.data()[0] = Scalar(val0);
This commit is contained in:
parent
5395059475
commit
de40cd6807
@ -195,15 +195,18 @@ bool GLGizmoSVG::create_volume(ModelVolumeType volume_type)
|
||||
return start_create_volume_without_position(input, std::move(base));
|
||||
}
|
||||
|
||||
bool GLGizmoSVG::create_volume(std::string_view svg_file, ModelVolumeType volume_type, const Vec2d &mouse_pos)
|
||||
bool GLGizmoSVG::create_volume(std::string_view svg_file, ModelVolumeType volume_type){
|
||||
CreateVolumeParams input = create_input(m_parent, m_raycast_manager, volume_type);
|
||||
DataBasePtr base = create_emboss_data_base(m_job_cancel, volume_type, svg_file);
|
||||
if (!base) return false; // Uninterpretable svg
|
||||
return start_create_volume_without_position(input, std::move(base));
|
||||
}
|
||||
|
||||
bool GLGizmoSVG::create_volume(std::string_view svg_file, const Vec2d &mouse_pos, ModelVolumeType volume_type)
|
||||
{
|
||||
CreateVolumeParams input = create_input(m_parent, m_raycast_manager, volume_type);
|
||||
DataBasePtr base = create_emboss_data_base(m_job_cancel, volume_type, svg_file);
|
||||
if (!base) return false; // Uninterpretable svg
|
||||
// is not a number || is infinity
|
||||
if (mouse_pos.x() != mouse_pos.x() ||
|
||||
mouse_pos.y() != mouse_pos.y())
|
||||
return start_create_volume_without_position(input, std::move(base));
|
||||
return start_create_volume(input, std::move(base), mouse_pos);
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ struct Texture{
|
||||
class GLGizmoSVG : public GLGizmoBase
|
||||
{
|
||||
public:
|
||||
GLGizmoSVG(GLCanvas3D &parent);
|
||||
explicit GLGizmoSVG(GLCanvas3D &parent);
|
||||
|
||||
/// <summary>
|
||||
/// Create new embossed text volume by type on position of mouse
|
||||
@ -60,10 +60,11 @@ public:
|
||||
/// Create volume from already selected svg file
|
||||
/// </summary>
|
||||
/// <param name="svg_file">File path</param>
|
||||
/// <param name="volume_type">Object part / Negative volume / Modifier</param>
|
||||
/// <param name="mouse_pos">Position on screen where to create volume</param>
|
||||
/// <param name="volume_type">Object part / Negative volume / Modifier</param>
|
||||
/// <returns>True on succesfull start creation otherwise False</returns>
|
||||
bool create_volume(std::string_view svg_file, ModelVolumeType volume_type = ModelVolumeType::MODEL_PART, const Vec2d &mouse_pos = Vec2d(std::nan, std::nan));
|
||||
bool create_volume(std::string_view svg_file, const Vec2d &mouse_pos, ModelVolumeType volume_type = ModelVolumeType::MODEL_PART);
|
||||
bool create_volume(std::string_view svg_file, ModelVolumeType volume_type = ModelVolumeType::MODEL_PART);
|
||||
|
||||
/// <summary>
|
||||
/// Check whether volume is object containing only emboss volume
|
||||
|
@ -1656,7 +1656,7 @@ bool emboss_svg(Plater& plater, const wxString &svg_file, const Vec2d& mouse_dro
|
||||
evt.SetPosition(wxPoint(mouse_drop_position.x(), mouse_drop_position.y()));
|
||||
canvas->on_mouse(evt); // call render where is call GLCanvas3D::_picking_pass()
|
||||
|
||||
return svg->create_volume(svg_file_str, ModelVolumeType::MODEL_PART, mouse_drop_position);
|
||||
return svg->create_volume(svg_file_str, mouse_drop_position, ModelVolumeType::MODEL_PART);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user