Alright, yea, cool. That explains a lot. So if I want to make a completely "new" plugin I should dig deeper in Cura. For now I'll stick to your advice and base it on the LegacyProfileReader plugin.
That's good advice, thanks ?
Alright, yea, cool. That explains a lot. So if I want to make a completely "new" plugin I should dig deeper in Cura. For now I'll stick to your advice and base it on the LegacyProfileReader plugin.
That's good advice, thanks ?
But what are you trying to do? Importing a single quality changes will cause issues, as you always need one for the extruder and the global profile.
I know, that's what I'm doing ?. I'm trying to add my own printing materials as native.
I did some research and indeed you're right. I'm not making the global profiles. I understand this is done by making a generic_material.xml.fdm_material file. However, when I do this I still keep getting errors like this:
Exception: When trying to deserialize fdmextruder #2, we received an unknown ID (um2p_plaht_0.8_draft) for container
How would I go about properly implementing a new printing material? Could you give me some advice maybe, because I have been tinkering with this for hours now.
Right, I see what you're missing. The UM2+ has so called material based qualities. So if you only add a new material type, you're not there yet, you also need the matching quality profile. As we also have "variants" (aka; nozzle sizes), you need to make multiple new quality profiles for each of the nozzle sizes it supports (a single material will need num_qualities * num_variants) of quality profiles to be added.
Adding new materials / qualities like that should not be done by means of a plugin. You don't even need to, as you can just put the files in the resources folder, which ensures that they are loaded on cura startup.
4 minutes ago, nallath said:Right, I see what you're missing. The UM2+ has so called material based qualities. So if you only add a new material type, you're not there yet, you also need the matching quality profile. As we also have "variants" (aka; nozzle sizes), you need to make multiple new quality profiles for each of the nozzle sizes it supports (a single material will need num_qualities * num_variants) of quality profiles to be added.
Yes, thank you. I did that actually. But the cura.log says my HT-PLA doesn't have a fallback material, which is obviously true because Ultimaker doesn't have an HT-PLA material. The thing that comes closest is Tough PLA I'd say but that is not supported on the Ultimaker 2+.
So I added 3 material based qualities (.inst.cfg files) for the UM2E+ so far. It's for the 0.8 mm variant with the qualities draft (0.2 mm ), verydraft (0.3 mm) and superdraft (0.4 mm). I'd like to maintain Ultimaker standards as much as possible to not get confused. When I select 0.8 mm with the draft quality and HT-PLA all is fine and dandy. When I select 0.3 mm layerthickness or higher Cura immediately crashes. Even though I wrote profiles for those exact layerheights. I think it must have something to do with 0.2 mm already being supported natively, but 0.3 mm and above are not.
Did you add a generic HT-PLA? That's what it always tries to use as a fallback material.
1 hour ago, nallath said:Did you add a generic HT-PLA? That's what it always tries to use as a fallback material.
Yea I kinda figured that is how to add global profiles. So I just copied my makerpoint_plaht.xml.fdm_material to generic_plaht.xml.fdm_material. In the generic file I changed the brand and color to Generic. Still crashes though at 0.8 mm nozzle when I add the material based qualities for 0.3 mm and 0.4 mm to the quality folder of the ultimaker2_plus.
So the fallback error is actually gone but I still get the uncaught error:
2018-06-22 16:07:43,416 - INFO - [MainThread] cura.Machines.ContainerNode.getContainer [39]: Lazy-loading container [makerpoint_plaht_ultimaker2_extended_plus_0.8_mm]
2018-06-22 16:07:43,474 - INFO - [MainThread] cura.Settings.MachineManager._updateQualityWithMaterial [1128]: Updating quality/quality_changes due to material change
2018-06-22 16:07:43,483 - DEBUG - [MainThread] cura.Settings.MachineManager._updateQualityWithMaterial [1135]: Current quality type = [fast]
2018-06-22 16:07:43,490 - INFO - [MainThread] cura.Settings.MachineManager._updateQualityWithMaterial [1161]: The current quality type [fast] is not available, switching to [draft] instead
2018-06-22 16:07:43,498 - INFO - [MainThread] cura.Machines.ContainerNode.getContainer [39]: Lazy-loading container [um2p_plaht_0.8_draft]
2018-06-22 16:07:43,503 - DEBUG - [MainThread] LocalContainerProvider.LocalContainerProvider.loadContainer [53]: Loading container um2p_plaht_0.8_draft
2018-06-22 16:07:43,531 - DEBUG - [MainThread] UM.Settings.ContainerRegistry.addContainer [355]: Container [um2p_plaht_0.8_draft] added.
2018-06-22 16:07:43,542 - DEBUG - [MainThread] cura.Machines.Models.CustomQualityProfilesDropDownMenuModel._update [15]: Updating CustomQualityProfilesDropDownMenuModel.
2018-06-22 16:07:43,549 - INFO - [MainThread] cura.Machines.QualityManager.getQualityChangesGroups [186]: Cannot find node for machine def [ultimaker2_plus] in QualityChanges lookup table
2018-06-22 16:07:43,557 - DEBUG - [MainThread] cura.Machines.Models.QualityProfilesDropDownMenuModel._update [50]: Updating QualityProfilesDropDownMenuModel.
2018-06-22 16:07:43,609 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [66]: An uncaught error has occurred!
2018-06-22 16:07:43,618 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: Traceback (most recent call last):
2018-06-22 16:07:43,625 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: File "X:\3.3\build\inst\lib\python3.5\site-packages\cura\Machines\Models\QualityProfilesDropDownMenuModel.py", line 70, in _update
2018-06-22 16:07:43,632 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: File "X:\3.3\build\inst\lib\python3.5\site-packages\cura\Machines\Models\QualityProfilesDropDownMenuModel.py", line 97, in _fetchLayerHeight
2018-06-22 16:07:43,640 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: AttributeError: 'NoneType' object has no attribute 'getContainer'
2018-06-22 16:07:43,802 - DEBUG - [MainThread] LocalContainerProvider.LocalContainerProvider.loadContainer [53]: Loading container ultimaker2_plus
2018-06-22 16:07:44,134 - DEBUG - [MainThread] UM.Settings.ContainerRegistry.addContainer [355]: Container [ultimaker2_plus] added.
Cura works fine (without crashes at least) untill I add the .inst.cfg profiles. For example the draft profile that is loaded by default:
[general]
version = 3
name = Fast
definition = ultimaker2_plus
[metadata]
setting_version = 4
type = quality
quality_type = draft
weight = -1
material = makerpoint_plaht
variant = 0.8 mm
[values]
cool_fan_full_at_height = =layer_height_0 + 2 * layer_height
cool_min_speed = 2
infill_sparse_density = 100
infill_line_width = =round(line_width * 0.75 / 0.75, 2)
infill_pattern = cubic
line_width = =machine_nozzle_size * 0.9375
machine_nozzle_cool_down_speed = 0.75
machine_nozzle_heat_up_speed = 1.6
material_final_print_temperature = =max(-273.15, material_print_temperature - 5)
material_initial_print_temperature = =max(-273.15, material_print_temperature)
material_print_temperature = =default_material_print_temperature + 10
speed_print = 45
top_bottom_thickness = =layer_height * 6
wall_line_width = =round(line_width * 0.75 / 0.75, 2)
wall_thickness = =wall_line_width_0 + wall_line_width_x
cool_fan_speed_max = =100
layer_height = 0.2
prime_tower_enable = False
wall_line_width_x = =round(wall_line_width * 0.75 / 0.75, 2)
gradual_infill_step_height = =3 * layer_height
retract_at_layer_change = False
support_angle = 70
support_line_width = =line_width * 0.75
support_xy_distance = =wall_line_width_0 * 1.5
Edited by Anteino
Bump?
Bump
Recommended Posts
nallath 1,124
There are a few mistakes that I see on first glance;
The "register" function in the __init__ must return a dict. The keys of the dict must match plugin types that Cura knows about. In this case, you return an unknown type ("p_reader").
You're also basing it on a meshreader, which is, as the name implies, a plugin that's made to read meshes. It would be better to base it on the profile_reader plugin type. An example of it can be found in the LegacyProfileReader plugin.
Link to post
Share on other sites