[TD]Add CenterLine edit function

This commit is contained in:
wandererfan
2019-06-23 13:44:29 -04:00
committed by WandererFan
parent 39e556fb3f
commit 11d8aaed61
20 changed files with 977 additions and 570 deletions

View File

@@ -412,6 +412,8 @@ void GeometryObject::addGeomFromCompound(TopoDS_Shape edgeCompound, edgeClass ca
Base::Console().Log("Error - GO::addGeomFromCompound - baseFactory failed for edge: %d\n",i);
throw Base::ValueError("GeometryObject::addGeomFromCompound - baseFactory failed");
}
base->source(0); //object geometry
base->sourceIndex(i-1);
base->classOfEdge = category;
base->visible = visible;
edgeGeom.push_back(base);
@@ -473,23 +475,37 @@ void GeometryObject::addGeomFromCompound(TopoDS_Shape edgeCompound, edgeClass ca
int GeometryObject::addCosmeticVertex(Base::Vector3d pos)
{
// Base::Console().Message("GO::addCosmeticVertex(%s)\n",DrawUtil::formatVector(pos).c_str());
TechDraw::Vertex* v = new TechDraw::Vertex(pos.x, pos.y);
vertexGeom.push_back(v);
int idx = vertexGeom.size() - 1;
return idx;
}
int GeometryObject::addCosmeticEdge(TechDraw::BaseGeom* base)
int GeometryObject::addCosmeticEdge(TechDraw::BaseGeom* base,
int s, int si)
{
// Base::Console().Message("GO::addCosmeticEdge() - cosmetic: %d\n", base->cosmetic);
base->cosmetic = true;
base->source(s); //1-CosmeticEdge, 2-CenterLine
base->sourceIndex(si); //index into source;
edgeGeom.push_back(base);
int idx = edgeGeom.size() - 1;
return idx;
}
int GeometryObject::addCenterLine(TechDraw::BaseGeom* base,
int s, int si)
{
base->cosmetic = true;
base->source(s); //1-CosmeticEdge, 2-CenterLine
base->sourceIndex(si); //index into source;
edgeGeom.push_back(base);
int idx = edgeGeom.size() - 1;
return idx;
}
//! empty Face geometry
void GeometryObject::clearFaceGeom()
{