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

[python] move magnitude to geometry

parent 704803da
......@@ -113,7 +113,7 @@ while not status.finished():
continue
# reject entities whose contained part is too small
from frackit.magnitude import computeContainedMagnitude
from frackit.geometry import computeContainedMagnitude
containedArea = computeContainedMagnitude(quad, domain);
if (containedArea < 0.01):
status.increaseRejectedCounter()
......
......@@ -18,7 +18,7 @@ if len(solids) != 3: raise RuntimeError("Expected the .brep file to contain 3 so
# The sub-domain we want to create a network in is the center one.
# Compute its volume and get the boundary faces for constraint evaluation.
from frackit.magnitude import computeMagnitude
from frackit.geometry import computeMagnitude
networkDomain = solids[1]
domainVolume = computeMagnitude(networkDomain);
shells = getShells(networkDomain)
......@@ -145,7 +145,7 @@ while not status.finished():
continue
# Moreover, we want to avoid small fragments (< 250 m²)
from frackit.magnitude import computeContainedMagnitude
from frackit.geometry import computeContainedMagnitude
containedArea = computeContainedMagnitude(geom, networkDomain);
if containedArea < 350.0:
status.increaseRejectedCounter()
......
add_subdirectory(common)
add_subdirectory(geometry)
add_subdirectory(io)
add_subdirectory(magnitude)
add_subdirectory(occutilities)
add_subdirectory(precision)
add_subdirectory(sampling)
......@@ -16,8 +16,8 @@
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
#ifndef FRACKIT_PYTHON_MAGNITUDE_HH
#define FRACKIT_PYTHON_MAGNITUDE_HH
#ifndef FRACKIT_PYTHON_GEOMETRY_MAGNITUDE_HH
#define FRACKIT_PYTHON_GEOMETRY_MAGNITUDE_HH
#include <pybind11/pybind11.h>
......
install(FILES
magnitude.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/frackit/python/magnitude)
......@@ -2,7 +2,6 @@ add_subdirectory(common)
add_subdirectory(entitynetwork)
add_subdirectory(geometry)
add_subdirectory(io)
add_subdirectory(magnitude)
add_subdirectory(occutilities)
add_subdirectory(precision)
add_subdirectory(sampling)
......@@ -43,6 +43,7 @@
#include <frackit/python/geometry/distance.hh>
#include <frackit/python/geometry/distancetoboundary.hh>
#include <frackit/python/geometry/magnitude.hh>
#include <frackit/python/geometry/intersect.hh>
PYBIND11_MODULE(_geometry, module)
......@@ -83,6 +84,10 @@ PYBIND11_MODULE(_geometry, module)
Frackit::Python::registerComputeDistance<double>(module);
Frackit::Python::registerComputeDistanceToBoundary<double>(module);
// magnitude computation
Frackit::Python::registerMagnitude<double>(module);
Frackit::Python::registerContainedMagnitude<double>(module);
// intersection functions
Frackit::Python::registerIntersectionFunctions<double>(module);
}
frackit_symlink_or_copy(FILES __init__.py)
pybind11_add_module(_magnitude _magnitude.cc)
target_link_libraries(_magnitude PRIVATE ${OCC_LIBS})
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
#include <pybind11/pybind11.h>
#include <frackit/python/magnitude/magnitude.hh>
PYBIND11_MODULE(_magnitude, module)
{
Frackit::Python::registerMagnitude<double>(module);
Frackit::Python::registerContainedMagnitude<double>(module);
}
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