11 #include "mg/Default.h"
12 #include "mg/Position.h"
13 #include "mg/Geometry.h"
14 #include "mg/FSurface.h"
15 #include "mg/Pvector.h"
16 #include "mg/KnotVector.h"
17 #include "mg/CCisect_list.h"
18 #include "mg/CSisect_list.h"
110 virtual void approximate_as_LBRep(
113 int parameter_normalization=0,
120 bool neglectMulti=
false
132 virtual int bdim()
const=0;
137 virtual MGBox box_limitted(
145 virtual int calc_div_num(
147 const{
return this->offset_div_num(interval);};
166 virtual void change_range(
177 virtual double closest(
const MGPosition& point)
const;
180 virtual double closest2D(
const MGPosition& point)
const;
192 bool cn_continuity(
int n)
const;
216 std::vector<double>& vecComSpan,
240 std::vector<double>& vecComSpan
246 virtual MGCurve& coordinate_exchange(
int i,
int j)=0;
254 virtual MGCurve* copy_as_nurbs()
const=0;
260 virtual void convert_to_Bezier(
MGLBRep& bezier)
const;
284 virtual double curvature(
double )
const;
298 virtual double curvilinear_integral(
double t1,
double t2)
const;
300 return curvilinear_integral(param_s(), param_e());
304 virtual double deriv_length()
const;
327 virtual int divide_multi(
351 )
const{drawSE(vbo,span_length,param_s(),param_e());};
369 virtual void eval_all(
379 virtual MGVector eval_deriv(
double)
const;
390 void eval_discrete_deviation(
392 std::vector<MGPosition>& sts,
399 virtual void eval_line(
407 virtual MGPosition eval_position(
double)
const;
428 virtual void Frenet_frame2(
437 virtual void Frenet_frame(
449 double get_average_tangent_length()
const;
457 )
const{
return false;};
462 void getParamsC0Continuity(std::vector<double>& param)
const;
469 bool has_same_direction_at(
479 virtual bool in_range(
double t)
const;
514 virtual int intersect_dnum()
const=0;
564 virtual const MGLBRep* is_Bezier(
int ordr=0)
const;
569 bool is_closed()
const{
return start_point()==end_point();};
572 bool is_closedWithError(
double err)
const;
578 virtual bool is_coplanar(
const MGCurve& curve2,
MGPlane& plane)
const;
581 virtual bool is_startpoint_parameter(
double t)
const;
584 virtual bool is_endpoint_parameter(
double t)
const;
589 bool is_perpendicular(
const MGPosition& P,
double t)
const;
595 virtual bool is_linear(
MGStraight& straight)
const;
601 virtual bool is_planar(
MGPlane& plane)
const;
604 virtual double knot(
int i)
const=0;
617 virtual double length(
double t1,
double t2)
const;
631 virtual double length_param(
double t,
double len)
const;
637 MGCurve& limit(
double t0,
double t1);
643 virtual void negate() = 0;
646 virtual double negate_param(
double t)
const= 0;
665 const MGVector& norm_vector = mgNULL_VEC
680 const MGVector& norm_vector = mgNULL_VEC
694 const MGVector& norm_vector = mgNULL_VEC
709 const MGVector& norm_vector = mgNULL_VEC
715 virtual int offset_div_num(
747 virtual int order()
const=0;
754 virtual double param(
759 virtual double param_e()
const=0;
762 virtual double param_error()
const;
765 virtual double param_normalize(
double t)
const=0;
771 double param_round_into_range(
double t)
const;
777 virtual double param_s()
const=0;
780 double param_se(
double t)
const;
783 virtual double param_span()
const{
return param_e()-param_s();};
802 virtual int perp_guess(
816 virtual int perp_guess(
834 virtual int perp_point(
895 virtual void polygonize(
937 virtual double range(
double t)
const;
946 std::auto_ptr<MGCurve> rebuild(
955 int parameter_normalization=2,
965 const double* param_range=0
978 virtual void remove_knot();
997 std::auto_ptr<MGLBRep> scalePolar(
1004 virtual int sdim()
const =0 ;
1024 virtual int tangent_guess(
1036 void trim_end(
double t);
1042 void trim_start(
double t);
1048 void trim_start_and_end(
double ts,
double te);
1054 virtual MGCurve& unlimit() =0;
1059 virtual MGCurve& unlimit_end() =0;
1064 virtual MGCurve& unlimit_start() =0;
1073 virtual std::auto_ptr<MGLBRep> PolarCoordinatesLBRep()
const;
1076 virtual std::ostream&
out(std::ostream&)
const;
1078 virtual std::string
whoami()
const{
return "Curve";};
1103 void approximate_as_LBRep2(
1108 bool neglectMulti=
false
1114 virtual void data_points_for_approximate_as_LBRep2(
1120 bool neglectMulti=
false
1126 void extrapolated_pp(
1146 virtual std::auto_ptr<MGCurve> oneD(
1182 int common_one_span(
1196 void common_boundary(
1198 const MGCommonON& onparam,
1199 const MGCommonON& offparam,
1200 double& param1,
double& param2
1208 int offset_norm_proc(
1221 int offset_norm_c2_proc(
1236 int divide_multi_ofs(
1262 class MGCurveLengthDrive{
1265 MGCurveLengthDrive(
const MGCurve* curve):m_curve(curve){;};
1268 double operator()(
double t)
const;
1272 class MGCurveLenParamDrive {
1276 MGCurveLenParamDrive(
const MGCurve* curve,
double len,
double ts)
1277 :m_curve(curve), m_len(len), m_ts(ts){;};
1278 double operator()(
double t)
const;
virtual MGGeometry & operator=(const MGGeometry &gel2)
Definition: Geometry.h:56
virtual MGCurve & operator=(const MGCurve &gel2)
Assignment.
Definition: Curve.h:84
const MGCurve * curve() const
Definition: Curve.h:288
MGTrimmedCurve is a part of an original curve of a limitted parameter range.
Definition: TrimmedCurve.h:50
Defines PP-Represetation of a spline.
Definition: PPRep.h:32
virtual void negate()
Negate direction of this geometry.
Definition: Geometry.h:120
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
double Torsion(const MGVector &v1, const MGVector &v2, const MGVector &v3)
Compute torsion.
virtual void update_mark()
Mark this as updated.
Definition: Geometry.h:156
MGPlane is infinite plane in 3D space.
Definition: Plane.h:38
MGTransf represents a transformation of a space dimension.
Definition: Transf.h:35
MGCylinder is a Cylinder in 3D space.
Definition: Cylinder.h:37
double Curvature(const MGVector &v1, const MGVector &v2)
Compute curvature in 3D space, ie, the value is not negative.
virtual std::ostream & out(std::ostream &) const
Output virtual function.
virtual double param_span() const
Compute parameter span length.
Definition: Curve.h:783
virtual int sdim() const =0
Return space dimension.
virtual MGisects intersection(const MGObject &obj2) const =0
virtual bool operator<(const MGGel &gel2) const
virtual long identify_type() const =0
Return This object's typeID.
MGPoint represents one dimensional manifold, a point in a space.
Definition: Point.h:28
virtual void display_curvatures(mgSysGL &sgl, double scale, int density, bool use_radius) const
Definition: Gel.h:195
MGCompositeCurve is a composite of other leaf curves.
Definition: CompositeCurve.h:39
void one_arrow(const MGPosition &root, const MGVector &vecx, const MGUnit_vector &vecy, MGPosition &head, MGPosition &headtail1, MGPosition &headtail2)
Generate arrow data from (root, vecx, vecy).
virtual void update_mark()
Mark this as updated.
Definition: Curve.h:1173
bool is_closed() const
Test if this is a closed curve.
Definition: Curve.h:569
int divide_number() const
get the a divide number for offset, intersection, or others.
Definition: Curve.h:335
MGCFisect_vector defines a vector of MGCFisect.
Definition: CFisect_vector.h:25
virtual MGGeometry * copy_change_dimension(int sdim, int start1=0, int start2=0) const =0
virtual MGBox * compute_box() const =0
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
virtual void negate_transform(MGGeometry &boundary) const =0
virtual MGPosition center() const =0
Obtain ceter coordinate of the geometry.
MGLBRep is a class for B-SPline representation.
Definition: LBRep.h:41
virtual std::string whoami() const
Definition: Curve.h:1078
Is an abstract class which represents a whole geometry and a topology.
Definition: Object.h:42
virtual MGUnit_vector direction(const MGPosition ¶m) const
Compute direction unit vector of the geometry.
MGShell is a composition of MGFace's(trimmed surface).
Definition: Shell.h:32
Vector of a general n space dimension.
Definition: Vector.h:26
MGGeometry is an abstract class which represents a whole geometry.
Definition: Geometry.h:36
MG_DLL_DECLR MGRLBRep * convert_to_rational(const MGCurve &curve)
Creates a curve that has weight.
Defines a Box of any space dimendion.
Definition: Box.h:34
Define MGBSumCurve Class(Boolean sum curve of three curves).
Definition: BSumCurve.h:28
virtual void ReadMembers(MGIfstream &buf)
MGFace is a trimmed surface.
Definition: Face.h:51
virtual void display_break_points(mgSysGL &sgl) const
Definition: Gel.h:193
virtual MGPosition pick_closest(const MGStraight &sl) const
Definition: Object.h:146
virtual void WriteMembers(MGOfstream &buf) const
MGGel is an abstract class which represents a group element.
Definition: Gel.h:53
MGStraight is a curve of any space dimension, represent a straight line.
Definition: Straight.h:49
Interval of 1 dimension, i.e. MGInterval is a real line.
Definition: Interval.h:22
Represent a positional data.
Definition: Position.h:28
MGSurface is an abstract class of 3D surface.
Definition: Surface.h:54
MGCurve * curve()
Return curve pointer if this MGGel is an MGCurve, else return null.
Definition: Curve.h:287
MGCSisect_list defines linked list of MGCSisect.
Definition: CSisect_list.h:22
Defines Knot vector of B-Representation.
Definition: KnotVector.h:28
Defines Boolean sum surface.
Definition: BSumSurf.h:26
virtual bool in_range(const MGPosition &t) const
Definition: Geometry.h:114
virtual MGObject & operator-=(const MGVector &v)=0
virtual MGGeometry & change_dimension(int sdim, int start1=0, int start2=0)=0
Changing this object's space dimension.
Defines BPoint seq of a space dimension and of a capacity.
Definition: BPointSeq.h:38
MGParam_Vector provides a list to store parameters of a curve.
Definition: CParam_list.h:18
MGSphere is a Sphere in 3D space.
Definition: Sphere.h:42
Defines a list of MGCCisect(curve to curve intersection).
Definition: CCisect_list.h:20
MGCSisect_list isect(const MGFSurface &fs) const
Definition: Curve.h:538
MGFSurface is an abstract class to provide the comman interfaces to MGFace and MGSurface.
Definition: FSurface.h:33
MGOfstream is a class to serialize all of the subclasses of MGGel.
Definition: Ofstream.h:31
Defines Rational Line B-Representation.
Definition: RLBRep.h:32
MGCURVE_TYPE
Curve type(曲線の種類).
Definition: MGCL.h:143
MGPosition_list provides a list of Positions.
Definition: Position_list.h:27
virtual double length() const
Compute whole curve length.
Definition: Curve.h:624
virtual MGBox parameter_range() const =0
virtual MGVector evaluate(const MGPosition &t, const int *nderiv=0) const =0
Evaluate n'th derivative data. n=0 means positional data evaluation.
Defines Surface B-Representation of rational form.
Definition: RSBRep.h:38
virtual bool get_control_points(MGBPointSeq &cpoints) const
Extracts control points.
Definition: Curve.h:455
virtual MGGeometry * clone() const =0
Defines non-decreasing double data array.
Definition: NDDArray.h:27
Defines Surface B-Representation, that is , B-Spline surface.
Definition: SBRep.h:48
MGEllipse is a class to define an ellipse of 2D or 3D.
Definition: Ellipse.h:38
virtual void drawWire(mgVBO &vbo, double span_length, int line_density=1) const
Draw this curve into vbo, approximating with polyline.
Definition: Curve.h:347
int manifold_dimension() const
Return manifold dimension, 0:point, 1:curve, 2:surface.
Definition: Curve.h:640
MGisects defines a vector of MGisect.
Definition: isects.h:44
virtual double curvilinear_integral() const
Definition: Curve.h:299
virtual MGObject & operator+=(const MGVector &v)=0
Object transformation.
virtual MGObject & operator*=(double scale)=0
virtual bool operator==(const MGGel &gel2) const
Comparison.
Definition: Gel.h:80
virtual MGHHisect_vector isect(const MGShell &shell2) const =0
Intersection.
virtual MGPosition center_param() const =0
Obtain ceter parameter value of the geometry.
mgSysGL is a class to provide a facility to draw temporal pictures.
Definition: sysGL.h:26
OpenGL 4 用描画のためのクラス, in other words, display list.
Definition: VBO.h:76
Define a unit vector, is a MGVector.
Definition: Unit_vector.h:17
MGSurfCurve is a curve on a surface.
Definition: SurfCurve.h:43
virtual void display_arrows(mgSysGL &sgl) const
Definition: Gel.h:192
MGMatrix is a matix of m by m, where m is the space dimension.
Definition: Matrix.h:30