189 Commits

Author SHA1 Message Date
YuSanka
7eec10c95e Fix for #9576 - A single cut can be made on the same model, after which the Cut tool is disabled
But really bug is a wrong detection of an CutObject as a DowelConnector
2023-02-15 13:56:13 +01:00
YuSanka
ffd484eb04 Cut bug fixing:
* Disable "Add/Edit connectors" button then cut to parts
* Fixed flip_cut_plane()
* Fixed cut by Line, when draw line over the cut plane
* Fixed apply of the transformations, when cut to parts

Cut improvements:
* Process "Ctrl"
* Change color of the cut plane when it's hovered
* Don't apply Cut information for result object(s), if cut doesn't have any connector or is cut to parts
  (partially related to #9633 - Add option to Invalidate Cut Info at the time of cutting)
2023-02-15 12:02:10 +01:00
YuSanka
7755231866 Cut: Fix for a normal for color clipping plane 2023-02-15 12:02:10 +01:00
enricoturri1966
224ee922c5 'gouraud' shader modified to allow to draw an object with two different colors in Cut Gizmo 2023-02-15 12:02:10 +01:00
YuSanka
b40473be51 CutGizmo: Improvements to identify Upper/Lower parts_count
+ Rework CutDialog
+ Added "Cut to" section (Idea from #9564[Cut: Keep results as parts of current idea] was used, but there is other implementation)
+ Fix for #9657 - Inconvenient gizma, blocks the view of the cut of small parts
+ Add functionality "Flip cut plane" = Fix for #9632 - Adding connectors to either split cut part
+ ImGuiWrapper: added tooltip for button
2023-02-15 12:02:10 +01:00
YuSanka
b71e0bfd34 Follow-up 8913fdf6ab
* Deleted/Temporary commented redundant call of app_config->save()
 * Use app_config->get_bool() function on all places
2023-02-13 17:23:49 +01:00
YuSanka
a913bd493f Fix for #9697 - Cut tool tolerance by measurement 2023-02-13 14:08:21 +01:00
YuSanka
b52ce29d12 Fix to #9629 - Cut tool will not cut unless there is an object
Allow to perform a cut even if CutPlane doesn't cross the solid parts of object.
But show the warning line
2023-02-09 15:22:01 +01:00
YuSanka
20e5083350 Cut: Fixed a scale for grabbers and thickness of the cut plane 2023-02-08 13:06:00 +01:00
YuSanka
d09f31db9c Fix for #9500 - Cut tool - minimal connector size
Minimal connector size is decreased to 1mm
2023-02-03 13:57:37 +01:00
YuSanka
e4ef82d1c1 CutGizmo: Add info icons to the connector types 2023-02-03 12:56:14 +01:00
YuSanka
e4ccfda0b0 Cut: Fix for apply of tolerance to the connectors
Bug was caused by refactoring in 0201a5055a
2023-02-02 12:23:54 +01:00
YuSanka
b173927ad1 CutGizmo: Fixed clipper behavior after slicing in SLA mode 2023-01-31 15:54:07 +01:00
tamasmeszaros
fc9b7ed59c Merge branch 'master' into et_tm_sla_volumes_6-SPE-1285 2023-01-13 11:02:06 +01:00
YuSanka
bfb60875fa CutGizmo: Allow to cut by line when only one cut part is selected.
+ Updated splashscreen
2023-01-04 17:40:22 +01:00
YuSanka
0addb3b9e7 Cut: Hide Debug window, leave rectangle mode for the cut plane
+ Fixed CameraUtils::ray_from_persp_screen_pos() to return a correct value of the point
2022-12-19 13:11:38 +01:00
YuSanka
4da322d527 CutGizmo: Some beautification/reorganization 2022-12-16 10:57:36 +01:00
YuSanka
7832d600ff CutGizmo: Allow to add connectors for SLA 2022-12-15 13:22:22 +01:00
YuSanka
24366c6294 Cut: Fixed connector rendering in "cut plane" mode 2022-12-13 16:36:10 +01:00
YuSanka
0d512a4256 Cut: Extended detection if connector is outside of cut contour
It respects to the whole connector contour now
2022-12-09 18:26:59 +01:00
YuSanka
7edc2acfc0 Cut: Connectors mode: Implemented forward/downward view to the cut plane
+ updated cut ikons
2022-12-09 11:15:48 +01:00
Lukas Matena
595ef873ad Change the way how cut gizmo detects hits on cut plane:
it did not work well on meshes with overlapping surfaces
2022-12-07 16:15:25 +01:00
YuSanka
e07843e6fb Cut: Fixed visualization of the selected connectors which are conflict
+ Back port a Lukas's code for enable/disable current contour
2022-12-01 16:44:36 +01:00
enricoturri1966
569db9689f Removal of calls to Geometry::assemble_transform() 2022-11-24 14:58:20 +01:00
YuSanka
69d1ad2cad CutGizmo: Bug Fixing :
* Crash - when click to Whipe-tower
* Crash - when the bed is empty and the top bar is pressed +. Note: There was a bug in detection if we can increase/recrease instances
* After cutting the object in SLA does not work clipping of view
 Improvements :
* Connectors mode of CutGizmo : Add "Cancel" button to Discard all conectors and switch to the CutPlane mode
2022-11-02 13:35:05 +01:00
YuSanka
9b0a69e50e CutGizmo: Fixed grabbers hovering after merge with master
+ Added possibility to use circle cut plane
+ Deleted unused code
2022-10-26 15:26:35 +02:00
YuSanka
bba6d8b94d Merge remote-tracking branch 'PRIVATE/master' into ys_cut 2022-10-25 16:16:36 +02:00
YuSanka
18edc71254 Cut WIP: Code refactoring for ae21667786
+ ObjectList: Fixed list of the types for "Change type" dialog, when object is cut.
+ CutGizmo:
  * Warning line is extended for information about invalid connectors
  * Fixed a crash on undo/Redo, when cutGizmo is active
2022-10-25 15:54:52 +02:00
YuSanka
ae21667786 Cut WIP: First implementation for detection of the invalid connectors position
Implemented cases:
* overlap of some connectors
* check if some connector position is outside of clipper
2022-10-24 16:57:02 +02:00
YuSanka
98d7fe335b Cut WIP: experiments with detection of the position for CutPlaneLine
Note: It still doesn't work properly

+ CurGizmo: Fixed a check of new center position in function set_center_pos().
2022-10-24 16:32:10 +02:00
YuSanka
7bb0b7eefc Cut bug fixing: Fixed a place of connectors after several cutting
+ Added info about camera direction to a DEBUG window
+ Code factoring (deleted unused code)
+ Fixed build warnings
2022-10-20 16:34:21 +02:00
YuSanka
2880704de9 Cut improvements/ bug fixing:
* Wrong position of grabber is fixed
* OSX specific: ObjectList: Fixed update of the info items after cut
* Show info line, when Cut plane is invisible

+ Fixed non-Win build: added missed include
2022-10-19 17:38:04 +02:00
YuSanka
3a21f156c0 Cut Improvements/Bug Fixing
* Context menu: Suppress "Simplify model" for cut object
* CutGizmo:
  * Disable gizmo for dowel object
  * Invalidate cut plane position after update of Bounding box
  * Suppress Frustum style for connectors with Dowel type
  * Rectangle selection: Fixed processing on LeftUp
* Selection on Canvas: Suppress to move NEGATIVE_VOLUME if it's a connector
* Model:cut: Fixed a bug in add_cut_volume(). Cut info wasn't copied to the new volume
2022-10-18 14:13:50 +02:00
YuSanka
5922bf2910 Cut small improvements:
* Disable revert icon if cut_plane position wasn't changed
* Hide CutGizmo for Simple mode.
* Fixed update of bounding box after changing scale during Z axis
2022-10-17 16:59:40 +02:00
YuSanka
64c57faf8f Cut Improvements: Fixed Undo/Redo for cut performance
+ ObjectList: Fixed items update after Invalidate cut information
+ CutGizmo: Fixed wrong mode selection after delete object and that add new
2022-10-17 12:15:10 +02:00
YuSanka
85af9b93f1 Cut: Fixes and improvements for object's context menu
* Disable or delete some menu items, which are inappropriate for cut objects
* For cut objects added menu item "Invalidate cut info" to disconnect related cut parts of initial object
* If just one part is kept after cut performance, than don't apply a cut info for this object.

+ CutGizmo: Fixed selection of the mode
   An object has connectors         -> Connectors mode
   An object doesn't has connectors -> CutPlane mode
2022-10-07 16:26:19 +02:00
YuSanka
74a32e3261 Cut: Bug fixing and Improvements
* CutGizmo: Fixed a label scale
* Fixed deselection of selected connectors, when moving the camera
* Implemented update of the settings for selected connectors
* Connector selection: Ctrl shortcut is changed to Shift to compatibility of the selection/deselection with rectangle selection
2022-10-07 11:14:13 +02:00
YuSanka
58c7d8b188 CutGizmo: Connectors mode: Implemented Rectangular selection of connectors
+ some code refactoring
2022-10-03 17:24:50 +02:00
YuSanka
a8440db5ec Cut WIP:
* ObjectList & Selection: Show Connectors in the Scene, when CutConnectors Item is selected
* ObjectList: refactoring: extract the adding of volumes to the add_volumes_to_object_in_list()
* If some connector is selected on 3dScene -> select all connectors of this object
* GLGizmoScale3D : check if grabber is enabled, when do rendering
+ GLGizmoCut: refactoring : split render_cut_plane_grabbers to several functions
2022-09-30 14:07:17 +02:00
YuSanka
0201a5055a Cut WIP:
* Suppress to split cut objects
* ObjectList:
  * Use another icons to mark the cut objects and connectors 
  * For the cut object show parts, which are not connectors
* Set different colors for the Plugs and Dowels
* CutGizmo:
  * Invalidate CutGizmo after changes in ObjectList or perform a cut
  * CupPlane in Connectors mode: Unselect selection, when click on empty space
  * Connectors mode: Fixed performance issue
2022-09-27 16:17:09 +02:00
YuSanka
66e2c3b30a Cut WIP: Send to the cut() whole cut_matrix instead of cut_plane_pos and rotation angles
+ Fixed units inside input window
+ NotificationManager: Added info line for loaded object with cut parts
+ Next Code refactoring
2022-09-27 08:22:20 +02:00
YuSanka
0fcb7243b7 Cut WIP: Upgrade for reset_buttons in inpot_window 2022-09-21 16:29:06 +02:00
YuSanka
e676d40df5 Cut WIP: Beatifications for input window dialog
+ Fixed rendering of the connectors, when cut plane is rotated for 270 deg by Y axis
2022-09-21 13:40:24 +02:00
YuSanka
94685b5ad8 WIP Cut: Fixed an adding/deleting of the connectors to the selection_info
+ more code refactoring
2022-09-20 20:29:00 +02:00
YuSanka
e93ff4d087 WIP Cut: Fixed transformation of a cut plane and a clipper.
+ Fixed a picking of the scaled grabbers
+ Code refactoring
2022-09-19 17:53:01 +02:00
Lukas Matena
582eccd51b Cut: turn off contour disabling for now 2022-09-19 11:19:18 +02:00
Lukas Matena
d7f55253cd Cut: allow enabling/disabling an island 2022-09-19 11:19:18 +02:00
YuSanka
cf144da4fe Cut WIP: Import/Export cut information to/from .3mf file
+ Fixed a crash during change object selection, when CutGizmo is On
+ Fixed Undo/Redo (was accidentally broken with 7912613dc8e11db2ddea8018ce16b26a01756a3b)
2022-08-22 10:09:32 +02:00
YuSanka
70a575198b Cut WIP: Fix for drawing of the cut line 2022-08-17 15:50:49 +02:00
YuSanka
79e9df4b64 Merge remote-tracking branch 'PRIVATE/master' into ys_cut 2022-08-17 10:05:44 +02:00