Itasca C++ Interface
Loading...
Searching...
No Matches
iextrudeedge.h
1#pragma once
2// iextrudeedge.h
3
5
6namespace itasca {
7 class IThing;
8}
9namespace itascaxd {
10 class IGeomEdge;
11}
12
13namespace extruder {
14 using namespace itasca;
15 using namespace itascaxd;
16
17 class IExtrudePoint;
18 class IExtrudeRegion;
19
21 enum EdgeType { edgeTypeSimple=0, edgeTypePoly, edgeTypeEllipse };
23 enum EdgePolyType { edgePolyTypeLinear=0, edgePolyTypeArc, edgePolyTypeSpline };
24
28 public:
30 inline static const TType type_ = 0x4cb610e6;
31
33 virtual const IThing * getIThing() const=0;
35 virtual IThing * getIThing()=0;
37 virtual const IGeomEdge * getIGeomEdge() const=0;
39 virtual IGeomEdge * getIGeomEdge()=0;
41 virtual bool isBlocked() const=0;
43 virtual bool isSimple() const=0;
45 virtual bool isPolyline() const=0;
47 virtual bool isCurved() const=0;
48
50 virtual void setPointExtrude(IExtrudePoint *point,uint32 end)=0;
52 virtual IExtrudePoint * getIExtrudePoint(uint32 end)=0;
54 virtual const IExtrudePoint * getIExtrudePoint(uint32 end) const=0;
55
57 virtual CLinkType<IExtrudeEdge> getNextExtrude(uint32 end) const=0;
64
66 virtual uint32 getSize() const=0;
68 virtual double getZoneLength() const = 0;
70 virtual double getRatio() const=0;
72 virtual bool getRatioIsolate() const=0;
74 virtual DVect getDiscretizedLocation(uint32 index,uint32 multiplier) const=0;
76 virtual DVect getParametricLocation(const double &frac0) const=0;
78 virtual double getFraction(uint32 i) const =0;
81
83 virtual uint32 setSize(uint32 s)=0;
85 virtual uint32 setRatio(const double &r)=0;
87 virtual void setRatioIsolate(bool b)=0;
88
90 virtual int getEdgeBlockCount() const=0; // 0-2 blocks connected to an edge
92 virtual DVect computeBlockSplitPoint(double mu, int index) const=0; // position for split on opposite edge of indexed block
93
95 virtual uint32 getEdgeType() const=0;
97 virtual uint32 getHybridType() const=0;
99 virtual const IExtrudePoint* getEllipseArcCenter() const=0;
101 virtual const IExtrudePoint* getEllipseArcWith() const=0;
102
104 virtual double getEdgePolylineLength() const=0;
106 virtual double computeEdgePolylineCurveLength() const=0;
107
109 virtual uint32 getEdgePolylineType() const=0;
111 virtual uint32 getEdgePolylineSize() const=0;
113 virtual DVect getEdgePolylineControlPoint(int id) const=0;
114
116 virtual double getEdgePolylineControlU(int id) const=0;
118 virtual double getEdgePolylineControlV(int id) const=0;
119#ifdef THREED
121 virtual double getEdgePolylineControlW(int id) const = 0;
122 #endif
124 virtual void setEdgePolylineControlPoint(int index, DVect p)=0;
126 virtual void setEdgePolylineControlLocal(int index, DVect p)=0;
128 virtual void setEdgePolylineControlLocalU(int index, double u)=0;
130 virtual void setEdgePolylineControlLocalV(int index, double v)=0;
131#ifdef THREED
133 virtual void setEdgePolylineControlLocalW(int index, double w) = 0;
134#endif
140 virtual void removeEdgePolylineControlPoint(int id)=0;
141
143 virtual double findParameterForPosition(DVect pos) const=0;
144
146 virtual void setEdgeTypeSimple()=0;
148 virtual void setEdgeType(int edgeType)=0;
150 virtual void setEdgePolylineType(int curvetype=edgePolyTypeLinear)=0;
151
154
155 // Check if the edge is connected to an irregular block
156 virtual bool belongsToIrregBlock() const=0;
157 // Get Tangent at a parametric position (0,1)
158 virtual DVect getTangent(double mu) const=0;
159 // Get Intersection with a ray defined by point p and direction t
160 virtual bool getIntersectRay(DVect p, DVect t, std::vector<DVect>* point, bool both = true) const = 0;
161 };
162
163} // namespace f3
164// EoF
Definition idef.h:50
Interface for IExtrudeEdge objects.
Definition iextrudeedge.h:27
virtual void setEdgePolylineControlLocalV(int index, double v)=0
Set v local position of controlpoint.
virtual CLinkType< IExtrudeRegion > getStartExtrude() const =0
Returns a interface to a CLinkType<> object, a const pointer to the first object in the linked list.
virtual void setRatioIsolate(bool b)=0
Set zone ratio isolate flag (Stops propagating ratios by connected blocks)
virtual bool isPolyline() const =0
Is edge a polyline (linear and at least one control point)?
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition iextrudeedge.h:30
virtual bool isBlocked() const =0
Are there any blocks attached?
virtual double getFraction(uint32 i) const =0
Return fraction value.
virtual IThing * getIThing()=0
Return an IThing interface for this object.
virtual IExtrudePoint * getIExtrudePoint(uint32 end)=0
Returns a pointer to IExtrudePoint at end.
virtual int getEdgeBlockCount() const =0
Return number of blocks connected to edge.
virtual uint32 getEdgePolylineSize() const =0
Return number of segments in polyline.
virtual const IExtrudePoint * getIExtrudePoint(uint32 end) const =0
Returns a const pointer to IExtrudePoint at end.
virtual IGeomEdge * getIGeomEdge()=0
Return a IGeomPoint interface for this object.
virtual const IExtrudePoint * getEllipseArcWith() const =0
Return ellipse arc "with" point.
virtual IExtrudeRegion * getOtherBlock(IExtrudeRegion *b)=0
Return block, besides given one, sharing this edge, 0 if none.
virtual uint32 setRatio(const double &r)=0
Set zone ratio on edge.
virtual DVect getParametricLocation(const double &frac0) const =0
Return x,y parametric position, frac0=0 to 1.
virtual bool getRatioIsolate() const =0
Return zone ratio isolate flag (Stops propagating ratios by connected blocks)
virtual uint32 getEdgeType() const =0
Return EdgeType: 0=simple, 1=polyline, 2=ellipse arc.
virtual double getEdgePolylineLength() const =0
Return polyline length (linear segments only)
virtual const IThing * getIThing() const =0
Return a const IThing interface for this object.
virtual void setEdgePolylineControlPoint(int index, DVect p)=0
Set x,y position of controlpoint.
virtual double getEdgePolylineControlU(int id) const =0
Return local U coordinate of controlpoint.
virtual LinkType< IExtrudeEdge > getNextExtrude(uint32 end)=0
Returns a interface to a CLinkType<> object, a pointer to the next object in the linked list.
virtual const IExtrudePoint * getEllipseArcCenter() const =0
Return ellipse arc center point.
virtual void setEdgeType(int edgeType)=0
Set EdgeType.
virtual void setEdgeTypeSimple()=0
Set edge type as simple.
virtual void setEdgePolylineType(int curvetype=edgePolyTypeLinear)=0
Set EdgeType as polyline, and polyline type: 0=linear, 1=circle arcs, 2=cubic splines.
virtual void addEdgePolylineControlPoint(DVect p)=0
Add controlpoint by x,y position.
virtual void addEdgePolylineControlLocal(DVect p)=0
Add controlpoint by u,v position.
virtual bool isSimple() const =0
Is edge simple (linear, no control points)?
virtual double getZoneLength() const =0
Return zone length.
virtual CLinkType< IExtrudeEdge > getNextExtrude(uint32 end) const =0
Returns a interface to a CLinkType<> object, a const pointer to the next object in the linked list.
virtual DVect computeBlockSplitPoint(double mu, int index) const =0
Return x,y split position of block opposite edge to this edge, by parametric position mu.
virtual void setEdgePolylineControlLocalU(int index, double u)=0
Set u local position of controlpoint.
virtual void removeEdgePolylineControlPoint(int id)=0
Remove indexed control point.
virtual uint32 getHybridType() const =0
Return EdgeType: 0=simple, 1=polyline, 2=arc, 3=spline, 4=ellipse arc.
virtual void setEdgePolylineControlLocal(int index, DVect p)=0
Set u,v local position of controlpoint.
virtual DVect getDiscretizedLocation(uint32 index, uint32 multiplier) const =0
Return x,y gridpoint position along edge.
virtual DVect getEdgePolylineControlPoint(int id) const =0
Return position of control points, 1..size-1, index 0,size return endpoint positions.
virtual double findParameterForPosition(DVect pos) const =0
Estimate parametric position (0,1) of position.
virtual uint32 getEdgePolylineType() const =0
Return PolylineType: 0=linear segments, 1=circle arcs, 2=cubic splines.
virtual uint32 setSize(uint32 s)=0
Set (zone) size.
virtual uint32 getSize() const =0
Return (zone) size.
virtual const IGeomEdge * getIGeomEdge() const =0
Return a const IGeomPoint interface for this object.
virtual double getRatio() const =0
Return zone ratio.
virtual void setPointExtrude(IExtrudePoint *point, uint32 end)=0
Adds point at end.
virtual QList< uint64 > getConnectedEdges() const =0
Return list of edges connected by block opposite sides, used for assigning zone sizes and ratios.
virtual bool isCurved() const =0
Is edge a "curved" type (requiring sampling approximation)?
virtual double computeEdgePolylineCurveLength() const =0
Return computed length of edge, including estimate for curved edges.
virtual double getEdgePolylineControlV(int id) const =0
Return local V coordinate of controlpoint.
virtual LinkType< IExtrudeRegion > getStartExtrude()=0
Returns a interface to a CLinkType<> object, a pointer to the first object in the linked list.
Interface for IExtrudePoint objects.
Definition iextrudepoint.h:20
Interface for IExtrudeEdge objects.
Definition iextruderegion.h:21
Base class for items that will be stored in containers.
Definition ithing.h:30
Interface for a user-defined geometric edge, defined as the line between two IGeomPoint objects.
Definition igeomedge.h:24
uint32 TType
class type indicator
Definition basedef.h:46
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition dim.h:154
Interface for LinkType<> objects, POD that contain both the pointer to the next object and an index f...
namespace Itasca
Definition basememory.cpp:14
Itasca Library standard namespace, specific to 2D or 3D.
Definition icontactmodule.h:4