Any restrictions on path points that gets passed to:
Code: Select all
Procedural::Extruder().setExtrusionPath(&p).setShapeToExtrude(&s).realizeMesh(entityName);
When I tested this by explicitly giving it points it works fine:
Code: Select all
scene = self.graphics.sceneManager;
Procedural::Root::getInstance()->sceneManager = scene;
Procedural::Path p = Procedural::BezierPath().setNumSeg(10).addPoint(0,5,0).addPoint(0,4,10).addPoint(10,5,10).realizePath();
Procedural::Shape s = Procedural::CircleShape().setRadius(0.5).realizeShape();
Procedural::Extruder().setExtrusionPath(&p).setShapeToExtrude(&s).realizeMesh("extrudedMesh");
But when I pass it these points it keeps crashing:
- X val : -2.910990 Y Val: -4.508870 Z Val: 0.019630
X val : -2.319500 Y Val: -4.533808 Z Val: -0.365461
X val : -1.546001 Y Val: -4.527168 Z Val: -0.424392
X val : -0.503734 Y Val: -4.301475 Z Val: 0.075474
X val : 0.791556 Y Val: -3.951742 Z Val: 0.121817
X val : 1.915843 Y Val: -3.756075 Z Val: 0.068665
X val : 2.981975 Y Val: -3.670143 Z Val: 0.531683
X val : 3.963867 Y Val: -3.583679 Z Val: 1.248001
X val : 4.601315 Y Val: -3.625022 Z Val: 1.519513
X val : 5.607715 Y Val: -3.107523 Z Val: 1.994461
The crash happens in ProceduralExtruder.h when it sets the extrusion path:
Code: Select all
/** Sets the extrusion path */
inline Extruder & setExtrusionPath(Path* extrusionPath)
{
mExtrusionPath = extrusionPath;
return *this;
}
It happens when the return is called. Using the debugger, extrusionPath variable has all the points, mExtrusionPath gets them fine, but when "return *this" gets executed, I get EXC_BAD_ACCESS. Not sure what is going on ... if some thing is missing or what
Any helps is greatly appreciate it,
Afshin