Commit Graph

243 Commits

Author SHA1 Message Date
bubnikv
1f7db3d40c Reworked the "new modifier mesh place on face" code to not place
on face if the instance coordinate system is skewed.
2019-03-01 10:09:20 +01:00
bubnikv
dc0c58a9c5 Improvement of the initial placement of modifier meshes:
Sphere and Cylinder are scaled to the same volume as Box
Newly entered modifier meshes are rotated parallell to the world coordinates.
If the instance coordinate system is rotated and scaled, it is not possible
to create an unskewed modifier to world transformation. In that case
the best possible transformation is found to minimize least squares error
of the 8 corners of the new modifier mesh bounding box using
Levenberg-Marquardt algorithm.

FIXME:
1) The Levenberg-Marquardt non-linear least squares does not converge
nicely, it may require some tuning.
2) Above all, if 1) is called, then often the skew of the modifier mesh
is so high, that it is likely more useful to display the modifier
with zero rotation and inverse scaling, so that the modifier will be
of correct size, but not parallel to the world coordinates.
2019-02-28 11:20:01 +01:00
Vojtech Kral
46ed5505da Fix string conversion in ObjectList 2019-02-22 14:34:50 +01:00
bubnikv
917f044f81 Renamed the "lambda-" prefix for the generic modifiers to "Generic-"
Refactored ModelVolume::Type to enum class ModelVolumeType to be able
to forward declare it.

