8 #include "mg/Pvector.h"
9 #include "topo/LSPoint_vector.h"
10 #include "topo/Boundary.h"
11 #include "topo/TrimLoop.h"
58 MG_DLL_DECLR
friend MGEdge* edge_from_iterator(pcellItr i);
59 MG_DLL_DECLR
friend const MGEdge* edge_from_iterator(const_pcellItr i);
76 MG_DLL_DECLR
friend int inside_outer_loop(
78 const std::vector<const MGLoop*>& loop,
106 MGLoop(std::auto_ptr<MGCurve>& param_curve, std::auto_ptr<MGCurve>& world_curve);
141 void append(
MGEdge* edge);
147 void append_edge_from_crv(
154 const std::vector<double>& pspan,
156 bool orientation_is_opposite=
false
167 bool both_end_on_perimeter(
int& pid_s,
int& pid_e,
const MGFSurface* srf=0)
const;
217 std::vector<MGLEPoint>& pranges1,
218 std::vector<double>& branges1,
219 std::vector<MGLEPoint>& pranges2,
220 std::vector<double>& branges2
225 double compute_area()
const;
249 const MGEdge* edge(
int i)
const;
256 int edge_num(
const MGEdge* e)
const;
283 const MGEdge* first_edge()
const;
290 int get_loop_id_in_face()
const;
302 int inside(
double u,
double v)
const;
321 std::vector<MGLEPoint> isect_1D(
331 (
const MGCurve& param_curve)
const;
334 bool is_inactive(
const MGFSurface* srf=0)
const;
339 bool is_inner_boundary(
const MGFSurface* srf=0)
const;
344 bool is_outer_boundary(
const MGFSurface* srf=0)
const;
349 bool is_perimeter_boundary(
const MGFSurface* srf=0)
const;
362 void join(
bool start,
const MGLoop& loop2);
363 void join(
bool start,
MGLoop* loop2);
364 void join(
bool start, std::auto_ptr<MGLoop>& loop2);
369 int parameter_normalization=2
379 const MGEdge* last_edge()
const;
427 bool merge_trim(
const MGCurve& param_curve);
429 bool merge_trim(
const MGCurve& param_curve,
const MGCurve& world_curve);
432 bool merge_trim(
const MGLoop& loop2);
460 bool on_perimeter_end(
int& pid_e,
const MGFSurface* surf=0)
const;
461 bool on_perimeter_start(
int& pid_s,
const MGFSurface* surf=0)
const;
464 bool on_surface_perimeter(
const MGFace& f)
const;
467 std::ostream&
out(std::ostream&)
const;
474 bool remove_pendent_edge(
const MGFSurface& face);
478 void remove_garbage_edge(
double error);
499 std::vector<MGEdge*> subdivide(
500 const std::vector<MGLEPoint>& ranges
527 std::list<MGCellNB*> boundaries
544 std::string
whoami()
const{
return "Loop";};
555 mutable LoopKind m_kind;
557 mutable double m_area;
561 mutable int m_perim_num_s;
562 mutable int m_perim_num_e;
567 void compute_kind(
const MGFSurface* srf=0)
const;
578 bool get_perimeter_num(
int& pid_s,
int& pid_e,
const MGFSurface* srf=0)
const;
591 const double error[3],
619 std::vector<MGLEPoint> isect_1D_tess(
629 void make_loop(std::auto_ptr<MGCurve>& param_curve, std::auto_ptr<MGCurve>& world_curve);
636 bool makeVertexWithLcis(
648 bool merge_loop(
const MGLoop& loop2);
653 void trim_param_set(
const MGLEPoint& t,
bool start);
CellNB is a cell without boundaries(No Boundaries).
Definition: CellNB.h:38
int manifold_dimension() const
Get manifold dimension.
Definition: Loop.h:400
int number_of_pcells() const
Obtain how many parameter cells are included in the boundary.
MGLCisect_vector defines linked list of MGLCisect.
Definition: LCisect_vector.h:23
virtual long identify_type() const =0
Return Object's type ID (TID)
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
MGTransf represents a transformation of a space dimension.
Definition: Transf.h:35
MG_DLL_DECLR std::auto_ptr< MGLoop > trim_out_subloop(const MGLEPoint &ts, const MGLEPoint &te)
virtual MGFace * face()
Return MGFace pointer if this MGGel is an MGFace, else return null.
Definition: Gel.h:151
virtual MGSurface * surf()
Return MGSurface pointer if this MGGel is an MGSurface, else return null.
Definition: Gel.h:143
MGLPoint is to represent Loop's point.
Definition: LPoint.h:23
virtual void negate_as_boundary(const MGCellNB *parent=0)
virtual void copy_boundary_without_binders(const MGBoundary &bnd)
virtual void ReadMembers(MGIfstream &buf)
Read Object's member data.
MGIfstream is a class to read the serialized data generated by MGOfstream.
Definition: Ifstream.h:30
MGLLisect_vector defines a vector of MGLLisect.
Definition: LLisect_vector.h:23
virtual bool closed() const =0
Test if this is closed boundary.
Vector of a general n space dimension.
Definition: Vector.h:26
MGCell is a general cell that has bound.
Definition: Cell.h:35
virtual MGBoundary * clone() const =0
MGFace is a trimmed surface.
Definition: Face.h:51
virtual MGBoundary & operator*=(double scale)
Definition: Boundary.h:67
bool edge_exist() const
Test if at least one edge is included in this loop.
Definition: Loop.h:252
MGGel is an abstract class which represents a group element.
Definition: Gel.h:53
MGEdge is an instance of MGCellNB, represents a boundary element of 2D manifold.
Definition: Edge.h:33
virtual void WriteMembers(MGOfstream &buf) const
Write Object's Member Data.
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
virtual MGBoundary * clone_without_binders() const =0
Represent a positional data.
Definition: Position.h:28
MGSurface is an abstract class of 3D surface.
Definition: Surface.h:54
Is to represent a Loop's point.
Definition: LEPoint.h:28
MGLoop is a boundary of a face, a boundary of 2D manifold cell.
Definition: Loop.h:44
virtual MGBoundary & operator+=(const MGVector &v)
Object transformation.
Definition: Boundary.h:65
MGBoundary is a boundary of more than 1 manifold dimension.
Definition: Boundary.h:35
virtual bool operator<(const MGComplex &gel2) const
comparison
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
bool pcell_exist() const
Cehck if pcell exist.
LoopKind
Definition: Loop.h:48
MGComplex is a container of parameter cells and binder cells.
Definition: Complex.h:25
virtual bool active() const =0
Test if this is an active boundary.
std::string whoami() const
Definition: Loop.h:544
int number_of_edges() const
Get the number of edge included.
Definition: Loop.h:455
MGLSPoint_vector defines a vector of MGLSPoint.
Definition: LSPoint_vector.h:18
virtual std::ostream & out(std::ostream &) const
Output virtual function.
bool is_network(const MGFSurface *srf=0) const
Test if this loop is network.
Definition: Loop.h:352
virtual void copy_boundary(const MGBoundary &bnd)
virtual MGBoundary & operator-=(const MGVector &v)
Definition: Boundary.h:66
MGPVertex is a parameter cell of the manifold dimension 0.
Definition: PVertex.h:34
MG_DLL_DECLR void build_networks(const MGFSurface &surf, const MGPvector< MGCurve > &pcurves, MGPvector< MGLoop > &networks)
Build networks of surf, given parameter curves vector.
virtual MGBoundary & operator=(const MGBoundary &gel2)
MGMatrix is a matix of m by m, where m is the space dimension.
Definition: Matrix.h:30