| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | #include "lc_dimarrowblock.h" |
| |
|
| | void LC_DimArrow::move(const RS_Vector& offset) { |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| |
|
| | m_position.move(offset); |
| | doMove(offset); |
| | calculateBorders(); |
| | } |
| |
|
| | void LC_DimArrow::doMove([[maybe_unused]]const RS_Vector& offset) { |
| | } |
| |
|
| | void LC_DimArrow::doRotate([[maybe_unused]]const RS_Vector& center, [[maybe_unused]]const RS_Vector& angleVector) { |
| | } |
| |
|
| | void LC_DimArrow::rotate(const RS_Vector& center, double angle) { |
| | RS_Vector angleVector(angle); |
| | rotate(center, angleVector); |
| | } |
| |
|
| | void LC_DimArrow::rotate(const RS_Vector& center, const RS_Vector& angleVector) { |
| | m_position.rotate(angleVector); |
| | doRotate(center, angleVector); |
| | calculateBorders(); |
| | } |
| |
|
| | void LC_DimArrow::doScale([[maybe_unused]]const RS_Vector& center, [[maybe_unused]]const RS_Vector& factor) { |
| | } |
| |
|
| | void LC_DimArrow::scale(const RS_Vector& center, const RS_Vector& factor) { |
| | m_position.scale(center, factor); |
| | doScale(center, factor); |
| | calculateBorders(); |
| | } |
| |
|
| | void LC_DimArrow::doMirror([[maybe_unused]]const RS_Vector& axisPoint1, [[maybe_unused]]const RS_Vector& axisPoint2) { |
| | } |
| |
|
| | void LC_DimArrow::mirror(const RS_Vector& axisPoint1, const RS_Vector& axisPoint2) { |
| | m_position.mirror(axisPoint1, axisPoint2); |
| | doMirror(axisPoint1, axisPoint2); |
| | calculateBorders(); |
| | } |
| |
|
| | RS_Vector LC_DimArrow::getNearestCenter([[maybe_unused]] const RS_Vector& coord, |
| | double* dist ) const { |
| | setDistPtr(dist, RS_MAXDOUBLE); |
| | return RS_Vector(false); |
| | } |
| |
|
| | RS_Vector LC_DimArrow::getNearestMiddle([[maybe_unused]] const RS_Vector& coord, |
| | double* dist , |
| | [[maybe_unused]] const int middlePoints ) const { |
| | setDistPtr(dist, RS_MAXDOUBLE); |
| | return RS_Vector(false); |
| | } |
| |
|
| | RS_Vector LC_DimArrow::getNearestDist([[maybe_unused]] double distance, |
| | [[maybe_unused]] const RS_Vector& coord, |
| | double* dist ) const { |
| | setDistPtr(dist, RS_MAXDOUBLE); |
| | return RS_Vector(false); |
| | } |
| |
|
| | void LC_DimArrow::doCalculateBorders() { |
| | } |
| |
|
| | void LC_DimArrow::setDimLinePoint(const RS_Vector& pos) { |
| | m_dimLinePoint = pos; |
| | } |
| |
|
| | void LC_DimArrow::positionDimLinePointFromZero(const RS_Vector &angleVector) { |
| | m_dimLinePoint.move(m_position); |
| | m_dimLinePoint.rotate(m_position, angleVector); |
| | } |
| |
|
| | void LC_DimArrow::calculateBorders() { |
| | resetBorders(); |
| | minV = RS_Vector::minimum(minV, m_position); |
| | maxV = RS_Vector::maximum(maxV, m_position); |
| | doCalculateBorders(); |
| | } |
| |
|
| | RS_Vector LC_DimArrow::getNearestEndpoint([[maybe_unused]]const RS_Vector& coord, [[maybe_unused]]double* dist ) const { |
| | return m_position; |
| | } |
| |
|
| | void LC_DimArrow::setDistPtr(double* dist, double value) const { |
| | if (nullptr != dist) { |
| | *dist = value; |
| | } |
| | } |
| |
|
| | RS_Vector LC_DimArrow::getNearestPointOnEntity(const RS_Vector& coord, |
| | [[maybe_unused]]bool onEntity , |
| | double* dist , |
| | [[maybe_unused]] RS_Entity** entity ) const { |
| | *dist = m_position.distanceTo(coord); |
| | return m_position; |
| | } |
| |
|
| | double LC_DimArrow::getDistanceToPoint(const RS_Vector& coord, |
| | RS_Entity** entity , |
| | [[maybe_unused]] RS2::ResolveLevel level , |
| | [[maybe_unused]] double solidDist ) const{ |
| | if (nullptr != entity) { |
| | *entity = const_cast<LC_DimArrow*>(this); |
| | } |
| |
|
| | double ret {0.0}; |
| | getNearestPointOnEntity( coord, true, &ret, entity); |
| | return ret; |
| | } |
| |
|