Refactored UI to use the ModelVolumeType instead of the untyped int.
2019-02-22 12:12:10 +01:00
YuSanka
2e14f3456e Changed sidebar controls layout 2019-02-07 14:50:48 +01:00
YuSanka
ef7512fc43 Added bitmap scaling 2019-02-06 15:29:13 +01:00
YuSanka
b2410e0f23 Merge remote-tracking branch 'origin/master' into ys_hdpi 2019-02-06 11:12:44 +01:00
YuSanka
948f03067d Added scale for ObjectList 2019-02-06 11:07:32 +01:00
bubnikv
8982664551 Improved stability (fixed crashes) of the Cut by plane function by
replacing the cut triangulation with freeglu tesselator.
Added performance tracing output of the Cut by plane function.
Added wait cursor to split to parts / objects, object cut, save to AMF/3MF.
2019-02-05 20:23:24 +01:00
Enrico Turri
8076b39c4b Emulation of kill focus event on object manipulator fields when changing selection into objects list [WIN+LINUX] 2019-01-31 14:12:07 +01:00
Enrico Turri
5fa5d495bb Merge branch 'master' of https://github.com/prusa3d/Slic3r into sidebar_fixes 2019-01-31 13:32:47 +01:00
YuSanka
a5ec951180 Added menu item for the "Fix through the Netfabb" 2019-01-30 16:27:33 +01:00
Enrico Turri
3deeab90f3 Merge branch 'master' of https://github.com/prusa3d/Slic3r into sidebar_fixes 2019-01-30 16:19:59 +01:00
YuSanka
5a28693ff4 Updated draw_colored_band() according to the new colors.
+ some code refactoring
2019-01-30 14:45:18 +01:00
Enrico Turri
168c3010fa Merge branch 'master' of https://github.com/prusa3d/Slic3r into sidebar_fixes 2019-01-30 14:09:18 +01:00
YuSanka
7957675a97 Fix to my last commit 2019-01-30 13:26:16 +01:00
Enrico Turri
fd65489c11 Added debug output to test event handling sequence between Objects List and Object Manipulator fields 2019-01-30 12:18:01 +01:00
YuSanka
411c02fef3 Implemented object/part renaming under OSX, using popup_menu 2019-01-30 11:35:37 +01:00
YuSanka
b6852d8bf2 Fixed first binding for "Split to parts" menu item in ObjectList 2019-01-30 10:06:10 +01:00
YuSanka
b0ecf07e9b Merge branch 'master' of https://github.com/prusa3d/Slic3r 2019-01-28 12:19:28 +01:00
YuSanka
c5152d04f8 Set options value from edited preset instead of default preset, when call "Add Settings"
+ added code for custom editing of the frequently used settings bundle (it's commented for this moment)
+ some code refactoring
2019-01-28 12:13:53 +01:00
bubnikv
588c07c12a Performance improvements:
Lazy "Place on face" gizmo update.
Caching of MeshObject::raw_mesh_bounding_box() for the object size display.
ModelObject::bounding_box(), raw_mesh_bounding_box(), full_raw_mesh_bounding_box() will not copy the mesh.
TriangleMesh::transformed_bounding_box(const Transform3d &trafo) will not copy the mesh data.
get_options_for_bundle() will not return reference to temp value
is_splittable() calls cheap mesh.has_multiple_patches()
2019-01-26 18:51:34 +01:00
YuSanka
9a01e313ad Implemented function create_freq_settings_popupmenu()
to add bundles with frequently used settings
2019-01-25 16:57:44 +01:00
YuSanka
5a7061a7fb Updated settings menu according to the view mode
+ Created new class PrusaMenu, derived from wxMenu and contains pointers to the separators.
2019-01-25 16:57:44 +01:00
Enrico Turri
348aa48121 Merge branch 'master' of https://github.com/prusa3d/Slic3r into objects_centering 2019-01-25 11:50:34 +01:00
YuSanka
9b8cdb95dc Updated view mode for object_list and object_menu 2019-01-25 10:57:13 +01:00
Enrico Turri
9a69305367 Merge branch 'master' of https://github.com/prusa3d/Slic3r into objects_centering 2019-01-24 08:33:14 +01:00
YuSanka
8fd6194403 Improved Instance splitting :
- Added icon and context menu for Instance.
- Added multiple selection and splitting for the instances (add new object with selected instances)
2019-01-23 16:12:47 +01:00
Enrico Turri
9a5d7a98a6 Merge branch 'master' of https://github.com/prusa3d/Slic3r into objects_centering 2019-01-23 08:26:55 +01:00
YuSanka
94b5f9c567 Implemented splitting of object instances by :
- drag & drop outside of any object
 - set as a separated Object (context menu)
2019-01-22 16:40:37 +01:00
Enrico Turri
f44510c272 Merge branch 'master' of https://github.com/prusa3d/Slic3r into objects_centering 2019-01-22 08:32:05 +01:00
YuSanka
5dafad3816 Fix of SPE-777
Added a flag to optimize the checking if the volume is splittable
2019-01-21 15:43:06 +01:00
Enrico Turri
25319113f1 Code cleanup 2019-01-21 11:29:45 +01:00
Enrico Turri
1eb01df0c8 Fixed .prusa i/o and split to objects 2019-01-18 16:01:43 +01:00
Enrico Turri
80bae6dd98 1st installment of volumes centering fixes (WIP) 2019-01-18 12:52:09 +01:00
Enrico Turri
01dc8e77ac Generic subparts placed at one of the bottom corners of the world bounding box of the transformed current selected instance (#1517) 2019-01-14 13:29:06 +01:00
YuSanka
c62a51ead1 Implemented ModeSizer with ModeButtons for the mode view changing from the settings tabs and plater 2019-01-10 11:09:31 +01:00
YuSanka
2dadf4b5dc Fixed a crash after settings adding for the instance from the scene's context menu 2019-01-09 10:30:48 +01:00
YuSanka
4d0c0ac748 Fix of Cyrillic named files inside the object list (part of the #1622) 2019-01-08 11:48:32 +01:00
YuSanka
bbed47acd0 Fixed #1579 2019-01-07 10:32:33 +01:00
bubnikv
8d1b854acb Replaced all wxString.ToStdString() with wxString.ToUTF8().data()
to be sure that the strings are correctly converted to UTF8.
2019-01-03 14:34:53 +01:00
Enrico Turri
611d9aa0d8 Model's volume transform set as default 2019-01-02 10:49:13 +01:00
bubnikv
76c922bf9a Fixed a crash when trying to delete a wipe tower with the delete key. 2018-12-18 19:12:59 +01:00
YuSanka
1dc3145e69 Suppressed selection's update if SettingsItem for the current object/part is selected 2018-12-18 15:29:49 +01:00
YuSanka
825f3641e2 Created GetRowByItem() to fix the Scrolling of the Object List to selected item under all platforms
+ temporary suppressed object/part mane editing under OSX
2018-12-17 12:47:08 +01:00
YuSanka
880c1ef2b4 Next try to fix scroll the Object List to selected item (OSX & GTK) 2018-12-14 17:10:08 +01:00
YuSanka
907e510535 Changed PrusaBitmapTextRenderer's inheritance to wxDataViewRenderer instead of wxDataViewCustomRenderer :
to fix name editing under OSX
2018-12-14 17:10:08 +01:00
YuSanka
48a94ebae1 Fixed scroll the Object List to selected item on OSX & GTK
+ fixed #1395 (maximum PresetComboBox's width limit on Ubuntu)
2018-12-14 12:11:23 +01:00
YuSanka
ef04e558a7 Temporary fix of the build 2018-12-13 15:06:34 +01:00
YuSanka
27f5df5fbd Fixed broken DnD on GTK
+ show "Object menu" for each FullInstance instead of FullObject
2018-12-13 13:38:18 +01:00
YuSanka
2c8bc7283e Scroll the Object List to selected item been visible in the list (after object/part selection from the 3DScene) 2018-12-13 13:38:18 +01:00
YuSanka
416f220c36 Save edited object/part's name to the object model 2018-12-12 14:44:43 +01:00
YuSanka
e1e4bf74ba ObjectList: first column editing 2018-12-12 14:44:42 +01:00
YuSanka
edb6928997 Fix to my last commit 2018-12-12 10:46:12 +01:00
YuSanka
a57ff1c221 Fixed DnD under all platforms
+ try to fix the work of Backspase in ObjectList (using EVT_KEY_DOWN instead of EVT_CHAR)
2018-12-12 08:40:10 +01:00
YuSanka
d7bc1410ee Update value inside TextCtrl & SpinCtrl after wxEVT_KILL_FOCES instead of wxEVT_TEXT (or wxEVT_TEXT_ENTER) 2018-12-11 14:05:56 +01:00
YuSanka
edd79883a1 Try to fix DnD under OSX
+ try to fix wxEVT_CHAR under OSX
+ some code-rebase
2018-12-11 09:37:58 +01:00
YuSanka
05fef33b10 Update extruder value for adding objects 2018-12-11 08:53:18 +01:00
YuSanka
d7db1cdc73 Fixed extruder number updating after changing of the extruder count 2018-12-10 17:02:54 +01:00
YuSanka
5e4c6c8e2d Fixed build under OSX 2018-12-10 14:13:25 +01:00
YuSanka
293d6ba8ad Suppressed import/adding of the 3mf which contains multi-part objects
+ Try to fix the wrong extruder selection under OSX
2018-12-10 13:40:19 +01:00
YuSanka
abbc451f80 Fixed wrong importing of the 3mf with modifier/part which is contain settings 2018-12-10 10:42:55 +01:00
YuSanka
c80267bb29 Context menu from the object on the 3Dscene 2018-12-07 17:50:48 +01:00
YuSanka
e382692a3f Try to fix sub_menu work(on the Scene) under OSX and Linux
+ some code refactoring for context menu inside ObjectList
2018-12-06 14:49:57 +01:00
Enrico Turri
7e613b706d Fixed wrong position of modifiers 2018-12-06 13:06:04 +01:00
bubnikv
b6861a5791 System Dialog - use bigger image, as the smaller one is not contained
in our Windows binary distro.
Fixed typo in "Add support bloker"
2018-12-05 16:24:43 +01:00
YuSanka
e0aa25b677 Fixed "extruder" column editing for non-object/part items. It's suppressed now.
+ Try to fix the wrong last column width updating under OSX
2018-12-04 14:32:15 +01:00
YuSanka
129c35b714 One more fix to updates of the "Slice now" and "Export G-code buttons"
- "Sliced now" button is hidden when "Background process" is selected
- deleted extra enable_buttons() function call
2018-12-04 12:30:47 +01:00
bubnikv
96e14b5d3b Fixed Canvas3D update after an object instance is deleted. 2018-12-04 11:35:04 +01:00
YuSanka
3c86203655 Disable "Slice now" and "Export G-code" buttons during BGP 2018-12-04 10:28:56 +01:00
Enrico Turri
fe8e431356 New menu layout set as default 2018-12-03 15:06:02 +01:00
YuSanka
7395b923bd Update gizmos on/off state 2018-12-03 13:29:28 +01:00
Enrico Turri
e1c90c83e8 Fixed GLVolumes reuse after instance deletion 2018-12-03 10:37:46 +01:00
YuSanka
054d202817 Correct mixed_selection updating from 3dScene to ObjectList 2018-11-30 11:22:06 +01:00
YuSanka
d7f9e86400 Update additional object setting after print technology changing 2018-11-29 15:01:20 +01:00
YuSanka
2add733caa Suppress change preset to SLA if we have multi-part object 2018-11-29 12:35:07 +01:00
Vojtech Kral
f5080ea7f5 Fix re-entrant render() calls, add an assert to enforce 2018-11-27 16:57:37 +01:00
bubnikv
a378bb7bed Removed some obsolete Perl bindings.
Removed libslic3r from the default include paths for all modules but
libslic3r. Now headers from libslic3r need to be included with an
explicit path (libslic3r/libslic3r.h etc)
Split the localization macros into I18N.{cpp,h}
2018-11-26 14:41:58 +01:00
bubnikv
9722bcdd75 Merge branch 'master' of https://github.com/Prusa3d/Slic3r 2018-11-23 12:47:46 +01:00
bubnikv
b03f672801 Refactored to get direct access to GLCanvas3D in Plater and Preview.
WIP: SLA update delayed until mouse is released.
2018-11-23 12:47:32 +01:00
YuSanka
4575443c4c Fixed bug with last solid part deleting
+ fixed building
+ deleted last ";" from the settings digest
2018-11-23 11:57:04 +01:00
YuSanka
7b9f498410 Changed the object context menu in the object list for SLA print technology
+ changed list of the options for "Add settings"
2018-11-22 11:06:07 +01:00
Enrico Turri
ee99fa2c64 Ensure object on bed after deletion of subpart 2018-11-21 12:27:20 +01:00
bubnikv
18f14482d0 Merge branch 'vb_3dscene_partial_update' 2018-11-20 17:07:31 +01:00
Enrico Turri
34cf541e0d Fixed position of newly created modifiers 2018-11-20 10:15:31 +01:00
tamasmeszaros
ad8c7c9f97 GUI forms with SLA support parameters 2018-11-19 14:15:40 +01:00
YuSanka
d658d918d7 Fixed crashing when project with modifier is imported 2018-11-19 14:05:29 +01:00
bubnikv
74ba1eaa16 WIP: Support of SLA suport & pad GLVolumes, couple of fixes. 2018-11-17 17:23:56 +01:00
Enrico Turri
9bb04ff15a Modified menu for open/save/save as project (3mf) and import/export 2018-11-15 15:27:39 +01:00
YuSanka
410568c9d9 Temporary workaround for the correct behavior of the Scrolled sidebar panel 2018-11-15 12:43:16 +01:00
Enrico Turri
86c1f5b417 Fixed crashes when deleting objects 2018-11-14 11:22:13 +01:00
Enrico Turri
3613a54e03 Deletion of instances and volumes from 3D scene 2018-11-14 08:53:56 +01:00
YuSanka
05e2d33d3f Added functions for deleting (sub)objects from model and list at the same time 2018-11-13 15:10:19 +01:00
YuSanka
ad8f270796 Added delete_instance_from_list(obj_idx, inst_idx) function 2018-11-13 13:35:10 +01:00
YuSanka
b721f9431a Fixed show_info_sizer according to selected mode.
+ fixed right panel layouts
+ deleted unused functions
2018-11-13 13:35:10 +01:00
YuSanka
d20bac7039 Added a modifier selection in the object list
+ set box-subobject's center to the objects center
+ fixed bug in PrusaObjectDataViewModel.Delete(), when deleting last volume_idx
2018-11-12 16:03:50 +01:00
YuSanka
c227dad8cc Changed object list behavior when we have only one part(volume) inside main object 2018-11-12 13:48:41 +01:00
Enrico Turri
22dbcbcd9c Enhanced volumes manipulation - wip 2018-11-12 08:54:22 +01:00
YuSanka
7f4a8bccd5 Fixed controls layout on right panel.
+ Split ObjectManipulation class to ObjectManipulation and ObjectSettings
+ fixed typo-bug in GetItemByVolumeId
2018-11-09 18:42:06 +01:00
bubnikv
06a51f9ed3 Fixed a crash on "split to parts" with an active SLA printer. 2018-11-08 20:44:07 +01:00
YuSanka
aa3e4c294a Added type "MultipleFullObject" to Selection
+ Fixed updating of the name of the manipulation pane
+ Changed logic of "Ctrl+A" inside the object list
2018-11-08 16:44:58 +01:00
YuSanka
96249792f6 Single volume selection from scene to object list 2018-11-08 16:44:58 +01:00
YuSanka
2c0b784a2d Added(ported) function fix_through_netfabb()
+ Fixed adding of the instances to the object list
2018-11-08 09:58:48 +01:00
Enrico Turri
f4b16bb242 Added new selection states - Select parts/modifiers from first instance only from right panel 2018-11-07 10:34:44 +01:00
YuSanka
00b833fbbe Lambda dialog is changed to default object adding (with default values), which can be modified from modifier matrix (in the future) 2018-11-06 17:39:18 +01:00
Enrico Turri
57c769b63b Selection of modifiers in 3D scene 2018-11-06 15:51:33 +01:00
YuSanka
de981ce8be Changed object context menu : Add part/modifier/support enforcer/support blocker -> Load model / generic box/sphere/cylinder/slab 2018-11-06 15:38:30 +01:00
YuSanka
0ac17b5513 Changed sequence of the items in the objects list (inside object): Additional Settings, Subvolumes(parts), Instances 2018-11-06 11:39:38 +01:00
YuSanka
4a8b738a6b Fixed object/part splitting
If object has additional settings and we split it, add this settings for each of the new objects(parts)
2018-11-06 10:17:56 +01:00
YuSanka
95af5c7cc6 Instance selection in object list according to the canvas selection 2018-11-06 10:17:56 +01:00
YuSanka
be57bb5c0e Update showing of the settings after part type changing 2018-11-05 08:58:14 +01:00
YuSanka
4eae6c0189 Changing of a type of a volume in the object list 2018-11-05 08:58:14 +01:00
YuSanka
a9e7b5c645 Implemented adding of support enforcer/blocker to the object list 2018-11-05 08:58:14 +01:00
YuSanka
618d0e4910 Fixed splitting of the objects with instances 2018-11-01 16:24:20 +01:00
Enrico Turri
b8168d421c Refactoring 2018-11-01 14:25:10 +01:00
YuSanka
c135f4a1f8 After-merge bug fixing 2018-11-01 14:02:38 +01:00
YuSanka
ba8a2e11b8 Merge branch 'dev_native' of https://github.com/prusa3d/Slic3r into dev_native 2018-11-01 13:56:20 +01:00
YuSanka
e62246d56c Fixed Info pane filling 2018-11-01 12:57:21 +01:00
Enrico Turri
a15bf7cc25 New selection set as default 2018-11-01 10:06:55 +01:00
YuSanka
5a4cef9ac1 Fixed part settings updating 2018-10-31 16:06:32 +01:00
YuSanka
7f08f460f1 Some code review 2018-10-31 12:58:35 +01:00
YuSanka
d2844bc39d Ported show_sliced_info_sizer
+ some code-view changes
2018-10-31 12:58:35 +01:00
Enrico Turri
b23f7e5834 New selection -> Restore selection after splitting an object to parts 2018-10-31 09:53:48 +01:00
Enrico Turri
503166a6a4 Automatic placement of instance at bed level 2018-10-30 16:03:03 +01:00
Enrico Turri
5d94e6adb8 New selection -> Improved sychronization of instances selection between 3D scene and right panel 2018-10-19 16:14:55 +02:00
YuSanka
5557ee3cd2 Fixed object adding to list with same object's name
+ Added name for main object for complex objects
+ Fixed incorrect Instances and Settings deleting from ObjectList
2018-10-19 11:08:43 +02:00
YuSanka
80f79451f7 Merge remote-tracking branch 'origin/ys_dev_native' into dev_native 2018-10-18 11:41:29 +02:00
YuSanka
33a0f5beff Deleted "Copy" column from ObjectList 2018-10-18 11:28:31 +02:00
YuSanka
e223120e7e Added instances to ObjectList 2018-10-18 10:40:26 +02:00
YuSanka
37a320c79e Changed logic of the PrusaObjectDataViewModelNode:
now each node has:
          * name,
          * type,
          * id (-1, if type == itSettings OR itInstanceRoot),
          * bmp,
          * action_bmp
          * extruder
2018-10-16 16:46:35 +02:00
Vojtech Kral
561bbf5a80 Fix build on non-MSVC 2018-10-16 13:57:11 +02:00
YuSanka
317fc45522 Fixed wxASSERT( variant.GetType() == PrusaDataViewBitmapText ); 2018-10-15 13:25:22 +02:00
YuSanka
d654e35975 Ported Plater->on_config_change 2018-10-15 10:53:47 +02:00
YuSanka
b7980f6b9b Added correct deleting of the selected objects(parts, mix)
but only in "ObjectList->Scene" direction
2018-10-12 12:00:37 +02:00
YuSanka
9cf80581d9 Added extended selection ObjectList -> to canvas3D 2018-10-11 16:13:23 +02:00
YuSanka
30f3ec3d16 Changed mode of the OblectList to Multiple selection 2018-10-10 16:22:20 +02:00
Vojtech Kral
322e0a433c Plater: Add missing skeletons (un-typed for now) 2018-10-09 10:47:42 +02:00
YuSanka
9f1613bffb Merge remote-tracking branch 'origin/dev_native' into ys_dev_native 2018-10-09 08:30:48 +02:00
Vojtech Kral
1f926964ee WIP: Plater, build fixes 2018-10-08 17:41:37 +02:00
YuSanka
1006cd976e Fixed events OBJECT_SETTINGS_CHANGED_EVENT , OBJECT_REMOVE_EVENT and UPDATE_SCENE_EVENT
+ changed ctor of ObjList
+ deleted unusable code from Tab.cpp
2018-10-08 16:28:11 +02:00
Enrico Turri
384cfa0e6d 1st installment of new selections (disabled) 2018-10-08 14:02:12 +02:00
YuSanka
ea30385fd0 Completed split of the GUI_ObjectParts 2018-10-05 23:29:15 +02:00
YuSanka
bcedd71e99 Start to Split GUI_ObjectParts:
+ created GUI_ObjectList & GUI_ObjectManipulation classes
2018-10-04 16:43:10 +02:00