ALTE DOCUMENTE
|
|||||
AcmSymbol is the base class for all symbol classes in AutoCAD/M. AcmSymbol is derived from AcDbEntity and can't be used to create instances. This class's primary responsibility is to handle leaders and connection to the AcmSt 12312d37m andard. It also handles the sub-entities created by each individual symbol.
This class is responsible for datum target sub-symbols. It contains several services that allow it to handle all types of target symbols.
This class is inherited from AcmSymbolStd. AcmStandard or one of its child classes owns it (hard ownership).
virtual ~AcmDatumStd();
virtual void getSubEnts(const AcmCSubSymbol* pSymb,
AcmCAuxEntArray& subents,
const AcGeMatrix3d& trans) const;
Here we need an additional parameter, which specifies the transformation matrix for the sub-symbol. The sub-symbol shouldn't be transformed.
AcDbObjectId hiddenLeaderLineId() const;
Acm::ErrorStatus setHiddenLeaderLineId(const AcDbObjectId& idType);
Used to create a special datum target leader, which expresses to be connected to the hidden target (the target point is attached to the hidden geometry).
AcDbObjectId borderLineId() const;
Acm::ErrorStatus setBorderLineId(const AcDbObjectId& idType);
Specifies the line type used to draw the borderline of a target symbol. Used for both circular and rectangular target symbols.
Adesk::Boolean drawLeaderArrow() const;
void setDrawLeaderArrow(Adesk::Boolean status);
Specifies whether to use the leader arrowhead for all leaders. If not, then kNoArrow is used as the arrowhead type for this leader.
double hatchAngle() const;
void setHatchAngle(double value);
Specifies the hatch angle for hatching inside the rectangular or circular area.
double hatchDist() const;
void setHatchDist(double value);
Specifies the distance between hatch lines. Used for hatching inside the rectangular or circular area.
Adesk::UInt16 pointColor() const;
void setPointColor(Adesk::UInt16 color);
Specifies the special color override for points used in point target and linear target symbols. If used, it overrides the symbol setting.
double pointSize() const;
void setPointSize(double value);
Specifies the size of the point symbol used in point target and linear target symbols.
Acm::ErrorStatus getHiddenLeaderLtypeName(char*& pName) const;
Acm::ErrorStatus setHiddenLeaderLtypeName(const char* pName);
Acm::ErrorStatus getBorderLtypeName(char*& pName) const;
Acm::ErrorStatus setBorderLtypeName(const char* pName);
virtual Acm::ErrorStatus checkVisibility(AcmCTargetBalloon* pData) const;
virtual Acm::ErrorStatus initFields(AcmCTargetBalloon* pData) const;
virtual Acm::ErrorStatus setSuggested(AcmCTargetBalloon* pData) const;
Adesk::Boolean registerService(AcmCTargetService* pNewServ);
This protected member function is used to register target service for use. The following target services are registered by default.
AcmCTargetService* getService(Acm::TargetType type) const;
Function used to get specified service to use for getting sub-entities.
These services don't contain data and they aren't filled out to drawing. There are two main entry points to these classes: registerService and getService. They are called during constructing of AcmDatumStd. Each service object contains a back pointer to enable it to remove its reference if these services are deleted. These services are used internally by AcmDatumStd to draw specific types of datum targets.
The following services are registered, except standard depended one: AcmCTargetBalloonService, AcmCTargetPointService, AcmCTargetLineService, AcmCTargetCircularAreaService, and AcmCTargetRectangularAreaService.
virtual ~AcmCTargetService();
virtual Acm::TargetType serviceType() const;
Returns the internal identification for this service. This function is used in the selection process - the standard is trying to locate the service of the specified type.
virtual void getSubEnts(const AcmCSubSymbol* pData,
AcmCAuxEntArray& subEnts,
const AcGeMatrix3d& mTransform) const;
Additional transformation matrix used to specify where the graphic representation of the symbol should be transformed. The sub-entities are created according to this matrix and cannot easily be transformed later.
This class has more complex grip points editing, because it contains more independent sub symbols - one balloon and one target sub-symbol. They are closely related to their leaders. The datum target still has a simple interface because of the internal structure of the target sub-symbol.
AcmDatumTarget();
virtual ~AcmDatumTarget();
AcmDatumTarget(Acm::TargetType type);
This constructor creates the symbol using a specific target type.
virtual void updateLeader();
double balloonRadius() const;
AcDbObjectId lTypeId() const;
void setLTypeIdToHidden();
void setLTypeIdToSolid();
Adesk::Boolean isHidden() const;
void setHidden(Adesk::Boolean val);
Acm::Orientation orientation() const;
void setOrientation(Acm::Orientation o);
virtual AcmCTarget *getNewTarget(Acm::TargetType type);
AcmCTargetBalloon* balloon() const;
AcmCTarget* target() const;
LPCTSTR value(Acm::Variable var) const;
Acm::ErrorStatus setValue(Acm::Variable var, LPCTSTR value);
Acm::Visibility variableStatus(Acm::Variable var) const;
Acm::ErrorStatus setVariableStatus(Acm::Variable var, Acm::Visibility status);
Acm::ErrorStatus getVarDlgInfo(Acm::Variable var,CVarDlgInfo& v) const;
Acm::ErrorStatus setVarDlgInfo(Acm::Variable var,const CVarDlgInfo& v);
The following member functions are overloaded from AcmSymbol. They are usually overloaded to supply surface symbol intelligent behavior with a leader and its sub-symbol.
virtual void leaderTipPointChanged(const AcGeVector3d& offset, const AcmCLeader* leader);
virtual void regen();
virtual Acm::ErrorStatus setSymbolDefaults(AcDbDatabase* pDb = NULL);
virtual Acad::ErrorStatus getClassID(CLSID* pClsid) const;
This symbol defines a common interface for all target types. Extended interfaces are implemented. It is inherited from AcmCSubSymbol. The basic interface is implemented as described in AcmCSubSymbol. The origin of the target represents the target point.
virtual double scale() const;
virtual Acm::TargetType type() const;
virtual void getDefaultText(CString& text) const;
virtual AcGePoint3d recalcLeaderStart(const AcGePoint3d& pnt) const;
virtual Acad::ErrorStatus getGripPoints(AcGePoint3dArray& gripPoints, AcDbIntArray& osnapModes, AcDbIntArray& geomIds) const;
virtual Acad::ErrorStatus moveGripPointsAt(const AcDbIntArray& indices, const AcGeVector3d& offset);
virtual Acad::ErrorStatus moveStretchPointsAt(const AcDbIntArray& indices, const AcGeVector3d& offset);
virtual int numGripPoints() const;
virtual Adesk::Boolean isKnownGrip(int indice) const;
virtual Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform);
It is inherited from AcmCTarget. The basic interface is implemented as described in AcmCSubSymbol and AcmCTarget.
virtual Acm::Orientation orientation() const;
virtual void setOrientation(Acm::Orientation o);
virtual Adesk::Boolean drawPoint() const;
virtual void setDrawPoint(Adesk::Boolean flag);
virtual Adesk::Boolean drawLine() const;
virtual void setDrawLine(Adesk::Boolean flag);
virtual AcGePoint3d endPoint() const;
virtual void setEndPoint(const AcGePoint3d& point);
virtual double factor() const;
virtual void setFactor(double f);
virtual AcGePoint3d midPoint() const;
virtual double radius() const;
virtual void setRadius(double r);
virtual double angle() const;
virtual void setAngle(double alpha);
virtual double xSize() const;
virtual void setXSize(double x);
virtual double ySize() const;
virtual void setYSize(double y);
virtual AcGePoint3d cornerPoint() const;
virtual void setCornerPoint(const AcGePoint3d& pt);
virtual AcGePoint3d anglePoint() const;
virtual void setAnglePoint(const AcGePoint3d& pt);
|