5 #ifndef _MGCylinder_HH_
6 #define _MGCylinder_HH_
7 #include "mg/Position.h"
8 #include "mg/Unit_vector.h"
9 #include "mg/CSisect_list.h"
10 #include "mg/Surface.h"
11 #include "mg/Ellipse.h"
12 #include "mg/Straight.h"
129 int SubordinateEntitySwitch=0
135 std::ostream&
out(std::ostream &)
const;
182 double distance(
const MGPosition& point)
const;
197 )
const{
return eval(uv.
ref(0),uv.
ref(1),ndu,ndv);}
222 )
const{
eval_all(uv(0),uv(1),f,fu,fv,fuv,fuu,fvv);}
247 bool in_range(
double u,
double v)
const;
277 double knot_u(
int i)
const{
return m_ellipse.knot(i);};
278 double knot_v(
int j)
const{
return m_axis.knot(j);};
446 int vrange(
const MGPosition& P,
double& v)
const;
454 std::string
whoami()
const{
return "Cylinder";};
468 MGBox* compute_box()
const;
492 double u,
double v,
double& du,
double& dv,
501 double du,
double dv,
514 double& du,
double& dv,
531 int offset_div_num()
const{
return 1;};
virtual MGSBRep * surf1D(const MGPlane &pl) const =0
virtual MGVector eval(double u, double v, int ndu=0, int ndv=0) const =0
Evaluate surface data.
MG_DLL_DECLR const MGBox mgNULL_BOX
virtual MGSurface & operator=(const MGSurface &gel2)
Definition: Surface.h:74
virtual MGCurve * perimeter_curve(int i) const
Retrieve perimeter i of this surface.
virtual void ReadMembers(MGIfstream &buf)
virtual int perp_point(const MGPosition &P, MGPosition &uv, const MGPosition *uvguess=0) const
Return the foot of the perpendicular straight line from P.
MGSURFACE_TYPE type() const
Definition: Cylinder.h:398
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
virtual std::ostream & out(std::ostream &ostrm) const
Output virtual function.
MGPlane is infinite plane in 3D space.
Definition: Plane.h:38
MGTransf represents a transformation of a space dimension.
Definition: Transf.h:35
virtual bool operator<(const MGGel &gel2) const =0
friend class MGCylinder
Definition: Surface.h:1307
MGCylinder is a Cylinder in 3D space.
Definition: Cylinder.h:37
virtual MGCurve * isect_incr_pline(const MGPosition &uv, int kdt, double du, double dv, double &u, double &v, int incr=0) const =0
virtual int out_to_IGES(MGIgesOfstream &igesfile, int SubordinateEntitySwitch=0) const
Definition: Gel.h:93
MGCSisect_list isect(const MGStraight &line) const
Definition: Cylinder.h:259
virtual void WriteMembers(MGOfstream &buf) const
double knot_v(int j) const
Access to i-th element of v knot.
Definition: Cylinder.h:278
virtual bool in_range(double u, double v) const =0
Test if the parameter(u,v) is in this surface's parameter range.
virtual MGBox box_limitted(const MGBox &uvrange) const =0
Return minimum box that includes limitted surface by uvrange.
virtual MGSurface & exchange_uv()=0
Exchange parameter u and v.
double param_e_u() const
Return ending parameter value.
Definition: Cylinder.h:338
MGSSisect_list intersectPl(const MGPlane &srf2) const
Default intersection program of MGSurface with a plane.
virtual long identify_type() const =0
Return This object's typeID.
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
virtual int sdim() const =0
Return the surface type.
double param_s_u() const
Return starting parameter value.
Definition: Cylinder.h:346
MGLBRep is a class for B-SPline representation.
Definition: LBRep.h:41
const MGKnotVector & knot_vector_u() const
Returns the u knot vector.
Definition: Cylinder.h:281
virtual MGSurface & change_range(int is_u, double t1, double t2)=0
Change parameter range, able to change the direction by providing t1 greater than t2...
virtual MGSSisect_list isect(const MGSurface &srf2) const =0
Surface and Surface intersection.
virtual void eval_all(double u, double v, MGPosition &f, MGVector &fu, MGVector &fv, MGVector &fuv, MGVector &fuu, MGVector &fvv) const
Evaluate right continuous surface data.
Vector of a general n space dimension.
Definition: Vector.h:26
virtual MGPosition range(const MGPosition &) const
Round the input parameter value uv.
const MGEllipse & ellipse() const
Return the ellipse rep of the cylinder.
Definition: Cylinder.h:300
virtual MGSurface & extend(int perimeter, double param, double length, double dk=0.)
Modify the original Surface by extrapolating the specified perimeter.
Definition: Surface.h:365
Defines a Box of any space dimendion.
Definition: Box.h:34
virtual bool on(const MGPosition &P, MGPosition &) const
Test if point P is ont the surface or not.
Define MGBSumCurve Class(Boolean sum curve of three curves).
Definition: BSumCurve.h:28
MGSurface & operator*=(double scale)=0
MGSurface & operator-=(const MGVector &v)=0
virtual MGSurface * clone() const =0
Construct new surface object by copying to newed area.
int intersect_dnum_v() const
Definition: Cylinder.h:254
virtual MGSurface * copy_change_dimension(int sdim, int start1=0, int start2=0) const =0
Construct new surface object by changing the original object's space dimension.
virtual bool flat(const MGBox &uvbox, double tol, int &direction, MGPosition &P, MGUnit_vector &N) 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
bool operator!=(const MGCylinder &gel2) const
Definition: Cylinder.h:124
virtual MGCSisect_list isectSl(const MGStraight &sl, const MGBox &uvbox=mgNULL_BOX) const
Intersection of Surface and a straight line.
bool in_range(const MGPosition &uv) const
Definition: Cylinder.h:248
virtual MGSurface * part(const MGBox &bx, int multiple=0) const =0
Compute part of the surface limitted by the parameter range bx.
virtual int isect_direction(const MGFSurface &sf2, int m1, MGPosition &uvuvS, double &du, double &dv, double acuRatio=1.) const
Definition: Surface.h:1168
MG_DLL_DECLR MGVector operator*(const MGVector &v, const MGMatrix &m)
virtual void isect_inner_dt(int n, const MGPosition &uvnow, double &du, double &dv, int &kdt, double acuRatio=1.) const
Definition: Surface.h:1199
bool operator!=(const MGGel &gel2) const
Definition: Cylinder.h:123
virtual int isect_order() const =0
Represent a positional data.
Definition: Position.h:28
MGSurface is an abstract class of 3D surface.
Definition: Surface.h:54
MGSurface & operator+=(const MGVector &v)=0
Object transformation.
MGSSisect_list defines linked list of MGSSisect.
Definition: SSisect_list.h:26
MGCSisect_list defines linked list of MGCSisect.
Definition: CSisect_list.h:22
int intersect_dnum_u() const
Definition: Cylinder.h:253
Defines Knot vector of B-Representation.
Definition: KnotVector.h:28
Defines Boolean sum surface.
Definition: BSumSurf.h:26
virtual MGPosition closest(const MGPosition &point) const
Compute the closest point parameter value (u,v)of this surface from a point.
MGKnotVector & knot_vector_u()
Definition: Cylinder.h:282
virtual std::auto_ptr< MGSurface > offset_c1(double ofs_value, int &error) const
C1 continuous Surface offset.
const MGKnotVector & knot_vector_v() const
Returns the v knot vector.
Definition: Cylinder.h:285
MGSphere is a Sphere in 3D space.
Definition: Sphere.h:42
virtual void negate()
Negate direction of surface.
Definition: Surface.h:730
const MGStraight & axis() const
Return the normal of the Cylinder.
Definition: Cylinder.h:303
MGFSurface is an abstract class to provide the comman interfaces to MGFace and MGSurface.
Definition: FSurface.h:33
int perimeter_num() const
Return how many perimeters this surface has.
Definition: Cylinder.h:371
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
MGPosition_list provides a list of Positions.
Definition: Position_list.h:27
MGVector eval(const MGPosition &uv, int ndu=0, int ndv=0) const
Evaluate surface data.
Definition: Cylinder.h:193
virtual bool operator==(const MGGel &gel2) const =0
comparison
virtual double param_error() const
Obtain parameter space error.
std::string whoami() const
Definition: Cylinder.h:454
MGOgesIfstream write out to *.iges file, transforming MGCL objects to IGES objects.
Definition: IgesOfstream.h:26
virtual MGSurface & change_dimension(int sdim, int start1=0, int start2=0)=0
Changing this object's space dimension.
double knot_u(int i) const
Return knot value of (infinite-minus, infinite-plus)
Definition: Cylinder.h:277
Defines Surface B-Representation of rational form.
Definition: RSBRep.h:38
MGKnotVector & knot_vector_v()
Definition: Cylinder.h:286
virtual MGBox param_range() const
Return parameter range.
double param_s_v() const
Definition: Cylinder.h:347
Defines Surface B-Representation, that is , B-Spline surface.
Definition: SBRep.h:48
Cylinder surface(A special case of MGSURFACE_CONE)
Definition: MGCL.h:183
MGEllipse is a class to define an ellipse of 2D or 3D.
Definition: Ellipse.h:38
virtual MGPosition center() const
Obtain ceter coordinate of the geometry.
double ref(int i) const
Definition: Position.h:304
virtual MGPosition_list perps(const MGPosition &P) const
Return all foots of perpendicular straight lines from P.
MGSURFACE_TYPE
Surface type(曲面の種類).
Definition: MGCL.h:173
virtual int isect_area_length() const
Definition: Surface.h:1161
void isect_dt(double u, double v, double &du, double &dv, double acuRatio=1.) const
virtual bool on_a_perimeter(double &u, double &v, int &perim_num) const
Test if input (u,v) is parameter value on a perimeter of the surface.
void eval_all(const MGPosition &uv, MGPosition &f, MGVector &fu, MGVector &fv, MGVector &fuv, MGVector &fuu, MGVector &fvv) const
Definition: Cylinder.h:214
double param_e_v() const
Definition: Cylinder.h:339
Define a unit vector, is a MGVector.
Definition: Unit_vector.h:17
virtual MGCurve * parameter_curve(int is_u, double x) const =0
Compute parameter curve.
MGSurfCurve is a curve on a surface.
Definition: SurfCurve.h:43
MGMatrix is a matix of m by m, where m is the space dimension.
Definition: Matrix.h:30