[TD]Python routines & extension for CosmeticVertex

This commit is contained in:
wandererfan
2019-12-01 09:18:24 -05:00
committed by WandererFan
parent 5022026906
commit d9e0c2e452
22 changed files with 800 additions and 249 deletions

View File

@@ -572,6 +572,24 @@ void GeometryObject::addGeomFromCompound(TopoDS_Shape edgeCompound, edgeClass ca
} //end TopExp
}
//adds a new GeomVert surrogate for CV
//returns GeomVert selection index ("Vertex3")
// insertGeomForCV(cv)
int GeometryObject::addCosmeticVertex(CosmeticVertex* cv)
{
// Base::Console().Message("GO::addCosmeticVertex(%X)\n", cv);
double scale = m_parent->getScale();
Base::Vector3d pos = cv->scaled(scale);
TechDraw::Vertex* v = new TechDraw::Vertex(pos.x, pos.y);
v->cosmetic = true;
v->cosmeticLink = -1; //obs??
v->cosmeticTag = cv->getTagAsString();
v->hlrVisible = true;
int idx = vertexGeom.size();
vertexGeom.push_back(v);
return idx;
}
//adds a new GeomVert to list for cv[link]
int GeometryObject::addCosmeticVertex(Base::Vector3d pos, int link)
{
@@ -599,6 +617,8 @@ int GeometryObject::addCosmeticVertex(Base::Vector3d pos, std::string tagString,
return idx;
}
//================================================================================
//do not need source index anymore. base has CosmeticTag
int GeometryObject::addCosmeticEdge(TechDraw::BaseGeom* base,
int s)