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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
3ea15b8b
Commit
3ea15b8b
authored
8 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
fix compile
parent
8efeb635
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Geo/GModelIO_OCC.cpp
+9
-6
9 additions, 6 deletions
Geo/GModelIO_OCC.cpp
Geo/GModelIO_OCC.h
+5
-4
5 additions, 4 deletions
Geo/GModelIO_OCC.h
with
14 additions
and
10 deletions
Geo/GModelIO_OCC.cpp
+
9
−
6
View file @
3ea15b8b
...
...
@@ -31,6 +31,7 @@
#include
<BRepBuilderAPI_MakeVertex.hxx>
#include
<BRepBuilderAPI_MakeWire.hxx>
#include
<BRepBuilderAPI_Sewing.hxx>
#include
<BRepBuilderAPI_Transform.hxx>
#include
<BRepCheck_Analyzer.hxx>
#include
<BRepFilletAPI_MakeFillet.hxx>
#include
<BRepGProp.hxx>
...
...
@@ -43,6 +44,8 @@
#include
<BRepPrimAPI_MakeBox.hxx>
#include
<BRepPrimAPI_MakeCone.hxx>
#include
<BRepPrimAPI_MakeCylinder.hxx>
#include
<BRepPrimAPI_MakePrism.hxx>
#include
<BRepPrimAPI_MakeRevol.hxx>
#include
<BRepPrimAPI_MakeSphere.hxx>
#include
<BRepPrimAPI_MakeTorus.hxx>
#include
<BRepPrimAPI_MakeWedge.hxx>
...
...
@@ -1863,7 +1866,7 @@ void OCC_Internals::applyBooleanOperator
}
void
OCC_Internals
::
_transform
(
const
std
::
vector
<
std
::
pair
<
int
,
int
>
>
&
inDimTags
,
BRepBuilderAPI_Transform
&
tfo
)
BRepBuilderAPI_Transform
*
tfo
)
{
for
(
unsigned
int
i
=
0
;
i
<
inDimTags
.
size
();
i
++
){
int
dim
=
inDimTags
[
i
].
first
;
...
...
@@ -1873,12 +1876,12 @@ void OCC_Internals::_transform(const std::vector<std::pair<int, int> > &inDimTag
dim
,
tag
);
return
;
}
tfo
.
Perform
(
find
(
dim
,
tag
),
Standard_False
);
if
(
!
tfo
.
IsDone
()){
tfo
->
Perform
(
find
(
dim
,
tag
),
Standard_False
);
if
(
!
tfo
->
IsDone
()){
Msg
::
Error
(
"Could not apply transformation"
);
return
;
}
bind
(
tfo
.
Shape
(),
dim
,
tag
);
bind
(
tfo
->
Shape
(),
dim
,
tag
);
}
}
...
...
@@ -1888,7 +1891,7 @@ void OCC_Internals::translate(const std::vector<std::pair<int, int> > &inDimTags
gp_Trsf
t
;
t
.
SetTranslation
(
gp_Pnt
(
0
,
0
,
0
),
gp_Pnt
(
dx
,
dy
,
dz
));
BRepBuilderAPI_Transform
tfo
(
t
);
_transform
(
inDimTags
,
tfo
);
_transform
(
inDimTags
,
&
tfo
);
}
void
OCC_Internals
::
rotate
(
const
std
::
vector
<
std
::
pair
<
int
,
int
>
>
&
inDimTags
,
...
...
@@ -1899,7 +1902,7 @@ void OCC_Internals::rotate(const std::vector<std::pair<int, int> > &inDimTags,
gp_Ax1
axisOfRevolution
(
gp_Pnt
(
x
,
y
,
z
),
gp_Dir
(
ax
,
ay
,
az
));
t
.
SetRotation
(
axisOfRevolution
,
angle
);
BRepBuilderAPI_Transform
tfo
(
t
);
_transform
(
inDimTags
,
tfo
);
_transform
(
inDimTags
,
&
tfo
);
}
void
OCC_Internals
::
copy
(
const
std
::
vector
<
std
::
pair
<
int
,
int
>
>
&
inDimTags
,
...
...
This diff is collapsed.
Click to expand it.
Geo/GModelIO_OCC.h
+
5
−
4
View file @
3ea15b8b
...
...
@@ -28,11 +28,12 @@ class ExtrudeParams;
#include
<TopTools_DataMapOfShapeInteger.hxx>
#include
<TopTools_DataMapOfIntegerShape.hxx>
#include
<TopTools_ShapeMapHasher.hxx>
#include
<BRepBuilderAPI_Transform.hxx>
#include
<BRepPrimAPI_MakePrism.hxx>
#include
<BRepPrimAPI_MakeRevol.hxx>
#include
<NCollection_DataMap.hxx>
class
BRepPrimAPI_MakePrism
;
class
BRepPrimAPI_MakeRevol
;
class
BRepBuilderAPI_Transform
;
class
OCC_Internals
{
public:
enum
BooleanOperator
{
Union
,
Intersection
,
Difference
,
Section
,
Fragments
};
...
...
@@ -82,7 +83,7 @@ class OCC_Internals {
// apply a geometrical transformation
void
_transform
(
const
std
::
vector
<
std
::
pair
<
int
,
int
>
>
&
inDimTags
,
BRepBuilderAPI_Transform
&
tfo
);
BRepBuilderAPI_Transform
*
tfo
);
// add circle or ellipse arc
void
_addArc
(
int
tag
,
int
startTag
,
int
centerTag
,
int
endTag
,
int
mode
);
...
...
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