Warn for zero-thickness shoulder
This commit is contained in:
parent
08c002ed57
commit
74cd0e9636
@ -1048,7 +1048,7 @@ RocketCompCfg.lbl.Length = Length:
|
||||
RocketCompCfg.lbl.Thickness = Thickness:
|
||||
RocketCompCfg.checkbox.Endcapped = End capped
|
||||
RocketCompCfg.checkbox.Endcapped.ttip = Caps (closes) the end of the shoulder.
|
||||
RocketCompCfg.title.Aftshoulder = Aft shoulder
|
||||
RocketCompCfg.border.Aftshoulder = Aft shoulder
|
||||
RocketCompCfg.border.Foreshoulder = Fore shoulder
|
||||
RocketCompCfg.tab.Outside = Outside
|
||||
RocketCompCfg.tab.Inside = Inside
|
||||
|
@ -951,7 +951,7 @@ RocketCompCfg.lbl.Length = :الطول
|
||||
RocketCompCfg.lbl.Thickness = :السماكة
|
||||
RocketCompCfg.checkbox.Endcapped = نهاية مغلقة
|
||||
RocketCompCfg.checkbox.Endcapped.ttip = .يغلق نهاية الكتف
|
||||
RocketCompCfg.title.Aftshoulder = مؤخرة الكتف
|
||||
RocketCompCfg.border.Aftshoulder = مؤخرة الكتف
|
||||
RocketCompCfg.border.Foreshoulder = مقدمة الكتف
|
||||
!RocketCompCfg.lbl.Length = :الطول
|
||||
RocketCompCfg.tab.Outside = من الخارج
|
||||
|
@ -651,7 +651,7 @@ RocketCompCfg.lbl.Length = D
|
||||
RocketCompCfg.lbl.Thickness = Tlou\u0161tka:
|
||||
RocketCompCfg.checkbox.Endcapped = Záslepka
|
||||
RocketCompCfg.ttip.Endcapped = Zdali je konec ramene zaslepen.
|
||||
RocketCompCfg.title.Aftshoulder = Dr\u017Eák zádi
|
||||
RocketCompCfg.border.Aftshoulder = Dr\u017Eák zádi
|
||||
RocketCompCfg.border.Foreshoulder = Dr\u017Eák prídi
|
||||
!RocketCompCfg.lbl.Length = Délka:
|
||||
|
||||
|
@ -708,7 +708,7 @@ RocketCompCfg.lbl.Length = L
|
||||
RocketCompCfg.lbl.Thickness = Wandstärke:
|
||||
RocketCompCfg.checkbox.Endcapped = Verschlossenes Ende
|
||||
RocketCompCfg.ttip.Endcapped = Gibt an, ob das Ende der Schulter geschlossen ist.
|
||||
RocketCompCfg.title.Aftshoulder = Schulter hinten
|
||||
RocketCompCfg.border.Aftshoulder = Schulter hinten
|
||||
RocketCompCfg.border.Foreshoulder = Schulter vorn
|
||||
!RocketCompCfg.lbl.Length = Length:
|
||||
|
||||
|
@ -857,7 +857,7 @@ RocketCompCfg.tab.Figure = Estilo
|
||||
RocketCompCfg.tab.Override.ttip = Especificar la Masa y el CG del componente.
|
||||
RocketCompCfg.tab.Override = Masa y CG
|
||||
RocketCompCfg.tab.Comment.ttip = Especifique un comentario para el componente
|
||||
RocketCompCfg.title.Aftshoulder = Trasera del acople
|
||||
RocketCompCfg.border.Aftshoulder = Trasera del acople
|
||||
RocketCompCfg.ttip.Endcapped = Si el extremo del soporte est\u00e1 truncado.
|
||||
RocketCompCfg.lbl.Componentname.ttip = El nombre del componente.
|
||||
|
||||
|
@ -849,7 +849,7 @@ RocketCompCfg.tab.Figure = Forme
|
||||
RocketCompCfg.tab.Override.ttip = For\u00E7age de la Masse et du CG
|
||||
RocketCompCfg.tab.Override = Forcer la valeur
|
||||
RocketCompCfg.tab.Comment.ttip = Commentaires concernant la pi\u00E8ce
|
||||
RocketCompCfg.title.Aftshoulder = Epaulement arri\u00E8re
|
||||
RocketCompCfg.border.Aftshoulder = Epaulement arri\u00E8re
|
||||
RocketCompCfg.ttip.Endcapped = Pr\u00E9cise si l'arri\u00E8re du c\u00F4ne est clos.
|
||||
RocketCompCfg.lbl.Componentname.ttip = Le nom de la pi\u00E8ce.
|
||||
|
||||
|
@ -709,7 +709,7 @@ RocketCompCfg.lbl.Length = Lunghezza:
|
||||
RocketCompCfg.lbl.Thickness = Spessore:
|
||||
RocketCompCfg.checkbox.Endcapped = Chiuso
|
||||
RocketCompCfg.ttip.Endcapped = Se la fine della spalla e' chiusa.
|
||||
RocketCompCfg.title.Aftshoulder = Spalla posteriore
|
||||
RocketCompCfg.border.Aftshoulder = Spalla posteriore
|
||||
RocketCompCfg.border.Foreshoulder = Spalla anteriore
|
||||
!RocketCompCfg.lbl.Length = Lunghezza:
|
||||
|
||||
|
@ -739,7 +739,7 @@ RocketCompCfg.lbl.Length = \u9577\u3055\uFF1A
|
||||
RocketCompCfg.lbl.Thickness = \u539A\u3055\uFF1A
|
||||
RocketCompCfg.checkbox.Endcapped = \u7AEF\u306B\u30D5\u30BF\u3092\u3059\u308B
|
||||
RocketCompCfg.ttip.Endcapped = \u30D5\u30BF\u304C\u3042\u308B\u304B\u3069\u3046\u304B
|
||||
RocketCompCfg.title.Aftshoulder = \u5F8C\u65B9\u30B7\u30E7\u30EB\u30C0\u30FC
|
||||
RocketCompCfg.border.Aftshoulder = \u5F8C\u65B9\u30B7\u30E7\u30EB\u30C0\u30FC
|
||||
RocketCompCfg.border.Foreshoulder = \u524D\u65B9\u30B7\u30E7\u30EB\u30C0\u30FC
|
||||
!RocketCompCfg.lbl.Length
|
||||
|
||||
|
@ -898,7 +898,7 @@ RocketCompCfg.lbl.Length = Lengte:
|
||||
RocketCompCfg.lbl.Thickness = Dikte:
|
||||
RocketCompCfg.checkbox.Endcapped = Einde afgetopt
|
||||
RocketCompCfg.ttip.Endcapped = Of het einde van de schouder is afgedekt.
|
||||
RocketCompCfg.title.Aftshoulder = Achterschouder
|
||||
RocketCompCfg.border.Aftshoulder = Achterschouder
|
||||
RocketCompCfg.border.Foreshoulder = Voorschouder
|
||||
!RocketCompCfg.lbl.Length = Lengte:
|
||||
RocketCompCfg.tab.Outside = Buitenkant
|
||||
|
@ -653,7 +653,7 @@ update.dlg.latestVersion = Korzystasz z najnowszej wersji OpenRocket: %s.
|
||||
RocketCompCfg.lbl.Thickness = Grubo\u015B\u0107:
|
||||
RocketCompCfg.checkbox.Endcapped = Zasklepiony koniec
|
||||
RocketCompCfg.ttip.Endcapped = Czy koniec wpustu jest zasklepiony.
|
||||
RocketCompCfg.title.Aftshoulder = Wpust tylny
|
||||
RocketCompCfg.border.Aftshoulder = Wpust tylny
|
||||
RocketCompCfg.border.Foreshoulder = Wpust przedni
|
||||
!RocketCompCfg.lbl.Length
|
||||
|
||||
|
@ -832,7 +832,7 @@ RocketCompCfg.tab.Figure = Figura
|
||||
RocketCompCfg.tab.Override.ttip = Op\u00e7\u00f5es de modifica\u00e7\u00e3o de massa e CG
|
||||
RocketCompCfg.tab.Override = Modificar
|
||||
RocketCompCfg.tab.Comment.ttip = Especifique um coment\u00e1rio para o componente
|
||||
RocketCompCfg.title.Aftshoulder = Ressalto traseiro
|
||||
RocketCompCfg.border.Aftshoulder = Ressalto traseiro
|
||||
RocketCompCfg.ttip.Endcapped = Quando a extremidade do ressalto \u00e9 limitada.
|
||||
RocketCompCfg.lbl.Componentname.ttip = Nome do componente.
|
||||
|
||||
|
@ -929,7 +929,7 @@ RocketCompCfg.lbl.Length = \u0414\u043B\u0438\u043D\u0430:
|
||||
RocketCompCfg.lbl.Thickness = \u0422\u043E\u043B\u0449\u0438\u043D\u0430:
|
||||
RocketCompCfg.checkbox.Endcapped = \u0422\u043E\u0440\u0435\u0446 \u0437\u0430\u0433\u043B\u0443\u0448\u0435\u043D
|
||||
RocketCompCfg.checkbox.Endcapped.ttip = \u0417\u0430\u0433\u043B\u0443\u0448\u0430\u0435\u0442 \u0442\u043E\u0440\u0435\u0446 \u043A\u0440\u044B\u0448\u043A\u043E\u0439.
|
||||
RocketCompCfg.title.Aftshoulder = \u0417\u0430\u0434\u043D\u0438\u0439 \u0432\u044B\u0441\u0442\u0443\u043F
|
||||
RocketCompCfg.border.Aftshoulder = \u0417\u0430\u0434\u043D\u0438\u0439 \u0432\u044B\u0441\u0442\u0443\u043F
|
||||
RocketCompCfg.border.Foreshoulder = \u041F\u0435\u0440\u0435\u0434\u043D\u0438\u0439 \u0432\u044B\u0441\u0442\u0443\u043F
|
||||
!RocketCompCfg.lbl.Length = \u0414\u043B\u0438\u043D\u0430:
|
||||
RocketCompCfg.tab.Outside = \u0421\u043D\u0430\u0440\u0443\u0436\u0438
|
||||
|
@ -811,7 +811,7 @@ RocketCompCfg.lbl.Length = Length:
|
||||
RocketCompCfg.lbl.Thickness = Thickness:
|
||||
RocketCompCfg.checkbox.Endcapped = End capped
|
||||
RocketCompCfg.ttip.Endcapped = Whether the end of the shoulder is capped.
|
||||
RocketCompCfg.title.Aftshoulder = Aft shoulder
|
||||
RocketCompCfg.border.Aftshoulder = Aft shoulder
|
||||
RocketCompCfg.border.Foreshoulder = Fore shoulder
|
||||
!RocketCompCfg.lbl.Length = Length:
|
||||
|
||||
|
@ -921,7 +921,7 @@ RocketCompCfg.tab.Figure = \u6837\u5F0F
|
||||
RocketCompCfg.tab.Override.ttip = \u8D28\u91CF\u53CA\u91CD\u5FC3\u9009\u9879
|
||||
RocketCompCfg.tab.Override = \u8986\u5199
|
||||
RocketCompCfg.tab.Comment.ttip = \u7EC4\u4EF6\u6CE8\u91CA
|
||||
RocketCompCfg.title.Aftshoulder = \u524D\u8FDE\u63A5\u5904
|
||||
RocketCompCfg.border.Aftshoulder = \u524D\u8FDE\u63A5\u5904
|
||||
RocketCompCfg.ttip.Endcapped = \u8FDE\u63A5\u5904\u7EC8\u7AEF\u662F\u5426\u6709\u76D6.
|
||||
RocketCompCfg.lbl.Componentname.ttip = \u7EC4\u4EF6\u540D\u79F0.
|
||||
|
||||
|
@ -9,11 +9,13 @@ import net.sf.openrocket.file.wavefrontobj.ObjUtils;
|
||||
import net.sf.openrocket.file.wavefrontobj.export.shapes.CylinderExporter;
|
||||
import net.sf.openrocket.file.wavefrontobj.export.shapes.DiskExporter;
|
||||
import net.sf.openrocket.file.wavefrontobj.export.shapes.TubeExporter;
|
||||
import net.sf.openrocket.l10n.Translator;
|
||||
import net.sf.openrocket.logging.Warning;
|
||||
import net.sf.openrocket.logging.WarningSet;
|
||||
import net.sf.openrocket.rocketcomponent.FlightConfiguration;
|
||||
import net.sf.openrocket.rocketcomponent.InstanceContext;
|
||||
import net.sf.openrocket.rocketcomponent.Transition;
|
||||
import net.sf.openrocket.startup.Application;
|
||||
import net.sf.openrocket.util.Coordinate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -22,6 +24,7 @@ import java.util.List;
|
||||
public class TransitionExporter extends RocketComponentExporter<Transition> {
|
||||
private static final double RADIUS_EPSILON = 1e-4;
|
||||
private final int nrOfSides;
|
||||
private static final Translator trans = Application.getTranslator();
|
||||
|
||||
public TransitionExporter(@NotNull DefaultObj obj, FlightConfiguration config, @NotNull CoordTransform transformer,
|
||||
Transition component, String groupName, ObjUtils.LevelOfDetail LOD, WarningSet warnings) {
|
||||
@ -56,6 +59,16 @@ public class TransitionExporter extends RocketComponentExporter<Transition> {
|
||||
(Double.compare(component.getForeRadius(), component.getThickness()) <= 0 &&
|
||||
Double.compare(component.getAftRadius(), component.getThickness()) <= 0);
|
||||
|
||||
// Warn for zero-thickness shoulders
|
||||
if (hasForeShoulder && Double.compare(component.getForeShoulderThickness(), 0) == 0) {
|
||||
warnings.add(Warning.OBJ_ZERO_THICKNESS, component.getName() +
|
||||
" (" + trans.get("RocketCompCfg.border.Foreshoulder") + ")");
|
||||
}
|
||||
if (hasAftShoulder && Double.compare(component.getAftShoulderThickness(), 0) == 0) {
|
||||
warnings.add(Warning.OBJ_ZERO_THICKNESS, component.getName() +
|
||||
" (" + trans.get("RocketCompCfg.border.Aftshoulder") + ")");
|
||||
}
|
||||
|
||||
final List<Integer> outsideForeRingVertices = new ArrayList<>();
|
||||
final List<Integer> outsideAftRingVertices = new ArrayList<>();
|
||||
final List<Integer> insideForeRingVertices = new ArrayList<>();
|
||||
|
@ -836,7 +836,7 @@ public class RocketComponentConfig extends JPanel {
|
||||
sub.setBorder(null);
|
||||
} else {
|
||||
//// Aft shoulder
|
||||
sub.setBorder(BorderFactory.createTitledBorder(trans.get("RocketCompCfg.title.Aftshoulder")));
|
||||
sub.setBorder(BorderFactory.createTitledBorder(trans.get("RocketCompCfg.border.Aftshoulder")));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user