From 9926b50177b38878461246e0ff24feb13ce2be88 Mon Sep 17 00:00:00 2001 From: JannisX11 Date: Sun, 12 May 2024 11:55:20 +0200 Subject: [PATCH] Rename cuboid with edges --- js/modeling/mesh_editing.js | 14 +++++++------- lang/en.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/modeling/mesh_editing.js b/js/modeling/mesh_editing.js index cdd9f286..d80e47a9 100644 --- a/js/modeling/mesh_editing.js +++ b/js/modeling/mesh_editing.js @@ -1046,7 +1046,7 @@ BARS.defineActions(function() { form: { shape: {label: 'dialog.add_primitive.shape', type: 'select', options: { cuboid: 'dialog.add_primitive.shape.cube', - rounded_cuboid: 'dialog.add_primitive.shape.rounded_cuboid', + beveled_cuboid: 'dialog.add_primitive.shape.beveled_cuboid', pyramid: 'dialog.add_primitive.shape.pyramid', plane: 'dialog.add_primitive.shape.plane', circle: 'dialog.add_primitive.shape.circle', @@ -1057,12 +1057,12 @@ BARS.defineActions(function() { torus: 'dialog.add_primitive.shape.torus', }}, diameter: {label: 'dialog.add_primitive.diameter', type: 'number', value: 16}, - align_edges: {label: 'dialog.add_primitive.align_edges', type: 'checkbox', value: true, condition: ({shape}) => !['cuboid', 'rounded_cuboid', 'pyramid', 'plane'].includes(shape)}, - height: {label: 'dialog.add_primitive.height', type: 'number', value: 8, condition: ({shape}) => ['cylinder', 'cone', 'cuboid', 'rounded_cuboid', 'pyramid', 'tube'].includes(shape)}, + align_edges: {label: 'dialog.add_primitive.align_edges', type: 'checkbox', value: true, condition: ({shape}) => !['cuboid', 'beveled_cuboid', 'pyramid', 'plane'].includes(shape)}, + height: {label: 'dialog.add_primitive.height', type: 'number', value: 8, condition: ({shape}) => ['cylinder', 'cone', 'cuboid', 'beveled_cuboid', 'pyramid', 'tube'].includes(shape)}, sides: {label: 'dialog.add_primitive.sides', type: 'number', value: 12, min: 3, max: 48, condition: ({shape}) => ['cylinder', 'cone', 'circle', 'torus', 'sphere', 'tube'].includes(shape)}, minor_diameter: {label: 'dialog.add_primitive.minor_diameter', type: 'number', value: 4, condition: ({shape}) => ['torus', 'tube'].includes(shape)}, minor_sides: {label: 'dialog.add_primitive.minor_sides', type: 'number', value: 8, min: 2, max: 32, condition: ({shape}) => ['torus'].includes(shape)}, - edge_size: {label: 'dialog.add_primitive.edge_size', type: 'number', value: 2, condition: ({shape}) => ['rounded_cuboid'].includes(shape)}, + edge_size: {label: 'dialog.add_primitive.edge_size', type: 'number', value: 2, condition: ({shape}) => ['beveled_cuboid'].includes(shape)}, }, onConfirm(result) { let original_selection_group = Group.selected && Group.selected.uuid; @@ -1278,7 +1278,7 @@ BARS.defineActions(function() { new MeshFace( mesh, {vertices: [vertex_keys[1], vertex_keys[3], vertex_keys[5], vertex_keys[7]]} ), // North ); } - if (result.shape == 'rounded_cuboid') { + if (result.shape == 'beveled_cuboid') { let s = result.edge_size; let rs = result.diameter/2 - s; let r = result.diameter/2; @@ -1410,11 +1410,11 @@ BARS.defineActions(function() { Undo.amendEdit({ diameter: {label: 'dialog.add_primitive.diameter', type: 'number', value: result.diameter, interval_type: 'position'}, - height: {label: 'dialog.add_primitive.height', type: 'number', value: result.height, condition: ['cylinder', 'cone', 'cuboid', 'rounded_cuboid', 'pyramid', 'tube'].includes(result.shape), interval_type: 'position'}, + height: {label: 'dialog.add_primitive.height', type: 'number', value: result.height, condition: ['cylinder', 'cone', 'cuboid', 'beveled_cuboid', 'pyramid', 'tube'].includes(result.shape), interval_type: 'position'}, sides: {label: 'dialog.add_primitive.sides', type: 'number', value: result.sides, min: 3, max: 48, condition: ['cylinder', 'cone', 'circle', 'torus', 'sphere', 'tube'].includes(result.shape)}, minor_diameter: {label: 'dialog.add_primitive.minor_diameter', type: 'number', value: result.minor_diameter, condition: ['torus', 'tube'].includes(result.shape), interval_type: 'position'}, minor_sides: {label: 'dialog.add_primitive.minor_sides', type: 'number', value: result.minor_sides, min: 2, max: 32, condition: ['torus'].includes(result.shape)}, - edge_size: {label: 'dialog.add_primitive.edge_size', type: 'number', value: result.edge_size, condition: ['rounded_cuboid'].includes(result.shape)}, + edge_size: {label: 'dialog.add_primitive.edge_size', type: 'number', value: result.edge_size, condition: ['beveled_cuboid'].includes(result.shape)}, }, form => { Object.assign(result, form); runEdit(true, result); diff --git a/lang/en.json b/lang/en.json index cf05bb3f..1100de5f 100644 --- a/lang/en.json +++ b/lang/en.json @@ -539,7 +539,7 @@ "dialog.add_primitive.shape.sphere": "Sphere", "dialog.add_primitive.shape.torus": "Torus", "dialog.add_primitive.shape.cube": "Cuboid", - "dialog.add_primitive.shape.rounded_cuboid": "Cuboid with Edges", + "dialog.add_primitive.shape.beveled_cuboid": "Beveled Cuboid", "dialog.add_primitive.shape.pyramid": "Pyramid", "dialog.add_primitive.shape.plane": "Plane", "dialog.add_primitive.diameter": "Diameter",