[TD]getters and setters for geometry
- make attributes private (or protected) and use getters and setters instead of accessing attributes directly.
This commit is contained in:
@@ -383,7 +383,7 @@ DimensionGeometryType TechDraw::isValidSingleEdge(ReferenceEntry ref)
|
||||
return isInvalid;
|
||||
}
|
||||
|
||||
if (geom->geomType == TechDraw::GENERIC) {
|
||||
if (geom->getGeomType() == TechDraw::GENERIC) {
|
||||
TechDraw::GenericPtr gen1 = std::static_pointer_cast<TechDraw::Generic>(geom);
|
||||
if (gen1->points.size() < 2) {
|
||||
return isInvalid;
|
||||
@@ -396,11 +396,11 @@ DimensionGeometryType TechDraw::isValidSingleEdge(ReferenceEntry ref)
|
||||
} else {
|
||||
return TechDraw::isDiagonal;
|
||||
}
|
||||
} else if (geom->geomType == TechDraw::CIRCLE || geom->geomType == TechDraw::ARCOFCIRCLE) {
|
||||
} else if (geom->getGeomType() == TechDraw::CIRCLE || geom->getGeomType() == TechDraw::ARCOFCIRCLE) {
|
||||
return isCircle;
|
||||
} else if (geom->geomType == TechDraw::ELLIPSE || geom->geomType == TechDraw::ARCOFELLIPSE) {
|
||||
} else if (geom->getGeomType() == TechDraw::ELLIPSE || geom->getGeomType() == TechDraw::ARCOFELLIPSE) {
|
||||
return isEllipse;
|
||||
} else if (geom->geomType == TechDraw::BSPLINE) {
|
||||
} else if (geom->getGeomType() == TechDraw::BSPLINE) {
|
||||
TechDraw::BSplinePtr spline = std::static_pointer_cast<TechDraw::BSpline>(geom);
|
||||
if (spline->isCircle()) {
|
||||
return isBSplineCircle;
|
||||
@@ -493,7 +493,7 @@ DimensionGeometryType TechDraw::isValidMultiEdge(ReferenceVector refs)
|
||||
TechDraw::BaseGeomPtr geom0 = objFeat0->getGeomByIndex(GeoId0);
|
||||
TechDraw::BaseGeomPtr geom1 = objFeat0->getGeomByIndex(GeoId1);
|
||||
|
||||
if (geom0->geomType == TechDraw::GENERIC && geom1->geomType == TechDraw::GENERIC) {
|
||||
if (geom0->getGeomType() == TechDraw::GENERIC && geom1->getGeomType() == TechDraw::GENERIC) {
|
||||
TechDraw::GenericPtr gen0 = std::static_pointer_cast<TechDraw::Generic>(geom0);
|
||||
TechDraw::GenericPtr gen1 = std::static_pointer_cast<TechDraw::Generic>(geom1);
|
||||
if (gen0->points.size() > 2 || gen1->points.size() > 2) {//the edge is a polyline
|
||||
|
||||
Reference in New Issue
Block a user