Commit 5675abd4 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[cylinder] rename lateralFace() -> mantle()

parent f8e6fdec
......@@ -131,7 +131,7 @@ public:
//! Return the bottom bounding face
const Disk& bottomFace() const { return bottom_; }
//! Return the lateral surface
CylinderMantle lateralFace() const
CylinderMantle mantle() const
{
return CylinderMantle(Circle(bottom_.center(),
bottom_.normal(),
......
......@@ -170,7 +170,7 @@ namespace OCCUtilities {
template<class ctype>
TopoDS_Solid getShape(const Cylinder<ctype>& cylinder)
{
const auto& lateral = cylinder.lateralFace();
const auto& lateral = cylinder.mantle();
const auto& bottom = lateral.lowerBoundingCircle();
auto axis = direction(bottom.normal());
auto base1 = direction(bottom.base1());
......
......@@ -113,19 +113,19 @@ int main()
// Test constraints w.r.t. cylinder
Frackit::Cylinder<ctype> cylinder(0.5, 1.0);
Disk disk10(Point(0.0, 0.0, 0.5), e1, e2, 2.0, 2.0);
if (!constraints.evaluate(cylinder.lateralFace(), disk10))
if (!constraints.evaluate(cylinder.mantle(), disk10))
throw std::runtime_error("False positive intersection distance violation");
std::cout << "Test 10 passed" << std::endl;
// violates intersection distance constraint
Disk disk11(Point(0.0, 0.0, 0.951), e1, e2, 2.0, 2.0);
if (constraints.evaluate(cylinder.lateralFace(), disk11))
if (constraints.evaluate(cylinder.mantle(), disk11))
throw std::runtime_error("Did not detect intersection distance violation");
std::cout << "Test 11 passed" << std::endl;
// just doesn't violate intersection distance constraint
Disk disk12(Point(0.0, 0.0, 0.849), e1, e2, 2.0, 2.0);
if (!constraints.evaluate(cylinder.lateralFace(), disk12))
if (!constraints.evaluate(cylinder.mantle(), disk12))
throw std::runtime_error("False positive intersection distance violation");
std::cout << "Test 12 passed" << std::endl;
......
......@@ -141,7 +141,7 @@ int main()
Point( 0.0, -0.6, 1.0 - 0.05111),
Point( 0.6, 0.0, 1.0 - 0.05111),
Point( 0.0, 0.6, 1.0 - 0.05111));
if (!constraints.evaluate(cylinder.lateralFace(), quad11))
if (!constraints.evaluate(cylinder.mantle(), quad11))
throw std::runtime_error("False positive intersection distance violation");
std::cout << "Test 11 passed" << std::endl;
......@@ -150,7 +150,7 @@ int main()
Point( 0.0, -0.6, 1.0 - 0.04999),
Point( 0.6, 0.0, 1.0 - 0.04999),
Point( 0.0, 0.6, 1.0 - 0.04999));
if (constraints.evaluate(cylinder.lateralFace(), quad12))
if (constraints.evaluate(cylinder.mantle(), quad12))
throw std::runtime_error("Did not detect intersection distance violation");
std::cout << "Test 12 passed" << std::endl;
......@@ -159,7 +159,7 @@ int main()
Point( 0.0, -0.40001, 01.5),
Point( 0.40001, 0.0, 01.5),
Point( 0.0, 0.40001, 01.5));
if (!constraints.evaluate(cylinder.lateralFace(), quad13))
if (!constraints.evaluate(cylinder.mantle(), quad13))
throw std::runtime_error("False positive distance violation");
std::cout << "Test 13 passed" << std::endl;
......@@ -168,7 +168,7 @@ int main()
Point( 0.0, -0.39999, 0.5),
Point( 0.39999, 0.0, 0.5),
Point( 0.0, 0.39999, 0.5));
if (constraints.evaluate(cylinder.lateralFace(), quad14))
if (constraints.evaluate(cylinder.mantle(), quad14))
throw std::runtime_error("Did not detect distance violation");
std::cout << "Test 14 passed" << std::endl;
......
......@@ -123,7 +123,7 @@ int main()
// enforce constraints w.r.t. the domain boundaries
if (!constraintsOnDomain.evaluate(domain.topFace(), disk)) continue;
// enforce constraints w.r.t. the domain boundaries
if (!constraintsOnDomain.evaluate(domain.lateralFace(), disk)) continue;
if (!constraintsOnDomain.evaluate(domain.mantle(), disk)) continue;
// reject if intersection with domain is too small (here: 0.2m²)
const auto containedArea = computeContainedMagnitude(disk, domain);
......
......@@ -94,7 +94,7 @@ int main()
if (geometry->name() != "EllipseArc_3d") throw std::runtime_error("EllipseArc name wrong");
// test cylinder surface
auto cylMantle = cylinder.lateralFace();
auto cylMantle = cylinder.mantle();
geometry = &cylMantle;
if (geometry->name() != "CylinderMantle") throw std::runtime_error("CylinderMantle name wrong");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment