356 Commits

Author SHA1 Message Date
fieldOfView
dc33d96e8c Make build plate shapes translatable 2016-11-29 10:42:24 +01:00
fieldOfView
4756168178 Fix elliptic bedshapes (vs circular)
MeshBuilder.addArc only supports circular arcs, not elliptic arcs. To work around this, the resulting MeshData is scaled.
2016-11-29 10:04:53 +01:00
fieldOfView
31ca80d407 Create disallowed areas for polar printers 2016-11-28 23:00:53 +01:00
fieldOfView
70bc8d8889 Fix z-fighting 2016-11-28 23:00:52 +01:00
fieldOfView
2c5a4de264 Draw circular build plate for polar printers 2016-11-28 23:00:52 +01:00
Jaime van Kessel
823993caaf ALways add prime areas
CURA-2625
2016-11-24 17:56:17 +01:00
Jaime van Kessel
1b01455c36 Increased tolerance around prime area
CURA-2934
2016-11-18 16:15:53 +01:00
Jaime van Kessel
d0bae5acd7 Merge branch 'feature_bed_adhesion_none' of github.com:Ultimaker/Cura 2016-11-18 10:35:06 +01:00
Ghostkeeper
41825231ad
Fix check for if nozzle offset exists
Because an offset of 0 results in False as well.

Contributes to issue CURA-2625.
2016-11-17 09:54:00 +01:00
Ghostkeeper
35a01435d5
Also rebuild when mesh extruder changes
I do not want to add the rebuild() call to the update function itself since there may be other changes to the build volume before we should rebuild (such as raft).

Contributes to issue CURA-2625.
2016-11-15 13:10:58 +01:00
Ghostkeeper
2492b03c4f
Update disallowed area when object's extruder is changed
This calls _updateDisallowedAreas() but not rebuild(), so the change is not visible at this moment.

Contributes to issue CURA-2625.
2016-11-15 13:10:58 +01:00
Ghostkeeper
60c8933906
Remove debug print
Oops.

Contributes to issue CURA-2625.
2016-11-15 13:10:58 +01:00
Ghostkeeper
f0766cbaf3
Update build volume when per-object settings change
Requires some multi-levelled trickery to get the event listeners working. This also assumes that the per-object stack decorator is not deleted at any point unless the mesh is deleted (which is currently a correct assumption). If that ever changes though, the harm is just that the update function is still listening on the deleted decorator's stack.

Contributes to issue CURA-2625.
2016-11-15 13:10:57 +01:00
Ghostkeeper
747ade2382
Remove now-useless variable
I just realised that there were two if statements below each other with the same condition.

Contributes to issue CURA-2625.
2016-11-15 13:10:57 +01:00
Ghostkeeper
9be02fb31f
Recalculate disallowed borders when adding or removing objects
Because the new object may use an extruder that wasn't used so far, and if you remove an object it may remove the need for a certain extruder.

Contributes to issue CURA-2625.
2016-11-15 13:10:57 +01:00
Ghostkeeper
47bb8f9601
Compute disallowed borders with all extruders
It's a bit counter-intuitive, so let me explain. The total build volume is defined as the rectangle around the union of the areas that all extruders can reach. The nozzle offset for the left extruder though is 0,0, so what should the border on the right side be? It should be 18 since there is a nozzle to the right of the left nozzle which has a relative x-offset of 18mm. Therefore we need to compute the relative offsets with each of the other nozzles and create sort of a bounding box around it, and the distance to the edge of that bounding box is the unreachable border on each of the sides.

Contributes to issue CURA-2625.
2016-11-14 17:17:55 +01:00
Ghostkeeper
f0d92873a3
Add nozzle disallowed areas
These disallowed areas are only at nozzle-height, not at head-height. They therefore won't move along with the nozzle offset.

Contributes to issue CURA-2625.
2016-11-14 17:13:24 +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
Ghostkeeper
519f6e58d2
Remove debug print
This is why it's wise to do a git diff --cached before you commit.

Contributes to issue CURA-2625.
2016-11-14 11:40:25 +01:00
Ghostkeeper
18b2834091
half_machine_width should be halved
Shoot me before I do any further damage, please.

Contributes to issue CURA-2625.
2016-11-14 11:38:47 +01:00
Ghostkeeper
98089e702c
Also offset inner corners of the Y-borders
These should coincide with the inner corners of the X-borders.

Contributes to issue CURA-2625.
2016-11-14 11:28:32 +01:00
Ghostkeeper
5ddc1d9d71
Fix offsetting polygon in single extrusion
In single extrusion, the machine_nozzle_offset_x and machine_nozzle_offset_y were not defined in the used extruder stacks, because the used extruder stack is the global stack.

Contributes to issue CURA-2625.
2016-11-14 10:47:38 +01:00
Ghostkeeper
a72d47c2a4
Fix adding prime tower locations to disallowed areas
Otherwise just a string gets added, which gives an error when the disallowed areas are being built as meshes. The front-end runs again, though the disallowed areas seem to be wrong now.

Contributes to issue CURA-2625.
2016-11-11 17:06:47 +01:00
Ghostkeeper
57f88ea048
Mush disallowed areas of all extruders together
The final result needs to be just a list.

Contributes to issue CURA-2625.
2016-11-11 17:02:01 +01:00
Ghostkeeper
edcf7320f0
Interpret prime tower areas per extruder
The function gives results per extruder now, so we should interpret that instead of crashing.

Contributes to issue CURA-2625.
2016-11-11 17:00:32 +01:00
Ghostkeeper
a8d36c9116
Fix iteration over prime-disallowed areas
Oops. prime_disallowed_areas is a dictionary per extruder.

