import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.Set;
import org.jcae.opencascade.jni.TopoDS_Shape;
private GeometryProvider geometryProvider;
public GeometryComponent() {
- currentParameters = new HashMap<String, Object>();
- calculatedParameters = new HashMap<String, Object>();
+ currentParameters = new HashMap<>();
+ calculatedParameters = new HashMap<>();
}
public void visualize(VtkView panel) {
return calculatedParameters;
}
+ public Map<String, Object> getTotalParameters() {
+ Map<String,Object> params = new HashMap<>();
+ params.putAll(currentParameters);
+ params.putAll(calculatedParameters);
+ return params;
+ }
+
public void setParametersUpdated(boolean parametersUpdated) {
this.parametersUpdated = parametersUpdated;
}
for (String id : parameters.keySet()) {
Object currentValue = currentParameters.get(id);
Object newValue = parameters.get(id);
- if (currentValue == newValue)
+ if (Objects.equals(currentValue, newValue))
continue;
+ if (newValue == null) {
+ continue;
+ }
if (currentValue instanceof Double) {
if (Math.abs((Double)currentValue-(Double)newValue) < MathTools.NEAR_ZERO)
continue;
if (hover)
color = new double[]{1,0,1};
for (vtkProp3D prop : solidObject.getEdges()) {
+ prop.SetVisibility(hover ? 1 : 0);
vtkProperty property = ((vtkActor)prop).GetProperty();
property.SetColor(color);
property.Delete();