}
if (curVec.containsBezier() || preVec != null
&& preVec.containsBezier()) {
Vec2D c1 = (SketchPoint) preVec;
Vec2D c2 = (SketchPoint) curVec;
if (c1 == null)
c1 = new SketchPoint(0, 0);
if (preVec != null && preVec.containsBezier())
{
c1 = preVec.getControlPoint2();
}
if (curVec.containsBezier()) {
c2 = curVec.getControlPoint1();
}
if (c1 != null && c2 != null && curVec != null)
g.bezierVertex(c1.x, c1.y, c2.x, c2.y, curVec.x, curVec.y);
} else {
if (SETTINGS_SKETCH.Draw_Curves) {
g.curveVertex(curVec.x, curVec.y);
} else {
g.vertex(curVec.x, curVec.y);
}
}
}
if (this.getClosed())
g.endShape(PConstants.CLOSE);
else
g.endShape(PConstants.OPEN);
if (getParentSketch().getSketchTools().getCurrentTool() == SketchTools.DRAW_PATH_TOOL
&& !this.getClosed() && this.selected && this.getLength() > 0) {
Vec2D firstPoint = this.get(0);
Vec2D mousePos = new Vec2D(
getParentSketch().getSketchTools().mouseX,
getParentSketch().getSketchTools().mouseY);
//#IF JAVA
if (getParentSketch().getOnSketchPlane() != null)