Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
4a9f83e4
Commit
4a9f83e4
authored
8 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
better syntax for pipes
parent
e019288a
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Parser/Gmsh.tab.cpp
+3049
-3155
3049 additions, 3155 deletions
Parser/Gmsh.tab.cpp
Parser/Gmsh.y
+6
-6
6 additions, 6 deletions
Parser/Gmsh.y
demos/boolean/pipe.geo
+1
-1
1 addition, 1 deletion
demos/boolean/pipe.geo
with
3056 additions
and
3162 deletions
Parser/Gmsh.tab.cpp
+
3049
−
3155
View file @
4a9f83e4
This diff is collapsed.
Click to expand it.
Parser/Gmsh.y
+
6
−
6
View file @
4a9f83e4
...
@@ -4254,19 +4254,19 @@ Extrude :
...
@@ -4254,19 +4254,19 @@ Extrude :
&extr, $$);
&extr, $$);
List_Delete($3);
List_Delete($3);
}
}
| t
Pip
e '{' ListOf
Double '}'
'{' ListOf
Shapes
'}'
| t
Extrud
e '{' ListOf
Shapes '}' tUsing tLine
'{' ListOf
Double
'}'
{
{
$$ = List_Create(2, 1, sizeof(Shape));
$$ = List_Create(2, 1, sizeof(Shape));
if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){
if(factory == "OpenCASCADE" && GModel::current()->getOCCInternals()){
std::vector<int> edges;
std::vector<int> edges;
std::vector<int> in[4], out[4];
std::vector<int> in[4], out[4];
for(int i = 0; i < List_Nbr($
3
); i++){
for(int i = 0; i < List_Nbr($
8
); i++){
double d; List_Read($
3
, i, &d);
double d; List_Read($
8
, i, &d);
edges.push_back((int)d);
edges.push_back((int)d);
}
}
Shape TheShape;
Shape TheShape;
for(int i = 0; i < List_Nbr($
6
); i++){
for(int i = 0; i < List_Nbr($
3
); i++){
List_Read($
6
, i, &TheShape);
List_Read($
3
, i, &TheShape);
int dim = TheShape.Type / 100 - 1;
int dim = TheShape.Type / 100 - 1;
if(dim >= 0 && dim <= 3) in[dim].push_back(TheShape.Num);
if(dim >= 0 && dim <= 3) in[dim].push_back(TheShape.Num);
}
}
...
@@ -4285,7 +4285,7 @@ Extrude :
...
@@ -4285,7 +4285,7 @@ Extrude :
yymsg(0, "Pipe only available with OpenCASCADE factory");
yymsg(0, "Pipe only available with OpenCASCADE factory");
}
}
List_Delete($3);
List_Delete($3);
List_Delete($
6
);
List_Delete($
8
);
}
}
// Deprecated extrude commands (for backward compatibility)
// Deprecated extrude commands (for backward compatibility)
| tExtrude tPoint '{' FExpr ',' VExpr '}' tEND
| tExtrude tPoint '{' FExpr ',' VExpr '}' tEND
...
...
This diff is collapsed.
Click to expand it.
demos/boolean/pipe.geo
+
1
−
1
View file @
4a9f83e4
...
@@ -35,5 +35,5 @@ For i In {0:5}
...
@@ -35,5 +35,5 @@ For i In {0:5}
EndFor
EndFor
BSpline
(
100
)
=
{
100
:
105
};
BSpline
(
100
)
=
{
100
:
105
};
a
()
=
Pipe
{
100
}
{
Surface
{
1
:
5
};
};
a
()
=
Extrude
{
Surface
{
1
:
5
};
}
Using
Line
{
100
}
;
Delete
{
Surface
{
1
:
5
};
}
Delete
{
Surface
{
1
:
5
};
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment