MCPcopy Create free account
hub / github.com/Singular/Singular / getSurfCode

Method getSurfCode

Singular/LIB/surfex/Curve.java:192–230  ·  view source on GitHub ↗
(String polyname, int surface_no, double ang[])

Source from the content-addressed store, hash-verified

190 }
191
192 public String getSurfCode(String polyname, int surface_no, double ang[]) {
193 //System.out.println("surf_no:"+surface_no);
194
195 String str = "";
196 str += "curve_red = " + (colorButton_i.getBackground().getRed()) + ";"
197 + "curve_green = " + (colorButton_i.getBackground().getGreen())
198 + ";" + "curve_blue = "
199 + (colorButton_i.getBackground().getBlue()) + ";";
200 //str += "surface" + strSurfNo + "=rotate(surface" + strSurfNo + ","
201 //+ ang[0] + ",yAxis);";
202 //str += "surface" + strSurfNo + "=rotate(surface" + strSurfNo + ","
203 //+ ang[1] + ",xAxis);";
204 //str += "surface" + strSurfNo + "=rotate(surface" + strSurfNo + ","
205 //+ ang[2] + ",zAxis);";
206 int i;
207 //System.out.println((C[0].getSelectedItem()).toString());
208
209 str += "surf_nr = " + surface_no + ";\n";
210 str += "cut_distance = 0.0001;\n";
211 str += "curve_width = 2.5;\n";
212
213 for (i = 1; i <= 8; i++) {
214 if (((C[i].getSelectedItem()).toString()).equals("-")) {
215 str += "cutsurface" + (i) + " = 0;";
216 } else {
217 str += "cutsurface" + (i) + " = f"
218 + ((C[i].getSelectedItem()).toString()) + ";";
219 str += "cutsurface" + (i) + "=rotate(cutsurface" + (i) + ","
220 + ang[0] + ",yAxis);\n";
221 str += "cutsurface" + (i) + "=rotate(cutsurface" + (i) + ","
222 + ang[1] + ",xAxis);\n";
223 str += "cutsurface" + (i) + "=rotate(cutsurface" + (i) + ","
224 + ang[2] + ",zAxis);\n";
225 }
226 }
227 str += "cut_with_surface;\n";
228
229 return (str);
230 }
231
232 public void savesurfCode(PrintWriter pw, String polyname, int surface_no,
233 double ang[]) {

Callers 1

getSurfCode_Part1Method · 0.95

Calls 4

getRedMethod · 0.80
getGreenMethod · 0.80
getBlueMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected