ALTE DOCUMENTE
|
|||||
The surface texture portion of the Standard Framework contains the AcmSurfTextStd class for standard parts and AcmSurfaceTexture symbols. The symbol contains one sub-symbol - AcmCSurfText.
Inherited from AcmSymbolStd.
This class is responsible for the surface texture symbol. It contains no special services for the class. It overrides all virtual functions defined at AcmSymbolStd. We'll list here only the additional interface defined just for the surface texture standard. The class has the following successors: AcmSurfTextStdANSI, AcmSurfTextStdBSI, AcmSurfTextStdISO, AcmSurfTextStdDIN, AcmSurfTextStdJIS, which implement standard-specific variations.
AcmSurfTextStd();
The constructor is protected, this class cannot be instantiated.
virtual ~AcmSurfTextStd();
virtual void getSubEnts(const AcmCSurfText * pSymb, AcmCAuxEntArray& subents) const;
Creates a list of all sub-entities, which represents the symbol according the content of its sub-symbols.
See also "AcmCSubSymbol", "Family of AcmCAuxEntities".
virtual void getBasicSymbol(const A 444c217e cmCSurfText* pSymb, double H1, double H2,Adesk::UInt16 symColor, double txtHeight, double tailLength, AcmCAuxEntArray& subents) const;
virtual void getMajoritySymbol(const AcmCSurfText* pSubSym, AcmCAuxEntArray& subents) const;
These functions get the basic symbol as a list of AcmCAuxEntitys. These member functions are protected and so only the successor is able to use them. Both functions are used to get part of the symbol's graphic representation.
virtual void getHeights(const AcmCSurfText* pSymb, double& H1, double& H2) const;
virtual void getLaySymbol(int type, Adesk::UInt16 textColor, double txtHeight, AcmCAuxEntArray& subents) const;
These member functions must be virtual, because they are called in getMajority. These member functions are protected and so only the successor is able to use them.
Supports the interface required by the AcmSymbolStd class and the following additional member functions:
Adesk::Boolean fitCircle() const;
void setFitCircle(Adesk::Boolean val);
If the value is true, the circle will be fit to the rectangle; otherwise it will be tangent to the base symbol V.
Adesk::Boolean allAroundAllowed() const;
void setAllAroundAllowed(Adesk::Boolean val);
Keeps information about allowance all-around symbol. The symbol is usually drawn at the start of topmost vertical line (used to highlight production).
Adesk::Boolean forceTail() const;
void setForceTail(Adesk::Boolean val);
The default value for the symbol. Specifies whether tails should be drawn for symbols that don't contain attributes below the tail.
Adesk::Boolean majorityAllowed() const;
void setMajorityAllowed(Adesk::Boolean val);
Specifies whether the symbol can contain basic symbols closed in the brackets.
Adesk::Boolean setFullList () const;
void setFullList (Adesk::Boolean v);
Specifies whether the symbol contains only simplify or full version list of symbols (which is closed in the parentheses).
Adesk::Boolean productionMultiline() const;
void setProductionMultiline(Adesk::Boolean val);
Specifies whether the symbol can have two tails for two production method strings.
Supports the interface required by the AcmSymbolStd class and the following additional member functions:
virtual Adesk::Boolean getLaySymbolList(AcmCObjArray<AcmCSymbolDesc>& list, const AcmCSurfText* pSubSym =NULL) const;
Get a direction of lay symbol descriptor. The data in it can then be used in editing or dialogs.
virtual Adesk::Boolean setLaySymbolList(AcmCObjArray<AcmCSymbolDesc>& list);
Sets the list of allowed directions of lay symbols.
It uses availability only. All other values are lost. It checks if the length of the array is the same as the length of the known direction of lay symbols in the standard. If not, it will return eInvalidInput.
virtual Acm::ErrorStatus getDescription(CString& desc, CBitmap*& pBmpLoaded, CBitmap*& pBmpReg, Adesk::Boolean& enablePref) const;
virtual Acm::ErrorStatus checkVisibility(AcmCSurfText * pData) const;
Sets the visibility status for all values in the surface texture sub-symbol.
It is used in the schematic dialog box. Any variable can have additional parameters associated with it that specify whether that value has meaning for the current kind of sub-symbol, its tooltip string and its field number, help Id, and label. It This function should be called any time the value of any variable changes to ensure the change has a meaning. This way we can implement "embedded" rules in an object. This class implementation doesn't do anything and returns eNotImplemented if is not overloaded in child class.
The member function is used for DxfOut and DxfIn operations as well.
virtual Acm::ErrorStatus initFields(AcmCSurfText * pData) const;
Sets the initial status of variables.
Used in schematic dialog box. Any variable can have additional parameters associated with that specify whether that value has meaning for the current kind of sub-symbol, its tooltip string and its field number, help Id, and label. This service will initialize all of this additional data according to the standard used, and should be called at the start of the editing process. This class implementation doesn't do anything and returns eNotImplemented if is not overloaded in child class.
virtual Acm::ErrorStatus setSuggested(AcmCSurfText* pData) const;
Sets the suggested values for any value in the sub-symbol.
These values can be used later in schematic dialog boxes. This service should be called any time you change the suggested values of any part of the symbol.
virtual Acm::Visibility variableStatus(AcmCSurfTextStd::Variable var) const;
virtual void setVariableStatus(AcmCSurfTextStd::Variable var, Acm::Visibility status);
Users can control the visibility of the editing controls. Each standard variable can be visible or editable for different kinds of standards. The Acm::Visibility status can be kHidden, kDisabled, kShaded, kSelectOnly, kVisible, where kDisabled, kShaded and kSelectOnly have the same meaning. AcmCSurfTextStd::Variable can be kAllAround, kMajorityAllowed, kFitCircle, kForceTail, or kProdMultiLine.
These member functions implement the symbol standard behavior for surface texture symbols. See AcmSymbolStd for details.
virtual Adesk::Boolean setFactoryDefaults();
virtual void setDefaultSubSymbol(AcmCSurfText* pData) const;
virtual Acm::ErrorStatus getDescription(CString& desc,CBitmap*& pBmpLoaded,CBitmap*& pBmpReg,Adesk::Boolean& enablePref) const;
virtual Acm::Visibility variableStatus(AcmSurfTextStd::Variable var) const;
virtual void setVariableStatus(AcmSurfTextStd::Variable var, Acm::Visibility status);
virtual void initToEditOriginal();
virtual void initToEdit();
virtual Acm::ErrorStatus setSuggested(AcmCSurfText * pData) const;
virtual Acm::ErrorStatus checkVisibility(AcmCSurfText * pData) const;
virtual Acm::ErrorStatus initFields(AcmCSurfText * pData) const;
This is the basic AcDbObjectInterface.
virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler* filer);
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* filer) const;
virtual Acad::ErrorStatus dxfInFields(AcDbDxfFiler* filer);
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* filer) const;
virtual Acad::ErrorStatus getClassID(CLSID* pClsid) const;
This class is inherited from AcmSymbol. It overrides all overridden AcDbEntity functions, which needs to be done. The class sub-symbol is AcmCSurfText inherited from AcmCSubSymbol.
This class contains only default constructor and destructor functions. Use setSymbolDefaults member function to initialize symbols properly.
AcmSurfaceTexture ();
virtual ~AcmSurfaceTexture ();
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);
Acm::SurfTextType subType() const;
Acm::ErrorStatus setSubType(Acm::SurfTextType flag);
Adesk::Boolean isAllAround() const;
Acm::ErrorStatus setAllAround(Adesk::Boolean flag);
The following member functions are overloaded from AcmSymbol. They are usually overloaded to be able to supply surface symbol intelligent behavior with a leader and its sub-symbol.
virtual void regen();
Updates data in the sub-symbol. When using this function we don't need to create undo recording, because that data is stored in AcmSymbol.
virtual Acm::ErrorStatus setSymbolDefaults(AcDbDatabase* pDb = NULL);
Sets up all symbol-specific data, sets up the AcmSurfTextStd as its server and creates the default sub-symbol.
virtual AcmCSurfText* subSymbol() const;
General sub-symbol interface.
virtual void setCoordSystem(const AcGePoint3d &origin,const AcGeVector3d &normal,const AcGeVector3d &xDir);
Resets the coordinate system used by the symbol. Calls setOrigin as well, keeping the sub-symbol at the ECS's origin.
virtual void setOrigin (const AcGePoint3d &origin);
Sets the origin of the symbol to the specified point. This change in origin will change the leader as well. If the leader exists and the origin of the surface texture moves, this function readjusts the leader to maintain its connection to the symbol.
double angle() const;
void setAngle(double angle);
Deals with the angle of the sub-symbol against the symbol plane x-axis. It has meaning for free standing symbols only.
virtual Acm::ErrorStatus addLeader(const AcGePoint3dArray &ptrArray);
virtual Acm::ErrorStatus removeLeader(Adesk::UInt16 index);
virtual void leaderTipPointChanged(const AcGeVector3d& offset, const AcmCLeader* leader);
virtual void leaderLandingChanged(const AcGeVector3d& offset, const AcmCLeader* leader);
Leader change notification. If the tip point of the leader is changed, then the sub-symbol has to move the same way. If the landing is changed, the position of the sub-symbol has to be reevaluated to sit at the right position.
virtual Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform);
During transformation, the surface texture symbol has to know its new angle relative to the x-axis to be able to properly display its variables.
virtual void list() const;
virtual Adesk::Boolean worldDraw(AcGiWorldDraw*);
virtual Acad::ErrorStatus explode(AcDbVoidPtrArray& entitySet) const;
virtual Acad::ErrorStatus getGeomExtents(AcDbExtents&) const;
virtual Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform);
virtual Acad::ErrorStatus getOsnapPoints(.) const;
virtual Acad::ErrorStatus getGripPoints(.) const;
virtual Acad::ErrorStatus moveGripPointsAt(.) const;
virtual Acad::ErrorStatus getStretchPoints(AcGePoint3dArray&) const;
virtual Acad::ErrorStatus moveStretchPointsAt(const AcDbIntArray& indices, const AcGeVector3d& offset);
This is the basic AcDbObjectInterface.
virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler*);
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler*) const;
virtual Acad::ErrorStatus dxfInFields(AcDbDxfFiler*);
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler*) const;
virtual Acad::ErrorStatus getClassID(CLSID* pClsid) const;
virtual Acad::ErrorStatus subErase(Adesk::Boolean erasing);
If symbol is erased, it will update any majority surface texture symbol, which may be displaying it.
virtual Acad::ErrorStatus autoAdjust();
Readjusts the surface texture leader so that the landing is long enough to underline all symbols and the symbol is in the middle of the landing.
void enableAutoAdjustment ();
void disableAutoAdjustment ();
Specifies whether the leader should be adjusted when the symbol is moved. Sets surface texture Auto adjustment mode so that the symbol always stays on the leader.
Adesk::Boolean isAutoAdjustmentEnabled () const;
This symbol doesn't have extended interface implemented. It is inherited from AcmCSubSymbol.
The class overrides the following member functions from the AcmCSubSymbol interface.
virtual Acm::ErrorStatus getValue(Acm::Variable var, CSring& value) const;
virtual Acm::ErrorStatus setValue(Acm::Variable var, LPCTSTR newValue) const;
The value is set or obtained this way for all of the symbol's variables. The possible values for surface texture symbols are:
Acm::SurfTextRaMax |
Maximum roughness value or grade number |
Acm::SurfTextRaMin |
Minimum roughness value or grade number |
Acm::SurfTextProduction |
Production method, treatment or coating |
Acm::SurfTextProduction2 |
Production method, treatment or coating second line (ISO specific) |
Acm::SurfTextAllowance |
Value of the machining allowance |
Acm::SurfTextDirLay |
Index of direction of lay symbol - possible values are "0", ."7" |
Acm::SurfTextSampLength |
Sampling length (for roughness average) |
Acm::SurfTextCutoff |
Cutoff value and evaluation length |
Acm::SurfTextOtherValue |
Other roughness value (for example Rz 0.8) |
Acm::SurfTextOtherMin |
Other roughness minimum value |
Acm::SurfTextMaxRspac |
Maximum roughness spacing |
Acm::SurfTextReference |
Reference length and evaluation length |
Acm::SurfTextWaviness |
Surface waviness |
Acm::SurfTextComment |
General comment |
If you use these functions to get or set values, you should carefully check the return value, since some of these variables are only supported for certain standards. If the variable is not supported, the function will return eInvalidInput.
See also "Acm::Variable."
virtual Acm::Visibility variableStatus(Acm::Variable var) const;
virtual void setVariableStatus(Acm::Variable var, Acm::Visibility status);
Users can control the visibility of the editing controls. Each standard variable can be visible or editable for different kinds of standards. The Acm::Visibility status can be kHidden, kDisabled, kShaded, kSelectOnly, kVisible, where kDisabled, kShaded and kSelectOnly have the same meaning. These member functions should be called anytime the variable value changes. For example, setting the SurfTextOtherValue variable to " " will reset the SurfTextOtherMin as well.
See also "Acm::Visibility," "Acm::Variable."
virtual Acm::ErrorStatus getVarDlgInfo(Acm::Variable var, CVarDlgInfo& v) const;
virtual Acm::ErrorStatus setVarDlgInfo(Acm::Variable var, const CVarDlgInfo& v);
These functions provide access to variable support data, such as help index, dialog index, tooltip string, and label string.
See also "Acm::Variable."
virtual double angle() const;
virtual void setAngle();
Sets and returns the angle of the sub-symbol in relation to the x-axis. Most sub-symbols don't have special meanings for different angles, but some, for example surface texture, do, and so would have to override this member function.
virtual Acm::SurfTextType subType() const;
virtual Acm::ErrorStatus setType(Acm::SurfTextType flag);
Specifies the general type of symbol it will express.
See also "Acm::SurfTextType"
virtual Adesk::Boolean hasLeader() const;
Specifies whether the symbol has a leader or not. It is important for the getSubEnts member function of AcmSurfTextStd and for the DXFIN operation to know this information. It is updated during updateSubSymbol of AcmSurfaceTexture.
virtual Acm::DirectionLayType directionLay() const;
virtual Acm::ErrorStatus setDirectionLay(Acm::DirectionLayType type);
Sets or gets the direction of lay data. It is a different type than string, so it provides another interface to get the right data type.
virtual void getDirectionLayRange(int& minValue, int& maxValue) const;
virtual void setDirectionLayRange(int minValue, int maxValue);
This is important for DXFIN operation and is set during initFields of AcmSurfTextStd.
virtual Adesk::Boolean isAllAround() const;
virtual Acm::ErrorStatus setAllAround(Adesk::Boolean flag);
Specifies whether the all-around symbol is used for the symbol. This additional symbol is usually placed at the left end of symbol tail. It is usually a small circle. Each standard dictates a different radius for the circle.
virtual Adesk::Boolean isMajority() const;
virtual Acm::ErrorStatus setMajority(Adesk::Boolean val);
Specifies whether the majority symbol is used. This additional symbol is usually placed right after the extent of the original symbol and looks like the basic symbol in brackets.
virtual Adesk::Boolean isForcedTail() const;
virtual Acm::ErrorStatus setForcedTail (Adesk::Boolean val);
The surface texture symbol has a symbol tail only if some non-null value exists above or below it. These functions allow you to force creation of the tail even if there is no value around it.
virtual void setLayFromCurve(const Adesk::Boolean lay) = 0;
virtual Adesk::Boolean layFromCurve() const = 0;
If symbol is directly attached, this specified if symbol is above curve or under curve.
|