1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
| # -*- coding: utf-8 -*-
import gom
# affichage d'un fenetre demandant la température ambiante
RESULT=gom.script.sys.execute_user_defined_dialog (dialog={
"content": [
[
{
"background_style": "",
"columns": 1,
"maximum": 1000,
"minimum": 0,
"name": "input",
"precision": 2,
"rows": 1,
"tooltip": {
"id": "",
"text": "",
"translatable": True
},
"type": "input::number",
"unit": "TEMPERATURE",
"value": 0 #La valeur par défaut quand on ouvre la fenêtre est de 0°C
}
]
],
"control": {
"id": "OkCancel"
},
"embedding": "always_toplevel",
"position": "automatic",
"size": {
"height": 112,
"width": 203
},
"sizemode": "automatic",
"style": "",
"title": {
"id": "",
"text": "Titre du dialogue",
"translatable": True
}
})
#Script dans lequel il faut intégrer la température renseignée dessus
gom.script.atos.set_project_settings (
cut_out_background_points_automatically=True,
measurement_temperature= 23.5, #J'ai essayé en utilisant float('value') mais cela ne marche pas. C'est sur cette ligne qu'il faut intégrer la température actuelle.
part_scanning_mode='single_part',
use_automatic_exposure_time_by_matrix=False,
use_gpu_acceleration=True) |
Partager