Skip to content
Snippets Groups Projects
Commit 21cccc53 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

prepare merge between JF and my new cad factory code

parent 04ced45d
No related branches found
No related tags found
No related merge requests found
......@@ -384,7 +384,6 @@ class GModel
int writeOCCSTEP(const std::string &name);
int writeOCCBREP(const std::string &name);
int importOCCShape(const void *shape);
void addShape(std::string name, std::vector<double> &p, std::string op);
// Gmsh mesh file format
int readMSH(const std::string &name);
......
......@@ -451,7 +451,7 @@ void OCC_Internals::loadShape(const TopoDS_Shape *s)
buildLists();
}
GVertex* OCC_Internals::addVertexToModel(GModel *model, TopoDS_Vertex vertex)
GVertex *OCC_Internals::addVertexToModel(GModel *model, TopoDS_Vertex vertex)
{
GVertex *gv = getOCCVertexByNativePtr(model, vertex);
if (gv) return gv;
......@@ -461,7 +461,7 @@ GVertex* OCC_Internals::addVertexToModel(GModel *model, TopoDS_Vertex vertex)
return gv;
}
GEdge * OCC_Internals::addEdgeToModel(GModel *model, TopoDS_Edge edge)
GEdge *OCC_Internals::addEdgeToModel(GModel *model, TopoDS_Edge edge)
{
GEdge *ge = getOCCEdgeByNativePtr(model, edge);
if (ge) return ge;
......@@ -475,7 +475,7 @@ GEdge * OCC_Internals::addEdgeToModel(GModel *model, TopoDS_Edge edge)
return e;
}
GEdge * OCC_Internals::addEdgeToModel(GModel *model, TopoDS_Edge edge, GVertex *g1,
GEdge *OCC_Internals::addEdgeToModel(GModel *model, TopoDS_Edge edge, GVertex *g1,
GVertex *g2)
{
OCCEdge *e = new OCCEdge(model, edge, model->maxEdgeNum() + 1, g1, g2);
......@@ -484,7 +484,7 @@ GEdge * OCC_Internals::addEdgeToModel(GModel *model, TopoDS_Edge edge, GVertex *
return e;
}
GFace* OCC_Internals::addFaceToModel(GModel *model, TopoDS_Face face, int i)
GFace *OCC_Internals::addFaceToModel(GModel *model, TopoDS_Face face, int i)
{
GFace *gf = getOCCFaceByNativePtr(model,face);
if (gf) return gf;
......@@ -510,26 +510,7 @@ GFace* OCC_Internals::addFaceToModel(GModel *model, TopoDS_Face face, int i)
return f;
}
GEntity* OCC_Internals::addShapeToModel(GModel *model, TopoDS_Shape sh)
{
TopExp_Explorer exp0, exp1, exp2;
std::vector<GEntity*> e;
for(exp0.Init(sh, TopAbs_SOLID); exp0.More(); exp0.Next()){
TopoDS_Solid solid = TopoDS::Solid(exp0.Current());
for(exp1.Init(exp0.Current(), TopAbs_SHELL); exp1.More(); exp1.Next()){
TopoDS_Shell shell = TopoDS::Shell(exp1.Current());
for(exp2.Init(shell, TopAbs_FACE); exp2.More(); exp2.Next()){
TopoDS_Face face = TopoDS::Face(exp2.Current());
addFaceToModel(model, face, -1);
}
}
OCCRegion *r = new OCCRegion(model, solid, model->maxRegionNum() + 1);
e.push_back(r);
}
return e[0];
}
GRegion* OCC_Internals::addRegionToModel(GModel *model, TopoDS_Solid region, int i)
GRegion *OCC_Internals::addRegionToModel(GModel *model, TopoDS_Solid region, int i)
{
if (i < 0){
TopExp_Explorer exp0, exp1, exp2;
......@@ -578,10 +559,6 @@ void OCC_Internals::buildGModel(GModel *model)
}
}
void OCC_Internals::removeAllDuplicates(const double &tolerance)
{
}
void addSimpleShapes(TopoDS_Shape theShape, TopTools_ListOfShape &theList)
{
if (theShape.ShapeType() != TopAbs_COMPOUND &&
......@@ -607,92 +584,8 @@ void addSimpleShapes(TopoDS_Shape theShape, TopTools_ListOfShape &theList)
}
}
void GModel::addShape(std::string name, std::vector<double> &p,
std::string op)
{
if (!_occ_internals)
_occ_internals = new OCC_Internals;
OCC_Internals::BooleanOperator o = OCC_Internals::Intersection;
if(op == "Cut") o = OCC_Internals::Cut;
else if(op == "Section") o = OCC_Internals::Section;
else if(op == "Fuse" || op == "Union") o = OCC_Internals::Fuse;
else if(op == "Intersection") o = OCC_Internals::Intersection;
try{
if (name == "Sphere"){
if (p.size() != 4){
Msg::Error("4 parameters have to be defined for a sphere");
return;
}
_occ_internals->Sphere(SPoint3(p[0],p[1],p[2]),p[3],o);
}
else if (name == "Cylinder"){
if (p.size() != 8){
Msg::Error("8 parameters have to be defined for a Cylinder");
return;
}
_occ_internals->Cylinder(SPoint3(p[0],p[1],p[2]),
SVector3(p[3],p[4],p[5]),p[6],p[7],o);
}
else if (name == "Torus"){
if (p.size() == 8){
_occ_internals->Torus(SPoint3(p[0],p[1],p[2]),
SVector3(p[3],p[4],p[5]),p[6],p[7],o);
}
else if (p.size() == 9){
_occ_internals->Torus(SPoint3(p[0],p[1],p[2]),
SVector3(p[3],p[4],p[5]),p[6],p[7],p[8],o);
}
else{
Msg::Error("Wrong number of parameters for a Torus (8 or 9 is OK)");
return;
}
}
else if (name == "Cone"){
if (p.size() != 9){
Msg::Error("9 parameters have to be defined for a Cone");
return;
}
_occ_internals->Cone(SPoint3(p[0],p[1],p[2]),
SVector3(p[3],p[4],p[5]),p[6],p[7],p[8],o);
}
else if (name == "Box"){
if (p.size() != 6){
Msg::Error("6 parameters have to be defined for a Box");
return;
}
_occ_internals->Box(SPoint3(p[0],p[1],p[2]),
SPoint3(p[3],p[4],p[5]),o);
}
else if (name == "Fillet"){
if (p.size() < 2){
Msg::Error("At least 2 parameters have to be defined for a Fillet");
return;
}
std::vector<TopoDS_Edge> edges;
for (unsigned int i = 0; i < p.size() - 1; i++){
GEdge *ge = getEdgeByTag((int)p[i]);
if (ge && ge->getNativeType() == GEntity::OpenCascadeModel){
edges.push_back(*(TopoDS_Edge*)ge->getNativePtr());
}
}
_occ_internals->Fillet(edges, p[p.size() - 1]);
}
else{
return;
}
destroy();
_occ_internals->buildLists();
_occ_internals->buildGModel(this);
}
catch(Standard_Failure &err){
Msg::Error("%s", err.GetMessageString());
}
}
TopoDS_Shape GlueFaces(const TopoDS_Shape &theShape,
const Standard_Real theTolerance)
static TopoDS_Shape GlueFaces(const TopoDS_Shape &theShape,
const Standard_Real theTolerance)
{
Msg::Error("glue !");
return theShape;
......@@ -741,7 +634,6 @@ TopoDS_Shape GlueFaces(const TopoDS_Shape &theShape,
void OCC_Internals::applyBooleanOperator(TopoDS_Shape tool, const BooleanOperator &op)
{
printf("coucou2\n");
if (tool.IsNull()) return;
if (shape.IsNull()) shape = tool;
else{
......@@ -923,102 +815,9 @@ void OCC_Internals::applyBooleanOperator(TopoDS_Shape tool, const BooleanOperato
}
}
void OCC_Internals::Sphere(const SPoint3 &center, const double &radius,
const BooleanOperator &op)
{
gp_Pnt aP(center.x(), center.y(), center.z());
TopoDS_Shape aShape = BRepPrimAPI_MakeSphere(aP, radius).Shape();
// either add it to the current shape, or use it as a tool and remove the
// sphere from the current shape
applyBooleanOperator(aShape, op);
}
void OCC_Internals::Cylinder(const SPoint3 &p, const SVector3 &d, double R, double H,
const BooleanOperator &op)
{
gp_Pnt aP(p.x(), p.y(), p.z());
gp_Vec aV(d.x(), d.y(), d.z());
gp_Ax2 anAxes(aP, aV);
BRepPrimAPI_MakeCylinder MC (anAxes, R, H);
MC.Build();
if (!MC.IsDone()) {
Msg::Error("Cylinder can't be computed from the given parameters");
return;
}
TopoDS_Shape aShape = MC.Shape();
if (aShape.IsNull()) return;
applyBooleanOperator(aShape, op);
}
void OCC_Internals::Torus(const SPoint3 &p, const SVector3 &d, double R1, double R2,
const BooleanOperator &op)
{
gp_Pnt aP(p.x(),p.y(),p.z());
gp_Vec aV(d.x(),d.y(),d.z());
gp_Ax2 anAxes (aP, aV);
BRepPrimAPI_MakeTorus MC (anAxes, R1, R2);
MC.Build();
if (!MC.IsDone()) {
Msg::Error("Torus can't be computed from the given parameters");
return;
}
TopoDS_Shape aShape = MC.Shape();
if (aShape.IsNull()) return;
applyBooleanOperator(aShape, op);
}
void OCC_Internals::Torus(const SPoint3 &p, const SVector3 &d, double R1, double R2,
double angle, const BooleanOperator &op)
{
gp_Pnt aP(p.x(), p.y(), p.z());
gp_Vec aV(d.x(), d.y(), d.z());
gp_Ax2 anAxes(aP, aV);
BRepPrimAPI_MakeTorus MC(anAxes, R1, R2, angle);
MC.Build();
if (!MC.IsDone()) {
Msg::Error("Torus can't be computed from the given parameters");
return;
}
TopoDS_Shape aShape = MC.Shape();
if (aShape.IsNull()) return;
applyBooleanOperator(aShape, op);
}
void OCC_Internals::Cone(const SPoint3 &p, const SVector3 &d, double R1,
double R2, double H, const BooleanOperator &op)
{
gp_Pnt aP(p.x(), p.y(), p.z());
gp_Vec aV(d.x(), d.y(), d.z());
gp_Ax2 anAxes(aP, aV);
BRepPrimAPI_MakeCone MC(anAxes, R1, R2, H);
MC.Build();
if (!MC.IsDone()) {
Msg::Error("Cone can't be computed from the given parameters");
return;
}
TopoDS_Shape aShape = MC.Shape();
if (aShape.IsNull()) return;
applyBooleanOperator(aShape, op);
}
void OCC_Internals::Box(const SPoint3 &p1, const SPoint3 &p2,
const BooleanOperator &op)
{
gp_Pnt P1(p1.x(), p1.y(), p1.z());
gp_Pnt P2(p2.x(), p2.y(), p2.z());
BRepPrimAPI_MakeBox MB(P1, P2);
MB.Build();
if (!MB.IsDone()) {
Msg::Error("Box can not be computed from the given point");
return;
}
TopoDS_Shape aShape = MB.Shape();
applyBooleanOperator(aShape, op);
}
void OCC_Internals::Fillet(std::vector<TopoDS_Edge> &edgesToFillet,
double Radius){
double Radius)
{
// create a tool for fillet
BRepFilletAPI_MakeFillet fill(shape);
for (unsigned int i = 0; i < edgesToFillet.size(); ++i){
......@@ -1154,11 +953,4 @@ int GModel::importOCCShape(const void *shape)
return 0;
}
void GModel::addShape(std::string name, std::vector<double> &p,
std::string op)
{
Msg::Error("Gmsh must be compiled with Open CASCADE support to apply "
"Boolean Operators On Solids");
}
#endif
......@@ -28,6 +28,11 @@ class OCC_Internals {
emap.Clear();
vmap.Clear();
}
TopoDS_Shape getShape () { return shape; }
void buildLists();
void buildShapeFromLists(TopoDS_Shape _shape);
const TopoDS_Shape *lookupInLists(TopoDS_Shape _shape);
void addShapeToLists(TopoDS_Shape shape);
void healGeometry(double tolerance, bool fixsmalledges,
bool fixspotstripfaces, bool sewfaces,
bool makesolids=false, bool connect=false);
......@@ -37,32 +42,14 @@ class OCC_Internals {
void writeSTEP(const char *);
void loadIGES(const char *);
void loadShape(const TopoDS_Shape *);
GVertex *addVertexToModel(GModel *model, TopoDS_Vertex v);
GEdge *addEdgeToModel(GModel *model, TopoDS_Edge e);
GEdge *addEdgeToModel(GModel *model, TopoDS_Edge e, GVertex *v1, GVertex *v2);
GFace *addFaceToModel(GModel *model, TopoDS_Face f, int i=-1);
GRegion *addRegionToModel(GModel *model, TopoDS_Solid r, int i=-1);
void buildGModel(GModel *gm);
GVertex * addVertexToModel(GModel *model, TopoDS_Vertex v);
GEdge * addEdgeToModel (GModel *model, TopoDS_Edge e);
GEdge * addEdgeToModel (GModel *model, TopoDS_Edge e, GVertex *v1, GVertex *v2);
GFace * addFaceToModel (GModel *model, TopoDS_Face f, int i=-1);
GRegion * addRegionToModel (GModel *model, TopoDS_Solid r, int i=-1);
GEntity * addShapeToModel (GModel *model, TopoDS_Shape);
void buildLists();
void addShapeToLists(TopoDS_Shape shape);
void buildShapeFromLists(TopoDS_Shape _shape);
const TopoDS_Shape *lookupInLists (TopoDS_Shape _shape);
void removeAllDuplicates(const double &tolerance);
void Box(const SPoint3 &p1, const SPoint3 &p2, const BooleanOperator &op);
void Sphere(const SPoint3 &center, const double &radius, const BooleanOperator &op);
void Cylinder(const SPoint3 &bottom_center, const SVector3 &dir, double R, double H,
const BooleanOperator &op);
void Cone(const SPoint3 &bottom_center, const SVector3 &dir, double R1, double R2,
double H, const BooleanOperator &op);
void Torus(const SPoint3 &bottom_center, const SVector3 &dir, double R1, double R2,
const BooleanOperator &op);
void Torus(const SPoint3 &bottom_center, const SVector3 &dir, double R1, double R2,
double angle, const BooleanOperator &op);
void Fillet(std::vector<TopoDS_Edge> &shapes, double radius);
void applyBooleanOperator(TopoDS_Shape tool, const BooleanOperator &op);
TopoDS_Shape getShape () {return shape;}
};
#endif
......
......@@ -167,7 +167,6 @@ MPI_Size return tMPI_Size;
Nurbs return tNurbs;
Order return tNurbsOrder;
OCCShape return tOCCShape;
Periodic return tPeriodic;
Physical return tPhysical;
......
This diff is collapsed.
......@@ -105,69 +105,68 @@
tUsing = 321,
tPlugin = 322,
tDegenerated = 323,
tOCCShape = 324,
tRotate = 325,
tTranslate = 326,
tSymmetry = 327,
tDilate = 328,
tExtrude = 329,
tLevelset = 330,
tLoop = 331,
tRecombine = 332,
tSmoother = 333,
tSplit = 334,
tDelete = 335,
tCoherence = 336,
tIntersect = 337,
tLayers = 338,
tHole = 339,
tAlias = 340,
tAliasWithOptions = 341,
tText2D = 342,
tText3D = 343,
tInterpolationScheme = 344,
tTime = 345,
tCombine = 346,
tBSpline = 347,
tBezier = 348,
tNurbs = 349,
tNurbsOrder = 350,
tNurbsKnots = 351,
tColor = 352,
tColorTable = 353,
tFor = 354,
tIn = 355,
tEndFor = 356,
tIf = 357,
tEndIf = 358,
tExit = 359,
tField = 360,
tReturn = 361,
tCall = 362,
tFunction = 363,
tShow = 364,
tHide = 365,
tGetValue = 366,
tGMSH_MAJOR_VERSION = 367,
tGMSH_MINOR_VERSION = 368,
tGMSH_PATCH_VERSION = 369,
tHomRank = 370,
tHomGen = 371,
tHomCut = 372,
tHomSeq = 373,
tAFFECTDIVIDE = 374,
tAFFECTTIMES = 375,
tAFFECTMINUS = 376,
tAFFECTPLUS = 377,
tOR = 378,
tAND = 379,
tNOTEQUAL = 380,
tEQUAL = 381,
tGREATEROREQUAL = 382,
tLESSOREQUAL = 383,
UNARYPREC = 384,
tMINUSMINUS = 385,
tPLUSPLUS = 386
tRotate = 324,
tTranslate = 325,
tSymmetry = 326,
tDilate = 327,
tExtrude = 328,
tLevelset = 329,
tLoop = 330,
tRecombine = 331,
tSmoother = 332,
tSplit = 333,
tDelete = 334,
tCoherence = 335,
tIntersect = 336,
tLayers = 337,
tHole = 338,
tAlias = 339,
tAliasWithOptions = 340,
tText2D = 341,
tText3D = 342,
tInterpolationScheme = 343,
tTime = 344,
tCombine = 345,
tBSpline = 346,
tBezier = 347,
tNurbs = 348,
tNurbsOrder = 349,
tNurbsKnots = 350,
tColor = 351,
tColorTable = 352,
tFor = 353,
tIn = 354,
tEndFor = 355,
tIf = 356,
tEndIf = 357,
tExit = 358,
tField = 359,
tReturn = 360,
tCall = 361,
tFunction = 362,
tShow = 363,
tHide = 364,
tGetValue = 365,
tGMSH_MAJOR_VERSION = 366,
tGMSH_MINOR_VERSION = 367,
tGMSH_PATCH_VERSION = 368,
tHomRank = 369,
tHomGen = 370,
tHomCut = 371,
tHomSeq = 372,
tAFFECTDIVIDE = 373,
tAFFECTTIMES = 374,
tAFFECTMINUS = 375,
tAFFECTPLUS = 376,
tOR = 377,
tAND = 378,
tNOTEQUAL = 379,
tEQUAL = 380,
tGREATEROREQUAL = 381,
tLESSOREQUAL = 382,
UNARYPREC = 383,
tMINUSMINUS = 384,
tPLUSPLUS = 385
};
#endif
/* Tokens. */
......@@ -237,69 +236,68 @@
#define tUsing 321
#define tPlugin 322
#define tDegenerated 323
#define tOCCShape 324
#define tRotate 325
#define tTranslate 326
#define tSymmetry 327
#define tDilate 328
#define tExtrude 329
#define tLevelset 330
#define tLoop 331
#define tRecombine 332
#define tSmoother 333
#define tSplit 334
#define tDelete 335
#define tCoherence 336
#define tIntersect 337
#define tLayers 338
#define tHole 339
#define tAlias 340
#define tAliasWithOptions 341
#define tText2D 342
#define tText3D 343
#define tInterpolationScheme 344
#define tTime 345
#define tCombine 346
#define tBSpline 347
#define tBezier 348
#define tNurbs 349
#define tNurbsOrder 350
#define tNurbsKnots 351
#define tColor 352
#define tColorTable 353
#define tFor 354
#define tIn 355
#define tEndFor 356
#define tIf 357
#define tEndIf 358
#define tExit 359
#define tField 360
#define tReturn 361
#define tCall 362
#define tFunction 363
#define tShow 364
#define tHide 365
#define tGetValue 366
#define tGMSH_MAJOR_VERSION 367
#define tGMSH_MINOR_VERSION 368
#define tGMSH_PATCH_VERSION 369
#define tHomRank 370
#define tHomGen 371
#define tHomCut 372
#define tHomSeq 373
#define tAFFECTDIVIDE 374
#define tAFFECTTIMES 375
#define tAFFECTMINUS 376
#define tAFFECTPLUS 377
#define tOR 378
#define tAND 379
#define tNOTEQUAL 380
#define tEQUAL 381
#define tGREATEROREQUAL 382
#define tLESSOREQUAL 383
#define UNARYPREC 384
#define tMINUSMINUS 385
#define tPLUSPLUS 386
#define tRotate 324
#define tTranslate 325
#define tSymmetry 326
#define tDilate 327
#define tExtrude 328
#define tLevelset 329
#define tLoop 330
#define tRecombine 331
#define tSmoother 332
#define tSplit 333
#define tDelete 334
#define tCoherence 335
#define tIntersect 336
#define tLayers 337
#define tHole 338
#define tAlias 339
#define tAliasWithOptions 340
#define tText2D 341
#define tText3D 342
#define tInterpolationScheme 343
#define tTime 344
#define tCombine 345
#define tBSpline 346
#define tBezier 347
#define tNurbs 348
#define tNurbsOrder 349
#define tNurbsKnots 350
#define tColor 351
#define tColorTable 352
#define tFor 353
#define tIn 354
#define tEndFor 355
#define tIf 356
#define tEndIf 357
#define tExit 358
#define tField 359
#define tReturn 360
#define tCall 361
#define tFunction 362
#define tShow 363
#define tHide 364
#define tGetValue 365
#define tGMSH_MAJOR_VERSION 366
#define tGMSH_MINOR_VERSION 367
#define tGMSH_PATCH_VERSION 368
#define tHomRank 369
#define tHomGen 370
#define tHomCut 371
#define tHomSeq 372
#define tAFFECTDIVIDE 373
#define tAFFECTTIMES 374
#define tAFFECTMINUS 375
#define tAFFECTPLUS 376
#define tOR 377
#define tAND 378
#define tNOTEQUAL 379
#define tEQUAL 380
#define tGREATEROREQUAL 381
#define tLESSOREQUAL 382
#define UNARYPREC 383
#define tMINUSMINUS 384
#define tPLUSPLUS 385
......@@ -317,7 +315,7 @@ typedef union YYSTYPE
List_T *l;
}
/* Line 1529 of yacc.c. */
#line 321 "Gmsh.tab.hpp"
#line 319 "Gmsh.tab.hpp"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
......
......@@ -104,7 +104,7 @@ fullMatrix<double> ListOfListOfDouble2Matrix(List_T *list);
%token tPoint tCircle tEllipse tLine tSphere tPolarSphere tSurface tSpline tVolume
%token tCharacteristic tLength tParametric tElliptic
%token tPlane tRuled tTransfinite tComplex tPhysical tCompound tPeriodic
%token tUsing tPlugin tDegenerated tOCCShape
%token tUsing tPlugin tDegenerated
%token tRotate tTranslate tSymmetry tDilate tExtrude tLevelset
%token tLoop tRecombine tSmoother tSplit tDelete tCoherence tIntersect
%token tLayers tHole tAlias tAliasWithOptions
......@@ -1573,20 +1573,6 @@ Shape :
$$.Type = MSH_VOLUME;
$$.Num = num;
}
| tOCCShape '(' tBIGSTR ',' ListOfDouble ',' tBIGSTR ')' tEND
{
#if defined(HAVE_OCC)
std::vector<double> data;
for (int i = 0 ; i < List_Nbr($5); i++){
double d; List_Read($5, i, &d);
data.push_back(d);
}
GModel::current()->addShape($3, data, $7);
Free($3); Free($7);
List_Delete($5);
#endif
}
| tCompound tVolume '(' FExpr ')' tAFFECT ListOfDouble tEND
{
int num = (int)$4;
......
This diff is collapsed.
L = 100;
H = 30;
Z = 10;
OCCShape("Box",{0,0,0,L,H,Z},"none");
R = 4;
OCCShape("Fillet",{1:12,R},"none");
OCCShape("Cone",{0*L/2,H/2,-Z,0,0,1,.3*R,2*R,3*Z},"Fuse");
OCCShape("Fillet",{1,R},"none");
OCCShape("Fillet",{14,R/8},"none");
OCCShape("Cone",{0.99*L/2,H/2,-Z,0,0,1,.3*R,2*R,3*Z},"Fuse");
OCCShape("Fillet",{1,R},"none");
OCCShape("Fillet",{83,R/8},"none");
OCCShape("Cone",{0.99*L,H/2,-Z,0,0,1,3*R,.2*R,3*Z},"Cut");
//Mesh.CharacteristicLengthFactor=0.15;
L = 100;
H = 30;
Z = 10;
OCCShape("Box",{0,0,0,L,H,Z},"none");
R = 10;
X = 5;
For I In {0:5}
OCCShape("Cylinder",{2*I*X,H/2,-3*Z,0,0,1,R,6*Z},"Cut");
EndFor
OCCShape("Sphere",{H-X,H/2,Z/2,R},"Fuse");
OCCShape("Torus",{L,H/2,Z/2,0,0,1,2*R,R/2},"Fuse");
//Compound Surface(100) = {1 ... 26};
Mesh.CharacteristicLengthFactor=0.1;
X = 12;
For I In {0:1}
OCCShape("Torus",{2*I*X,0,0,0,0,1,10,4},"Fuse");
OCCShape("Torus",{2*I*X,24,0,0,0,1,10,4},"Fuse");
OCCShape("Torus",{2*I*X,48,0,0,0,1,10,4},"Fuse");
EndFor
//Compound Surface(100) = {1,2,3,4,5,6,7,8,9};
OCCShape("Box",{0,0,0,1,1,1},"none");
OCCShape("Box",{1,0.5,0.5,2,1.5,1.5},"Union");
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment