@@ -3932,29 +3932,46 @@ public Optional<String> getMaterialType() {
39323932 return getStorage ().getValue ("materialType" );
39333933 }
39343934
3935- public void setMaterialType (String type ) {
3935+ public CSG setMaterialType (String type ) {
3936+ if (type .length () == 0 )
3937+ throw new RuntimeException ("Can not set empty" );
3938+ if (getMaterialType ().isPresent ())
3939+ if (getMaterialType ().get ().contentEquals (type ))
3940+ return this ;
39363941 getStorage ().set ("materialType" , type );
39373942 getStorage ().delete ("material" );
39383943 getStorage ().delete ("materialInfillPercent" );
3944+ return this ;
39393945
39403946 }
39413947
39423948 public Optional <String > getMaterial () {
39433949 return getStorage ().getValue ("material" );
39443950 }
39453951
3946- public void setMaterial (String type ) {
3952+ public CSG setMaterial (String type ) {
3953+ if (type .length () == 0 )
3954+ throw new RuntimeException ("Can not set empty" );
39473955 getStorage ().set ("material" , type );
3956+ return this ;
39483957 }
39493958
39503959 public Optional <Double > getMateriaInfillPercent () {
39513960 return getStorage ().getValue ("materialInfillPercent" );
39523961 }
39533962
3954- public void setMaterialInfillPercent (double type ) {
3963+ public CSG setMaterialInfillPercent (double type ) {
39553964 getStorage ().set ("materialInfillPercent" , type );
3965+ return this ;
3966+ }
3967+ public Optional <Double > getMateriaDensity () {
3968+ return getStorage ().getValue ("materialDensity" );
39563969 }
39573970
3971+ public CSG setMaterialDensity (double type ) {
3972+ getStorage ().set ("materialDensity" , type );
3973+ return this ;
3974+ }
39583975 private void syncCadoodleCatagories (CSG dyingCSG ) {
39593976 setIsHole (dyingCSG .isHole ());
39603977 setIsHide (dyingCSG .isHide ());
0 commit comments