Freestyle: Removed SVertex _curvatureFredo and _directionFredo and their getter/setter methods..
These data elements are undocumented and of little use. For now they are commented out in the implementation in favor of less memory consumption, and a very limited support for these data components in the Python API was just removed (should be easy to recover).
This commit is contained in:
parent
685d785c98
commit
62bf22e27b
|
@ -199,26 +199,12 @@ static int CurvePoint_t2d_set(BPy_CurvePoint *self, PyObject *value, void *UNUSE
|
|||
return 0;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(CurvePoint_curvature_fredo_doc,
|
||||
"The angle (Fredo's curvature) in radians.\n"
|
||||
"\n"
|
||||
":type: float");
|
||||
|
||||
static PyObject *CurvePoint_curvature_fredo_get(BPy_CurvePoint *self, void *UNUSED(closure))
|
||||
{
|
||||
return PyFloat_FromDouble(self->cp->curvatureFredo());
|
||||
}
|
||||
|
||||
// todo - CurvePoint.directionFredo()
|
||||
|
||||
static PyGetSetDef BPy_CurvePoint_getseters[] = {
|
||||
{(char *)"first_svertex", (getter)CurvePoint_first_svertex_get, (setter)CurvePoint_first_svertex_set,
|
||||
(char *)CurvePoint_first_svertex_doc, NULL},
|
||||
{(char *)"second_svertex", (getter)CurvePoint_second_svertex_get, (setter)CurvePoint_second_svertex_set,
|
||||
(char *)CurvePoint_second_svertex_doc, NULL},
|
||||
{(char *)"t2d", (getter)CurvePoint_t2d_get, (setter)CurvePoint_t2d_set, (char *)CurvePoint_t2d_doc, NULL},
|
||||
{(char *)"curvature_fredo", (getter)CurvePoint_curvature_fredo_get, (setter)NULL,
|
||||
(char *)CurvePoint_curvature_fredo_doc, NULL},
|
||||
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
|
|
|
@ -475,7 +475,6 @@ real CurvePoint::curvature2d_as_angle() const
|
|||
return __A->curvature2d_as_angle();
|
||||
return ((1 - _t2d) * __A->curvature2d_as_angle() + _t2d * __B->curvature2d_as_angle());
|
||||
}
|
||||
#endif
|
||||
|
||||
real CurvePoint::curvatureFredo() const
|
||||
{
|
||||
|
@ -494,6 +493,7 @@ Vec2d CurvePoint::directionFredo () const
|
|||
return __A->directionFredo();
|
||||
return ((1 - _t2d) * __A->directionFredo() + _t2d * __B->directionFredo());
|
||||
}
|
||||
#endif
|
||||
|
||||
/**********************************/
|
||||
/* */
|
||||
|
@ -813,14 +813,12 @@ real Curve::local_average_density(float sigma, int iCombination ) const
|
|||
return result;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
/* UNUSED */
|
||||
// #define EPS_CURVA_DIR 0.01
|
||||
|
||||
void Curve::computeCurvatureAndOrientation ()
|
||||
{
|
||||
#if 0
|
||||
const_vertex_iterator v = vertices_begin(), vend = vertices_end(), v2, prevV, v0;
|
||||
Vec2d p0, p1, p2;
|
||||
Vec3r p;
|
||||
|
@ -924,7 +922,7 @@ void Curve::computeCurvatureAndOrientation ()
|
|||
p0 = p1;
|
||||
p1 = p2;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
} /* namespace Freestyle */
|
||||
|
|
|
@ -337,10 +337,10 @@ public:
|
|||
Vec3r curvature2d_as_vector() const;
|
||||
/*! angle in radians */
|
||||
real curvature2d_as_angle() const;
|
||||
#endif
|
||||
|
||||
real curvatureFredo() const;
|
||||
Vec2d directionFredo() const;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
@ -422,8 +422,10 @@ public:
|
|||
return "Curve";
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* fredo's curvature storage */
|
||||
void computeCurvatureAndOrientation();
|
||||
#endif
|
||||
|
||||
/*! Adds a single vertex (CurvePoint) at the end of the Curve */
|
||||
inline void push_vertex_back(Vertex *iVertex)
|
||||
|
|
|
@ -167,8 +167,10 @@ private:
|
|||
vector<FEdge*> _FEdges; // the edges containing this vertex
|
||||
SShape *_Shape; // the shape to which belongs the vertex
|
||||
ViewVertex *_pViewVertex; // The associated viewvertex, in case there is one.
|
||||
#if 0
|
||||
real _curvatureFredo;
|
||||
Vec2r _directionFredo;
|
||||
#endif
|
||||
CurvatureInfo *_curvature_info;
|
||||
|
||||
public:
|
||||
|
@ -326,6 +328,7 @@ public:
|
|||
return _curvature_info;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Fredo's normal and curvature*/
|
||||
void setCurvatureFredo(real c)
|
||||
{
|
||||
|
@ -346,6 +349,7 @@ public:
|
|||
{
|
||||
return _directionFredo;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*! Sets the Id */
|
||||
inline void setId(const Id& id)
|
||||
|
|
Loading…
Reference in New Issue