123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- //
- //////////////////////////////////////////////////////////////////////////////
- //
- // Copyright 2015 Autodesk, Inc. All rights reserved.
- //
- // Use of this software is subject to the terms of the Autodesk license
- // agreement provided at the time of installation or download, or which
- // otherwise accompanies this software in either electronic or hard copy form.
- //
- //////////////////////////////////////////////////////////////////////////////
- //
- //
- // DESCRIPTION:
- //
- // The AcDbSweepOptions class is used for setting options that are
- // passed to createSweptSurface() and sweepFace().
- #pragma once
- #ifndef DBSWEEPOPTIONS_H
- #define DBSWEEPOPTIONS_H
- #include "dbmain.h"
- #include "dbsubeid.h"
- #include "gepnt3d.h"
- #include "gevec3d.h"
- #include "dbbody.h"
- #pragma pack(push, 8)
- // Utility class for setting options used by createSweptSurface().
- class AcDbSweepOptions
- {
- public:
- AcDbSweepOptions ();
- AcDbSweepOptions ( const AcDbSweepOptions& src );
- ~AcDbSweepOptions ();
- // Assignment operator.
- AcDbSweepOptions& operator = ( const AcDbSweepOptions& src );
- bool operator == (const AcDbSweepOptions&) const;
- enum AlignOption {
- kNoAlignment,
- kAlignSweepEntityToPath,
- kTranslateSweepEntityToPath,
- kTranslatePathToSweepEntity
-
- };
- enum MiterOption {
- kDefaultMiter,
- kOldMiter,
- kNewMiter,
- kCrimpMiter,
- kBendMiter
- };
- // Get/set draft angle.
- double draftAngle () const;
- void setDraftAngle ( double ang );
- // Get/set start draft distance.
- double startDraftDist () const;
- void setStartDraftDist ( double val );
- // Get/set end draft distance.
- double endDraftDist () const;
- void setEndDraftDist ( double val );
- // Get/set twist angle.
- double twistAngle () const;
- void setTwistAngle ( double ang );
- // Get/set scale factor.
- double scaleFactor () const;
- void setScaleFactor ( double val );
- // Get/set align angle.
- double alignAngle () const;
- void setAlignAngle ( double ang );
- // Get/set align option.
- AcDbSweepOptions::AlignOption align () const;
- void setAlign ( AcDbSweepOptions::AlignOption val );
- // Get/set miter option.
- AcDbSweepOptions::MiterOption miterOption () const;
- void setMiterOption ( AcDbSweepOptions::MiterOption val );
- // Get/set whether to align to start or end of curve.
- bool alignStart () const;
- void setAlignStart ( bool val );
- // Get/set base point for alignment.
- AcGePoint3d basePoint () const;
- void setBasePoint ( AcGePoint3d& pnt );
- // Get/set bank option.
- bool bank () const;
- void setBank ( bool val );
- // Get/set self-intersection check option.
- // Warning: turning off this check may result in the creation of
- // a self-intersecting surface or solid.
- bool checkIntersections () const;
- void setCheckIntersections ( bool val );
- // Get/set reference vector for controlling twist.
- AcGeVector3d twistRefVec () const;
- void setTwistRefVec ( const AcGeVector3d& vec );
- // Get/set coordinate system for sweep entity.
- bool getSweepEntityTransform ( AcGeMatrix3d& mat );
- void setSweepEntityTransform ( AcGeMatrix3d& mat );
- Acad::ErrorStatus setSweepEntityTransform ( AcArray<AcDbEntity*>& sweepEntities,
- bool displayErrorMessages = false );
- // Get/set coordinate system at start/end of path curve. If path entity transform is
- // computed from the path entity geometry (by calling the second
- // setPathEntityTransform() below), then the sweep entity transform should be
- // set before making this call.
- bool getPathEntityTransform ( AcGeMatrix3d& mat );
- void setPathEntityTransform ( AcGeMatrix3d& mat );
- Acad::ErrorStatus setPathEntityTransform ( AcDbEntity *pPathEnt,
- bool displayErrorMessages = false );
- // Check for valid sweep entity. Returns planarity of input entity.
- // If planarity is kPlanar, then pnt and vec will be set to a point on the
- // plane and the plane normal of the entity. If planarity is kLinear, then
- // pnt and vec will be set to a point on the line and the line direction of
- // the entity.
- Acad::ErrorStatus checkSweepCurve ( AcDbEntity *pSweepEnt,
- AcDb::Planarity& planarity, AcGePoint3d& pnt, AcGeVector3d& vec,
- bool& closed, double& approxArcLen, bool displayErrorMessages = false );
- // Check for valid path entity.
- Acad::ErrorStatus checkPathCurve ( AcDbEntity *pPathEnt,
- bool displayErrorMessages = false );
- private:
- void *mpImpSweepOptions;
- friend class AcDbImpSweepOptions;
- };
- #pragma pack(pop)
- #endif // DBSWEEPOPTIONS_H
|