| offsetting a solid |
 |
| hylkema |
2012/10/19 19:34 |
Hello all, I'm trying to offset a solid in order to cut it with a cylinder (to simulate the regression in a star shaped solid propellant grain). The idea is to offset the kernel, cut it with the cylinder and then offset some more ...
for (int i = 1;i<20;i++) {
Kernel = offset(0.1,Kernel);
Bloc = BRepAlgoAPI_Cut(Bloc,Kernel);
fileName.str("");
fileName<<"bloc_"<<i<<".stp";
WriteStep(fileName.str(),Bloc);
fileName.str("");
fileName<<"kernel_"<<i<<".stp";
WriteStep(fileName.str(),Kernel);
}
with offset as :
TopoDS_Shape Model2::offset(double dist,TopoDS_Shape original) {
double res = Precision::Confusion();
BRepOffset_MakeOffset mkOffset(original,dist,res);
TopoDS_Shape tmp = mkOffset.Shape();
return tmp;
}
This works for the first few itteration but that I have an instance of 'Standard_ConstructionError'
The kernel is defined in the attached file. All help is greatly appreciated
Jouke
|
|
You have to be logged in to download the attached file
|
 |
| | | |