#include <Brep.h>
Public Member Functions | |
BREP_FACET (BREP_SHELL *pr_shell) | |
virtual | ~BREP_FACET () |
void | CloseData () |
void | ConnectContour (BREP_CONTOUR *contour) |
void | DisconnectContour (BREP_CONTOUR *contour) |
void | ComputePlaneEquation () |
Public Attributes | |
BREP_SHELL * | shell |
BREP_CONTOUR_LIST | outer_contours |
Vector< double > | normal |
RBound< double > | rbound |
double | d |
定数,原点から平面への距離*(-1) | |
double | tolerance |
bool | deletable |
削除できる | |
bool | notdelete |
削除してはいけない |
Definition at line 137 of file Brep.h.
BREP_FACET | ( | BREP_SHELL * | pr_shell | ) |
Definition at line 225 of file Brep.cpp.
References BREP_SHELL::ConnectFacet(), BREP_FACET::deletable, jbxl::Facet_Tolerance, BREP_FACET::notdelete, BREP_FACET::rbound, RBound< T >::set(), BREP_FACET::shell, and BREP_FACET::tolerance.
00226 { 00227 shell = pr_shell; 00228 if (shell!=NULL) shell->ConnectFacet(this); 00229 00230 deletable = false; 00231 notdelete = false; 00232 tolerance = Facet_Tolerance; 00233 00234 rbound.set(HUGE_VALF, -HUGE_VALF, HUGE_VALF, -HUGE_VALF, HUGE_VALF, -HUGE_VALF); 00235 }
~BREP_FACET | ( | ) | [virtual] |
Definition at line 239 of file Brep.cpp.
References BREP_SHELL::DisconnectFacet(), BREP_CONTOUR::facet, BREP_FACET::outer_contours, and BREP_FACET::shell.
00240 { 00241 if (shell!=NULL) shell->DisconnectFacet(this); 00242 00243 BREP_CONTOUR* bpcn; 00244 BREP_CONTOUR_LIST::iterator icon = outer_contours.begin(); 00245 while (icon!=outer_contours.end()) { 00246 bpcn = *icon; 00247 icon = outer_contours.erase(icon); 00248 bpcn->facet = NULL; 00249 delete (bpcn); 00250 } 00251 }
void CloseData | ( | void | ) |
Definition at line 255 of file Brep.cpp.
References BREP_FACET::ComputePlaneEquation(), and BREP_FACET::outer_contours.
Referenced by jbxl::PatchupContour(), and jbxl::ReverseContours().
00256 { 00257 BREP_CONTOUR_LIST::iterator icon; 00258 for (icon=outer_contours.begin(); icon!=outer_contours.end(); icon++) (*icon)->CloseData(); 00259 00260 ComputePlaneEquation(); 00261 }
void ComputePlaneEquation | ( | ) |
void BREP_FACET::ComputePlaneEquation()
Definition at line 296 of file Brep.cpp.
References BREP_FACET::d, jbxl::Facet_Tolerance, Max, BREP_FACET::normal, BREP_FACET::outer_contours, BREP_FACET::rbound, BREP_FACET::tolerance, RBound< T >::xmax, RBound< T >::xmin, RBound< T >::ymax, RBound< T >::ymin, RBound< T >::zmax, and RBound< T >::zmin.
Referenced by BREP_FACET::CloseData().
00297 { 00298 normal = outer_contours.front()->normal; 00299 00300 double emax = 0.0; 00301 double dmin = HUGE_VALF; 00302 double dmax = -HUGE_VALF; 00303 00304 BREP_CONTOUR_LIST::iterator icon; 00305 for (icon=outer_contours.begin(); icon!=outer_contours.end(); icon++) { 00306 (*icon)->CloseFacet(this, emax, dmin, dmax); 00307 } 00308 00309 d = (dmin + dmax)/2.0; 00310 tolerance = Max((dmax - dmin)/2.0, Facet_Tolerance); 00311 tolerance = Max(emax, tolerance); 00312 00313 double extent = tolerance + emax; 00314 rbound.xmin -= extent; 00315 rbound.ymin -= extent; 00316 rbound.zmin -= extent; 00317 rbound.xmax += extent; 00318 rbound.ymax += extent; 00319 rbound.zmax += extent; 00320 }
void ConnectContour | ( | BREP_CONTOUR * | contour | ) |
Definition at line 266 of file Brep.cpp.
References BREP_CONTOUR::facet, and BREP_FACET::outer_contours.
Referenced by BREP_CONTOUR::BREP_CONTOUR().
00267 { 00268 if (contour!=NULL) { 00269 contour->facet = this; 00270 outer_contours.push_back(contour); 00271 } 00272 }
void DisconnectContour | ( | BREP_CONTOUR * | contour | ) |
Definition at line 276 of file Brep.cpp.
References BREP_CONTOUR::facet, and BREP_FACET::outer_contours.
Referenced by BREP_CONTOUR::~BREP_CONTOUR().
00277 { 00278 if (contour!=NULL) { 00279 BREP_CONTOUR_LIST::iterator icon; 00280 icon = std::find(outer_contours.begin(), outer_contours.end(), contour); 00281 if (icon!=outer_contours.end()) outer_contours.erase(icon); 00282 00283 contour->facet = NULL; 00284 } 00285 }
double d |
Definition at line 146 of file Brep.h.
Referenced by BREP_FACET::ComputePlaneEquation().
bool deletable |
Definition at line 149 of file Brep.h.
Referenced by BREP_FACET::BREP_FACET(), jbxl::DeleteShortageWings(), and jbxl::SetDeletableContoursByEdge().
Definition at line 143 of file Brep.h.
Referenced by BREP_CONTOUR::CloseFacet(), and BREP_FACET::ComputePlaneEquation().
bool notdelete |
Definition at line 150 of file Brep.h.
Referenced by BREP_FACET::BREP_FACET().
Definition at line 141 of file Brep.h.
Referenced by BREP_FACET::CloseData(), BREP_FACET::ComputePlaneEquation(), BREP_FACET::ConnectContour(), BREP_FACET::DisconnectContour(), jbxl::FastDeleteFacet(), and BREP_FACET::~BREP_FACET().
Definition at line 144 of file Brep.h.
Referenced by BREP_FACET::BREP_FACET(), BREP_CONTOUR::CloseFacet(), BREP_FACET::ComputePlaneEquation(), and jbxl::IsCollisionContours().
Definition at line 140 of file Brep.h.
Referenced by BREP_FACET::BREP_FACET(), BREP_SHELL::ConnectFacet(), jbxl::CreateContourByVector(), jbxl::CreateContoursList(), BREP_SHELL::DisconnectFacet(), jbxl::FastDeleteFacet(), jbxl::FillShortageWings_Near(), jbxl::FillShortageWings_Next(), jbxl::ReverseContours(), BREP_FACET::~BREP_FACET(), and BREP_SHELL::~BREP_SHELL().
double tolerance |
Definition at line 147 of file Brep.h.
Referenced by BREP_FACET::BREP_FACET(), and BREP_FACET::ComputePlaneEquation().