Fem: Add electrostatic constraint symbol

This commit is contained in:
marioalexis
2024-12-14 17:04:21 -03:00
committed by Max Wilfinger
parent 82c7d013fb
commit b64549b348
3 changed files with 84 additions and 0 deletions

View File

@@ -367,6 +367,7 @@ SET(FemGuiIcon_SVG
SET(FemGuiSymbol_IV
Resources/symbols/ConstraintContact.iv
Resources/symbols/ConstraintDisplacement.iv
Resources/symbols/ConstraintElectrostaticPotential.iv
Resources/symbols/ConstraintFixed.iv
Resources/symbols/ConstraintForce.iv
Resources/symbols/ConstraintHeatFlux.iv

View File

@@ -0,0 +1,73 @@
#Inventor V2.1 ascii
# SPDX-License-Identifier: LGPL-2.1-or-later
#/***************************************************************************
# * Copyright (c) 2024 Mario Passaglia <mpassaglia[at]cbc.uba.ar> *
# * *
# * This file is part of FreeCAD. *
# * *
# * FreeCAD is free software: you can redistribute it and/or modify it *
# * under the terms of the GNU Lesser General Public License as *
# * published by the Free Software Foundation, either version 2.1 of the *
# * License, or (at your option) any later version. *
# * *
# * FreeCAD 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 *
# * Lesser General Public License for more details. *
# * *
# * You should have received a copy of the GNU Lesser General Public *
# * License along with FreeCAD. If not, see *
# * <https://www.gnu.org/licenses/>. *
# * *
# **************************************************************************
Separator {
Separator {
Translation {
translation 0 1.25 0
}
Cylinder {
radius 0.25
height 2.5
}
Translation {
translation 0 1.3 0
}
Cube {
width 2
height 0.1
depth 0.75
}
Translation {
translation 0 0.4 0
}
BaseColor {
rgb 0.17 0.46 1.0
}
Cube {
width 1.5
height 0.1
depth 0.75
}
Translation {
translation 0 0.3 0
}
Cylinder {
radius 0.25
height 0.5
}
}
}

View File

@@ -36,7 +36,17 @@ from . import view_base_femconstraint
class VPConstraintElectroStaticPotential(view_base_femconstraint.VPBaseFemConstraint):
def __init__(self, vobj):
super().__init__(vobj)
mat = vobj.ShapeAppearance[0]
mat.DiffuseColor = (1.0, 0.0, 0.2, 0.0)
vobj.ShapeAppearance = mat
def setEdit(self, vobj, mode=0):
view_base_femconstraint.VPBaseFemConstraint.setEdit(
self, vobj, mode, task_constraint_electrostaticpotential._TaskPanel
)
def attach(self, vobj):
super().attach(vobj)
vobj.loadSymbol(self.resource_symbol_dir + "ConstraintElectrostaticPotential.iv")