20 constexpr static const char*
TypeName() noexcept {
return "ObjectGcode"; }
21 virtual const char*
typeName()
const override {
return TypeName(); }
30 virtual const std::shared_ptr<GcodeSource>&
gcodeSource()
const {
return gcodeSource_; }
32 virtual const std::vector<GcodeProcessor::MoveAction>&
actionList()
const {
return actionList_; }
42 virtual std::string
getClassName()
const override {
return "G-code"; }
75 std::shared_ptr<GcodeSource> gcodeSource_;
76 std::vector<GcodeProcessor::MoveAction> actionList_;
78 void updateHeapUsageCache_();
79 size_t nonTrivialHeapUsageCache_{ 0 };
81 std::vector<int> segmentToSourceLineMap_;
84 float maxFeedrate_ = 0.f;
85 bool feedrateGradientEnabled_ =
true;
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
#define MRMESH_CLASS
Definition MRMesh/MRMeshFwd.h:50
class with CNC machine emulation settings
Definition MRCNCMachineSettings.h:14
Definition MRObjectGcode.h:14
MRMESH_API void setIdleColor(const Color &color)
virtual MRMESH_API void setGcodeSource(const std::shared_ptr< GcodeSource > &gcodeSource)
virtual const CNCMachineSettings & getCNCMachineSettings() const
Definition MRObjectGcode.h:27
const Color & getIdleColor() const
Definition MRObjectGcode.h:49
virtual MRMESH_API bool select(bool isSelected) override
selects the object, returns true if value changed, otherwise returns false
virtual const std::vector< GcodeProcessor::MoveAction > & actionList() const
Definition MRObjectGcode.h:32
virtual MRMESH_API void swapBase_(Object &other) override
swaps this object with other
virtual const std::vector< int > & segmentToSourceLineMap() const
Definition MRObjectGcode.h:34
MRMESH_API void switchFeedrateGradient(bool isFeedrateGradientEnabled)
virtual MRMESH_API size_t heapBytes() const override
returns the amount of memory this object occupies on heap
bool isFeedrateGradient() const
Definition MRObjectGcode.h:46
ObjectGcode(ProtectedStruct, const ObjectGcode &obj)
Definition MRObjectGcode.h:39
virtual MRMESH_API std::vector< std::string > getInfoLines() const override
return several info lines that can better describe the object in the UI
virtual MRMESH_API void serializeFields_(Json::Value &root) const override
serializeFields_: serializeBaseFields_ plus polyline serialization
virtual MRMESH_API void setCNCMachineSettings(const CNCMachineSettings &cncSettings)
virtual const std::shared_ptr< GcodeSource > & gcodeSource() const
Definition MRObjectGcode.h:30
ObjectGcode(const ObjectGcode &other)=default
virtual MRMESH_API void setFrontColor(const Color &color, bool selected, ViewportId viewportId={}) override
sets color of object when it is selected/not-selected (depending on argument) in given viewport
ObjectGcode & operator=(ObjectGcode &&)=default
virtual std::string getClassName() const override
return human readable name of subclass
Definition MRObjectGcode.h:42
static constexpr const char * TypeName() noexcept
Definition MRObjectGcode.h:20
virtual MRMESH_API std::shared_ptr< Object > shallowClone() const override
virtual MRMESH_API void swapSignals_(Object &other) override
virtual MRMESH_API void setDirtyFlags(uint32_t mask, bool invalidateCaches=true) override
ObjectGcode(ObjectGcode &&)=default
virtual const char * typeName() const override
Definition MRObjectGcode.h:21
virtual MRMESH_API std::shared_ptr< Object > clone() const override
GcodeChangedSignal gcodeChangedSignal
Definition MRObjectGcode.h:53
MRMESH_API void deserializeFields_(const Json::Value &root) override
deserializeFields_: deserializeBaseFields_ plus polyline deserialization
Definition MRObjectLinesHolder.h:19
named object in the data model
Definition MRObject.h:60
Definition MRViewportId.h:16
Definition MRCameraOrientationPlugin.h:8
std::vector< std::string > GcodeSource
Definition MRMesh/MRMeshFwd.h:522
Definition MRObject.h:246