From 9593c78703845bfca18a3a135cbbc47cc03b54f6 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Mon, 16 Feb 2015 21:49:53 +0100 Subject: continuing fillet/chamfer (bzr r13645.1.13) --- src/2geom/satellite.h | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'src/2geom') diff --git a/src/2geom/satellite.h b/src/2geom/satellite.h index 8623ff1b0..06b4a1dd6 100644 --- a/src/2geom/satellite.h +++ b/src/2geom/satellite.h @@ -54,6 +54,12 @@ class Satellite _satellitetype = A; } + void setSatelliteType(gchar const * A) + { + std::map GcharMapToSatelliteType = boost::assign::map_list_of("FILLET", FILLET)("INVERSE_FILLET", INVERSE_FILLET)("CHAMFER",CHAMFER)("INVERSE_CHAMFER",INVERSE_CHAMFER)("INVALID_SATELLITE",INVALID_SATELLITE); + _satellitetype = GcharMapToSatelliteType[A]; + } + void setIsTime(bool A) { _isTime = A; @@ -84,42 +90,48 @@ class Satellite _size = A; } - SatelliteType satellitetype() const + SatelliteType getSatelliteType() const { return _satellitetype; } - bool isTime() const + gchar const * getSatelliteTypeGchar() const + { + std::map SatelliteTypeToGcharMap = boost::assign::map_list_of(FILLET, "FILLET")(INVERSE_FILLET, "INVERSE_FILLET")(CHAMFER,"CHAMFER")(INVERSE_CHAMFER,"INVERSE_CHAMFER")(INVALID_SATELLITE,"INVALID_SATELLITE"); + return SatelliteTypeToGcharMap[_satellitetype]; + } + + bool getIsTime() const { return _isTime; } - bool active() const + bool getActive() const { return _active; } - bool hasMirror() const + bool getHasMirror() const { return _hasMirror; } - bool hidden() const + bool getHidden() const { return _hidden; } - double size() const + double getSize() const { return _size; } - double time() const + double getTime() const { return _time; } - double time(Geom::D2 curve) const + double getTime(Geom::D2 curve) const { //todo make the process return _time; @@ -133,7 +145,10 @@ class Satellite static const std::map GcharMapToSatelliteType; + static double getOpositeTime(Geom::D2 SBasisCurve, double time); + private: + SatelliteType _satellitetype; bool _isTime; bool _active; -- cgit v1.2.3