mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 15:53:00 +00:00
tree ray intersection
This commit is contained in:
@@ -69,6 +69,8 @@
|
||||
%include "../serializers/SvgSerializer.h"
|
||||
%include "../serializers/WavefrontObjSerializer.h"
|
||||
|
||||
%template(ray_intersection_results) std::vector<IfcGeom::ray_intersection_result>;
|
||||
|
||||
// A Template instantantation should be defined before it is used as a base class.
|
||||
// But frankly I don't care as most methods are subtlely different anyway.
|
||||
%include "../ifcgeom/IfcGeomTree.h"
|
||||
|
||||
@@ -217,6 +217,17 @@ CREATE_VECTOR_TYPEMAP_IN(std::string, STRING, str)
|
||||
$1 = new gp_Pnt(ds[0], ds[1], ds[2]);
|
||||
}
|
||||
|
||||
%typemap(in) const gp_Dir& {
|
||||
if (!check_aggregate_of_type($input, get_python_type<double>())) {
|
||||
SWIG_exception(SWIG_TypeError, "<Direction> type needs a python sequence of 3 floats");
|
||||
}
|
||||
std::vector<double> ds = python_sequence_as_vector<double>($input);
|
||||
if (ds.size() != 3) {
|
||||
SWIG_exception(SWIG_TypeError, "<Direction> type needs a python sequence of 3 floats");
|
||||
}
|
||||
$1 = new gp_Dir(ds[0], ds[1], ds[2]);
|
||||
}
|
||||
|
||||
%typemap(in) const Bnd_Box& {
|
||||
if (!check_aggregate_of_aggregate_of_type($input, get_python_type<double>())) {
|
||||
SWIG_exception(SWIG_TypeError, "<AABB> type needs a python sequence of 2 x 3 floats");
|
||||
@@ -237,6 +248,10 @@ CREATE_VECTOR_TYPEMAP_IN(std::string, STRING, str)
|
||||
$1 = check_aggregate_of_type($input, get_python_type<double>());
|
||||
}
|
||||
|
||||
%typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) const gp_Dir& {
|
||||
$1 = check_aggregate_of_type($input, get_python_type<double>());
|
||||
}
|
||||
|
||||
%typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) const Bnd_Box& {
|
||||
$1 = check_aggregate_of_aggregate_of_type($input, get_python_type<double>());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user