Contributes to issue CURA-2625.
2016-11-11 16:58:25 +01:00
Ghostkeeper
1c445a1512
Move computing disallowed areas to separate function
The results are checked for intersection in the main update function, and then it crashes because the main function doesn't expect per-extruder disallowed areas yet from the rest.

Contributes to issue CURA-2625.
2016-11-11 16:55:07 +01:00
Ghostkeeper
4b02171db6
Compute disallowed areas per-extruder
This computes the disallowed areas of the machine, the disallowed border and the prime tower per extruder. The prime locations are not yet calculated per extruder, but I'd like to extract it to a function before I try that.

Warning: Cura will not run at this stage. Please await the next commits.

Contributes to issue CURA-2625.
2016-11-11 16:26:58 +01:00
Ghostkeeper
3571ed2d7a
Expand disallowed border beyond build volume
This way we can offset it with the nozzle offset and it would still cover all the way to the edge. The disallowed areas are clipped to the build volume anyway.

Contributes to issue CURA-2625.
2016-11-11 15:44:53 +01:00
Ghostkeeper
ec057c72a6
Compute disallowed border size only once
We pass it on through a parameter instead of computing it again in the function.

Contributes to issue CURA-2625.
2016-11-11 15:16:43 +01:00
Ghostkeeper
bcd4dd3aeb
Fix applying skirt radius to prime locations
This makes the prime locations equal to what it was before.

Contributes to issue CURA-2625.
2016-11-11 15:14:15 +01:00
Ghostkeeper
45db315f77
Fix adding prime locations to final disallowed areas
They were added to several intermediary variables, but not to the final result.

Contributes to issue CURA-2625.
2016-11-11 15:10:39 +01:00
Ghostkeeper
ccccf62bf7
Repair showing build volume
We needed to apply the Minkowski hull on the polygon or it would be disjunct and wouldn't show up in the interface.

Contributes to issue CURA-2625.
2016-11-11 14:18:08 +01:00
Ghostkeeper
41c8371b86
Compute _has_errors only from _error_areas
This way we need fewer intermediary variables. It's also more robust and somewhat more elegant.

Contributes to issue CURA-2625.
2016-11-11 13:09:17 +01:00
Ghostkeeper
cfc9a7b6cf
Move prime tower area generation to separate function
This function is named as if it could later include other printed pieces, but it is meant to only include pieces that have normal bed adhesion, so not the prime locations.

Contributes to issue CURA-2625.
2016-11-11 13:03:34 +01:00
Ghostkeeper
a37ab8f4b1
Use approximated circle for the prime polygons
It's much easier to create, more obvious code, and better approximates the area that we seek to use for our prime location.

Contributes to issue CURA-2625.
2016-11-11 12:46:53 +01:00
Ghostkeeper
3d9eb4f2be
Move prime tower creation code closer to where it's used
The check for collisions is only at the end, and after that it adds the polygon itself. We should keep the code closer together to make it more readable.

Contributes to issue CURA-2625.
2016-11-11 12:01:08 +01:00
Ghostkeeper
42ee87c88f
Rename areas to result_areas
Because we have 'areas', 'disallowed_areas', 'self._disallowed_areas', 'disallowed_polygons', and so on. This should reduce the confusion a bit.

Contributes to issue CURA-2625.
2016-11-11 11:54:50 +01:00
Ghostkeeper
77a6c459d8
Move initialisation of areas closer to where it's used
Makes the code more easy to follow.

Contributes to issue CURA-2625.
2016-11-11 11:53:13 +01:00
Ghostkeeper
b6611b66f8
Remove unused intermediary value
This is not used, unless you take multi-threading into account. In that case though, the actual disallowed areas are only updated at the end of this function, and the _has_errors variable is updated right before then as well, so this way the variable is in an invalid state for a smaller amount of time.

Contributes to issue CURA-2625.
2016-11-11 11:51:32 +01:00
Ghostkeeper
49c5a90d29
Remove unused variable
This one is now moved to the _computeDisallowedAreasStatic function.

Contributes to issue CURA-2625.
2016-11-11 11:48:03 +01:00
Ghostkeeper
1603930c5c
Extract computing static disallowed areas to different function
These disallowed areas will have to move or get duplicated according to which nozzles are used. Eventually we'll want to compute these with their Minkowski additions only when needed (the skirt size changes), not when the used extruders change. This is also part of an effort to make this disallowed area computation a bit better structured. The behaviour should be the same.

Contributes to issue CURA-2625.
2016-11-11 11:41:55 +01:00
Ghostkeeper
6999a14821
Merge branch '2.3' 2016-10-31 10:55:54 +01:00
Ghostkeeper
2760055e89
Use settings from all extruders for radius of moves from walls
It computes the maximum move distance from the outer walls for all extruders, not just the platform adhesion extruder.

Contributes to issue CURA-2823.
2016-10-28 15:20:13 +02:00
Jaime van Kessel
999380cf1b Merge branch '2.3' of github.com:Ultimaker/Cura 2016-10-27 17:15:58 +02:00
Jaime van Kessel
e27be7fc4b Travel_avoid_distance and support_offset are only taken into account if respecive feature is active
We used to always add them, but now we check if support_enable and travel_avoid_other_parts are enabled
CURA-2823
2016-10-27 09:59:29 +02:00
fieldOfView
55191b722a Codestyle & documentation 2016-10-25 23:06:23 +02:00
fieldOfView
fef15c706f Render an indication of the origin of the machine 2016-10-25 22:51:44 +02:00
Jaime van Kessel
bac0ea94a1 Removed nozzle offset from prime area
CURA-2520
2016-10-04 13:40:31 +02:00
Jack Ha
4cc5b6d9eb Added activeStackChanged to BuildVolume, it is semantically more correct. Contributes to CURA-2232 2016-10-03 10:27:31 +02:00