fix subassembly transformation bug
This commit is contained in:
parent
14c20fbe89
commit
bf8d5e7aa9
|
@ -56,6 +56,7 @@ short ItemAssembly::mustExecute() const {
|
|||
App::DocumentObjectExecReturn* ItemAssembly::execute(void) {
|
||||
|
||||
try {
|
||||
|
||||
//create a solver and init all child assemblys with subsolvers
|
||||
m_solver = boost::shared_ptr<Solver>(new Solver);
|
||||
init(boost::shared_ptr<Solver>());
|
||||
|
|
|
@ -174,11 +174,7 @@ boost::shared_ptr< Geometry3D > ItemPart::getGeometry3D(const char* Type)
|
|||
return boost::shared_ptr< Geometry3D >();
|
||||
}
|
||||
};
|
||||
/*
|
||||
std::stringstream s;
|
||||
s<<geometry->m_global;
|
||||
Base::Console().Message("Added geom: %s, %s\n", Type, s.str().c_str());
|
||||
*/
|
||||
|
||||
return geometry;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#include <opendcm/core/kernel.hpp>
|
||||
#include "defines.hpp"
|
||||
|
||||
#include "Base/Console.h"
|
||||
|
||||
#define MAXFAKTOR 1.2 //the maximal distance allowd by a point normed to the cluster size
|
||||
#define MINFAKTOR 0.8 //the minimal distance allowd by a point normed to the cluster size
|
||||
#define SKALEFAKTOR 1. //the faktor by which the biggest size is multiplied to get the scale value
|
||||
|
@ -436,7 +438,11 @@ void ClusterMath<Sys>::map_downstream::operator()(Geom g) {
|
|||
|
||||
template<typename Sys>
|
||||
void ClusterMath<Sys>::map_downstream::operator()(boost::shared_ptr<Cluster> c) {
|
||||
m_transform *= c->template getClusterProperty<math_prop>().getTransform().inverse();
|
||||
//we transform the GLOBAL geometries to local ones in the subcluster! therefore
|
||||
//we are not interested in the successive transformations, we only transform the
|
||||
//global geometries with the cluster transform we want them to be local in, and thats
|
||||
//the one supplied in the constructor
|
||||
//m_transform *= c->template getClusterProperty<math_prop>().getTransform().inverse();
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -314,8 +314,8 @@ ModulePart<Typelist, ID>::type<Sys>::Part_base::addGeometry3D(const T& geom, Coo
|
|||
//we need to collect all transforms up to this part!
|
||||
Transform t;
|
||||
transform_traverse(t, m_cluster);
|
||||
|
||||
g->transform(t);
|
||||
|
||||
g->transform(t);
|
||||
}
|
||||
|
||||
fusion::vector<LocalVertex, GlobalVertex> res = m_cluster->addVertex();
|
||||
|
|
Loading…
Reference in New Issue
Block a user