Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
meshmode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiaoyu Wei
meshmode
Commits
ab5a5a41
Commit
ab5a5a41
authored
9 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Add circle mesh test
parent
003f0dbe
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/circle.step
+85
-0
85 additions, 0 deletions
test/circle.step
test/test_meshmode.py
+23
-0
23 additions, 0 deletions
test/test_meshmode.py
with
108 additions
and
0 deletions
test/circle.step
0 → 100644
+
85
−
0
View file @
ab5a5a41
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('FreeCAD Model'),'2;1');
FILE_NAME('/home/andreas/own/graphics/freecad/circle.step',
'2015-04-28T14:41:10',('FreeCAD'),('FreeCAD'),
'Open CASCADE STEP processor 6.7','FreeCAD','Unknown');
FILE_SCHEMA(('AUTOMOTIVE_DESIGN_CC2 { 1 2 10303 214 -1 1 5 4 }'));
ENDSEC;
DATA;
#1 = APPLICATION_PROTOCOL_DEFINITION('committee draft',
'automotive_design',1997,#2);
#2 = APPLICATION_CONTEXT(
'core data for automotive mechanical design processes');
#3 = SHAPE_DEFINITION_REPRESENTATION(#4,#10);
#4 = PRODUCT_DEFINITION_SHAPE('','',#5);
#5 = PRODUCT_DEFINITION('design','',#6,#9);
#6 = PRODUCT_DEFINITION_FORMATION('','',#7);
#7 = PRODUCT('Circle001','Circle001','',(#8));
#8 = MECHANICAL_CONTEXT('',#2,'mechanical');
#9 = PRODUCT_DEFINITION_CONTEXT('part definition',#2,'design');
#10 = MANIFOLD_SURFACE_SHAPE_REPRESENTATION('',(#11,#15),#46);
#11 = AXIS2_PLACEMENT_3D('',#12,#13,#14);
#12 = CARTESIAN_POINT('',(0.,0.,0.));
#13 = DIRECTION('',(0.,0.,1.));
#14 = DIRECTION('',(1.,0.,-0.));
#15 = SHELL_BASED_SURFACE_MODEL('',(#16));
#16 = OPEN_SHELL('',(#17));
#17 = ADVANCED_FACE('',(#18),#31,.T.);
#18 = FACE_BOUND('',#19,.F.);
#19 = EDGE_LOOP('',(#20));
#20 = ORIENTED_EDGE('',*,*,#21,.T.);
#21 = EDGE_CURVE('',#22,#22,#24,.T.);
#22 = VERTEX_POINT('',#23);
#23 = CARTESIAN_POINT('',(2.E-04,0.,0.));
#24 = SURFACE_CURVE('',#25,(#30),.PCURVE_S1.);
#25 = CIRCLE('',#26,2.E-04);
#26 = AXIS2_PLACEMENT_3D('',#27,#28,#29);
#27 = CARTESIAN_POINT('',(0.,0.,0.));
#28 = DIRECTION('',(0.,0.,1.));
#29 = DIRECTION('',(1.,0.,0.));
#30 = PCURVE('',#31,#36);
#31 = PLANE('',#32);
#32 = AXIS2_PLACEMENT_3D('',#33,#34,#35);
#33 = CARTESIAN_POINT('',(2.E-04,0.,0.));
#34 = DIRECTION('',(0.,0.,-1.));
#35 = DIRECTION('',(-1.,0.,0.));
#36 = DEFINITIONAL_REPRESENTATION('',(#37),#45);
#37 = ( BOUNDED_CURVE() B_SPLINE_CURVE(2,(#38,#39,#40,#41,#42,#43,#44),
.UNSPECIFIED.,.F.,.F.) B_SPLINE_CURVE_WITH_KNOTS((1,2,2,2,2,1),(
-2.094395102393,0.,2.094395102393,4.188790204786,6.28318530718,
8.377580409573),.UNSPECIFIED.) CURVE() GEOMETRIC_REPRESENTATION_ITEM()
RATIONAL_B_SPLINE_CURVE((1.,0.5,1.,0.5,1.,0.5,1.)) REPRESENTATION_ITEM(
'') );
#38 = CARTESIAN_POINT('',(0.,0.));
#39 = CARTESIAN_POINT('',(0.,3.464101615138E-04));
#40 = CARTESIAN_POINT('',(3.E-04,1.732050807569E-04));
#41 = CARTESIAN_POINT('',(6.E-04,4.898587196589E-20));
#42 = CARTESIAN_POINT('',(3.E-04,-1.732050807569E-04));
#43 = CARTESIAN_POINT('',(2.981555974335E-19,-3.464101615138E-04));
#44 = CARTESIAN_POINT('',(0.,0.));
#45 = ( GEOMETRIC_REPRESENTATION_CONTEXT(2)
PARAMETRIC_REPRESENTATION_CONTEXT() REPRESENTATION_CONTEXT('2D SPACE',''
) );
#46 = ( GEOMETRIC_REPRESENTATION_CONTEXT(3)
GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#50)) GLOBAL_UNIT_ASSIGNED_CONTEXT(
(#47,#48,#49)) REPRESENTATION_CONTEXT('Context #1',
'3D Context with UNIT and UNCERTAINTY') );
#47 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT($,.METRE.) );
#48 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) );
#49 = ( NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT() );
#50 = UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-10),#47,
'distance_accuracy_value','confusion accuracy');
#51 = PRODUCT_TYPE('part',$,(#7));
#52 = MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION('',(#53),
#46);
#53 = STYLED_ITEM('color',(#54),#17);
#54 = PRESENTATION_STYLE_ASSIGNMENT((#55));
#55 = SURFACE_STYLE_USAGE(.BOTH.,#56);
#56 = SURFACE_SIDE_STYLE('',(#57));
#57 = SURFACE_STYLE_FILL_AREA(#58);
#58 = FILL_AREA_STYLE('',(#59));
#59 = FILL_AREA_STYLE_COLOUR('',#60);
#60 = COLOUR_RGB('',0.800000011921,0.800000011921,0.800000011921);
ENDSEC;
END-ISO-10303-21;
This diff is collapsed.
Click to expand it.
test/test_meshmode.py
+
23
−
0
View file @
ab5a5a41
...
...
@@ -39,6 +39,29 @@ import logging
logger
=
logging
.
getLogger
(
__name__
)
def
test_circle_mesh
(
do_plot
=
False
):
from
meshmode.mesh.io
import
generate_gmsh
,
FileSource
print
(
"
BEGIN GEN
"
)
mesh
=
generate_gmsh
(
FileSource
(
"
circle.step
"
),
2
,
order
=
2
,
force_ambient_dim
=
2
,
other_options
=
[
"
-string
"
,
"
Mesh.CharacteristicLengthMax = 0.05;
"
]
)
print
(
"
END GEN
"
)
print
(
mesh
.
nelements
)
from
meshmode.mesh.processing
import
affine_map
mesh
=
affine_map
(
mesh
,
A
=
3
*
np
.
eye
(
2
))
if
do_plot
:
from
meshmode.mesh.visualization
import
draw_2d_mesh
draw_2d_mesh
(
mesh
,
fill
=
None
,
draw_connectivity
=
True
,
set_bounding_box
=
True
)
import
matplotlib.pyplot
as
pt
pt
.
show
()
def
test_boundary_interpolation
(
ctx_getter
):
cl_ctx
=
ctx_getter
()
queue
=
cl
.
CommandQueue
(
cl_ctx
)
...
...
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