Renamed python class Voronoi to VoronoiDiagram
This commit is contained in:
@@ -77,7 +77,7 @@ PyMOD_INIT_FUNC(Path)
|
||||
Base::Interpreter().addType(&Path::ToolPy ::Type, pathModule, "Tool");
|
||||
Base::Interpreter().addType(&Path::TooltablePy ::Type, pathModule, "Tooltable");
|
||||
Base::Interpreter().addType(&Path::AreaPy ::Type, pathModule, "Area");
|
||||
Base::Interpreter().addType(&Path::VoronoiPy ::Type, pathModule, "Voronoi");
|
||||
Base::Interpreter().addType(&Path::VoronoiPy ::Type, pathModule, "VoronoiDiagram");
|
||||
Base::Interpreter().addType(&Path::VoronoiCellPy ::Type, pathModule, "VoronoiCell");
|
||||
Base::Interpreter().addType(&Path::VoronoiEdgePy ::Type, pathModule, "VoronoiEdge");
|
||||
Base::Interpreter().addType(&Path::VoronoiVertexPy ::Type, pathModule, "VoronoiVertex");
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<PythonExport
|
||||
Father="BaseClassPy"
|
||||
Name="VoronoiPy"
|
||||
PythonName="VoronoiDiagram"
|
||||
Twin="Voronoi"
|
||||
TwinPointer="Voronoi"
|
||||
Include="Mod/Path/App/Voronoi.h"
|
||||
|
||||
@@ -45,7 +45,7 @@ std::string VoronoiPy::representation(void) const
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss.precision(5);
|
||||
ss << "Voronoi("
|
||||
ss << "VoronoiDiagram("
|
||||
<< "{" << getVoronoiPtr()->numSegments() << ", " << getVoronoiPtr()->numPoints() << "}"
|
||||
<< " -> "
|
||||
<< "{" << getVoronoiPtr()->numCells() << ", " << getVoronoiPtr()->numEdges() << ", " << getVoronoiPtr()->numVertices() << "}"
|
||||
|
||||
@@ -292,7 +292,7 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
|
||||
voronoiWires = []
|
||||
for f in faces:
|
||||
vd = Path.Voronoi()
|
||||
vd = Path.VoronoiDiagram()
|
||||
insert_many_wires(vd, f.Wires)
|
||||
|
||||
vd.construct()
|
||||
@@ -354,7 +354,7 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
)
|
||||
return
|
||||
|
||||
try:
|
||||
if True:
|
||||
faces = []
|
||||
|
||||
for base in obj.BaseShapes:
|
||||
@@ -383,10 +383,10 @@ class ObjectVcarve(PathEngraveBase.ObjectOp):
|
||||
)
|
||||
)
|
||||
|
||||
except Exception as e:
|
||||
PathLog.error(
|
||||
"Error processing Base object. Engraving operation will produce no output."
|
||||
)
|
||||
#except Exception as e:
|
||||
# PathLog.error(
|
||||
# "Error processing Base object. Engraving operation will produce no output."
|
||||
# )
|
||||
|
||||
def opUpdateDepths(self, obj, ignoreErrors=False):
|
||||
"""updateDepths(obj) ... engraving is always done at the top most z-value"""
|
||||
|
||||
@@ -49,7 +49,7 @@ def initVD():
|
||||
ptv = [FreeCAD.Vector(p[0], p[1]) for p in pts]
|
||||
ptv.append(ptv[0])
|
||||
|
||||
vd = Path.Voronoi()
|
||||
vd = Path.VoronoiDiagram()
|
||||
for i in range(len(pts)):
|
||||
vd.addSegment(ptv[i], ptv[i + 1])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user