Skip to content

Commit 9ebde69

Browse files
committed
set the resolution of curves
1 parent d707080 commit 9ebde69

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

src/main/java/com/piro/bezier/BezierPath.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
public class BezierPath {
1717

18-
private static final double MaximumInterpolationStep = 0.5;
18+
private static double MaximumInterpolationStep = 0.01;
1919

2020
static final Matcher matchPoint = Pattern.compile("\\s*(\\d+)[^\\d]+(\\d+)\\s*").matcher("");
2121

@@ -179,8 +179,8 @@ private double getResolution() {
179179
double min = 1.0 / ((double) TextExtrude.getTextResolutionPoints());
180180
if (increment < min)
181181
increment = min;
182-
if (increment > MaximumInterpolationStep)
183-
increment = MaximumInterpolationStep;
182+
if (increment > getMaximumInterpolationStep())
183+
increment = getMaximumInterpolationStep();
184184
// System.out.println("Path with inc "+points);
185185
return increment;
186186
}
@@ -250,4 +250,12 @@ public ArrayList<Vector3d> evaluate() {
250250
return plInternal;
251251
}
252252

253+
public static double getMaximumInterpolationStep() {
254+
return MaximumInterpolationStep;
255+
}
256+
257+
public static void setMaximumInterpolationStep(double maximumInterpolationStep) {
258+
MaximumInterpolationStep = maximumInterpolationStep;
259+
}
260+
253261
}

src/main/java/eu/mihosoft/vrl/v3d/CSG.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3667,7 +3667,7 @@ public static CSG text(String text, double height, double fontSize, String fontT
36673667
for (String name : javafx.scene.text.Font.getFontNames()) {
36683668
options += name + "\n";
36693669
}
3670-
new Exception(options + "\nIs Not " + fontType + " instead got " + font.getName()).printStackTrace();
3670+
new Exception("Missing " + fontType + " instead got " + font.getName()).printStackTrace();
36713671
}
36723672
ArrayList<CSG> stuff = TextExtrude.text(height, text, font);
36733673
CSG back = null;

0 commit comments

Comments
 (0)