49 Commits

Author SHA1 Message Date
Simon Edwards
74e5798509 Lots of import fixes. Eliminated the import hacks such as those used inside UM/Settings/__init__.py.
CURA-2917
2016-12-12 16:05:35 +01:00
Tim Kuipers
995705f82b fix: don't expand disallowed areas when using none platform adhesion (CURA-759) 2016-11-14 12:36:21 +01:00
Jaime van Kessel
cc549932c4 ConvexHull decorater no longer crashes if node has no MeshData
Fixes CURA-2706
2016-10-18 11:48:23 +02:00
Ghostkeeper
f435dcd896
Document parameters of _offsetHull
Makes it clear that the input is a Polygon instance, not a Numpy array.

Contributes to issue CURA-2407.
2016-09-29 09:32:43 +02:00
Ghostkeeper
7c573e3c29
Recompute convex hull if xy_offset changes
With room for more settings.

Contributes to issue CURA-2407.
2016-09-28 11:48:07 +02:00
Ghostkeeper
0bcc8f9a5d
Rename _roundHull to _offsetHull
And a few variables that had a similar name. This better reflects the new function of this method.

Contributes to issue CURA-2407.
2016-09-28 11:48:07 +02:00
Ghostkeeper
f3afcb1b36
Document _roundHull
The code documentation is generalised and moved to the function documentation.

Contributes to issue CURA-2407.
2016-09-28 11:48:06 +02:00
Ghostkeeper
aa69c1beee
Re-use _roundHull method
This code was duplicated.

Contributes to issue CURA-2407.
2016-09-28 11:48:06 +02:00
Ghostkeeper
5f2533e8a4
Also apply horizontal expansion on normal rounding
Might have to rename this function later.

Contributes to issue CURA-2407.
2016-09-28 11:48:06 +02:00
Ghostkeeper
622233bfd8
Remove duplicate code for creating circle approximations
This code is now in the Polygon class, so we can re-use it.

Contributes to issue CURA-2407.
2016-09-28 11:48:06 +02:00
Ghostkeeper
2bdb388ad5
Improve documentation
This makes it more clear when that variable is -1.

Contributes to issue CURA-2407.
2016-09-27 17:41:37 +02:00
Ghostkeeper
2721cde6f0
Fix _getSettingProperty up
Seems to work again now.

Contributes to issue CURA-2407.
2016-09-27 17:41:37 +02:00
Ghostkeeper
edc6955162
Use per-mesh settings if it has them
For platform adhesion offset and that sort of thing, we now also listen to per mesh settings. It isn't yet re-computed when changing per-mesh settings though. I'm going to look how to do that next.

Contributes to issue CURA-2407.
2016-09-27 17:41:37 +02:00
Ghostkeeper
6affb80189
Expand convex hull by horizontal expansion
The getSetting call doesn't seem to work at the moment, but the rest of the routine works if I replace the getSetting call with an actual value.

Contributes to issue CURA-2407.
2016-09-27 17:41:37 +02:00
Ghostkeeper
dc80d50eb5
Remove unused value for extra_margin
Since the else clause below now raises an exception and all its if clauses define extra_margin, this initial value is now unused.

Contributes to issue CURA-2407.
2016-09-27 17:41:37 +02:00
Ghostkeeper
6783b4b3ef
Fix function call to _getSettingProperty
Don't know who ever tested this...

Contributes to issue CURA-2407.
2016-09-27 17:41:37 +02:00
Ghostkeeper
61477078a4
Raise exception when encountering unknown build adhesion type
This is to warn future programmers when they add new build adhesion types.

Contributes to issue CURA-2407.
2016-09-27 17:41:37 +02:00
Jaime van Kessel
277123d1d3 Brim, raft & skirt settings are now retrieved from correct extruder (if any)
CURA-2245
2016-09-15 09:42:13 +02:00
Jaime van Kessel
3f5d7b0f53 One at a time mode now adds platform adhesion to convex hulls
CURA-403
2016-09-01 15:42:00 +02:00
Jack Ha
3d47e329a7 Fix convex hull being updated after removing CPU eating monster.
CURA-2002.
2016-07-28 14:57:17 +02:00
Jaime van Kessel
c6d1caaf0f Convex hull is no longer needlessly re-calculated
CURA-2002
2016-07-28 11:47:56 +02:00
Jack Ha
3703ed9eb0 Fix overlapping object with raft/brim/skirt in one-at-a-time mode.
head_and_fans is extended by an extra margin to prevent overlapping.
CURA-1776

Also fixed: showing one-at-a-time head convex at start.
2016-07-26 11:45:06 +02:00
Jack Ha
d82249e260 Fix for one-at-a-time. CURA-1707 2016-07-25 17:09:06 +02:00
Jack Ha
d77f6e86e4 Added an extruded convex hull as a raft instead of a grey plane.
- New shader transparent_object.shader
- Raft thickness is calculated in BuildVolume and used in
  ConvexHullDecorator, notified by a Signal.
- Removed old grey plane from BuildVolume.
- Vertex data below build plane is no longer discarded (caused convex
  hulls that are too small).
- Uses new functions in MeshBuilder (update Uranium as well).

CURA-1707
2016-07-25 16:45:38 +02:00
Jaime van Kessel
77c5d25e70 Cutoff point for convex hull is now a bit below 0 to prevent rounding issues.
CURA-1608
2016-07-20 14:11:16 +02:00
Simon Edwards
47de254f97 Fixed up the 3MF reader to use the changed MeshBuilder and MeshData.
CURA-1633 OverflowError: cannot convert float infinity to integer (loading larger models)
2016-06-28 11:43:02 +02:00
Simon Edwards
65a8cf1c45 'One at a time' printing was broken due to a regression in the convex hull decorator.
Contributes to CURA-1504
2016-06-22 16:51:56 +02:00
Simon Edwards
631ef8e678 Reimplement the "no convex hull when using a tool" functionality.
Contributes to CURA-1504
2016-06-22 15:06:03 +02:00
Simon Edwards
9641a25f31 Fixed up the convex hull 'shadow' creation and deletion after the merge.
Contributes to CURA-1504
2016-06-22 14:48:15 +02:00
Simon Edwards
fd42a43270 Merge branch 'master' into simple_convex_hull
Conflicts:
	cura/BuildVolume.py
	cura/ConvexHullDecorator.py
	cura/ConvexHullJob.py
	cura/CuraApplication.py
2016-06-21 14:47:10 +02:00
Simon Edwards
4cc0026af3 Minor rework in response to code review.
Contributes to CURA-1504
2016-06-15 16:22:48 +02:00
Arjen Hiemstra
186eca160b Fix containersChanged signal handlers
Fixes CURA-1642
2016-06-02 16:25:13 +02:00
Arjen Hiemstra
4dffc414fb Make convex hull decorator respond properly to property change events
Fixes CURA-1460
2016-05-31 18:07:33 +02:00
Simon Edwards
5f638f6e69 Better handling of degenerate convex hull cases.
Contributes to CURA-1504
2016-05-26 14:39:22 +02:00
Simon Edwards
7e3dd3d443 Removed some debug.
Contributes to CURA-1504
2016-05-25 15:51:12 +02:00
Arjen Hiemstra
386aec32a8 Merge branch 'settings_rework'
Contributes to CURA-1278

* settings_rework: (224 commits)
  Improve slice trigger documentation
  Import Cura in materials preferences page so we can use the active definition id
  Add layer height to high quality profile so we have something that changes
  Update example XML material to use the right product names
  Filter available materials by the machine definition
  Show the add machine dialog when we do not have an active machine
  Create machine-specific material containers for machine specific overrides in XML material files
  When creating a new container stack, add empty containers for things where we cannot find containers
  Add preferred variant, material and quality to UM2+ definition
  Account for global container stack being None in the backend plugin
  Use the global stack instance variable and account for it potentially being None
  Store the global container stack as an instance property
  Added wildcard to filtering
  Per object settings filter now uses correct bool types (instead of strings)
  Removed stray = sign.
  Fix creating print job name
  Disable asynchronous loading of SettingItem when Qt Version < 5.5
  Document QTbug
  Properly serialise all settings to g-code file
  Document GCodeWriter class
  ...
2016-05-25 15:12:25 +02:00
Simon Edwards
d7127b800c Finally, use the new convex hull code to compute the object 'shadow' and exclusion zones.
Contributes to CURA-1504
2016-05-23 17:21:52 +02:00
Jaime van Kessel
295cea338c Translate tool is now no longer stopped by ton of errors
CURA-1278
2016-05-20 14:09:58 +02:00
fieldOfView
9f2e87fdcb Force updating the convex hull of a group node if one of its children is removed
Before this fix, if a subselection of a group was deleted from the group, the convex hull would not update.

CURA-1054
2016-05-11 17:44:58 +02:00
Jaime van Kessel
97d16ae3bd Update documentation & code cleanup 2016-04-08 14:26:28 +02:00
Jaime van Kessel
a50ef02d81 Code cleanup 2016-03-02 14:49:41 +01:00
fieldOfView
6e11c2409b Use working profile instead of "active" profile 2016-02-08 09:20:46 +01:00
Jaime van Kessel
782c4508c6 Convex hull is also redrawn when machineInstance is changed
CURA-742
2016-02-01 16:03:31 +01:00
Jaime van Kessel
44ab89724e ConvexHullDecorator is now correctly duplicated
The deepcopy of convex hull decorator now returns an empty (new) ConvexHulldecorator object
This ensures that the init is correctly called. CURA-665
2016-01-15 15:18:16 +01:00
Arjen Hiemstra
47e96a9e2a Fix ConvexHull{Decorator,Job} to work with the new profile structure 2015-09-01 15:03:29 +02:00
Arjen Hiemstra
09cfda095b Convert the last bits over to the changed API 2015-08-11 17:02:17 +02:00
Jaime van Kessel
78ebb13089 Changes required for printing one at a time 2015-07-22 11:46:12 +02:00
Jaime van Kessel
a18f133e29 Head size & settings for one at a time & all at once printing 2015-07-21 11:13:38 +02:00
Jaime van Kessel
8e6dd2486f Groups now also have a convexHull 2015-07-14 16:41:59 +02:00