24 #ifndef __ODGISECTIONGEOMETRYOUTPUT_H__
25 #define __ODGISECTIONGEOMETRYOUTPUT_H__
60 kOutputClosedPrimitives = 1,
61 kOutputOpenedPrimitives = 2,
62 kClosedPrimitivesAsPolylines = 4,
63 kToleranceOverrideEnabled = 8
149 m_overrideFlags = nFlags;
156 return m_overrideFlags;
227 setupTraits(getInterface().conveyorContext());
228 getInterface().destinationGeometry().polylineProc(numPoints, vertexList, pNormal, pExtrusion, baseSubEntMarker);
229 releaseTraits(getInterface().conveyorContext());
240 setupTraits(getInterface().conveyorContext());
241 if (!isOutputOfClosedSectionsAsPolylinesEnabled())
242 getInterface().destinationGeometry().shellProc(numVertices, vertexList, faceListSize, faceList, pEdgeData, pFaceData, pVertexData);
244 shellProcAsPolylineProc(numVertices, vertexList, faceListSize, faceList, pEdgeData, pFaceData, pVertexData);
245 releaseTraits(getInterface().conveyorContext());
251 OdInt32 nFace = 0, nFaceList = 0;
253 const bool bExtrusion =
OdNonZero(getInterface().conveyorContext().subEntityTraits().thickness());
254 while (nFaceList < faceListSize)
258 if (pNormal && bExtrusion)
259 extrusion = *pNormal * getInterface().conveyorContext().subEntityTraits().thickness();
260 m_tmpPoints.
resize(numVerts + 1);
262 for (
OdInt32 nVert = 0; nVert < numVerts; nVert++)
263 tmpPoints[nVert] = vertexList[faceList[nFaceList++]];
264 tmpPoints[numVerts] = tmpPoints[0];
265 getInterface().destinationGeometry().polylineProc(numVerts + 1, tmpPoints, pNormal, (pNormal && bExtrusion) ? &
extrusion :
NULL);
OdSmartPtr< OdGiSectionGeometryOutput > OdGiSectionGeometryOutputPtr
bool OdNonZero(double x, double tol=1.e-10)
#define SETBIT(flags, bit, value)
#define SETBIT_0(flags, bit)
#define GETBIT(flags, bit)
#define SETBIT_1(flags, bit)
const T * asArrayPtr() const
void resize(size_type logicalLength, const T &value)
virtual OdGiSubEntityTraits & subEntityTraits() const =0
virtual void onTraitsModified()=0
const OdGeVector3d * normals() const
bool isOpenedSectionsOutputEnabled() const
void resetSectionToleranceOverride()
SectionGeometryOutputInterface * m_pIface
void setTraitsOverrideFlags(OdUInt32 nFlags)
virtual void releaseTraits(OdGiConveyorContext &context)
void polylineProc(OdInt32 numPoints, const OdGePoint3d *vertexList, const OdGeVector3d *pNormal=0, const OdGeVector3d *pExtrusion=0, OdGsMarker baseSubEntMarker=-1)
OdGiSubEntityTraitsData m_overrides
OdGiSubEntityTraitsData m_traits
bool isOutputOfClosedSectionsAsPolylinesEnabled() const
bool isClosedSectionsOutputEnabled() const
static OdSmartPtr< OdGiSectionGeometryOutput > createObject()
void setInterface(SectionGeometryOutputInterface *pInterface)
void enableClosedSectionsOutput(bool bSet)
void setTraitsOverrides(const OdGiSubEntityTraitsData &pData)
const OdGiSubEntityTraitsData & traitsOverrides() const
OdGePoint3dArray m_tmpPoints
void setSectionToleranceOverride(double tolOverride)
SectionGeometryOutputInterface & getInterface()
OdGiSubEntityTraitsData & traitsOverrides()
virtual void setupTraits(OdGiConveyorContext &context)
void enableOutputOfClosedSectionsAsPolylines(bool bSet)
OdGiSectionGeometryOutput()
bool isSectionToleranceOverrideEnabled() const
OdUInt32 traitsOverrideFlags() const
void shellProc(OdInt32 numVertices, const OdGePoint3d *vertexList, OdInt32 faceListSize, const OdInt32 *faceList, const OdGiEdgeData *pEdgeData=0, const OdGiFaceData *pFaceData=0, const OdGiVertexData *pVertexData=0)
void shellProcAsPolylineProc(OdInt32, const OdGePoint3d *vertexList, OdInt32 faceListSize, const OdInt32 *faceList, const OdGiEdgeData *, const OdGiFaceData *pFaceData, const OdGiVertexData *)
double sectionToleranceOverride() const
void enableOpenedSectionsOutput(bool bSet)
static void copyTraits(OdGiSubEntityTraits &pFrom, OdGiSubEntityTraits &pTo, OdUInt32 nFlags=kAllChanged)
void setTraits(TData &pTraits)
static OdSmartPtr< TInterface > createObject()
AECGEOMETRY_API FacetModeler::Body extrusion(const FacetModeler::Profile2D &rBase, const FacetModeler::Contour3D &rPath, const FacetModeler::DeviationParams &devDeviation=FacetModeler::FMGeGbl::gDefDev)
virtual OdGiConveyorContext & conveyorContext()=0
virtual OdGiConveyorGeometry & destinationGeometry()=0