Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

offsetting a solid

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
 
 
Latest news
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map