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
a44c87e3
Commit
a44c87e3
authored
18 years ago
by
Jean-François Remacle
Browse files
Options
Downloads
Patches
Plain Diff
OCC regions added
parent
cb6ecc80
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Geo/OCCRegion.cpp
+56
-0
56 additions, 0 deletions
Geo/OCCRegion.cpp
Geo/OCCRegion.h
+37
-0
37 additions, 0 deletions
Geo/OCCRegion.h
with
93 additions
and
0 deletions
Geo/OCCRegion.cpp
0 → 100644
+
56
−
0
View file @
a44c87e3
// $Id: OCCRegion.cpp,v 1.1 2006-11-15 14:36:39 remacle Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems to <OCC@geuz.org>.
#ifdef _HAVE_OCC_
#include
"GModel.h"
#include
"OCCVertex.h"
#include
"OCCEdge.h"
#include
"OCCFace.h"
#include
"OCCRegion.h"
#include
"Message.h"
OCCRegion
::
OCCRegion
(
GModel
*
m
,
TopoDS_Solid
_s
,
int
num
,
TopTools_IndexedMapOfShape
&
fmap
)
:
GRegion
(
m
,
num
),
s
(
_s
)
{
TopExp_Explorer
exp0
,
exp01
,
exp1
,
exp2
,
exp3
;
for
(
exp2
.
Init
(
s
,
TopAbs_SHELL
);
exp2
.
More
();
exp2
.
Next
())
{
TopoDS_Shape
shell
=
exp2
.
Current
();
Msg
(
INFO
,
"OCC Region %d - New Shell"
,
num
);
for
(
exp3
.
Init
(
shell
,
TopAbs_FACE
);
exp3
.
More
();
exp3
.
Next
())
{
TopoDS_Face
face
=
TopoDS
::
Face
(
exp3
.
Current
());
int
index
=
fmap
.
FindIndex
(
face
);
GFace
*
f
=
m
->
faceByTag
(
index
);
if
(
!
f
)
throw
;
l_faces
.
push_back
(
f
);
f
->
addRegion
(
this
);
}
}
Msg
(
INFO
,
"OCC Region %d with %d edges"
,
num
,
l_faces
.
size
());
}
GEntity
::
GeomType
OCCRegion
::
geomType
()
const
{
return
Unknown
;
}
#endif
This diff is collapsed.
Click to expand it.
Geo/OCCRegion.h
0 → 100644
+
37
−
0
View file @
a44c87e3
#ifndef _OCC_REGION_H_
#define _OCC_REGION_H_
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.
//
// Please report all bugs and problems to <gmsh@geuz.org>.
#include
"Mesh.h"
#include
"GRegion.h"
class
OCCRegion
:
public
GRegion
{
protected:
TopoDS_Solid
s
;
public:
OCCRegion
(
GModel
*
m
,
TopoDS_Solid
s
,
int
num
,
TopTools_IndexedMapOfShape
&
fmap
);
virtual
~
OCCRegion
()
{}
virtual
GeomType
geomType
()
const
;
ModelType
getNativeType
()
const
{
return
OpenCascadeModel
;
}
void
*
getNativePtr
()
const
{
return
(
void
*
)
&
s
;
}
};
#endif
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