Skip to content

Commit 7cf844e

Browse files
committed
Fem: Constraint symbols rescaling - fixes FreeCAD#11306
1 parent 3fadb1f commit 7cf844e

27 files changed

+641
-917
lines changed

src/Mod/Fem/App/FemConstraint.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,9 @@ Constraint::Constraint()
9090
"Normal direction pointing outside of solid");
9191
ADD_PROPERTY_TYPE(Scale,
9292
(1),
93-
"Base",
94-
App::PropertyType(App::Prop_Output),
95-
"Scale used for drawing constraints"); // OvG: Add scale parameter inherited
96-
// by all derived constraints
93+
"Constraint",
94+
App::PropertyType(App::Prop_ReadOnly | App::Prop_Output | App::Prop_Hidden),
95+
"Scale used for drawing constraints");
9796
ADD_PROPERTY_TYPE(Points,
9897
(Base::Vector3d()),
9998
"Constraint",

src/Mod/Fem/Gui/CMakeLists.txt

+16-1
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,27 @@ SET(FemGuiIcon_SVG
346346
Resources/icons/FemWorkbench.svg
347347
)
348348

349-
add_library(FemGui SHARED ${FemGui_SRCS} ${FemGuiIcon_SVG})
349+
SET(FemGuiSymbol_IV
350+
Resources/symbols/ConstraintContact.iv
351+
Resources/symbols/ConstraintDisplacement.iv
352+
Resources/symbols/ConstraintFixed.iv
353+
Resources/symbols/ConstraintForce.iv
354+
Resources/symbols/ConstraintHeatFlux.iv
355+
Resources/symbols/ConstraintPlaneRotation.iv
356+
Resources/symbols/ConstraintPressure.iv
357+
Resources/symbols/ConstraintSpring.iv
358+
Resources/symbols/ConstraintTemperature.iv
359+
Resources/symbols/ConstraintTie.iv
360+
)
361+
362+
add_library(FemGui SHARED ${FemGui_SRCS} ${FemGuiIcon_SVG} ${FemGuiSymbol_IV})
350363
target_link_libraries(FemGui ${FemGui_LIBS} ${VTK_LIBRARIES})
351364

352365
fc_copy_sources(FemGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Fem" ${FemGuiIcon_SVG})
366+
fc_copy_sources(FemGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Fem" ${FemGuiSymbol_IV})
353367

354368
INSTALL(FILES ${FemGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Fem/Resources/icons")
369+
INSTALL(FILES ${FemGuiSymbol_IV} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Fem/Resources/symbols")
355370

356371
# Python modules ui files, they are copied as they are, thus the need not to be added to Fem.qrc
357372
# see https://forum.freecad.org/viewtopic.php?f=10&t=25833
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#Inventor V2.1 ascii
2+
3+
4+
Separator {
5+
6+
Separator {
7+
8+
Translation {
9+
translation 0 0.0625 0
10+
11+
}
12+
Cube {
13+
width 0.375
14+
height 0.125
15+
depth 0.75
16+
17+
}
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
#Inventor V2.1 ascii
2+
3+
4+
Separator {
5+
6+
Separator {
7+
8+
DEF X_DISPLACEMENT Switch {
9+
10+
Separator {
11+
12+
Rotation {
13+
rotation 0 0 1 1.5707964
14+
15+
}
16+
DEF DISPLACEMENT Separator {
17+
18+
Translation {
19+
translation 0 -2 0
20+
21+
}
22+
Cone {
23+
bottomRadius 0.3
24+
height 4
25+
26+
}
27+
}
28+
}
29+
}
30+
DEF Y_DISPLACEMENT Switch {
31+
32+
Separator {
33+
34+
Rotation {
35+
rotation 0 0 1 3.1415927
36+
37+
}
38+
USE DISPLACEMENT
39+
}
40+
}
41+
DEF Z_DISPLACEMENT Switch {
42+
43+
Separator {
44+
45+
Rotation {
46+
rotation -1 0 0 1.5707964
47+
48+
}
49+
USE DISPLACEMENT
50+
}
51+
}
52+
DEF X_ROTATION Switch {
53+
54+
Separator {
55+
56+
Rotation {
57+
rotation 0 0 1 1.5707964
58+
59+
}
60+
DEF ROTATION Separator {
61+
62+
Cylinder {
63+
radius 2
64+
height 0.15
65+
66+
}
67+
}
68+
}
69+
}
70+
DEF Y_ROTATION Switch {
71+
72+
Separator {
73+
74+
Rotation {
75+
rotation 0 0 1 0
76+
77+
}
78+
USE ROTATION
79+
}
80+
}
81+
DEF Z_ROTATION Switch {
82+
83+
Separator {
84+
85+
Rotation {
86+
rotation 1 0 0 1.5707964
87+
88+
}
89+
USE ROTATION
90+
}
91+
}
92+
}
93+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#Inventor V2.1 ascii
2+
3+
4+
Separator {
5+
6+
Separator {
7+
8+
Rotation {
9+
rotation 1 0 0 3.1415927
10+
11+
}
12+
Translation {
13+
translation 0 -0.25 0
14+
15+
}
16+
Cone {
17+
bottomRadius 0.5
18+
height 0.5
19+
20+
}
21+
Translation {
22+
translation 0 -0.525 0
23+
24+
}
25+
Cube {
26+
width 2
27+
height 0.5
28+
depth 2
29+
30+
}
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#Inventor V2.1 ascii
2+
3+
4+
Separator {
5+
6+
Separator {
7+
8+
Translation {
9+
translation 0 3.3333334 0
10+
}
11+
Cone {
12+
bottomRadius 0.66666669
13+
height 1.3333334
14+
15+
}
16+
Translation {
17+
translation 0 -2 0
18+
19+
}
20+
Cylinder {
21+
radius 0.26666668
22+
height 2.6666667
23+
24+
}
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#Inventor V2.1 ascii
2+
3+
4+
Separator {
5+
6+
Separator {
7+
8+
Translation {
9+
translation 0 0.225 0
10+
11+
}
12+
Sphere {
13+
radius 0.225
14+
15+
}
16+
Translation {
17+
translation 0 0.5625 0
18+
19+
}
20+
Cylinder {
21+
radius 0.1125
22+
height 0.75
23+
24+
}
25+
Translation {
26+
translation 0 0.5625 0
27+
28+
}
29+
Material {
30+
diffuseColor 1 1 1
31+
32+
}
33+
Cylinder {
34+
radius 0.1125
35+
height 0.375
36+
37+
}
38+
Translation {
39+
translation 0 -0.5625 0
40+
41+
}
42+
Cylinder {
43+
radius 0.3
44+
height 0.075
45+
46+
}
47+
}
48+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#Inventor V2.1 ascii
2+
3+
4+
Separator {
5+
6+
Separator {
7+
8+
Translation {
9+
translation 0 0.125 0
10+
11+
}
12+
Cylinder {
13+
radius 1.25
14+
height 0.25
15+
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#Inventor V2.1 ascii
2+
3+
4+
Separator {
5+
6+
Separator {
7+
8+
Rotation {
9+
rotation 1 0 0 3.1415927
10+
11+
}
12+
Translation {
13+
translation 0 -0.66666669 0
14+
}
15+
Cone {
16+
bottomRadius 0.66666669
17+
height 1.3333334
18+
19+
}
20+
Translation {
21+
translation 0 -2 0
22+
23+
}
24+
Cylinder {
25+
radius 0.26666668
26+
height 2.6666667
27+
28+
}
29+
}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#Inventor V2.1 ascii
2+
3+
4+
Separator {
5+
6+
Separator {
7+
8+
Translation {
9+
translation 0 0.5 0
10+
11+
}
12+
Cube {
13+
width 1
14+
height 1
15+
depth 1
16+
17+
}
18+
Translation {
19+
translation 0 1 0
20+
21+
}
22+
Cylinder {
23+
radius 0.25
24+
height 1
25+
26+
}
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#Inventor V2.1 ascii
2+
3+
4+
Separator {
5+
6+
Separator {
7+
8+
Translation {
9+
translation 0 0.225 0
10+
11+
}
12+
Sphere {
13+
radius 0.225
14+
15+
}
16+
Translation {
17+
translation 0 0.5625 0
18+
19+
}
20+
Cylinder {
21+
radius 0.1125
22+
height 0.75
23+
24+
}
25+
Translation {
26+
translation 0 0.5625 0
27+
28+
}
29+
Material {
30+
diffuseColor 1 1 1
31+
32+
}
33+
Cylinder {
34+
radius 0.1125
35+
height 0.375
36+
37+
}
38+
}
39+
}

0 commit comments

Comments
 (0)