* EM workbench support for VoxHenry

- Works, with Python3, in FreeCAD 18.1/18.2/19.0 beta
- Usage of Coin3d for shell represenation of voxelized geometries
- Fix for FasterCap export in sorting vertices
This commit is contained in:
Enrico Di Lorenzo - FastFieldSolvers S.R.L 2019-05-15 18:21:45 +02:00
parent 081ec9fc65
commit 60b99aeee0
22 changed files with 5880 additions and 37 deletions

16
EM.py
View File

@ -63,8 +63,11 @@ from EM_FHPort import *
from EM_FHEquiv import *
from EM_FHSolver import *
from EM_FHInputFile import *
## VoxHenry specific
#from EM_VHSolver import *
# VoxHenry specific
from EM_VHSolver import *
from EM_VHConductor import *
from EM_VHPort import *
from EM_VHInputFile import *
# for debugging
#import EM_Globals
@ -103,3 +106,12 @@ from EM_FHInputFile import *
#import EM_VHSolver
#reload(EM_VHSolver)
#from EM_VHSolver import *
#import EM_VHConductor
#reload(EM_VHConductor)
#from EM_VHConductor import *
#import EM_VHPort
#reload(EM_VHPort)
#from EM_VHPort import *
#import EM_VHInputFile
#reload(EM_VHInputFile)
#from EM_VHInputFile import *

View File

@ -73,7 +73,7 @@ def createFHInputFile(doc=None,filename=None,folder=None):
createFHInputFile()
'''
if not doc:
doc = App.ActiveDocument
doc = FreeCAD.ActiveDocument
if not doc:
FreeCAD.Console.PrintWarning(translate("EM","No active document available. Aborting."))
return
@ -92,7 +92,7 @@ def createFHInputFile(doc=None,filename=None,folder=None):
# (this should be the standard way)
if solver.Filename == "":
# build a filename concatenating the document name
solver.Filename = doc.Name + EMFHSOLVER_DEF_FILENAME
solver.Filename = doc.Name + EM.EMFHSOLVER_DEF_FILENAME
filename = solver.Filename
else:
# otherwise, if the user passed a filename to the function, update it in the 'solver' object

View File

@ -110,7 +110,7 @@ class _FHPath:
def __init__(self, obj):
''' Add properties '''
obj.addProperty("App::PropertyLink", "Base", "EM", QT_TRANSLATE_NOOP("App::Property","The base object this component is built upon"))
obj.addProperty("App::PropertyLinkList","Nodes","EM",QT_TRANSLATE_NOOP("App::Property","The list of FHNodes along the path. Not for direct user modification."))
obj.addProperty("App::PropertyLinkList","Nodes","EM",QT_TRANSLATE_NOOP("App::Property","The list of FHNodes along the path (read only)"),1)
obj.addProperty("App::PropertyLength","Width","EM",QT_TRANSLATE_NOOP("App::Property","Path width ('w' segment parameter)"))
obj.addProperty("App::PropertyLength","Height","EM",QT_TRANSLATE_NOOP("App::Property","Path height ('h' segment parameter)"))
obj.addProperty("App::PropertyInteger","Discr","EM",QT_TRANSLATE_NOOP("App::Property","Max number of segments into which curves will be discretized"))
@ -120,11 +120,6 @@ class _FHPath:
obj.addProperty("App::PropertyInteger","nwinc","EM",QT_TRANSLATE_NOOP("App::Property","Number of filaments in the width direction ('nwinc' segment parameter)"))
obj.addProperty("App::PropertyInteger","rh","EM",QT_TRANSLATE_NOOP("App::Property","Ratio of adjacent filaments in the height direction ('rh' segment parameter)"))
obj.addProperty("App::PropertyInteger","rw","EM",QT_TRANSLATE_NOOP("App::Property","Ratio of adjacent filaments in the width direction ('rw' segment parameter)"))
# Setting the Nodes property to read-only. The user should not directly handle this.
#0 -- default mode, read and write
#1 -- read-only
#2 -- hidden
obj.setEditorMode("Nodes", 1)
obj.Proxy = self
self.Type = "FHPath"
obj.Discr = EMFHPATH_DEF_DISCR

View File

@ -81,15 +81,15 @@ def makeFHSegment(baseobj=None,nodeStart=None,nodeEnd=None,width=None,height=Non
_ViewProviderFHSegment(obj.ViewObject)
# set base ViewObject properties to user-selected values (if any)
# check if 'nodeStart' is a FHNode, and if so, assign it as segment start node
if nodeStart:
if nodeStart is not None:
if Draft.getType(nodeStart) == "FHNode":
obj.NodeStart = nodeStart
# check if 'nodeEnd' is a FHNode, and if so, assign it as segment end node
if nodeEnd:
if nodeEnd is not None:
if Draft.getType(nodeEnd) == "FHNode":
obj.NodeEnd = nodeEnd
# check if 'baseobj' is a wire (only base object allowed), and only if not passed any node
if baseobj and not obj.NodeStart and not obj.NodeEnd:
if (baseobj is not None) and (obj.NodeStart is None and obj.NodeEnd is None):
if Draft.getType(baseobj) == "Wire":
if len(baseobj.Shape.Vertexes) == 2:
import EM_FHNode

View File

@ -112,9 +112,6 @@ def makeFHSolver(units=None,sigma=None,nhinc=None,nwinc=None,rh=None,rw=None,fmi
obj.Sigma = sigma
else:
# use default sigma, but scale it according to the chosen units of measurement
mylist = EMFHSOLVER_UNITS
unitindex = mylist.index('mm')
unitindex = EMFHSOLVER_UNITS.index("mm")
obj.Sigma = EMFHSOLVER_DEF_SEGSIGMA * EMFHSOLVER_UNITS_VALS[EMFHSOLVER_UNITS.index(obj.Units)]
if nhinc:
obj.nhinc = nhinc

View File

@ -29,12 +29,10 @@ __title__="FreeCAD E.M. Workbench global definitions"
__author__ = "FastFieldSolvers S.R.L."
__url__ = "http://www.fastfieldsolvers.com"
from FreeCAD import Vector
# defines
#
# version information
EM_VERSION = '1.0.1'
EM_VERSION = '2.0.0'
# default node color
EMFHNODE_DEF_NODECOLOR = (1.0,0.0,0.0)
# tolerance in degrees when verifying if vectors are parallel
@ -42,8 +40,22 @@ EMFHSEGMENT_PARTOL = 0.01
# tolerance in length
EMFHSEGMENT_LENTOL = 1e-8
import FreeCAD, Part
import FreeCAD, Part, Draft
from FreeCAD import Vector
import EM
if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtCore, QtGui
from DraftTools import translate
from PySide.QtCore import QT_TRANSLATE_NOOP
else:
# \cond
def translate(ctxt,txt, utf8_decode=False):
return txt
def QT_TRANSLATE_NOOP(ctxt,txt):
return txt
# \endcond
def getAbsCoordBodyPart(obj,position):
''' Retrieve the absolute coordinates of a point belonging to an object, even if in a Body or Part
@ -140,3 +152,31 @@ def makeSegShape(n1,n2,width,height,ww):
segShell = Part.makeShell([face1,face2,face3,face4,face5,face6])
return segShell
def getVHSolver(createIfNotExisting=False):
''' Retrieves the VHSolver object.
'createIfNotExisting' if True forces the creation of a VHSolver object,
if not already existing
Returns the VHSolver object of the current Document. If more than one VHSolver object is present,
return the first one.
'''
# get the document containing this object
doc = FreeCAD.ActiveDocument
if doc is None:
FreeCAD.Console.PrintWarning(translate("EM","No active document available. Cannot get any VHSolver object."))
return None
solver = [obj for obj in doc.Objects if Draft.getType(obj) == "VHSolver"]
if solver == []:
if createIfNotExisting == True:
solver = EM.makeVHSolver()
if solver is None:
FreeCAD.Console.PrintError(translate("EM","Cannot create VHSolver!"))
else:
FreeCAD.Console.PrintWarning(translate("EM","Cannot get VHSolver. Is at least one VHSolver object existing?"))
return None
else:
# take the first in the list
solver = solver[0]
return solver

953
EM_VHConductor.py Normal file
View File

@ -0,0 +1,953 @@
#***************************************************************************
#* *
#* Copyright (c) 2019 *
#* FastFieldSolvers S.R.L., http://www.fastfieldsolvers.com *
#* *
#* This program is free software; you can redistribute it and/or modify *
#* it under the terms of the GNU Lesser General Public License (LGPL) *
#* as published by the Free Software Foundation; either version 2 of *
#* the License, or (at your option) any later version. *
#* for detail see the LICENCE text file. *
#* *
#* 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 Library General Public License for more details. *
#* *
#* You should have received a copy of the GNU Library 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 *
#* *
#***************************************************************************
__title__="FreeCAD E.M. Workbench VoxHenry Conductor Class"
__author__ = "FastFieldSolvers S.R.L."
__url__ = "http://www.fastfieldsolvers.com"
# copper conductivity 1/(m*Ohms)
EMVHSOLVER_DEF_SIGMA = 5.8e7
import FreeCAD, FreeCADGui, Part, Draft, DraftGeomUtils, os
import DraftVecUtils
import Mesh
from EM_Globals import getVHSolver
from FreeCAD import Vector
import numpy as np
import time
from pivy import coin
if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtCore, QtGui
from DraftTools import translate
from PySide.QtCore import QT_TRANSLATE_NOOP
else:
# \cond
def translate(ctxt,txt, utf8_decode=False):
return txt
def QT_TRANSLATE_NOOP(ctxt,txt):
return txt
# \endcond
__dir__ = os.path.dirname(__file__)
iconPath = os.path.join( __dir__, 'Resources' )
def makeVHConductor(baseobj=None,name='VHConductor'):
''' Creates a VoxHenry Conductor (a voxelized solid object)
'baseobj' is the 3D solid object on which the conductor is based.
If no 'baseobj' is given, the user must assign a base
object later on, to be able to use this object.
The 'baseobj' is mandatory, and can be any 3D solid object
'name' is the name of the object
Example:
cond = makeVHConductor(mySolid)
'''
# to check if the object fits into the VHSolver bbox, we must retrieve
# the global bbox *before* the new VHConductor is created.
# get the VHSolver object; if not existing, create it
solver = getVHSolver(True)
if solver is not None:
gbbox = solver.Proxy.getGlobalBBox()
condIndex = solver.Proxy.getNextCondIndex()
else:
FreeCAD.Console.PrintWarning(translate("EM","As we found no valid VHSolver object, conductor index is set to 1. This may create issues in simulation (multiple VHConductors with the same conductor index)"))
condIndex = 1
# now create the object
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", name)
obj.Label = translate("EM", name)
# this adds the relevant properties to the object
#'obj' (e.g. 'Base' property) making it a _VHConductor
_VHConductor(obj)
# now we have the properties, init condIndex
obj.CondIndex = condIndex
# manage ViewProvider object
if FreeCAD.GuiUp:
_ViewProviderVHConductor(obj.ViewObject)
# set base ViewObject properties to user-selected values (if any)
# check if 'baseobj' is a solid object
if baseobj is not None:
# if right type of base
if not baseobj.isDerivedFrom("Part::Feature"):
FreeCAD.Console.PrintWarning(translate("EM","VHConductor can only be based on objects derived from Part::Feature"))
return
# check validity
if baseobj.Shape.isNull():
FreeCAD.Console.PrintWarning(translate("EM","VHConductor base object shape is null"))
return
if not baseobj.Shape.isValid():
FreeCAD.Console.PrintWarning(translate("EM","VHConductor base object shape is invalid"))
return
obj.Base = baseobj
# check if the object fits into the VHSolver bbox, otherwise must flag the voxel space as invalid
if solver is not None:
bbox = baseobj.Shape.BoundBox
if gbbox.isValid() and bbox.isValid():
if not gbbox.isInside(bbox):
# invalidate voxel space
solver.Proxy.flagVoxelSpaceInvalid()
# hide the base object
if FreeCAD.GuiUp:
obj.Base.ViewObject.hide()
# return the newly created Python object
return obj
class _VHConductor:
'''The EM VoxHenry Conductor object'''
def __init__(self, obj):
# save the object in the class, to store or retrieve specific data from it
# from within the class
self.Object = obj
''' Add properties '''
obj.addProperty("App::PropertyLink", "Base", "EM", QT_TRANSLATE_NOOP("App::Property","The base object this component is built upon"))
obj.addProperty("App::PropertyFloat","Sigma","EM",QT_TRANSLATE_NOOP("App::Property","Conductor conductivity (S/m)"))
obj.addProperty("App::PropertyLength","Lambda","EM",QT_TRANSLATE_NOOP("App::Property","Superconductor London penetration depth (m)"))
obj.addProperty("App::PropertyBool","ShowVoxels","EM",QT_TRANSLATE_NOOP("App::Property","Show the voxelization"))
obj.addProperty("App::PropertyInteger","CondIndex","EM",QT_TRANSLATE_NOOP("App::Property","Voxel space VHConductor index number (read-only)"),1)
obj.addProperty("App::PropertyBool","isVoxelized","EM",QT_TRANSLATE_NOOP("App::Property","Flags if the conductor has been voxelized (read only)"),1)
obj.ShowVoxels = False
obj.Proxy = self
obj.isVoxelized = False
obj.Sigma = EMVHSOLVER_DEF_SIGMA
self.shapePoints = []
self.Type = "VHConductor"
def onChanged(self, obj, prop):
''' take action if an object property 'prop' changed
'''
#FreeCAD.Console.PrintWarning("\n_VHConductor onChanged(" + str(prop)+")\n") #debug
# on restore, self.Object is not there anymore (JSON does not serialize complex objects
# members of the class, so __getstate__() and __setstate__() skip them);
# so we must "re-attach" (re-create) the 'self.Object'
if not hasattr(self,"Object"):
self.Object = obj
# if just changed non-shape affecting properties, clear the recompute flag (not needed)
#if prop == "Sigma" or prop == "Lambda":
# obj.purgeTouched()
def execute(self, obj):
''' this method is mandatory. It is called on Document.recompute()
'''
#FreeCAD.Console.PrintWarning("_VHConductor execute()\n") #debug
# the class needs a 'Base' object
if obj.Base is None:
return
# if right type of base
if not obj.Base.isDerivedFrom("Part::Feature"):
FreeCAD.Console.PrintWarning(translate("EM","VHConductor can only be based on objects derived from Part::Feature"))
return
# check validity
if obj.Base.Shape.isNull():
FreeCAD.Console.PrintWarning(translate("EM","VHConductor base object shape is null"))
return
if not obj.Base.Shape.isValid():
FreeCAD.Console.PrintWarning(translate("EM","VHConductor base object shape is invalid"))
return
shape = None
# Check if the user selected to see the voxelization, and if the voxelization exists
if obj.ShowVoxels == True:
# get the VHSolver object
solver = getVHSolver()
if solver is not None:
gbbox = solver.Proxy.getGlobalBBox()
delta = solver.Proxy.getDelta()
# getting the voxel space may cause the voxelization of this VHConductor to become invalid,
# if the global bounding box is found to have changed, or VHSolver 'Delta' changed over time, etc.
voxelSpace = solver.Proxy.getVoxelSpace()
if obj.isVoxelized == False:
FreeCAD.Console.PrintWarning(translate("EM","Cannot fulfill 'ShowVoxels', VHConductor object has not been voxelized, or voxelization is now invalid (e.g. change in voxel space dimensions). Voxelize it first."))
else:
shape = self.createVoxelShellFastCoin(obj.Base,obj.CondIndex,gbbox,delta,voxelSpace)
if shape is None:
# if we don't show the voxelized view of the object, let's show the bounding box
self.shapePoints = []
bbox = obj.Base.Shape.BoundBox
if bbox.isValid():
shape = Part.makeBox(bbox.XLength,bbox.YLength,bbox.ZLength,Vector(bbox.XMin,bbox.YMin,bbox.ZMin))
# and finally assign the shape (but only if we were able to create any)
obj.Shape = shape
else:
# make a dummy empty shape. Representation is through custom coin3d scenegraph.
obj.Shape = Part.makeShell([])
#if FreeCAD.GuiUp:
# force shape recompute (even if we are using directly coin here)
# _ViewProviderVHConductor.updateData(obj.ViewObject.Proxy,obj.ViewObject,"Shape")
#FreeCAD.Console.PrintWarning("_VHConductor execute() ends\n") #debug
def createVoxelShell(self,obj,condIndex,gbbox,delta,voxelSpace=None):
''' Creates a shell composed by the external faces of a voxelized object.
'obj' is the object whose shell must be created
'condIndex' (int16) is the index of the object. It defines the object conductivity.
'gbbox' (FreeCAD.BoundBox) is the overall bounding box
'delta' is the voxels size length
'voxelSpace' (Numpy 3D array) is the voxel tensor of the overall space
This version uses a standard Part::Shell
Remark: the VHConductor must have already been voxelized
'''
if voxelSpace is None:
return None
if not hasattr(obj,"Shape"):
return None
if self.Object.isVoxelized == False:
return None
surfList = []
# get the object's bbox
bbox = obj.Shape.BoundBox
if not gbbox.isInside(bbox):
FreeCAD.Console.PrintError(translate("EM","Conductor bounding box is larger than the global bounding box. Cannot voxelize conductor shell.\n"))
return
# now must find the voxel set that contains the object bounding box
# find the voxel that contains the bbox min point
min_x = int((bbox.XMin - gbbox.XMin)/delta)
min_y = int((bbox.YMin - gbbox.YMin)/delta)
min_z = int((bbox.ZMin - gbbox.ZMin)/delta)
# find the voxel that contains the bbox max point
# (if larger than the voxelSpace, set to voxelSpace max dim,
# we already verified that 'bbox' fits into 'gbbox')
vs_size = voxelSpace.shape
max_x = min(int((bbox.XMax - gbbox.XMin)/delta), vs_size[0]-1)
max_y = min(int((bbox.YMax - gbbox.YMin)/delta), vs_size[1]-1)
max_z = min(int((bbox.ZMax - gbbox.ZMin)/delta), vs_size[2]-1)
# array to find the six neighbour
sides = [(1,0,0), (-1,0,0), (0,1,0), (0,-1,0), (0,0,1), (0,0,-1)]
# vertexes of the six faces
vertexes = [[Vector(delta,0,0), Vector(delta,delta,0), Vector(delta,delta,delta), Vector(delta,0,delta)],
[Vector(0,0,0), Vector(0,0,delta), Vector(0,delta,delta), Vector(0,delta,0)],
[Vector(0,delta,0), Vector(0,delta,delta), Vector(delta,delta,delta), Vector(delta,delta,0)],
[Vector(0,0,0), Vector(delta,0,0), Vector(delta,0,delta), Vector(0,0,delta)],
[Vector(0,0,delta), Vector(delta,0,delta), Vector(delta,delta,delta), Vector(0,delta,delta)],
[Vector(0,0,0), Vector(0,delta,0), Vector(delta,delta,0), Vector(delta,0,0)]]
# get the base point
vbase = Vector(gbbox.XMin + min_x * delta, gbbox.YMin + min_y * delta, gbbox.ZMin + min_z * delta)
FreeCAD.Console.PrintMessage(translate("EM","Starting voxel shell creation for object ") + obj.Label + "...\n")
# make a progress bar - commented out as not working properly
# total number of voxels to scan is
#totalVox = (max_x-min_x) * (max_y-min_y) * (max_z-min_z)
#stepProg = totalVox / 100.0
#progIndex = 0
#progBar = FreeCAD.Base.ProgressIndicator()
#progBar.start(translate("EM","Voxelizing object ") + obj.Label ,100)
for step_x in range(min_x,max_x+1):
vbase.y = gbbox.YMin + min_y * delta
for step_y in range(min_y,max_y+1):
# advancing the progress bar. Doing it only in the y loop for optimization
#if (step_x-min_x)*(max_y-min_y)*(max_z-min_z) + (step_y-min_y)*(max_z-min_z) > stepProg * progIndex:
# progBar.next()
# progIndex = progIndex + 1
vbase.z = gbbox.ZMin + min_z * delta
for step_z in range(min_z,max_z+1):
# check if voxel is belonging to the given object
if voxelSpace[step_x,step_y,step_z] == condIndex:
# scan the six neighbour voxels, to see if they are belonging to the same conductor or not.
# If they are not belonging to the same conductor, or if the voxel space is finished, the current voxel
# side in the direction of the empty voxel is an external surface
for side, vertex in zip(sides,vertexes):
is_surface = False
nextVoxelIndexes = [step_x+side[0],step_y+side[1],step_z+side[2]]
if (nextVoxelIndexes[0] > max_x or nextVoxelIndexes[0] < 0 or
nextVoxelIndexes[1] > max_y or nextVoxelIndexes[1] < 0 or
nextVoxelIndexes[2] > max_z or nextVoxelIndexes[2] < 0):
is_surface = True
else:
if voxelSpace[nextVoxelIndexes[0],nextVoxelIndexes[1],nextVoxelIndexes[2]] != condIndex:
is_surface = True
if is_surface == True:
# create the face
# calculate the vertexes
v11 = vbase + vertex[0]
v12 = vbase + vertex[1]
v13 = vbase + vertex[2]
v14 = vbase + vertex[3]
# now make the face
poly = Part.makePolygon( [v11,v12,v13,v14,v11])
face = Part.Face(poly)
surfList.append(face)
vbase.z += delta
vbase.y += delta
vbase.x += delta
#progBar.stop()
FreeCAD.Console.PrintMessage(translate("EM","Voxelization of the shell completed.\n"))
# create a shell. Does not need to be solid.
objShell = Part.makeShell(surfList)
return objShell
def createVoxelShellFast(self,obj,condIndex,gbbox,delta,voxelSpace=None):
''' Creates a shell composed by the external faces of a voxelized object.
'obj' is the object whose shell must be created
'condIndex' (int16) is the index of the object. It defines the object conductivity.
'gbbox' (FreeCAD.BoundBox) is the overall bounding box
'delta' is the voxels size length
'voxelSpace' (Numpy 3D array) is the voxel tensor of the overall space
This version uses a standard Part::Shell, but calculates the VHConductor
boundaries by finite differences over the voxel conductor space,
for speed in Python. However the speed bottleneck is still the
use of the Part::Shell via OpenCascade
Remark: the VHConductor must have already been voxelized
'''
if voxelSpace is None:
return None
if not hasattr(obj,"Shape"):
return None
if self.Object.isVoxelized == False:
return None
surfList = []
# get the object's bbox
bbox = obj.Shape.BoundBox
if not gbbox.isInside(bbox):
FreeCAD.Console.PrintError(translate("EM","Conductor bounding box is larger than the global bounding box. Cannot voxelize conductor shell.\n"))
return
# now must find the voxel set that contains the object bounding box
# find the voxel that contains the bbox min point
min_x = int((bbox.XMin - gbbox.XMin)/delta)
min_y = int((bbox.YMin - gbbox.YMin)/delta)
min_z = int((bbox.ZMin - gbbox.ZMin)/delta)
# find the voxel that contains the bbox max point
# (if larger than the voxelSpace, set to voxelSpace max dim,
# we already verified that 'bbox' fits into 'gbbox')
vs_size = voxelSpace.shape
max_x = min(int((bbox.XMax - gbbox.XMin)/delta), vs_size[0]-1)
max_y = min(int((bbox.YMax - gbbox.YMin)/delta), vs_size[1]-1)
max_z = min(int((bbox.ZMax - gbbox.ZMin)/delta), vs_size[2]-1)
# get the base point
vbase = Vector(gbbox.XMin + min_x * delta, gbbox.YMin + min_y * delta, gbbox.ZMin + min_z * delta)
# now get a sub-tensor out of the voxel space, containing the obj.Shape; but make it one (empty) voxel
# larger in every direction (that's the '+2': one voxel in the - direction, one in the +),
# so we can check if the object shape span up to the border
dim_x = max_x+1-min_x
dim_y = max_y+1-min_y
dim_z = max_z+1-min_z
# create the sub-tensor
voxSubSpace = np.full((dim_x+2,dim_y+2,dim_z+2),0,np.int32)
# copy the sub-tensor out of the full voxel space, after selecting the elements
# corresponding to 'condIndex' and converting (casting with astype() )
# to a matrix composed only of zeros and ones (True -> 1, False -> 0)
voxSubSpace[1:dim_x+1,1:dim_y+1,1:dim_z+1] = (voxelSpace[min_x:max_x+1,min_y:max_y+1,min_z:max_z+1] == condIndex).astype(np.int8)
# now we must find the boundaries in the three x,y,z directions. We differentiate.
# start from dx
diff = voxSubSpace[1:dim_x+2,:,:] - voxSubSpace[0:dim_x+1,:,:]
# and extract the non-zero elements positions
voxelIndices = [ [step_x,step_y,step_z] for step_x in range(0,dim_x+1) for step_y in range(0,dim_y+2) for step_z in range(0,dim_z+2) if diff[step_x,step_y,step_z] != 0]
# cube x side vertex points
vertex = [Vector(0,0,0), Vector(0,0,delta), Vector(0,delta,delta), Vector(0,delta,0)]
# now we can create the faces orthogonal to the current direction
for index in voxelIndices:
# calculate the base point of the vector pointed to by 'index' (remark: 'index' is not the index
# of the voxel, but of the surface between two voxels, for the direction along which we are operating)
vbaseRel = vbase + Vector(index[0]*delta,(index[1]-1)*delta,(index[2]-1)*delta)
# create the face
# calculate the vertexes
v11 = vbaseRel + vertex[0]
v12 = vbaseRel + vertex[1]
v13 = vbaseRel + vertex[2]
v14 = vbaseRel + vertex[3]
# now make the face
poly = Part.makePolygon( [v11,v12,v13,v14,v11])
face = Part.Face(poly)
surfList.append(face)
# then dy
diff = voxSubSpace[:,1:dim_y+2,:] - voxSubSpace[:,0:dim_y+1,:]
# and extract the non-zero elements positions
voxelIndices = [ [step_x,step_y,step_z] for step_x in range(0,dim_x+2) for step_y in range(0,dim_y+1) for step_z in range(0,dim_z+2) if diff[step_x,step_y,step_z] != 0]
# cube y side vertex points
vertex = [Vector(0,0,0), Vector(delta,0,0), Vector(delta,0,delta), Vector(0,0,delta)]
# now we can create the faces orthogonal to the current direction
for index in voxelIndices:
# calculate the base point of the vector pointed to by 'index' (remark: 'index' is not the index
# of the voxel, but of the surface between two voxels, for the direction along which we are operating)
vbaseRel = vbase + Vector((index[0]-1)*delta,index[1]*delta,(index[2]-1)*delta)
# create the face
# calculate the vertexes
v11 = vbaseRel + vertex[0]
v12 = vbaseRel + vertex[1]
v13 = vbaseRel + vertex[2]
v14 = vbaseRel + vertex[3]
# now make the face
poly = Part.makePolygon( [v11,v12,v13,v14,v11])
face = Part.Face(poly)
surfList.append(face)
# then dz
diff = voxSubSpace[:,:,1:dim_z+2] - voxSubSpace[:,:,0:dim_z+1]
# and extract the non-zero elements positions
voxelIndices = [ [step_x,step_y,step_z] for step_x in range(0,dim_x+2) for step_y in range(0,dim_y+2) for step_z in range(0,dim_z+1) if diff[step_x,step_y,step_z] != 0]
# cube z side vertex points
vertex = [Vector(0,0,0), Vector(0,delta,0), Vector(delta,delta,0), Vector(delta,0,0)]
# now we can create the faces orthogonal to the current direction
for index in voxelIndices:
# calculate the base point of the vector pointed to by 'index' (remark: 'index' is not the index
# of the voxel, but of the surface between two voxels, for the direction along which we are operating)
vbaseRel = vbase + Vector((index[0]-1)*delta,(index[1]-1)*delta,index[2]*delta)
# create the face
# calculate the vertexes
v11 = vbaseRel + vertex[0]
v12 = vbaseRel + vertex[1]
v13 = vbaseRel + vertex[2]
v14 = vbaseRel + vertex[3]
# now make the face
poly = Part.makePolygon( [v11,v12,v13,v14,v11])
face = Part.Face(poly)
surfList.append(face)
#progBar.stop()
FreeCAD.Console.PrintMessage(translate("EM","Voxelization of the shell completed.\n"))
# create a shell. Does not need to be solid.
objShell = Part.makeShell(surfList)
return objShell
def createVoxelShellFastCoin(self,obj,condIndex,gbbox,delta,voxelSpace=None):
''' Creates a shell composed by the external faces of a voxelized object.
'obj' is the object whose shell must be created
'condIndex' (int16) is the index of the object. It defines the object conductivity.
'gbbox' (FreeCAD.BoundBox) is the overall bounding box
'delta' is the voxels size length
'voxelSpace' (Numpy 3D array) is the voxel tensor of the overall space
This version uses a direct coin3d / pivy representation of the VHConductor
boundaries ('shell'), and calculates the VHConductor
boundaries by finite differences over the voxel conductor space,
for speed in Python.
Remark: the VHConductor must have already been voxelized
'''
if voxelSpace is None:
return None
if not hasattr(obj,"Shape"):
return None
if self.Object.isVoxelized == False:
return None
self.shapePoints = []
# get the object's bbox
bbox = obj.Shape.BoundBox
if not gbbox.isInside(bbox):
FreeCAD.Console.PrintError(translate("EM","Conductor bounding box is larger than the global bounding box. Cannot voxelize conductor shell.\n"))
return
# now must find the voxel set that contains the object bounding box
# find the voxel that contains the bbox min point
min_x = int((bbox.XMin - gbbox.XMin)/delta)
min_y = int((bbox.YMin - gbbox.YMin)/delta)
min_z = int((bbox.ZMin - gbbox.ZMin)/delta)
# find the voxel that contains the bbox max point
# (if larger than the voxelSpace, set to voxelSpace max dim,
# we already verified that 'bbox' fits into 'gbbox')
vs_size = voxelSpace.shape
max_x = min(int((bbox.XMax - gbbox.XMin)/delta), vs_size[0]-1)
max_y = min(int((bbox.YMax - gbbox.YMin)/delta), vs_size[1]-1)
max_z = min(int((bbox.ZMax - gbbox.ZMin)/delta), vs_size[2]-1)
# get the base point
vbase = Vector(gbbox.XMin + min_x * delta, gbbox.YMin + min_y * delta, gbbox.ZMin + min_z * delta)
# now get a sub-tensor out of the voxel space, containing the obj.Shape; but make it one (empty) voxel
# larger in every direction (that's the '+2': one voxel in the - direction, one in the +),
# so we can check if the object shape span up to the border
dim_x = max_x+1-min_x
dim_y = max_y+1-min_y
dim_z = max_z+1-min_z
# create the sub-tensor
voxSubSpace = np.full((dim_x+2,dim_y+2,dim_z+2),0,np.int32)
# copy the sub-tensor out of the full voxel space, after selecting the elements
# corresponding to 'condIndex' and converting (casting with astype() )
# to a matrix composed only of zeros and ones (True -> 1, False -> 0)
voxSubSpace[1:dim_x+1,1:dim_y+1,1:dim_z+1] = (voxelSpace[min_x:max_x+1,min_y:max_y+1,min_z:max_z+1] == condIndex).astype(np.int8)
# now we must find the boundaries in the three x,y,z directions. We differentiate.
# start from dx
diff = voxSubSpace[1:dim_x+2,:,:] - voxSubSpace[0:dim_x+1,:,:]
# and extract the non-zero elements positions
voxelIndices = [ [step_x,step_y,step_z] for step_x in range(0,dim_x+1) for step_y in range(0,dim_y+2) for step_z in range(0,dim_z+2) if diff[step_x,step_y,step_z] != 0]
# cube x side vertex points
vertex = [Vector(0,0,0), Vector(0,0,delta), Vector(0,delta,delta), Vector(0,delta,0)]
# now we can create the faces orthogonal to the current direction
for index in voxelIndices:
# calculate the base point of the vector pointed to by 'index' (remark: 'index' is not the index
# of the voxel, but of the surface between two voxels, for the direction along which we are operating)
vbaseRel = vbase + Vector(index[0]*delta,(index[1]-1)*delta,(index[2]-1)*delta)
# create the face
# calculate the vertexes
v11 = vbaseRel + vertex[0]
v12 = vbaseRel + vertex[1]
v13 = vbaseRel + vertex[2]
v14 = vbaseRel + vertex[3]
# now make the face
self.shapePoints.extend([v11,v12,v13,v14])
# then dy
diff = voxSubSpace[:,1:dim_y+2,:] - voxSubSpace[:,0:dim_y+1,:]
# and extract the non-zero elements positions
voxelIndices = [ [step_x,step_y,step_z] for step_x in range(0,dim_x+2) for step_y in range(0,dim_y+1) for step_z in range(0,dim_z+2) if diff[step_x,step_y,step_z] != 0]
# cube y side vertex points
vertex = [Vector(0,0,0), Vector(delta,0,0), Vector(delta,0,delta), Vector(0,0,delta)]
# now we can create the faces orthogonal to the current direction
for index in voxelIndices:
# calculate the base point of the vector pointed to by 'index' (remark: 'index' is not the index
# of the voxel, but of the surface between two voxels, for the direction along which we are operating)
vbaseRel = vbase + Vector((index[0]-1)*delta,index[1]*delta,(index[2]-1)*delta)
# create the face
# calculate the vertexes
v11 = vbaseRel + vertex[0]
v12 = vbaseRel + vertex[1]
v13 = vbaseRel + vertex[2]
v14 = vbaseRel + vertex[3]
# now make the face
self.shapePoints.extend([v11,v12,v13,v14])
# then dz
diff = voxSubSpace[:,:,1:dim_z+2] - voxSubSpace[:,:,0:dim_z+1]
# and extract the non-zero elements positions
voxelIndices = [ [step_x,step_y,step_z] for step_x in range(0,dim_x+2) for step_y in range(0,dim_y+2) for step_z in range(0,dim_z+1) if diff[step_x,step_y,step_z] != 0]
# cube z side vertex points
vertex = [Vector(0,0,0), Vector(0,delta,0), Vector(delta,delta,0), Vector(delta,0,0)]
# now we can create the faces orthogonal to the current direction
for index in voxelIndices:
# calculate the base point of the vector pointed to by 'index' (remark: 'index' is not the index
# of the voxel, but of the surface between two voxels, for the direction along which we are operating)
vbaseRel = vbase + Vector((index[0]-1)*delta,(index[1]-1)*delta,index[2]*delta)
# create the face
# calculate the vertexes
v11 = vbaseRel + vertex[0]
v12 = vbaseRel + vertex[1]
v13 = vbaseRel + vertex[2]
v14 = vbaseRel + vertex[3]
# now make the face
self.shapePoints.extend([v11,v12,v13,v14])
#progBar.stop()
#FreeCAD.Console.PrintMessage(translate("EM","Voxelization of the shell completed.\n"))
return True
def voxelizeConductor(self):
''' Voxelize the Base (solid) object. The function will modify the 'voxelSpace'
by marking with 'CondIndex' all the voxels that sample the Base object
as internal.
'''
if self.Object.Base is None:
return
if not hasattr(self.Object.Base,"Shape"):
return
# get the VHSolver object
solver = getVHSolver()
if solver is None:
return
FreeCAD.Console.PrintMessage(translate("EM","Starting voxelization of conductor ") + self.Object.Label + "...\n")
# get global parameters from the VHSolver object
gbbox = solver.Proxy.getGlobalBBox()
delta = solver.Proxy.getDelta()
voxelSpace = solver.Proxy.getVoxelSpace()
if voxelSpace is None:
FreeCAD.Console.PrintWarning(translate("EM","VoxelSpace not valid, cannot voxelize conductor\n"))
return
# get this object bbox
bbox = self.Object.Base.Shape.BoundBox
if not gbbox.isInside(bbox):
FreeCAD.Console.PrintError(translate("EM","Internal error: conductor bounding box is larger than the global bounding box. Cannot voxelize conductor.\n"))
return
# first of all, must remove all previous instances of the conductor in the voxel space
voxelSpace[voxelSpace==self.Object.CondIndex] = 0
# now must find the voxel set that contains the object bounding box
# find the voxel that contains the bbox min point
min_x = int((bbox.XMin - gbbox.XMin)/delta)
min_y = int((bbox.YMin - gbbox.YMin)/delta)
min_z = int((bbox.ZMin - gbbox.ZMin)/delta)
# find the voxel that contains the bbox max point
# (if larger than the voxelSpace, set to voxelSpace max dim,
# we already verified that 'bbox' fits into 'gbbox')
vs_size = voxelSpace.shape
max_x = min(int((bbox.XMax - gbbox.XMin)/delta), vs_size[0]-1)
max_y = min(int((bbox.YMax - gbbox.YMin)/delta), vs_size[1]-1)
max_z = min(int((bbox.ZMax - gbbox.ZMin)/delta), vs_size[2]-1)
# if the Base object is a Part::Box, just mark all the voxels
# inside the bounding box as belonging to the conductor
if self.Object.Base.TypeId == "Part::Box":
voxelSpace[min_x:max_x,min_y:max_y,min_z:max_z] = self.Object.CondIndex
else:
# and now find which voxel is inside the object 'self.Object.Base',
# sampling based on the voxel centers
voxelIndices = [ (step_x,step_y,step_z) for step_x in range(min_x,max_x+1)
for step_y in range(min_y,max_y+1)
for step_z in range(min_z,max_z+1)
if self.Object.Base.Shape.isInside(Vector(gbbox.XMin + step_x * delta + delta/2.0,
gbbox.YMin + step_y * delta + delta/2.0,
gbbox.ZMin + step_z * delta + delta/2.0),0.0,True)]
# mark the relevant voxels with the 'CondIndex'
# note that as Python3 zip() returns an iterator, need to build the list of indices explicitly,
# but then we need to move this to a tuple to avoid a Python3 warning
voxelSpace[tuple([x for x in zip(*voxelIndices)])] = self.Object.CondIndex
# flag as voxelized
self.Object.isVoxelized = True
# if just voxelized, cannot show voxeld; and if there was an old shell representing
# the previoius voxelization, must clear it
self.Object.ShowVoxels = False
FreeCAD.Console.PrintMessage(translate("EM","Voxelization of the conductor completed.\n"))
def flagVoxelizationInvalid(self):
''' Flags the voxelization as invalid
'''
self.Object.isVoxelized = False
self.Object.ShowVoxels = False
def getBaseObj(self):
''' Retrieves the Base object.
Returns the Base object.
'''
return self.Object.Base
def getBBox(self):
''' Retrieves the bounding box containing the base objects
Returns a FreeCAD::BoundBox
'''
bbox = FreeCAD.BoundBox()
if self.Object.Base is not None:
if hasattr(self.Object.Base,"Shape"):
bbox = self.Object.Base.Shape.BoundBox
return bbox
def getCondIndex(self):
''' Retrieves the conductor index.
Returns the int16 conductor index.
'''
return self.Object.CondIndex
def setVoxelState(self,isVoxelized):
''' Sets the voxelization state.
'''
self.Object.isVoxelized = isVoxelized
def serialize(self,fid,isSupercond):
''' Serialize the object to the 'fid' file descriptor
'fid' is the file descriptor
'isSupercond' is a boolean indicating if the input file must contain
superconductor lambda values (even if for some conductors this may be zero)
'''
if self.Object.isVoxelized == True:
solver = getVHSolver()
if solver is None:
return
# get global parameters from the VHSolver object
gbbox = solver.Proxy.getGlobalBBox()
delta = solver.Proxy.getDelta()
voxelSpace = solver.Proxy.getVoxelSpace()
# get this object bbox
bbox = self.Object.Base.Shape.BoundBox
if not gbbox.isInside(bbox):
FreeCAD.Console.PrintError(translate("EM","Conductor bounding box is larger than the global bounding box. Cannot serialize VHConductor.\n"))
return
# now must find the voxel set that contains the object bounding box
# find the voxel that contains the bbox min point
min_x = int((bbox.XMin - gbbox.XMin)/delta)
min_y = int((bbox.YMin - gbbox.YMin)/delta)
min_z = int((bbox.ZMin - gbbox.ZMin)/delta)
# find the voxel that contains the bbox max point
# (if larger than the voxelSpace, set to voxelSpace max dim,
# we already verified that 'bbox' fits into 'gbbox')
vs_size = voxelSpace.shape
max_x = min(int((bbox.XMax - gbbox.XMin)/delta), vs_size[0]-1)
max_y = min(int((bbox.YMax - gbbox.YMin)/delta), vs_size[1]-1)
max_z = min(int((bbox.ZMax - gbbox.ZMin)/delta), vs_size[2]-1)
# and now find which voxel belongs to this VHConductor
voxCoords = np.argwhere(voxelSpace[min_x:max_x+1, min_y:max_y+1, min_z:max_z+1]==self.Object.CondIndex)
# remark: VoxHenry voxel tensor is 1-based, not 0-based. Must add 1
voxCoords = voxCoords + 1
# and add the base offset
voxCoords[:,0] = voxCoords[:,0]+min_x
voxCoords[:,1] = voxCoords[:,1]+min_y
voxCoords[:,2] = voxCoords[:,2]+min_z
# now must add the information about the 'CondIndex' value:
voxCoordsSize = voxCoords.shape
# check if we must output lambda values or not
if isSupercond:
# first create a new matrix with an additional column full of 'Sigma'
voxCoordsAndCond = np.full((voxCoordsSize[0],voxCoordsSize[1]+2),self.Object.Sigma,np.float64)
# add the lambda values (note that since there is one column only, this is treated as an array in numpy, i.e. row-like)
voxCoordsAndCond[:,-1] = np.full(voxCoordsSize[0],self.Object.Lambda.getValueAs('m'),np.float64)
# then copy in the first 2 columns the voxCoords
# REMARK: this is now a float64 array! Cannot contain int64 values without loss of precision
# but up to 32 bits this should be ok
voxCoordsAndCond[:,:-2] = voxCoords
# finally output the voxels
np.savetxt(fid, voxCoordsAndCond, fmt="V %d %d %d %g %g")
else:
# first create a new matrix with an additional column full of 'Sigma'
voxCoordsAndCond = np.full((voxCoordsSize[0],voxCoordsSize[1]+1),self.Object.Sigma,np.float64)
# then copy in the first 2 columns the voxCoords
# REMARK: this is now a float64 array! Cannot contain int64 values without loss of precision
# but up to 32 bits this should be ok
voxCoordsAndCond[:,:-1] = voxCoords
# finally output the voxels
np.savetxt(fid, voxCoordsAndCond, fmt="V %d %d %d %g")
else:
FreeCAD.Console.PrintWarning(translate("EM","VHConductor object not voxelized, cannot serialize ") + str(self.Object.Label) + "\n")
def __getstate__(self):
# JSON does not understand FreeCAD.Vector, so need to convert to tuples
shapePointsJSON = [(x[0],x[1],x[2]) for x in self.shapePoints]
dictForJSON = {'sp':shapePointsJSON,'type':self.Type}
#FreeCAD.Console.PrintMessage("Save\n"+str(dictForJSON)+"\n") #debug
return dictForJSON
def __setstate__(self,dictForJSON):
if dictForJSON:
#FreeCAD.Console.PrintMessage("Load\n"+str(dictForJSON)+"\n") #debug
# no need to convert back to FreeCAD.Vectors, 'shapePoints' can also be tuples
self.shapePoints = dictForJSON['sp']
self.Type = dictForJSON['type']
class _ViewProviderVHConductor:
def __init__(self, vobj):
''' Set this object to the proxy object of the actual view provider '''
vobj.Proxy = self
self.VObject = vobj
self.Object = vobj.Object
def attach(self, vobj):
''' Setup the scene sub-graph of the view provider, this method is mandatory '''
#FreeCAD.Console.PrintMessage("ViewProvider attach()\n") # debug
# on restore, self.Object is not there anymore (JSON does not serialize complex objects
# members of the class, so __getstate__() and __setstate__() skip them);
# so we must "re-attach" (re-create) the 'self.Object'
self.VObject = vobj
self.Object = vobj.Object
# actual representation
self.switch = coin.SoSwitch()
self.hints = coin.SoShapeHints()
self.style1 = coin.SoDrawStyle()
self.style2 = coin.SoDrawStyle()
self.material = coin.SoMaterial()
self.linecolor = coin.SoBaseColor()
self.data = coin.SoCoordinate3()
self.face = coin.SoFaceSet()
# init
# A shape hints tells the ordering of polygons.
# This ensures double-sided lighting.
self.hints.vertexOrdering = coin.SoShapeHints.COUNTERCLOCKWISE
self.hints.faceType = coin.SoShapeHints.CONVEX
# init styles
self.style1.style = coin.SoDrawStyle.FILLED
self.style2.style = coin.SoDrawStyle.LINES
self.style2.lineWidth = self.VObject.LineWidth
# init color
self.material.diffuseColor.setValue(self.VObject.ShapeColor[0],self.VObject.ShapeColor[1],self.VObject.ShapeColor[2])
self.material.transparency = self.VObject.Transparency/100.0
self.linecolor.rgb.setValue(self.VObject.LineColor[0],self.VObject.LineColor[1],self.VObject.LineColor[2])
# instructs to visit the first child (this is used to toggle visiblity)
self.switch.whichChild = coin.SO_SWITCH_ALL
# scene
#sep = coin.SoSeparator()
# not using a separator, but a FreeCAD Selection node
sep = coin.SoType.fromName("SoFCSelection").createInstance()
sep.documentName.setValue(self.Object.Document.Name)
sep.objectName.setValue(self.Object.Name)
sep.subElementName.setValue("Face")
# now adding the common children
sep.addChild(self.hints)
sep.addChild(self.data)
sep.addChild(self.switch)
# and finally the two groups, the first is the contour lines,
# the second is the filled faces, so we can switch between
# "Flat Lines", "Shaded" and "Wireframe". Note: not implementing "Points"
group0Line = coin.SoGroup()
self.switch.addChild(group0Line)
group0Line.addChild(self.style2)
group0Line.addChild(self.linecolor)
group0Line.addChild(self.face)
group1Face = coin.SoGroup()
self.switch.addChild(group1Face)
group1Face.addChild(self.material)
group1Face.addChild(self.style1)
group1Face.addChild(self.face)
self.VObject.RootNode.addChild(sep)
#FreeCAD.Console.PrintMessage("ViewProvider attach() completed\n")
return
def updateData(self, fp, prop):
''' If a property of the data object has changed we have the chance to handle this here
'fp' is the handled feature (the object)
'prop' is the name of the property that has changed
'''
#FreeCAD.Console.PrintMessage("ViewProvider updateData(), property: " + str(prop) + "\n") # debug
if prop == "Shape":
numpoints = len(self.Object.Proxy.shapePoints)
# this can be used to reset the number of points to the value actually needed
# (e.g. shorten the array, or pre-allocate it). However setValue() will automatically
# increase the array size if needed, and will NOT shorten it if less values are inserted
# This is less memory efficient, but faster; and in using the points in the SoFaceSet,
# we specify how many points (vertices) we want out of the total array, so no issue
# if the array is longer
#self.data.point.setNum(numpoints)
self.data.point.setValues(0,numpoints,self.Object.Proxy.shapePoints)
# 'numvertices' contains the number of vertices used for each face.
# Here all faces are quadrilaterals, so this is a long array of number '4's
numvertices = [4 for i in range(int(numpoints/4))]
# set the number of vertices per each face, for a total of len(numvertices) faces, starting from 0
# but must first delete all the old values, otherwise the remaining panels with vertices from
# 'numvertices+1' will still be shown
self.face.numVertices.deleteValues(0,-1)
self.face.numVertices.setValues(0,len(numvertices),numvertices)
#FreeCAD.Console.PrintMessage("numpoints " + str(numpoints) + "; numvertices " + str(numvertices) + "\n") # debug
#FreeCAD.Console.PrintMessage("self.Object.Proxy.shapePoints " + str(self.Object.Proxy.shapePoints) + "\n") # debug
#FreeCAD.Console.PrintMessage("self.data.point " + str(self.data.point.get()) + "\n") # debug
#FreeCAD.Console.PrintMessage("updateData() shape!\n") # debug
return
# def getDisplayModes(self,obj):
# '''Return a list of display modes.'''
# modes=[]
# modes.append("Shaded")
# modes.append("Wireframe")
# return modes
def onChanged(self, vp, prop):
''' If the 'prop' property changed for the ViewProvider 'vp' '''
#FreeCAD.Console.PrintMessage("ViewProvider onChanged(), property: " + str(prop) + "\n") # debug
if prop == "ShapeColor":
#self.color.rgb.setValue(self.VObject.ShapeColor[0],self.VObject.ShapeColor[1],self.VObject.ShapeColor[2])
self.material.diffuseColor.setValue(self.VObject.ShapeColor[0],self.VObject.ShapeColor[1],self.VObject.ShapeColor[2])
if prop == "Visibility" or prop=="DisplayMode":
if not vp.Visibility:
self.switch.whichChild = coin.SO_SWITCH_NONE
else:
if self.VObject.DisplayMode == "Wireframe":
self.switch.whichChild = 0
elif self.VObject.DisplayMode == "Shaded":
self.switch.whichChild = 1
else:
self.switch.whichChild = coin.SO_SWITCH_ALL
if prop == "LineColor":
self.linecolor.rgb.setValue(self.VObject.LineColor[0],self.VObject.LineColor[1],self.VObject.LineColor[2])
if prop == "LineWidth":
self.style2.lineWidth = self.VObject.LineWidth
if prop == "Transparency":
self.material.transparency = self.VObject.Transparency/100.0
def getDefaultDisplayMode(self):
''' Return the name of the default display mode. It must be defined in getDisplayModes. '''
return "Flat Lines"
# def setDisplayMode(self,mode):
# return mode
def claimChildren(self):
''' Used to place other objects as children in the tree'''
c = []
if hasattr(self,"Object"):
if hasattr(self.Object,"Base"):
c.append(self.Object.Base)
return c
def getIcon(self):
''' Return the icon which will appear in the tree view. This method is optional
and if not defined a default icon is shown.
'''
return os.path.join(iconPath, 'EM_VHConductor.svg')
def __getstate__(self):
return None
def __setstate__(self,state):
return None
class _CommandVHConductor:
''' The EM VoxHenry Conductor (VHConductor) command definition
'''
def GetResources(self):
return {'Pixmap' : os.path.join(iconPath, 'EM_VHConductor.svg') ,
'MenuText': QT_TRANSLATE_NOOP("EM_VHConductor","VHConductor"),
'Accel': "E, C",
'ToolTip': QT_TRANSLATE_NOOP("EM_VHConductor","Creates a VoxHenry Conductor object (voxelized 3D object) from a selected solid base object")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
# preferences
#p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/EM")
#self.Width = p.GetFloat("Width",200)
# get the selected object(s)
selection = FreeCADGui.Selection.getSelectionEx()
# if selection is not empty
done = False
for selobj in selection:
# automatic mode
if selobj.Object.isDerivedFrom("Part::Feature"):
FreeCAD.ActiveDocument.openTransaction(translate("EM","Create VHConductor"))
FreeCADGui.addModule("EM")
FreeCADGui.doCommand('obj=EM.makeVHConductor(FreeCAD.ActiveDocument.'+selobj.Object.Name+')')
# autogrouping, for later on
#FreeCADGui.addModule("Draft")
#FreeCADGui.doCommand("Draft.autogroup(obj)")
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()
# this is not a mistake. The double recompute() is needed to show the new FHNode object
# that have been created by the first execute(), called upon the first recompute()
FreeCAD.ActiveDocument.recompute()
done = True
if done == False:
FreeCAD.Console.PrintWarning(translate("EM","No valid object found in the selection for the creation of a VHConductor. Nothing done."))
class _CommandVHCondPortVoxelize:
''' The EM VoxHenry conductor (VHConductor) and port (VHPort) voxelize command definition
'''
def GetResources(self):
return {'Pixmap' : os.path.join(iconPath, 'EM_VHCondPortVoxelize.svg') ,
'MenuText': QT_TRANSLATE_NOOP("EM_VHCondPortVoxelize","VHCondPortVoxelize"),
'Accel': "E, V",
'ToolTip': QT_TRANSLATE_NOOP("EM_VHCondPortVoxelize","Voxelize the selected VHConductor(s) and VHPort(s)")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
# preferences
#p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/EM")
#self.Width = p.GetFloat("Width",200)
# get the selected object(s)
selection = FreeCADGui.Selection.getSelectionEx()
conds = []
ports = []
# if selection is not empty
for selobj in selection:
# screen the VHConductors and VHPorts
objType = Draft.getType(selobj.Object)
if objType == "VHConductor":
conds.append(selobj.Object)
elif objType == "VHPort":
ports.append(selobj.Object)
if len(conds) > 0 or len(ports) > 0:
FreeCAD.ActiveDocument.openTransaction(translate("EM","Voxelize VHConductors and VHPorts"))
FreeCADGui.addModule("EM")
for cond in conds:
FreeCADGui.doCommand('FreeCAD.ActiveDocument.'+cond.Name+'.Proxy.voxelizeConductor()')
for port in ports:
FreeCADGui.doCommand('FreeCAD.ActiveDocument.'+port.Name+'.Proxy.voxelizePort()')
FreeCAD.ActiveDocument.commitTransaction()
# recompute the document (assuming something has changed; otherwise this is dummy)
FreeCAD.ActiveDocument.recompute()
if FreeCAD.GuiUp:
FreeCADGui.addCommand('EM_VHConductor',_CommandVHConductor())
FreeCADGui.addCommand('EM_VHCondPortVoxelize',_CommandVHCondPortVoxelize())

175
EM_VHInputFile.py Normal file
View File

@ -0,0 +1,175 @@
#***************************************************************************
#* *
#* Copyright (c) 2019 *
#* FastFieldSolvers S.R.L., http://www.fastfieldsolvers.com *
#* *
#* This program is free software; you can redistribute it and/or modify *
#* it under the terms of the GNU Lesser General Public License (LGPL) *
#* as published by the Free Software Foundation; either version 2 of *
#* the License, or (at your option) any later version. *
#* for detail see the LICENCE text file. *
#* *
#* 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 Library General Public License for more details. *
#* *
#* You should have received a copy of the GNU Library 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 *
#* *
#***************************************************************************
__title__="FreeCAD E.M. Workbench VoxHenry create input file command"
__author__ = "FastFieldSolvers S.R.L."
__url__ = "http://www.fastfieldsolvers.com"
import FreeCAD, FreeCADGui, Mesh, Part, MeshPart, Draft, DraftGeomUtils, os
from FreeCAD import Vector
from PySide import QtCore, QtGui
if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtCore, QtGui
from DraftTools import translate
from PySide.QtCore import QT_TRANSLATE_NOOP
else:
# \cond
def translate(ctxt,txt, utf8_decode=False):
return txt
def QT_TRANSLATE_NOOP(ctxt,txt):
return txt
# \endcond
__dir__ = os.path.dirname(__file__)
iconPath = os.path.join( __dir__, 'Resources' )
def createVHInputFile(doc=None,filename=None,folder=None):
'''Outputs a VoxHenry input file based on the active document geometry
'doc' is the Document object that must contain at least one
EM_VHSolver object and the relevant geometry.
If no 'doc' is given, the active document is used, if any.
'filename' is the filename to use. If not passed as an argument,
the 'Filename' property of the VHSolver object contained in the document
will be used. If the "Filename" string in the VHSolver object is empty,
the function builds a filename concatenating the document name
with the default extension EMVHSOLVER_DEF_FILENAME.
Whatever the name, if a file with the same name exists in the target
folder, the user is prompted to know if he/she wants to overwrite it.
'folder' is the folder where the file will be stored. If not passed
as an argument, the 'Folder' property of the VHSolver object
contained in the document will be used. If the 'Folder' string
in the VHSolver object is empty, the function defaults to the
user's home path (e.g. in Windows "C:\Documents and Settings\
username\My Documents", in Linux "/home/username")
Example:
createVHInputFile()
'''
if not doc:
doc = FreeCAD.ActiveDocument
if not doc:
FreeCAD.Console.PrintWarning(translate("EM","No active document available. Aborting."))
return
# get the solver object, if any
solver = [obj for obj in doc.Objects if Draft.getType(obj) == "VHSolver"]
if solver == []:
# error
FreeCAD.Console.PrintWarning(translate("EM","VHSolver object not found in the document. Aborting."))
return
else:
if len(solver) > 1:
FreeCAD.Console.PrintWarning(translate("EM","More than one VHSolver object found in the document. Using the first one."))
solver = solver[0]
if not filename:
# if 'filename' was not passed as an argument, retrieve it from the 'solver' object
# (this should be the standard way)
if solver.Filename == "":
# build a filename concatenating the document name
solver.Filename = doc.Name + EM.EMVHSOLVER_DEF_FILENAME
filename = solver.Filename
else:
# otherwise, if the user passed a filename to the function, update it in the 'solver' object
solver.Filename = filename
if not folder:
# if 'folder' was not passed as an argument, retrieve it from the 'solver' object
# (this should be the standard way)
if solver.Folder == "":
# if not specified, default to the user's home path
# (e.g. in Windows "C:\Documents and Settings\username\My Documents", in Linux "/home/username")
solver.Folder = FreeCAD.ConfigGet("UserHomePath")
folder = solver.Folder
if not os.path.isdir(folder):
# if 'folder' does not exists, create it
os.mkdir(folder)
# check if exists
if os.path.isfile(folder + os.sep + filename):
# filename already exists! Check if overwrite
diag = QtGui.QMessageBox()
diag.setText("File '" + str(filename) + "' exists in the folder '" + str(folder) + "'")
diag.setInformativeText("Do you want to overwrite?")
diag.setStandardButtons(QtGui.QMessageBox.Cancel | QtGui.QMessageBox.Ok)
ret = diag.exec_()
if ret == QtGui.QMessageBox.Cancel:
return
FreeCAD.Console.PrintMessage(QT_TRANSLATE_NOOP("EM","Exporting to VoxHenry file ") + "'" + folder + os.sep + filename + "'\n")
with open(folder + os.sep + filename, 'w') as fid:
# serialize the header
solver.Proxy.serialize(fid)
# check if there are superconductors
isSupercond = solver.Proxy.isSupercond()
if isSupercond:
fid.write("* Specify there are superconductors\n")
fid.write("Superconductor\n")
fid.write("\n")
# now the conductors
fid.write("* Voxel list\n")
fid.write("* Format is:\n")
fid.write("* V <index_x> <index_y> <index_z> <conductivity S/m>\n")
fid.write("*\n")
fid.write("StartVoxelList\n")
conds = [obj for obj in doc.Objects if Draft.getType(obj) == "VHConductor"]
for cond in conds:
FreeCAD.Console.PrintMessage(QT_TRANSLATE_NOOP("EM"," Exporting conductor ") + "'" + cond.Label + "'\n")
cond.Proxy.serialize(fid, isSupercond)
fid.write("EndVoxelList\n")
fid.write("\n")
# then the ports
ports = [obj for obj in doc.Objects if Draft.getType(obj) == "VHPort"]
if ports:
fid.write("* Port nodes list\n")
fid.write("* Format is:\n")
fid.write("* N <portname> <excitation or ground (P/N)> <voxel_index_x> <voxel_index_y> <voxel_index_z> <node (+z,-z,+x,-x,+y,-y)>\n")
fid.write("*\n")
for port in ports:
port.Proxy.serialize(fid)
fid.write("\n")
FreeCAD.Console.PrintMessage(QT_TRANSLATE_NOOP("EM","Finished exporting")+"\n")
class _CommandVHInputFile:
''' The EM VoxHenry create input file command definition
'''
def GetResources(self):
return {'Pixmap' : os.path.join(iconPath, 'EM_VHInputFile.svg') ,
'MenuText': QT_TRANSLATE_NOOP("EM_VHInputFile","VHInputFile"),
'Accel': "E, I",
'ToolTip': QT_TRANSLATE_NOOP("EM_VHInputFile","Creates a FastHenry input file")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
# preferences
#p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/EM")
#self.Width = p.GetFloat("Width",200)
FreeCAD.ActiveDocument.openTransaction(translate("EM","Create a VoxHenry file"))
FreeCADGui.addModule("EM")
FreeCADGui.doCommand('obj=EM.createVHInputFile(App.ActiveDocument)')
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()
if FreeCAD.GuiUp:
FreeCADGui.addCommand('EM_VHInputFile',_CommandVHInputFile())

737
EM_VHPort.py Normal file
View File

@ -0,0 +1,737 @@
#***************************************************************************
#* *
#* Copyright (c) 2019 *
#* FastFieldSolvers S.R.L., http://www.fastfieldsolvers.com *
#* *
#* This program is free software; you can redistribute it and/or modify *
#* it under the terms of the GNU Lesser General Public License (LGPL) *
#* as published by the Free Software Foundation; either version 2 of *
#* the License, or (at your option) any later version. *
#* for detail see the LICENCE text file. *
#* *
#* 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 Library General Public License for more details. *
#* *
#* You should have received a copy of the GNU Library 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 *
#* *
#***************************************************************************
__title__="FreeCAD E.M. Workbench VoxHenry Port Class"
__author__ = "FastFieldSolvers S.R.L."
__url__ = "http://www.fastfieldsolvers.com"
# default port colors
EMVHPORT_DEF_POSPORTCOLOR = (1.0,0.0,0.0)
EMVHPORT_DEF_NEGPORTCOLOR = (0.0,0.0,0.0)
EMVHPORT_DEF_LINECOLOR = (0.25, 0.25, 0.25)
# displacement percentage fraction of the voxel dimension
EMVHPORT_EPSDELTA = 10.0
# side strings
EMVHPORT_SIDESTRS = ['+x', '-x', '+y', '-y', '+z', '-z']
import FreeCAD, FreeCADGui, Part, Draft, DraftGeomUtils, os
import DraftVecUtils
from EM_Globals import getVHSolver
from FreeCAD import Vector
import time
from pivy import coin
if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtCore, QtGui
from DraftTools import translate
from PySide.QtCore import QT_TRANSLATE_NOOP
else:
# \cond
def translate(ctxt,txt, utf8_decode=False):
return txt
def QT_TRANSLATE_NOOP(ctxt,txt):
return txt
# \endcond
__dir__ = os.path.dirname(__file__)
iconPath = os.path.join( __dir__, 'Resources' )
def makeVHPortFromSel(selection=[]):
''' Creates a VoxHenry Port from the selection
'selection' is a selection object (from getSelectionEx() )
The selection object must contain at least two faces
Example:
port = makeVHPortFromSel(FreeCADGui.Selection.getSelectionEx())
'''
port = None
# if selection is not empty
if len(selection) > 0:
real_faces = []
# get all the subobjects of the selection (faces, edges, etc.)
for selobj in selection:
if selobj.HasSubObjects:
# screen out the faces
for sobj in selobj.SubElementNames:
if "Face" in sobj:
real_faces.append((selobj.Object, (sobj,)))
real_faces_len = len(real_faces)
# need at least two faces to make a port
if real_faces_len > 1:
mid = int(real_faces_len / 2)
port = makeVHPort(real_faces[0:mid],real_faces[mid:real_faces_len])
if port is None:
FreeCAD.Console.PrintWarning(translate("EM","No faces selected for the creation of a VHPort (need at least two). Nothing done."))
return port
def makeVHPort(posFaces=None,negFaces=None,name='VHPort'):
''' Creates a VoxHenry Port (a set of two voxelized faces, representing the positive and negative contacts)
'posFaces' is a list of faces of a 3D solid object that is forming the positive
contact of the port. If no 'posFace' is given, the user must assign a list
later on, to be able to use this object.
'negFaces' is a list of faces of a 3D solid object that is forming the negative
contact of the port. If no 'negFace' is given, the user must assign a list
later on, to be able to use this object.
'name' is the name of the object
Example:
port = makeVHPort(myPosFaces, myNegFaces)
'''
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", name)
obj.Label = translate("EM", name)
# this adds the relevant properties to the object
#'obj' (e.g. 'Base' property) making it a _VHPort
_VHPort(obj)
# manage ViewProvider object
if FreeCAD.GuiUp:
_ViewProviderVHPort(obj.ViewObject)
# set base ViewObject properties to user-selected values (if any)
# check if 'posFaces' contains valid faces
real_faces = obj.PosFaces
if posFaces != []:
# screen out the faces
for face in posFaces:
if "Face" in face[1][0]:
real_faces.append(face)
# cannot directly append to 'obj.PosFaces' as this is a PropertyLinkSubList object,
# that automatically detect multiple instances of the same Part::Feature,
# and merges the sub-object lists (e.g. faces)
obj.PosFaces = real_faces
# check if 'negFaces' contains valid faces
real_faces = obj.NegFaces
if negFaces != []:
# screen out the faces
for face in negFaces:
if "Face" in face[1][0]:
real_faces.append(face)
# cannot directly append to 'obj.PosFaces' as this is a PropertyLinkSubList object,
# that automatically detect multiple instances of the same Part::Feature,
# and merges the sub-object lists (e.g. faces)
obj.NegFaces = real_faces
# return the newly created Python object
return obj
class _VHPort:
'''The EM VoxHenry Port object'''
def __init__(self, obj):
# save the object in the class, to store or retrieve specific data from it
# from within the class
self.Object = obj
''' Add properties '''
obj.addProperty("App::PropertyLinkSubList", "PosFaces", "EM", QT_TRANSLATE_NOOP("App::Property","The list of faces forming the positive contact of the port"))
obj.addProperty("App::PropertyLinkSubList", "NegFaces", "EM", QT_TRANSLATE_NOOP("App::Property","The list of faces forming the negative contact of the port"))
obj.addProperty("App::PropertyBool","ShowVoxels","EM",QT_TRANSLATE_NOOP("App::Property","Show the voxelization"))
obj.addProperty("App::PropertyInteger","DeltaDist","EM",QT_TRANSLATE_NOOP("App::Property","Distance as percentage of the delta voxel dimension to consider a port face as belonging to a voxel"))
obj.addProperty("App::PropertyBool","isVoxelized","EM",QT_TRANSLATE_NOOP("App::Property","Flags if the port has been voxelized (read only)"),1)
obj.addProperty("App::PropertyIntegerList","PosVoxelContacts","EM",QT_TRANSLATE_NOOP("App::Property","Positive Contacts (hidden)"),4)
obj.addProperty("App::PropertyIntegerList","NegVoxelContacts","EM",QT_TRANSLATE_NOOP("App::Property","Negative Contacts (hidden)"),4)
obj.ShowVoxels = False
obj.Proxy = self
obj.DeltaDist = int(50 + 50/EMVHPORT_EPSDELTA)
obj.isVoxelized = False
obj.PosVoxelContacts = []
obj.NegVoxelContacts = []
self.posContactShapePoints = []
self.negContactShapePoints = []
self.Type = "VHPort"
def onChanged(self, obj, prop):
''' take action if an object property 'prop' changed
'''
#FreeCAD.Console.PrintWarning("\n_VHPort onChanged(" + str(prop)+")\n") #debug
# on restore, some self.Objects are not there anymore (JSON does not serialize complex objects
# members of the class, so __getstate__() and __setstate__() skip them);
# so we must "re-attach" (re-create) the 'self.Objects'
if not hasattr(self,"Object"):
self.Object = obj
if prop == "DeltaDist":
self.flagVoxelizationInvalid()
def execute(self, obj):
''' this method is mandatory. It is called on Document.recompute()
'''
#FreeCAD.Console.PrintWarning("_VHPort execute()\n") #debug
# if no faces were assigned to the port, exit
if len(obj.PosFaces) == 0 and len(obj.NegFaces) == 0:
return
shape = None
# Check if the user selected to see the voxelization, and if the voxelization exists
if obj.ShowVoxels == True:
# get the VHSolver object
solver = getVHSolver()
if solver is not None:
gbbox = solver.Proxy.getGlobalBBox()
delta = solver.Proxy.getDelta()
# getting the voxel space may cause the voxelization of this VHConductor to become invalid,
# if the global bounding box is found to have changed, or VHSolver 'Delta' changed over time, etc.
voxelSpace = solver.Proxy.getVoxelSpace()
if obj.isVoxelized == False:
FreeCAD.Console.PrintWarning(translate("EM","Cannot fulfill 'ShowVoxels', VHPort objects has not been voxelized, or voxelization is invalid (e.g. change in voxel space dimensions or no voxelized conductor). Voxelize it first.\n"))
else:
self.posContactShapePoints = []
posContact = self.createVoxelShellFastCoin(self.posContactShapePoints, obj.PosVoxelContacts,gbbox,delta,voxelSpace)
self.negContactShapePoints = []
negContact = self.createVoxelShellFastCoin(self.negContactShapePoints, obj.NegVoxelContacts,gbbox,delta,voxelSpace)
if posContact and negContact:
shape = True
else:
FreeCAD.Console.PrintWarning(translate("EM","Cannot create VHPort shell, voxelized pos or neg contact shell creation failed"))
if shape is None:
# if we don't show the voxelized view of the object, let's show the faces
self.posContactShapePoints = []
self.negContactShapePoints = []
faces = self.getFaces(obj.PosFaces)
posContact = Part.makeCompound(faces)
faces = self.getFaces(obj.NegFaces)
negContact = Part.makeCompound(faces)
shape = Part.makeCompound([posContact,negContact])
# and finally assign the shape (but only if we were able to create any)
obj.Shape = shape
# force the color, if FreeCAD has a GUI and therefore the object has a ViewObject.
# must do it from here, as from within the ViewObject we cannot force the reconstruction of the coin3D
# scenegraph representation, that is using the ShapeColor
if FreeCAD.GuiUp:
obj.ViewObject.DiffuseColor = [obj.ViewObject.PosPortColor for x in range(0,len(obj.PosFaces))] + [obj.ViewObject.NegPortColor for x in range(0,len(obj.NegFaces))]
else:
# make a dummy empty shape. Representation is through custom coin3d scenegraph.
obj.Shape = Part.makeShell([])
#FreeCAD.Console.PrintWarning("_VHPort execute() ends\n") #debug
def getFaces(self,faceSubObjs):
''' Get the face objects from an App::PropertyLinkSubList
'faceSubObjs' an App::PropertyLinkSubList list of objects and face names. Each element of the list
has the format (Part::Feature, ('FaceXXX',)) where XXX is the face number.
The tuple ('FaceXXX',) may also contain multiple face names.
Returns a list of face objects
'''
faces = []
for obj in faceSubObjs:
if obj[0].isDerivedFrom("Part::Feature"):
for sub in obj[1]:
if "Face" in sub:
fn = int(sub[4:])-1
faces.append(obj[0].Shape.Faces[fn])
return faces
def createVoxelShell(self,contacts,gbbox,delta,voxelSpace=None):
''' Creates a shell composed by the external faces of a voxelized port.
'contacts' is the list of contacts (see voxelizeContact() for the format)
'gbbox' (FreeCAD.BoundBox) is the overall bounding box
'delta' is the voxels size length
'voxelSpace' (Numpy 3D array) is the voxel tensor of the overall space
Remark: the VHPort must have already been voxelized
'''
if voxelSpace is None:
return
# small displacement w.r.t. delta
epsdelta = delta/EMVHPORT_EPSDELTA
# vertexes of the six faces (with a slight offset)
vertexes = [[Vector(delta+epsdelta,0,0), Vector(delta+epsdelta,delta,0), Vector(delta+epsdelta,delta,delta), Vector(delta+epsdelta,0,delta)],
[Vector(-epsdelta,0,0), Vector(-epsdelta,0,delta), Vector(-epsdelta,delta,delta), Vector(-epsdelta,delta,0)],
[Vector(0,delta+epsdelta,0), Vector(0,delta+epsdelta,delta), Vector(delta,delta+epsdelta,delta), Vector(delta,delta+epsdelta,0)],
[Vector(0,-epsdelta,0), Vector(delta,-epsdelta,0), Vector(delta,-epsdelta,delta), Vector(0,-epsdelta,delta)],
[Vector(0,0,delta+epsdelta), Vector(delta,0,delta+epsdelta), Vector(delta,delta,delta+epsdelta), Vector(0,delta,delta+epsdelta)],
[Vector(0,0,-epsdelta), Vector(0,delta,-epsdelta), Vector(delta,delta,-epsdelta), Vector(delta,0,-epsdelta)]]
surfList = []
# and now iterate through all the contact faces, and create FreeCAD Part.Faces
for contact in contacts:
vbase = Vector(gbbox.XMin + contact[0] * delta, gbbox.YMin + contact[1] * delta, gbbox.ZMin + contact[2] * delta)
# the third element of 'contact' is the
# index of the sides, order is ['+x', '-x', '+y', '-y', '+z', '-z']
vertex = vertexes[contact[3]]
# create the face
# calculate the vertexes
v11 = vbase + vertex[0]
v12 = vbase + vertex[1]
v13 = vbase + vertex[2]
v14 = vbase + vertex[3]
# now make the face
poly = Part.makePolygon( [v11,v12,v13,v14,v11])
contFace = Part.Face(poly)
surfList.append(contFace)
# create the shell out of the list of faces
contactShell = None
if len(surfList) > 0:
# create a shell. Does not need to be solid.
contactShell = Part.makeShell(surfList)
return contactShell
def createVoxelShellFastCoin(self,shapePoints,contacts,gbbox,delta,voxelSpace=None):
''' Creates a shell composed by the external faces of a voxelized port.
'contacts' is the list of contacts (see voxelizeContact() for the format)
'gbbox' (FreeCAD.BoundBox) is the overall bounding box
'delta' is the voxels size length
'voxelSpace' (Numpy 3D array) is the voxel tensor of the overall space
Remark: the VHPort must have already been voxelized
'''
if voxelSpace is None:
return None
# small displacement w.r.t. delta
epsdelta = delta/EMVHPORT_EPSDELTA
# vertexes of the six faces (with a slight offset)
vertexes = [[Vector(delta+epsdelta,0,0), Vector(delta+epsdelta,delta,0), Vector(delta+epsdelta,delta,delta), Vector(delta+epsdelta,0,delta)],
[Vector(-epsdelta,0,0), Vector(-epsdelta,0,delta), Vector(-epsdelta,delta,delta), Vector(-epsdelta,delta,0)],
[Vector(0,delta+epsdelta,0), Vector(0,delta+epsdelta,delta), Vector(delta,delta+epsdelta,delta), Vector(delta,delta+epsdelta,0)],
[Vector(0,-epsdelta,0), Vector(delta,-epsdelta,0), Vector(delta,-epsdelta,delta), Vector(0,-epsdelta,delta)],
[Vector(0,0,delta+epsdelta), Vector(delta,0,delta+epsdelta), Vector(delta,delta,delta+epsdelta), Vector(0,delta,delta+epsdelta)],
[Vector(0,0,-epsdelta), Vector(0,delta,-epsdelta), Vector(delta,delta,-epsdelta), Vector(delta,0,-epsdelta)]]
# and now iterate through all the contact faces, and create FreeCAD Part.Faces
# The contact list is flat (to be able to store it as a PropertyIntegerList) so must go in steps of 4
for contactIndex in range(0,len(contacts),4):
vbase = Vector(gbbox.XMin + contacts[contactIndex] * delta, gbbox.YMin + contacts[contactIndex+1] * delta, gbbox.ZMin + contacts[contactIndex+2] * delta)
# the third element of 'contact' is the
# index of the sides, order is ['+x', '-x', '+y', '-y', '+z', '-z']
vertex = vertexes[contacts[contactIndex+3]]
# create the face
# calculate the vertexes
v11 = vbase + vertex[0]
v12 = vbase + vertex[1]
v13 = vbase + vertex[2]
v14 = vbase + vertex[3]
# now make the face
shapePoints.extend([v11,v12,v13,v14])
# create the shell out of the list of faces
if len(shapePoints) > 0:
return True
else:
return None
def voxelizePort(self):
''' Voxelize the port object, i.e. find all the voxel faces belonging to the port
The two list of voxel faces are assigned to internal variables
'''
if len(self.Object.PosFaces) == 0 and len(self.Object.NegFaces) == 0:
FreeCAD.Console.PrintWarning(translate("EM","Cannot voxelize port, no faces assigned to the port\n"))
return
# get the VHSolver object
solver = getVHSolver()
if solver is None:
return
FreeCAD.Console.PrintMessage(translate("EM","Starting voxelization of port ") + self.Object.Label + "...\n")
# get global parameters from the VHSolver object
gbbox = solver.Proxy.getGlobalBBox()
delta = solver.Proxy.getDelta()
voxelSpace = solver.Proxy.getVoxelSpace()
if voxelSpace is None:
FreeCAD.Console.PrintWarning(translate("EM","VoxelSpace not valid, cannot voxelize port\n"))
return
self.PosVoxelFaces = None
self.NegVoxelFaces = None
if len(self.Object.PosFaces) > 0:
self.Object.PosVoxelContacts = self.voxelizeContact(self.Object.PosFaces,gbbox,delta,self.Object.DeltaDist/100.0,voxelSpace)
if len(self.Object.NegFaces) > 0:
self.Object.NegVoxelContacts = self.voxelizeContact(self.Object.NegFaces,gbbox,delta,self.Object.DeltaDist/100.0,voxelSpace)
if len(self.Object.PosVoxelContacts) == 0 or len(self.Object.NegVoxelContacts) == 0:
FreeCAD.Console.PrintWarning(translate("EM","No voxelized contacts created, could not voxelize port. Is there any voxelized conductor in the space by the port?\n"))
else:
self.Object.isVoxelized = True
# if just voxelized, cannot show voxels; and if there was an old shell representing
# the previoius voxelization, must clear it
self.Object.ShowVoxels = False
FreeCAD.Console.PrintMessage(translate("EM","Voxelization of the port completed.\n"))
def voxelizeContact(self,faceSubobjs,gbbox,delta,deltadist,voxelSpace=None):
''' Find the voxel surface sides corresponding to the given contact surface
(face) of an object. The object must have already been voxelized.
'face' is the object face
'condIndex' (integer) is the index of the object to which the face belongs.
It defines the object conductivity.
'gbbox' (FreeCAD.BoundBox) is the overall bounding box
'delta' is the voxels size length
'voxelSpace' (Numpy 3D array) is the voxel tensor of the overall space
'createShell' (bool) creates a shell out of the contact faces
Returns a list of surfaces in the format x,y,z,voxside (all integers) repeated n times where
x, y, z are the voxel position indexes, while voxside is '+x', '-x',
'+y', '-y', '+z', '-z' according the the impacted surface of the voxel.
The list is flat to allow it to be stored in a PropertyIntegerList
'''
if voxelSpace is None:
return []
contactList = []
# get the faces bbox
faces = self.getFaces(faceSubobjs)
if len(faces) == 0:
return []
bbox = FreeCAD.BoundBox()
for face in faces:
bbox.add(face.BoundBox)
if not bbox.isValid():
return []
# check if we are still within the global bbox
if not gbbox.isInside(bbox):
FreeCAD.Console.PrintWarning(translate("EM","Port faces bounding box is larger than the global bounding box. Cannot voxelize port.\n"))
return []
# now must find the voxel set that contains the faces bounding box
# with a certain slack - it could be the next voxel,
# if the surface is at the boundary between voxels.
# Find the voxel that contains the bbox min point
# (if negative, take zero)
min_x = max(int((bbox.XMin - gbbox.XMin)/delta)-2, 0)
min_y = max(int((bbox.YMin - gbbox.YMin)/delta)-2, 0)
min_z = max(int((bbox.ZMin - gbbox.ZMin)/delta)-2, 0)
# find the voxel that contains the bbox max point
# (if larger than the voxelSpace, set to voxelSpace max dim,
# we already verified that 'bbox' fits into 'gbbox')
vs_size = voxelSpace.shape
max_x = min(int((bbox.XMax - gbbox.XMin)/delta)+2, vs_size[0]-1)
max_y = min(int((bbox.YMax - gbbox.YMin)/delta)+2, vs_size[1]-1)
max_z = min(int((bbox.ZMax - gbbox.ZMin)/delta)+2, vs_size[2]-1)
# create a Part.Vertex that we can use to test the distance
# to the face (as it is a TopoShape)
vec = FreeCAD.Vector(0,0,0)
testVertex = Part.Vertex(vec)
# this is half the side of the voxel
halfdelta = delta/2.0
# array to find the six neighbors
sides = [(1,0,0), (-1,0,0), (0,1,0), (0,-1,0), (0,0,1), (0,0,-1)]
# index of the sides, order is ['+x', '-x', '+y', '-y', '+z', '-z']
sideStrs = range(6)
# centers of the sides, with respect to the lower corner (with the smallest coordinates)
sideCenters = [Vector(delta,halfdelta,halfdelta), Vector(0.0,halfdelta,halfdelta),
Vector(halfdelta,delta,halfdelta), Vector(halfdelta,0.0,halfdelta),
Vector(halfdelta,halfdelta,delta), Vector(halfdelta,halfdelta,0.0)]
# and now iterate to find which voxel is inside the bounding box of the 'face',
vbase = Vector(gbbox.XMin + min_x * delta, gbbox.YMin + min_y * delta, gbbox.ZMin + min_z * delta)
for step_x in range(min_x,max_x+1):
vbase.y = gbbox.YMin + min_y * delta
for step_y in range(min_y,max_y+1):
vbase.z = gbbox.ZMin + min_z * delta
for step_z in range(min_z,max_z+1):
# check if voxel is belonging to an object
if voxelSpace[step_x,step_y,step_z] != 0:
# scan the six neighbor voxels, to see if they are belonging to the conductor or not.
# If they are not belonging to the conductor, or if the voxel space is finished, the current voxel
# side in the direction of the empty voxel is an external surface
for side, sideStr, sideCenter in zip(sides,sideStrs,sideCenters):
is_surface = False
nextVoxelIndexes = [step_x+side[0],step_y+side[1],step_z+side[2]]
if (nextVoxelIndexes[0] > max_x or nextVoxelIndexes[0] < 0 or
nextVoxelIndexes[1] > max_y or nextVoxelIndexes[1] < 0 or
nextVoxelIndexes[2] > max_z or nextVoxelIndexes[2] < 0):
is_surface = True
else:
if voxelSpace[nextVoxelIndexes[0],nextVoxelIndexes[1],nextVoxelIndexes[2]] == 0:
is_surface = True
if is_surface == True:
testVertex.Placement.Base = vbase + sideCenter
# if the point is close enough to the face(s), we consider
# the voxel surface as belonging to the voxelized face(s);
# to this goal, take the shortest distance from any of the faces
mindist = bbox.DiagonalLength
for face in faces:
dist = abs(testVertex.distToShape(face)[0])
if dist < mindist:
mindist = dist
if mindist < (delta*deltadist):
contactList.extend([step_x,step_y,step_z,sideStr])
vbase.z += delta
vbase.y += delta
vbase.x += delta
return contactList
def flagVoxelizationInvalid(self):
''' Flags the voxelization as invalid
'''
self.Object.isVoxelized = False
self.Object.ShowVoxels = False
def getBaseObj(self):
''' Retrieves the Base object.
Returns the Base object.
'''
return self.Object.Base
def getCondIndex(self):
''' Retrieves the conductor index.
Returns the int16 conductor index.
'''
return self.Object.CondIndex
def setVoxelState(self,isVoxelized):
''' Sets the voxelization state.
'''
self.Object.isVoxelized = isVoxelized
def serialize(self,fid):
''' Serialize the object to the 'fid' file descriptor
'''
# index of the sides, order is ['+x', '-x', '+y', '-y', '+z', '-z']
sideStrs = range(6)
if self.Object.isVoxelized == True:
fid.write("* Port " + str(self.Object.Label) + "\n")
name = "N " + str(self.Object.Label) + " P "
self.serializeContact(fid,name,self.Object.PosVoxelContacts)
name = "N " + str(self.Object.Label) + " N "
self.serializeContact(fid,name,self.Object.NegVoxelContacts)
else:
FreeCAD.Console.PrintWarning(translate("EM","Object not voxelized, cannot serialize ") + str(self.Object.Label) + "\n")
def serializeContact(self,fid,name,contacts):
''' Serialize the contact to the 'fid' file descriptor
'contacts' is the list of contacts (see voxelizeContact() for the format)
'''
for contactIndex in range(0,len(contacts),4):
# remark: VoxHenry voxel tensor is 1-based, not 0-based. Must add 1
fid.write(name + " " + str(contacts[contactIndex+0]+1) + " " + str(contacts[contactIndex+1]+1) + " " + str(contacts[contactIndex+2]+1) + " " + EMVHPORT_SIDESTRS[contacts[contactIndex+3]] + "\n")
def __getstate__(self):
# JSON does not understand FreeCAD.Vector, so need to convert to tuples
negConShapePointsJSON = [(x[0],x[1],x[2]) for x in self.negContactShapePoints]
posConShapePointsJSON = [(x[0],x[1],x[2]) for x in self.posContactShapePoints]
dictForJSON = {'nsp':negConShapePointsJSON,'psp':posConShapePointsJSON,'type':self.Type}
#FreeCAD.Console.PrintMessage("Save\n"+str(dictForJSON)+"\n") #debug
return dictForJSON
def __setstate__(self,dictForJSON):
if dictForJSON:
#FreeCAD.Console.PrintMessage("Load\n"+str(dictForJSON)+"\n") #debug
# no need to convert back to FreeCAD.Vectors, 'shapePoints' can also be tuples
self.negContactShapePoints = dictForJSON['nsp']
self.posContactShapePoints = dictForJSON['psp']
self.Type = dictForJSON['type']
class _ViewProviderVHPort:
def __init__(self, vobj):
''' Set this object to the proxy object of the actual view provider '''
vobj.addProperty("App::PropertyColor","PosPortColor","Base","")
vobj.addProperty("App::PropertyColor","NegPortColor","Base","")
vobj.PosPortColor = EMVHPORT_DEF_POSPORTCOLOR
vobj.NegPortColor = EMVHPORT_DEF_NEGPORTCOLOR
# set also default LineColor
vobj.LineColor = EMVHPORT_DEF_LINECOLOR
# remark: these associations must *follow* the addition of the custom properties,
# or attach() will be called before the properties are created
vobj.Proxy = self
self.VObject = vobj
self.Object = vobj.Object
def attach(self, vobj):
''' Setup the scene sub-graph of the view provider, this method is mandatory '''
# on restore, self.Object is not there anymore (JSON does not serialize complex objects
# members of the class, so __getstate__() and __setstate__() skip them);
# so we must "re-attach" (re-create) the 'self.Object'
self.Object = vobj.Object
self.VObject = vobj
# actual representation
self.switch = coin.SoSwitch()
self.hints = coin.SoShapeHints()
self.style1 = coin.SoDrawStyle()
self.style2 = coin.SoDrawStyle()
self.materialPos = coin.SoMaterial()
self.materialNeg = coin.SoMaterial()
self.linecolor = coin.SoBaseColor()
self.dataPos = coin.SoCoordinate3()
self.dataNeg = coin.SoCoordinate3()
self.facePos = coin.SoFaceSet()
self.faceNeg = coin.SoFaceSet()
# init
# A shape hints tells the ordering of polygons.
# This ensures double-sided lighting.
self.hints.vertexOrdering = coin.SoShapeHints.COUNTERCLOCKWISE
self.hints.faceType = coin.SoShapeHints.CONVEX
# init styles
self.style1.style = coin.SoDrawStyle.FILLED
self.style2.style = coin.SoDrawStyle.LINES
self.style2.lineWidth = self.VObject.LineWidth
# init color
self.materialPos.diffuseColor.setValue(self.VObject.PosPortColor[0],self.VObject.PosPortColor[1],self.VObject.PosPortColor[2])
self.materialPos.transparency = self.VObject.Transparency/100.0
self.materialNeg.diffuseColor.setValue(self.VObject.NegPortColor[0],self.VObject.NegPortColor[1],self.VObject.NegPortColor[2])
self.materialNeg.transparency = self.VObject.Transparency/100.0
self.linecolor.rgb.setValue(self.VObject.LineColor[0],self.VObject.LineColor[1],self.VObject.LineColor[2])
# instructs to visit the first child (this is used to toggle visiblity)
self.switch.whichChild = coin.SO_SWITCH_ALL
# scene
#sep = coin.SoSeparator()
# not using a separator, but a FreeCAD Selection node
sep = coin.SoType.fromName("SoFCSelection").createInstance()
sep.documentName.setValue(self.Object.Document.Name)
sep.objectName.setValue(self.Object.Name)
sep.subElementName.setValue("Face")
# now adding the common children
sep.addChild(self.hints)
sep.addChild(self.switch)
# and finally the two groups, the first is the contour lines,
# the second is the filled faces, so we can switch between
# "Flat Lines", "Shaded" and "Wireframe". Note: not implementing "Points"
group0Line = coin.SoGroup()
self.switch.addChild(group0Line)
group0Line.addChild(self.style2)
group0Line.addChild(self.linecolor)
group0Line.addChild(self.dataPos)
group0Line.addChild(self.facePos)
group0Line.addChild(self.dataNeg)
group0Line.addChild(self.faceNeg)
group1Face = coin.SoGroup()
self.switch.addChild(group1Face)
group1Face.addChild(self.materialPos)
group1Face.addChild(self.style1)
group1Face.addChild(self.dataPos)
group1Face.addChild(self.facePos)
group1Face.addChild(self.materialNeg)
group1Face.addChild(self.style1)
group1Face.addChild(self.dataNeg)
group1Face.addChild(self.faceNeg)
self.VObject.RootNode.addChild(sep)
#FreeCAD.Console.PrintMessage("ViewProvider attach() completed\n")
return
def updateData(self, fp, prop):
''' If a property of the data object has changed we have the chance to handle this here
'fp' is the handled feature (the object)
'prop' is the name of the property that has changed
'''
#FreeCAD.Console.PrintMessage("ViewProvider updateData(), property: " + str(prop) + "\n") # debug
if prop == "Shape":
numpointsPos = len(self.Object.Proxy.posContactShapePoints)
numpointsNeg = len(self.Object.Proxy.negContactShapePoints)
# this can be used to reset the number of points to the value actually needed
# (e.g. shorten the array, or pre-allocate it). However setValue() will automatically
# increase the array size if needed, and will NOT shorten it if less values are inserted
# This is less memory efficient, but faster; and in using the points in the SoFaceSet,
# we specify how many points (vertices) we want out of the total array, so no issue
# if the array is longer
#self.data.point.setNum(numpoints)
self.dataPos.point.setValues(0,numpointsPos,self.Object.Proxy.posContactShapePoints)
self.dataNeg.point.setValues(0,numpointsNeg,self.Object.Proxy.negContactShapePoints)
# 'numvertices' contains the number of vertices used for each face.
# Here all faces are quadrilaterals, so this is a long array of number '4's
numverticesPos = [4 for i in range(int(numpointsPos/4))]
numverticesNeg = [4 for i in range(int(numpointsNeg/4))]
# set the number of vertices per each face, for a total of len(numvertices) faces, starting from 0
# but must first delete all the old values, otherwise the remaining panels with vertices from
# 'numvertices+1' will still be shown
self.facePos.numVertices.deleteValues(0,-1)
self.facePos.numVertices.setValues(0,len(numverticesPos),numverticesPos)
self.faceNeg.numVertices.deleteValues(0,-1)
self.faceNeg.numVertices.setValues(0,len(numverticesNeg),numverticesNeg)
#FreeCAD.Console.PrintMessage("numpoints " + str(numpoints) + "; numvertices " + str(numvertices) + "\n") # debug
#FreeCAD.Console.PrintMessage("self.Object.Proxy.shapePoints " + str(self.Object.Proxy.shapePoints) + "\n") # debug
#FreeCAD.Console.PrintMessage("self.data.point " + str(self.data.point.get()) + "\n") # debug
#FreeCAD.Console.PrintMessage("updateData() shape!\n") # debug
return
def onChanged(self, vp, prop):
''' If the 'prop' property changed for the ViewProvider 'vp' '''
#FreeCAD.Console.PrintMessage("ViewProvider onChanged(), property: " + str(prop) + "\n") # debug
if not hasattr(self,"VObject"):
self.VObject = vp
# if there is a coin3d custom representation
if self.Object.isVoxelized and self.Object.ShowVoxels:
if prop == "PosPortColor" or prop == "NegPortColor":
self.materialPos.diffuseColor.setValue(self.VObject.PosPortColor[0],self.VObject.PosPortColor[1],self.VObject.PosPortColor[2])
self.materialNeg.diffuseColor.setValue(self.VObject.NegPortColor[0],self.VObject.NegPortColor[1],self.VObject.NegPortColor[2])
if prop == "Visibility" or prop=="DisplayMode":
if not vp.Visibility:
self.switch.whichChild = coin.SO_SWITCH_NONE
else:
if self.VObject.DisplayMode == "Wireframe":
self.switch.whichChild = 0
elif self.VObject.DisplayMode == "Shaded":
self.switch.whichChild = 1
else:
self.switch.whichChild = coin.SO_SWITCH_ALL
if prop == "LineColor":
self.linecolor.rgb.setValue(self.VObject.LineColor[0],self.VObject.LineColor[1],self.VObject.LineColor[2])
if prop == "LineWidth":
self.style2.lineWidth = self.VObject.LineWidth
if prop == "Transparency":
self.materialPos.transparency = self.VObject.Transparency/100.0
self.materialNeg.transparency = self.VObject.Transparency/100.0
# otherwise the VHPort is based on a Shape containing the faces composing the port
else:
if prop == "PosPortColor" or prop == "NegPortColor":
if vp.Object.Shape is not None:
# only if this is not a direct coin3d representation but a compound
# of faces, color them according to which port they are
if type(vp.Object.Shape) == Part.Compound:
if len(vp.Object.Shape.Faces) >= 2:
self.VObject.DiffuseColor = [self.VObject.PosPortColor for x in range(0,len(vp.Object.PosFaces))] + [self.VObject.NegPortColor for x in range(0,len(vp.Object.NegFaces))]
def getDefaultDisplayMode(self):
''' Return the name of the default display mode. It must be defined in getDisplayModes. '''
return "Flat Lines"
def getIcon(self):
''' Return the icon which will appear in the tree view. This method is optional
and if not defined a default icon is shown.
'''
return os.path.join(iconPath, 'EM_VHPort.svg')
def __getstate__(self):
return None
def __setstate__(self,state):
return None
class _CommandVHPort:
''' The EM VoxHenry Conductor (VHPort) command definition
'''
def GetResources(self):
return {'Pixmap' : os.path.join(iconPath, 'EM_VHPort.svg') ,
'MenuText': QT_TRANSLATE_NOOP("EM_VHPort","VHPort"),
'Accel': "E, O",
'ToolTip': QT_TRANSLATE_NOOP("EM_VHPort","Creates a VoxHenry Port object from a set of faces")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
# preferences
#p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/EM")
#self.Width = p.GetFloat("Width",200)
# get the selected object(s)
selection = FreeCADGui.Selection.getSelectionEx()
if len(selection) > 0:
FreeCAD.ActiveDocument.openTransaction(translate("EM","Create VHPort"))
FreeCADGui.addModule("EM")
FreeCADGui.doCommand('obj=EM.makeVHPortFromSel(FreeCADGui.Selection.getSelectionEx())')
# autogrouping, for later on
#FreeCADGui.addModule("Draft")
#FreeCADGui.doCommand("Draft.autogroup(obj)")
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()
else:
FreeCAD.Console.PrintWarning(translate("EM","No face selected for the creation of a VHPort (need at least two). Nothing done."))
if FreeCAD.GuiUp:
FreeCADGui.addCommand('EM_VHPort',_CommandVHPort())

524
EM_VHSolver.py Normal file
View File

@ -0,0 +1,524 @@
#***************************************************************************
#* *
#* Copyright (c) 2019 *
#* FastFieldSolvers S.R.L., http://www.fastfieldsolvers.com *
#* *
#* This program is free software; you can redistribute it and/or modify *
#* it under the terms of the GNU Lesser General Public License (LGPL) *
#* as published by the Free Software Foundation; either version 2 of *
#* the License, or (at your option) any later version. *
#* for detail see the LICENCE text file. *
#* *
#* 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 Library General Public License for more details. *
#* *
#* You should have received a copy of the GNU Library 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 *
#* *
#***************************************************************************
__title__="FreeCAD E.M. Workbench VoxHenry Solver Class"
__author__ = "FastFieldSolvers S.R.L."
__url__ = "http://www.fastfieldsolvers.com"
# defines
#
# default solver bbox color
EMVHSOLVER_DEF_SHAPECOLOR = (0.33,1.0,1.0)
# default solver bbox transparency
EMVHSOLVER_DEF_TRANSPARENCY = 90
# default voxel size
EMVHSOLVER_DEF_DELTA = 1.0
# minimum frequency that can be specified
EMVHSOLVER_DEF_MINFREQ = 1e-6
# maximum index value that can be contained in the voxel space array (made of int16)
EMVHSOLVER_COND_ID_OVERFLOW = 65535
# allowed .units
EMVHSOLVER_UNITS = ["km", "m", "cm", "mm", "um", "nm", "in", "mils"]
EMVHSOLVER_UNITS_VALS = [1e3, 1, 1e-2, 1e-3, 1e-6, 1e-9, 2.54e-2, 1e-3]
EMVHSOLVER_DEFUNITS = "um"
EMVHSOLVER_DEFNHINC = 1
EMVHSOLVER_DEFNWINC = 1
EMVHSOLVER_DEFRW = 2
EMVHSOLVER_DEFRH = 2
EMVHSOLVER_DEFFMIN = 2.5e+09
EMVHSOLVER_DEFFMAX = 1.0e+10
EMVHSOLVER_DEFNDEC = 1
# default input file name
EMVHSOLVER_DEF_FILENAME = "voxhenry_input_file.vhr"
import FreeCAD, FreeCADGui, Mesh, Part, MeshPart, Draft, DraftGeomUtils, os
from FreeCAD import Vector
import math
import numpy as np
if FreeCAD.GuiUp:
import FreeCADGui
from PySide import QtCore, QtGui
from DraftTools import translate
from PySide.QtCore import QT_TRANSLATE_NOOP
else:
# \cond
def translate(ctxt,txt, utf8_decode=False):
return txt
def QT_TRANSLATE_NOOP(ctxt,txt):
return txt
# \endcond
__dir__ = os.path.dirname(__file__)
iconPath = os.path.join( __dir__, 'Resources' )
def makeVHSolver(units=None,fmin=None,fmax=None,ndec=None,folder=None,filename=None,name='VHSolver'):
''' Creates a VoxHenry Solver object (all statements needed for the simulation, and container for objects)
'units' is the VoxHenry unit of measurement. Each unit in FreeCad will be
one unit of the default unit of measurement in VoxHenry.
Allowed values are: "km", "m", "cm", "mm", "um", "in", "mils".
Defaults to EMVHSOLVER_DEFUNITS
'fmin' is the float minimum simulation frequency
'fmax' is the float maximum simulation frequency
'ndec' is the float value defining how many frequency points per decade
will be simulated
'folder' is the folder into which the FastHenry file will be saved.
Defaults to the user's home path (e.g. in Windows "C:\\Documents
and Settings\\username\\My Documents", in Linux "/home/username")
'filename' is the name of the file that will be exported.
Defaults to EMVHSOLVER_DEF_FILENAME
'name' is the name of the object
Example:
solver = makeVHSolver()
'''
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", name)
obj.Label = translate("EM", name)
# this adds the relevant properties to the object
#'obj' (e.g. 'Base' property) making it a _VHSolver
_VHSolver(obj)
# manage ViewProvider object
if FreeCAD.GuiUp:
_ViewProviderVHSolver(obj.ViewObject)
# set base ViewObject properties to user-selected values (if any)
if units in EMVHSOLVER_UNITS:
obj.units = units
else:
obj.units = EMVHSOLVER_DEFUNITS
if fmin is not None:
obj.fmin = fmin
else:
obj.fmin = EMVHSOLVER_DEFFMIN
if fmax is not None:
obj.fmax = fmax
else:
obj.fmax = EMVHSOLVER_DEFFMAX
if ndec is not None:
obj.ndec = ndec
else:
obj.ndec = EMVHSOLVER_DEFNDEC
if filename is not None:
obj.Filename = filename
else:
obj.Filename = EMVHSOLVER_DEF_FILENAME
if folder is not None:
obj.Folder = folder
else:
# if not specified, default to the user's home path
# (e.g. in Windows "C:\Documents and Settings\username\My Documents", in Linux "/home/username")
obj.Folder = FreeCAD.ConfigGet("UserHomePath")
# hide by default (would show the bbox when valid)
obj.ViewObject.hide()
# return the newly created Python object
return obj
class _VHSolver:
'''The EM VoxHenry Solver object'''
def __init__(self, obj):
''' Add properties '''
obj.addProperty("App::PropertyFloat","delta","EM",QT_TRANSLATE_NOOP("App::Property","Voxel size dimension ('delta' parameter in VoxHenry)"))
obj.addProperty("App::PropertyInteger","VoxelSpaceX","EM",QT_TRANSLATE_NOOP("App::Property","Voxel space dimension along X (read-only)"),1)
obj.addProperty("App::PropertyInteger","VoxelSpaceY","EM",QT_TRANSLATE_NOOP("App::Property","Voxel space dimension along Y (read-only)"),1)
obj.addProperty("App::PropertyInteger","VoxelSpaceZ","EM",QT_TRANSLATE_NOOP("App::Property","Voxel space dimension along Z (read-only)"),1)
obj.addProperty("App::PropertyInteger","VoxelSpaceDim","EM",QT_TRANSLATE_NOOP("App::Property","Voxel space dimension, total number of voxels (read-only)"),1)
obj.addProperty("App::PropertyEnumeration","units","EM",QT_TRANSLATE_NOOP("App::Property","The measurement units for all the dimensions"))
obj.addProperty("App::PropertyFloatConstraint","fmin","EM",QT_TRANSLATE_NOOP("App::Property","Lowest simulation frequency"))
obj.addProperty("App::PropertyFloatConstraint","fmax","EM",QT_TRANSLATE_NOOP("App::Property","Highest simulation frequency"))
obj.addProperty("App::PropertyFloat","ndec","EM",QT_TRANSLATE_NOOP("App::Property","Number of desired frequency points per decade"))
obj.addProperty("App::PropertyFloatList","freq","EM",QT_TRANSLATE_NOOP("App::Property","Frequencies for simulation"))
obj.addProperty("App::PropertyPath","Folder","EM",QT_TRANSLATE_NOOP("App::Property","Folder path for exporting the file in VoxHenry input file format"))
obj.addProperty("App::PropertyString","Filename","EM",QT_TRANSLATE_NOOP("App::Property","Simulation filename when exporting to VoxHenry input file format"))
obj.addProperty("App::PropertyBool","voxelSpaceValid","EM",QT_TRANSLATE_NOOP("App::Property","Flags the validity of the voxel space (read only)"),1)
obj.addProperty("App::PropertyInteger","condIndexGenerator","EM",QT_TRANSLATE_NOOP("App::Property","Latest index for conductor numbering (hidden)"),4)
obj.Proxy = self
obj.delta = EMVHSOLVER_DEF_DELTA
obj.units = EMVHSOLVER_UNITS
obj.voxelSpaceValid = False
obj.condIndexGenerator = 0
obj.freq = []
obj.fmin = (EMVHSOLVER_DEFFMIN, EMVHSOLVER_DEF_MINFREQ, 1e+20, EMVHSOLVER_DEF_MINFREQ)
obj.fmax = (EMVHSOLVER_DEFFMAX, EMVHSOLVER_DEF_MINFREQ, 1e+20, EMVHSOLVER_DEF_MINFREQ)
obj.fmin = EMVHSOLVER_DEFFMIN
self.bbox = FreeCAD.BoundBox()
self.voxelSpace = np.full((0,0,0), 0, np.int16)
self.oldDelta = obj.delta
self.Type = "VHSolver"
# save the object in the class, to store or retrieve specific data from it
# from within the class
self.Object = obj
self.justLoaded = False
def execute(self, obj):
''' this method is mandatory. It is called on Document.recompute()
'''
if self.bbox.isValid():
obj.Shape = Part.makeBox(self.bbox.XLength,self.bbox.YLength,self.bbox.ZLength,Vector(self.bbox.XMin,self.bbox.YMin,self.bbox.ZMin))
def onChanged(self, obj, prop):
''' take action if an object property 'prop' changed
'''
#FreeCAD.Console.PrintWarning("\n_VHSolver onChanged(" + str(prop)+")\n") #debug
if not hasattr(self,"Object"):
# on restore, self.Object is not there anymore (JSON does not serialize complex objects
# members of the class, so __getstate__() and __setstate__() skip them);
# so we must "re-attach" (re-create) the 'self.Object'
self.Object = obj
if prop == "delta":
# at creation 'oldDelta' does not yet exist (created after 'delta')
if hasattr(self,"oldDelta"):
if obj.delta != self.oldDelta:
self.oldDelta = obj.delta
# if changing 'Delta', must flag the voxel space as invalid
obj.voxelSpaceValid = False
self.flagVoxelizationInvalidAll()
if prop == "VoxelSpaceX" or prop == "VoxelSpaceY" or prop == "VoxelSpaceZ" or prop == "VoxelSpaceDim":
# if just changed read-only properties, clear the recompute flag (not needed)
obj.purgeTouched()
if prop == "fmin" or prop == "fmax" or prop == "ndec":
if hasattr(obj,"fmin") and hasattr(obj,"fmax") and hasattr(obj,"ndec"):
if self.Object.fmin > EMVHSOLVER_DEF_MINFREQ and self.Object.ndec > 0.0:
# calculate all the frequency points
# first calculate how many decades
decades = math.log10(self.Object.fmax / self.Object.fmin)
# then the total number of points, knowing the decades and the number of points per decade
npoints = int(decades * self.Object.ndec)+1
# step per decade
logofstep = 1.0/self.Object.ndec
# finally the frequencies
self.Object.freq = [self.Object.fmin*math.pow(10,m*logofstep) for m in range(0,npoints)]
else:
self.Object.freq = [1]
def computeContainingBBox(self):
''' Get the bounding box containing all the VHConductors in the document
Returns the global bounding box.
If there are no VHConductors, or if the VHConductors Base objects have no Shape,
the returned BoundBox is invalid (.isValid() on the returned BoundBox gives False)
'''
# create an empty bbox
gbbox = FreeCAD.BoundBox()
# get the document containing this object
doc = self.Object.Document
if doc is None:
FreeCAD.Console.PrintWarning(translate("EM","No active document available. Cannot compute containing BBox."))
else:
# get all the VHConductors
conds = [obj for obj in doc.Objects if Draft.getType(obj) == "VHConductor"]
for obj in conds:
gbbox.add(obj.Proxy.getBBox())
# if the the old bbox or the newly computed bbox is invalid, flag the voxel space as invalid
if (not gbbox.isValid()) or (not self.bbox.isValid()):
self.Object.voxelSpaceValid = False
else:
# if we just re-loaded the model, do not flag the bbox as invalid.
# the problem is that the Shape.BoundBox of the base objects of the VHConductors
# can be different if the object actually has a visible shape or not.
# At load time, if the object is invisible, its boundbox may be different.
# However, if we knew it was valid at save time, no reason to invalidate it
if not self.justLoaded:
if (not gbbox.isInside(self.bbox)) and (not self.bbox.isInside(gbbox)):
self.Object.voxelSpaceValid = False
else:
self.justLoaded = False
self.bbox = gbbox
return gbbox
def createVoxelSpace(self, bbox=None, delta=None):
''' Creates the voxel tensor (3D array) in the given bounding box
'bbox' is the overall FreeCAD.BoundBox bounding box
'delta' is the voxels size length
Returns a voxel tensor as a Numpy 3D array.
If gbbox is None, returns None
'''
if bbox is None:
return None
if not bbox.isValid():
return None
if delta is None:
return None
if delta <= 0.0:
return None
# add 1.0 to always cover the bbox space with the voxels
stepsX = int(bbox.XLength/delta + 1.0)
stepsY = int(bbox.YLength/delta + 1.0)
stepsZ = int(bbox.ZLength/delta + 1.0)
# store info in the properties visible to the user (but read-only)
self.Object.VoxelSpaceX = stepsX
self.Object.VoxelSpaceY = stepsY
self.Object.VoxelSpaceZ = stepsZ
self.Object.VoxelSpaceDim = stepsX*stepsY*stepsZ
# create the 3D array of nodes as 16-bit integers (max 65k different conductivities)
voxelSpace=np.full((stepsX+1,stepsY+1,stepsZ+1), 0, np.int16)
return voxelSpace
def getVoxelSpace(self,force=False):
''' Retrieves the voxel space. If not computed yet, or invalid, forces computation.
'force' causes full recalculation of both the bbox and the voxel space
Returns the voxel space tensor as a Numpy 3D array. If impossible to calculate, returns 'None'
'''
# get the document containing this object
doc = self.Object.Document
if doc is None:
FreeCAD.Console.PrintWarning(translate("EM","No active document available. Cannot compute the voxel space."))
return None
# first re-compute the global bbox. This may flag the voxel space as invalid.
self.computeContainingBBox()
# if the bounding box is invalid, no voxel space, no matter what
if not self.bbox.isValid():
self.voxelSpace = np.full((0,0,0), 0, np.int16)
# else if voxel space invalid, or forcing recalculation, let's compute it
elif (self.voxelSpace.size == 0) or (not self.Object.voxelSpaceValid) or force:
# create voxel space
self.voxelSpace = self.createVoxelSpace(self.bbox, self.Object.delta)
self.Object.voxelSpaceValid = True
# now flag all VHConductor and VHPort voxelizations as invalid
# get all the VHConductors
conds = [obj for obj in doc.Objects if Draft.getType(obj) == "VHConductor"]
for obj in conds:
obj.Proxy.flagVoxelizationInvalid()
# get all the VHPorts
ports = [obj for obj in doc.Objects if Draft.getType(obj) == "VHPort"]
for obj in ports:
obj.Proxy.flagVoxelizationInvalid()
# return the voxel space (may also be None)
return self.voxelSpace
def getGlobalBBox(self):
''' Retrieves the bounding box. If not calculated yet, forces calculation
Returns the global bbox as FreeCAD.BoundBox class
'''
return self.computeContainingBBox()
def getDelta(self):
''' Retrieves the voxel size.
Returns the voxel size float value 'delta'.
'''
return self.Object.delta
def isSupercond(self):
''' Check if there is any VHConductor specifying a lambda value (in this case,
must treat the system as containing superconductors)
Returns boolean 'True' if there are superconductors
'''
isSupercond = False
# get the document containing this object
doc = self.Object.Document
if doc is None:
FreeCAD.Console.PrintWarning(translate("EM","No active document available. Cannot check if there are superconductors."))
else:
# get all the VHConductors
conds = [obj for obj in doc.Objects if Draft.getType(obj) == "VHConductor"]
for obj in conds:
if obj.Lambda.Value > 0.0:
isSupercond = True
break
return isSupercond
def flagVoxelSpaceInvalid(self):
''' Flags the voxel space as invalid
'''
self.Object.voxelSpaceValid = False
def getNextCondIndex(self):
''' Generates a unique conductor index for marking the different VHConductors in the voxel space.
Returns a unique integer.
'''
self.Object.condIndexGenerator = self.Object.condIndexGenerator + 1
if self.Object.condIndexGenerator > EMVHSOLVER_COND_ID_OVERFLOW:
FreeCAD.Console.PrintWarning(translate("EM","Conductor index generator overflowed int16 capacity! Cannot reliably mark VHConductors any more in the voxel space"))
return self.Object.condIndexGenerator
def voxelizeAll(self):
''' Voxelize all VHConductors and VHPorts in the voxelSpace of the VHSolver object
'''
# get the document containing this object
doc = self.Object.Document
if doc is None:
FreeCAD.Console.PrintWarning(translate("EM","No active document available. Cannot voxelize conductors."))
return None
# get all VHConductors and VHPorts
conds = [obj for obj in doc.Objects if Draft.getType(obj) == "VHConductor"]
for cond in conds:
cond.Proxy.voxelizeConductor()
ports = [obj for obj in doc.Objects if Draft.getType(obj) == "VHPort"]
for port in ports:
port.Proxy.voxelizePort()
def flagVoxelizationInvalidAll(self):
''' Invalidate the voxelization of all VHConductors and VHPorts
'''
# get the document containing this object
doc = self.Object.Document
if doc is None:
FreeCAD.Console.PrintWarning(translate("EM","No active document available. Cannot invalidate conductors."))
return None
# get all VHConductors and VHPorts
conds = [obj for obj in doc.Objects if Draft.getType(obj) == "VHConductor"]
for cond in conds:
cond.Proxy.flagVoxelizationInvalid()
ports = [obj for obj in doc.Objects if Draft.getType(obj) == "VHPort"]
for port in ports:
port.Proxy.flagVoxelizationInvalid()
def serialize(self,fid):
''' Serialize the object to the 'fid' file descriptor
'''
fid.write("* VoxHenry input file created using FreeCAD's ElectroMagnetic Workbench\n")
fid.write("* See http://www.freecad.org and http://www.fastfieldsolvers.com\n")
fid.write("\n")
fid.write("* Frequency points (Hz)\n")
fid.write("freq=")
for freq in self.Object.freq:
fid.write(" "+str(freq))
fid.write("\n")
fid.write("\n")
fid.write("* Voxel size (m)\n")
scaledDelta = self.Object.delta * EMVHSOLVER_UNITS_VALS[EMVHSOLVER_UNITS.index(self.Object.units)]
fid.write("dx=" + str(scaledDelta) + "\n")
fid.write("\n")
fid.write("* Voxel grid dimension in voxel units: x, y, z\n")
fid.write("LMN=" + str(self.Object.VoxelSpaceX) + "," + str(self.Object.VoxelSpaceY) + "," + str(self.Object.VoxelSpaceZ) + "\n")
fid.write("\n")
def __getstate__(self):
voxelspacedim = (self.Object.VoxelSpaceX+1,self.Object.VoxelSpaceY+1,self.Object.VoxelSpaceZ+1)
bboxcoord = (self.bbox.XMin,self.bbox.YMin,self.bbox.ZMin,self.bbox.XMax,self.bbox.YMax,self.bbox.ZMax)
voxelSpaceConds = self.voxelSpace.nonzero()
voxelSpaceVals = self.voxelSpace[voxelSpaceConds].tolist()
voxelSpaceCoordX = voxelSpaceConds[0].tolist()
voxelSpaceCoordY = voxelSpaceConds[1].tolist()
voxelSpaceCoordZ = voxelSpaceConds[2].tolist()
dictForJSON = {'oldD':self.oldDelta,'vsDim':voxelspacedim,'vsX':voxelSpaceCoordX,'vsY':voxelSpaceCoordY,'vsZ':voxelSpaceCoordZ,'vsVals':voxelSpaceVals,'bbox':bboxcoord,'type':self.Type}
#FreeCAD.Console.PrintMessage("Save\n"+str(dictForJSON)+"\n") #debug
return dictForJSON
def __setstate__(self,dictForJSON):
if dictForJSON:
#FreeCAD.Console.PrintMessage("Load\n"+str(dictForJSON)+"\n") #debug
self.oldDelta = dictForJSON['oldD']
bboxcoord = dictForJSON['bbox']
self.bbox = FreeCAD.BoundBox(bboxcoord[0],bboxcoord[1],bboxcoord[2],bboxcoord[3],bboxcoord[4],bboxcoord[5])
voxelspacedim = dictForJSON['vsDim']
self.voxelSpace = np.full(voxelspacedim,0,np.int16)
voxelSpaceConds = (np.array(dictForJSON['vsX']),np.array(dictForJSON['vsY']),np.array(dictForJSON['vsZ']))
self.voxelSpace[voxelSpaceConds] = dictForJSON['vsVals']
self.Type = dictForJSON['type']
self.justLoaded = True
class _ViewProviderVHSolver:
def __init__(self, vobj):
''' Set this object to the proxy object of the actual view provider '''
vobj.ShapeColor = EMVHSOLVER_DEF_SHAPECOLOR
vobj.Transparency = EMVHSOLVER_DEF_TRANSPARENCY
vobj.Proxy = self
def attach(self, obj):
''' Setup the scene sub-graph of the view provider, this method is mandatory '''
return
def updateData(self, fp, prop):
''' If a property of the handled feature has changed we have the chance to handle this here '''
#FreeCAD.Console.PrintMessage("ViewProvider updateData(), property: " + str(prop) + "\n") # debug
return
def getDefaultDisplayMode(self):
''' Return the name of the default display mode. It must be defined in getDisplayModes. '''
return "Flat Lines"
def onChanged(self, vp, prop):
''' If the 'prop' property changed for the ViewProvider 'vp' '''
#FreeCAD.Console.PrintMessage("ViewProvider onChanged(), property: " + str(prop) + "\n") # debug
def getIcon(self):
''' Return the icon which will appear in the tree view. This method is optional
and if not defined a default icon is shown.
'''
return os.path.join(iconPath, 'EM_VHSolver.svg')
def __getstate__(self):
return None
def __setstate__(self,state):
return None
class _CommandVHSolver:
''' The EM VoxHenry Solver command definition
'''
def GetResources(self):
return {'Pixmap' : os.path.join(iconPath, 'EM_VHSolver.svg') ,
'MenuText': QT_TRANSLATE_NOOP("EM_VHSolver","VHSolver"),
'Accel': "E, Y",
'ToolTip': QT_TRANSLATE_NOOP("EM_VHSolver","Creates a VoxHenry Solver object")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
# preferences
#p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/EM")
#self.Width = p.GetFloat("Width",200)
FreeCAD.ActiveDocument.openTransaction(translate("EM","Create VHSolver"))
FreeCADGui.addModule("EM")
FreeCADGui.doCommand('obj=EM.makeVHSolver()')
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()
class _CommandVHVoxelizeAll:
''' The EM VoxHenry 'voxelize all' command definition
'''
def GetResources(self):
return {'Pixmap' : os.path.join(iconPath, 'EM_VHVoxelizeAll.svg') ,
'MenuText': QT_TRANSLATE_NOOP("EM_VHVoxelizeAll","VHVoxelizeAll"),
'Accel': "E, W",
'ToolTip': QT_TRANSLATE_NOOP("EM_VHVoxelizeAll","Voxelize all the VHConductors and VHPorts in the document")}
def IsActive(self):
return not FreeCAD.ActiveDocument is None
def Activated(self):
# preferences
#p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/EM")
#self.Width = p.GetFloat("Width",200)
# get the selected object(s)
if FreeCAD.ActiveDocument is not None:
if hasattr(FreeCAD.ActiveDocument, 'VHSolver'):
FreeCAD.ActiveDocument.openTransaction(translate("EM","Voxelize all VHConductors and VHPorts"))
FreeCADGui.addModule("EM")
FreeCADGui.doCommand('FreeCAD.ActiveDocument.VHSolver.Proxy.voxelizeAll()')
FreeCAD.ActiveDocument.commitTransaction()
# recompute the document (assuming something has changed; otherwise this is dummy)
FreeCAD.ActiveDocument.recompute()
if FreeCAD.GuiUp:
FreeCADGui.addCommand('EM_VHSolver',_CommandVHSolver())
FreeCADGui.addCommand('EM_VHVoxelizeAll',_CommandVHVoxelizeAll())

View File

@ -155,6 +155,8 @@ def export_faces(filename, isDiel=False, name="", showNormals=False, forceMesh=F
a reference point to each panel to indicate which is the external side (outside)
'name' is the name of the conductor created in the file. If not specified, defaults
to the label of the first element in the selection set
'forceMesh' force the meshing of all faces, even if they could be exported non-meshed
(triangular or quadrilateral faces).
'showNormals' will add a compound object composed by a set of arrows showing the
normal direction for each panel
'folder' is the folder in which 'filename' will be saved
@ -203,7 +205,7 @@ def export_faces(filename, isDiel=False, name="", showNormals=False, forceMesh=F
for face in facesSimple:
sortEdges = Part.__sortEdges__(face.Edges)
# Point of a Vertex is a Vector, as well as Face.normalAt()
points = [x.Vertexes[0].Point for x in sortEdges]
points = [x.firstVertex().Point for x in sortEdges]
panels.append( [points, face.normalAt(0,0)] )
for facet in facets:
points = [ Vector(x) for x in facet.Points]

View File

@ -45,8 +45,7 @@ class EMWorkbench(Workbench):
self.emtools = ["EM_About"]
self.emfhtools = ["EM_FHSolver", "EM_FHNode", "EM_FHSegment", "EM_FHPath", "EM_FHPlane",
"EM_FHPlaneHole", "EM_FHPlaneAddRemoveNodeHole", "EM_FHEquiv", "EM_FHPort", "EM_FHInputFile"]
#self.emvhtools = ["EM_VHSolver"]
self.emvhtools = []
self.emvhtools = ["EM_VHSolver", "EM_VHConductor", "EM_VHPort", "EM_VHCondPortVoxelize", "EM_VHVoxelizeAll", "EM_VHInputFile"]
# draft tools
# setup menus
self.draftcmdList = ["Draft_Line","Draft_Rectangle"]
@ -63,7 +62,7 @@ class EMWorkbench(Workbench):
def QT_TRANSLATE_NOOP(scope, text): return text
self.appendToolbar(QT_TRANSLATE_NOOP("Workbench","E.M. FastHenry tools"),self.emfhtools)
#self.appendToolbar(QT_TRANSLATE_NOOP("Workbench","E.M. VoxHenry tools"),self.emvhtools)
self.appendToolbar(QT_TRANSLATE_NOOP("Workbench","E.M. VoxHenry tools"),self.emvhtools)
self.appendToolbar(QT_TRANSLATE_NOOP("Workbench","Draft creation tools"),self.draftcmdList)
self.appendToolbar(QT_TRANSLATE_NOOP("Workbench","Draft mod tools"),self.draftmodtools)
self.appendMenu(QT_TRANSLATE_NOOP("EM","&EM"),self.emfhtools + self.emvhtools + self.emtools)

247
Resources/EM_FCSolver.svg Normal file
View File

@ -0,0 +1,247 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64px"
height="64px"
id="svg2860"
sodipodi:version="0.32"
inkscape:version="0.91 r13725"
sodipodi:docname="EM_FCSolver.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<title
id="title4146">EM Workbench</title>
<defs
id="defs2862">
<linearGradient
id="linearGradient4150">
<stop
style="stop-color:#fcaf3e;stop-opacity:1"
offset="0"
id="stop4152" />
<stop
style="stop-color:#f57900;stop-opacity:1"
offset="1"
id="stop4154" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3692"
cx="45.883327"
cy="28.869568"
fx="45.883327"
fy="28.869568"
r="19.467436"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3703"
gradientUnits="userSpaceOnUse"
cx="135.38333"
cy="97.369568"
fx="135.38333"
fy="97.369568"
r="19.467436"
gradientTransform="matrix(0.97435,0.2250379,-0.4623105,2.0016728,48.487554,-127.99883)" />
<linearGradient
id="linearGradient3377">
<stop
id="stop3379"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3705"
gradientUnits="userSpaceOnUse"
cx="148.88333"
cy="81.869568"
fx="148.88333"
fy="81.869568"
r="19.467436"
gradientTransform="matrix(1.3852588,-5.1367833e-2,3.7056289e-2,0.9993132,-60.392403,7.7040438)" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective2868" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4148"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1846386,0,0,1.1846386,-9.501508,-5.4148589)" />
<linearGradient
gradientTransform="translate(9.9161935,2.2059659)"
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4148-7"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4159"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
<linearGradient
gradientTransform="matrix(0.50862782,0,0,0.50862782,20.157629,27.042116)"
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4148-5"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4172"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.5"
inkscape:cx="-22.636364"
inkscape:cy="26.215803"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1920"
inkscape:window-height="1018"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:snap-grids="true"
showguides="false"
inkscape:snap-nodes="true"
inkscape:snap-others="true"
inkscape:snap-to-guides="false"
inkscape:snap-global="true">
<inkscape:grid
type="xygrid"
id="grid4187"
spacingx="1"
spacingy="1"
visible="true"
empspacing="2" />
</sodipodi:namedview>
<metadata
id="metadata2865">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>EM Workbench</dc:title>
<dc:date>2019/01/10</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>FastFieldSolvers S.R.L.</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title>LGPL2+</dc:title>
</cc:Agent>
</dc:rights>
<dc:publisher>
<cc:Agent>
<dc:title>FreeCAD</dc:title>
</cc:Agent>
</dc:publisher>
<dc:relation>https://www.freecadweb.org/wiki/Artwork_Guidelines</dc:relation>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:75.81687164px;line-height:125%;font-family:Georgia;-inkscape-font-specification:Georgia;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4148);fill-opacity:1;stroke:#241c1c;stroke-width:2.918185;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4.0999999"
x="1.483322"
y="58.55563"
id="text3014"
sodipodi:linespacing="125%"
transform="scale(1.0619928,0.94162596)"><tspan
sodipodi:role="line"
id="tspan3016"
x="1.483322"
y="58.55563"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Georgia;-inkscape-font-specification:Georgia;fill:url(#linearGradient4148);fill-opacity:1;stroke-width:2.918185;stroke-miterlimit:4;stroke-dasharray:none">S</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:64px;line-height:125%;font-family:'DejaVu Serif';-inkscape-font-specification:'DejaVu Serif';letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4148-7);fill-opacity:1;stroke:#241c1c;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4.0999999"
x="19.188921"
y="56.205967"
id="text3014-3"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3016-8"
x="19.188921"
y="56.205967"
style="fill:url(#linearGradient4148-7);fill-opacity:1" /></text>
<rect
style="fill:#ffffff;fill-opacity:0.85789472;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4204"
width="43.63636"
height="32"
x="18.545454"
y="30.363636" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32.55217743px;line-height:125%;font-family:Georgia;-inkscape-font-specification:Georgia;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4148-5);fill-opacity:1;stroke:#241c1c;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4.0999999"
x="24.873997"
y="54.508018"
id="text3014-6"
sodipodi:linespacing="125%"
transform="scale(0.91885745,1.0883081)"><tspan
sodipodi:role="line"
id="tspan3016-1"
x="24.873997"
y="54.508018"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Georgia;-inkscape-font-specification:Georgia;fill:url(#linearGradient4148-5);fill-opacity:1;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none">FC</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -107,6 +107,26 @@
id="linearGradient3087"
xlink:href="#linearGradient3138"
inkscape:collect="always" />
<linearGradient
gradientTransform="matrix(0.50862782,0,0,0.50862782,7.0539597,917.75705)"
inkscape:collect="always"
xlink:href="#linearGradient3138"
id="linearGradient4148-5"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
<linearGradient
gradientTransform="matrix(0.50862782,0,0,0.50862782,15.408648,27.042116)"
inkscape:collect="always"
xlink:href="#linearGradient3138"
id="linearGradient4191"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
@ -116,15 +136,15 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="6.1875"
inkscape:cx="-27.190759"
inkscape:cy="37.245498"
inkscape:cx="-6.8686869"
inkscape:cy="35.871761"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1598"
inkscape:window-height="836"
inkscape:window-x="1146"
inkscape:window-y="400"
inkscape:window-x="101"
inkscape:window-y="110"
inkscape:window-maximized="0"
inkscape:snap-global="true"
borderlayer="true">
@ -231,5 +251,25 @@
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/changeprop.png"
inkscape:export-xdpi="4.1683898"
inkscape:export-ydpi="4.1683898" />
<rect
style="fill:#ffffff;fill-opacity:0.85789472;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4204"
width="45.81818"
height="32"
x="8.5050488"
y="999.37225" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32.55217743px;line-height:125%;font-family:Georgia;-inkscape-font-specification:Georgia;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4148-5);fill-opacity:1;stroke:#241c1c;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4.0999999"
x="11.770329"
y="945.22296"
id="text3014-6"
sodipodi:linespacing="125%"
transform="scale(0.91885745,1.0883081)"><tspan
sodipodi:role="line"
id="tspan3016-1"
x="11.770329"
y="945.22296"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Georgia;-inkscape-font-specification:Georgia;fill:url(#linearGradient4148-5);fill-opacity:1;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none">FH</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

247
Resources/EM_VCSolver.svg Normal file
View File

@ -0,0 +1,247 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64px"
height="64px"
id="svg2860"
sodipodi:version="0.32"
inkscape:version="0.91 r13725"
sodipodi:docname="EM_VCSolver.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<title
id="title4146">EM Workbench</title>
<defs
id="defs2862">
<linearGradient
id="linearGradient4150">
<stop
style="stop-color:#fcaf3e;stop-opacity:1"
offset="0"
id="stop4152" />
<stop
style="stop-color:#f57900;stop-opacity:1"
offset="1"
id="stop4154" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3692"
cx="45.883327"
cy="28.869568"
fx="45.883327"
fy="28.869568"
r="19.467436"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3703"
gradientUnits="userSpaceOnUse"
cx="135.38333"
cy="97.369568"
fx="135.38333"
fy="97.369568"
r="19.467436"
gradientTransform="matrix(0.97435,0.2250379,-0.4623105,2.0016728,48.487554,-127.99883)" />
<linearGradient
id="linearGradient3377">
<stop
id="stop3379"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3705"
gradientUnits="userSpaceOnUse"
cx="148.88333"
cy="81.869568"
fx="148.88333"
fy="81.869568"
r="19.467436"
gradientTransform="matrix(1.3852588,-5.1367833e-2,3.7056289e-2,0.9993132,-60.392403,7.7040438)" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective2868" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4148"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1846386,0,0,1.1846386,-9.501508,-5.4148589)" />
<linearGradient
gradientTransform="translate(9.9161935,2.2059659)"
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4148-7"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4159"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
<linearGradient
gradientTransform="matrix(0.50862782,0,0,0.50862782,17.189516,27.042116)"
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4148-5"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4172"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.5"
inkscape:cx="-22.636364"
inkscape:cy="26.215803"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1920"
inkscape:window-height="1018"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:snap-grids="true"
showguides="false"
inkscape:snap-nodes="true"
inkscape:snap-others="true"
inkscape:snap-to-guides="false"
inkscape:snap-global="true">
<inkscape:grid
type="xygrid"
id="grid4187"
spacingx="1"
spacingy="1"
visible="true"
empspacing="2" />
</sodipodi:namedview>
<metadata
id="metadata2865">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>EM Workbench</dc:title>
<dc:date>2019/01/10</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>FastFieldSolvers S.R.L.</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title>LGPL2+</dc:title>
</cc:Agent>
</dc:rights>
<dc:publisher>
<cc:Agent>
<dc:title>FreeCAD</dc:title>
</cc:Agent>
</dc:publisher>
<dc:relation>https://www.freecadweb.org/wiki/Artwork_Guidelines</dc:relation>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:75.81687164px;line-height:125%;font-family:Georgia;-inkscape-font-specification:Georgia;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4148);fill-opacity:1;stroke:#241c1c;stroke-width:2.918185;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4.0999999"
x="1.483322"
y="58.55563"
id="text3014"
sodipodi:linespacing="125%"
transform="scale(1.0619928,0.94162596)"><tspan
sodipodi:role="line"
id="tspan3016"
x="1.483322"
y="58.55563"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Georgia;-inkscape-font-specification:Georgia;fill:url(#linearGradient4148);fill-opacity:1;stroke-width:2.918185;stroke-miterlimit:4;stroke-dasharray:none">S</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:64px;line-height:125%;font-family:'DejaVu Serif';-inkscape-font-specification:'DejaVu Serif';letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4148-7);fill-opacity:1;stroke:#241c1c;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4.0999999"
x="19.188921"
y="56.205967"
id="text3014-3"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3016-8"
x="19.188921"
y="56.205967"
style="fill:url(#linearGradient4148-7);fill-opacity:1" /></text>
<rect
style="fill:#ffffff;fill-opacity:0.85789472;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4204"
width="45.81818"
height="32"
x="14.909091"
y="30" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32.55217743px;line-height:125%;font-family:Georgia;-inkscape-font-specification:Georgia;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4148-5);fill-opacity:1;stroke:#241c1c;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4.0999999"
x="21.905884"
y="54.508018"
id="text3014-6"
sodipodi:linespacing="125%"
transform="scale(0.91885745,1.0883081)"><tspan
sodipodi:role="line"
id="tspan3016-1"
x="21.905884"
y="54.508018"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Georgia;-inkscape-font-specification:Georgia;fill:url(#linearGradient4148-5);fill-opacity:1;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none">VC</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -0,0 +1,576 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="EM_VHCondPortVoxelize.svg"
inkscape:version="0.91 r13725"
version="1.1"
id="svg2816"
height="64px"
width="64px">
<title
id="title4210">EM Workbench</title>
<defs
id="defs2818">
<linearGradient
inkscape:collect="always"
id="linearGradient4584">
<stop
style="stop-color:#fcaf3e;stop-opacity:1"
offset="0"
id="stop4586" />
<stop
style="stop-color:#f57900;stop-opacity:1"
offset="1"
id="stop4588" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3789">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3781">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-576.62397 : 353.91041 : 1"
inkscape:vp_y="0 : 1312.2305 : 0"
inkscape:vp_z="612.8902 : 417.51808 : 1"
inkscape:persp3d-origin="26.615276 : 18.425936 : 1"
id="perspective2824" />
<inkscape:perspective
id="perspective3622"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3622-9"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3653"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3675"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3697"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3720"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3742"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3764"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3785"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3806"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3806-3"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3835"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781"
id="linearGradient3787"
x1="93.501396"
y1="-0.52792466"
x2="92.882462"
y2="-7.2011309"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789"
id="linearGradient3795"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-6"
id="linearGradient3804-3"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.882462"
y2="-7.2011309" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-6">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-7" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-5" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-5"
id="linearGradient3806-3"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-5">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-6" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-2" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-0"
id="linearGradient3804-36"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.882462"
y2="-7.2011309" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-0">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-6" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-2" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-1"
id="linearGradient3806-6"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-1">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-8" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-7" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-8"
id="linearGradient3804-2"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.814743"
y2="-5.3353744" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-8">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-9" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-7" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-12"
id="linearGradient3806-36"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-12">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-9" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-3" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-03"
id="linearGradient3804-5"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.814743"
y2="-5.3353744" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-03">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-61" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-0" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-2"
id="linearGradient3806-63"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-2">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-0" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-6" />
</linearGradient>
<radialGradient
r="18.0625"
fy="41.625"
fx="25.1875"
cy="41.625"
cx="25.1875"
gradientTransform="matrix(1,0,0,0.32526,0,28.08607)"
gradientUnits="userSpaceOnUse"
id="radialGradient3169"
xlink:href="#linearGradient2269-0"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
id="linearGradient2269-0">
<stop
offset="0"
id="stop2271-4"
style="stop-color:#000000;stop-opacity:1;" />
<stop
offset="1"
id="stop2273-87"
style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
gradientTransform="matrix(1.1739484,0,0,0.86938425,-12.759075,16.833846)"
inkscape:collect="always"
xlink:href="#linearGradient3884"
id="linearGradient3890"
x1="50.11961"
y1="38.894291"
x2="45.327534"
y2="21.83534"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient3884">
<stop
style="stop-color:#f57900;stop-opacity:1"
offset="0"
id="stop3886" />
<stop
style="stop-color:#fcaf3e;stop-opacity:1"
offset="1"
id="stop3888" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590"
x1="-19.915104"
y1="69.038132"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.91593544,0,0,1.0160986,29.846635,-28.642958)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590-9"
x1="-19.915104"
y1="69.038132"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.91593544,0,0,1.0160986,41.846635,-50.642958)" />
<linearGradient
gradientTransform="matrix(1.1739484,0,0,0.86938425,-12.759075,-8.9843033)"
inkscape:collect="always"
xlink:href="#linearGradient3884"
id="linearGradient3890-4"
x1="50.11961"
y1="38.894291"
x2="45.327534"
y2="21.83534"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
inkscape:snap-to-guides="false"
inkscape:snap-nodes="true"
inkscape:snap-global="false"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1018"
inkscape:window-width="1920"
inkscape:object-nodes="true"
inkscape:object-paths="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:bbox-nodes="true"
inkscape:bbox-paths="true"
inkscape:snap-bbox="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
showgrid="true"
inkscape:current-layer="layer1"
inkscape:cy="17.448972"
inkscape:cx="5.1161511"
inkscape:zoom="5.6568543"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base">
<inkscape:grid
type="xygrid"
id="grid3005"
empspacing="2"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
spacingx="1"
spacingy="1" />
</sodipodi:namedview>
<metadata
id="metadata2821">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>EM Workbench</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>FastFieldSolvers S.R.L.</dc:title>
</cc:Agent>
</dc:creator>
<dc:date>2019/01/10</dc:date>
<dc:relation>https://www.freecadweb.org/wiki/Artwork_Guidelines</dc:relation>
<dc:publisher>
<cc:Agent>
<dc:title>FreeCAD</dc:title>
</cc:Agent>
</dc:publisher>
<dc:identifier />
<dc:rights>
<cc:Agent>
<dc:title>LGPL2+</dc:title>
</cc:Agent>
</dc:rights>
<cc:license>https://www.gnu.org/copyleft/lesser.html</cc:license>
<dc:contributor>
<cc:Agent>
<dc:title />
</cc:Agent>
</dc:contributor>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="fill:url(#linearGradient3890);fill-opacity:1;stroke:#321900;stroke-width:1.92849684;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 57.901592,31.844945 57.59099,46.59112 33.746291,58.772971 33.59099,43.410574 Z"
id="path3838"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#linearGradient4590);fill-opacity:1;fill-rule:evenodd;stroke:#321900;stroke-width:1.92943597;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 33.59099,42.772971 0,16 -25.9999998,-10 0,-16 z"
id="path4570"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#fcaf3e;fill-rule:evenodd;stroke:#321900;stroke-width:1.90989172;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 58.094375,31.812816 -24.503385,10.960155 -25.9999998,-10 23.9999998,-12 z"
id="path4602"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#321900;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 19.483496,52.405592 19.660273,52.228815 20.190603,38.08668 43.59099,26.772971"
id="path4244"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#321900;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 18.897704,26.696699 26.693286,10.076272 0,16"
id="path4250"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 9.6013983,35.705322 17.909902,38.533749 17.733124,50.554564 9.6013976,47.372583 Z"
id="path4604-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.49222159;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 36.371271,44.61699 6.492934,-2.798002 -0.08782,9.574411 -6.876187,3.709685 z"
id="path4604-0"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#linearGradient4590-9);fill-opacity:1;fill-rule:evenodd;stroke:#321900;stroke-width:1.92943597;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 32.474873,15.833631 0,16.176777 -12.883883,-5.237437 0,-16 z"
id="path4570-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#linearGradient3890-4);fill-opacity:1;stroke:#321900;stroke-width:1.92849684;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 45.414213,10.772971 0.176777,15.116117 -12.40901,6 -0.474873,-16.176777 z"
id="path3838-5"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#fcaf3e;fill-rule:evenodd;stroke:#321900;stroke-width:1.90989172;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 45.227461,11.006836 32.391338,15.426254 19.64959,10.729554 31.982328,5.977399 Z"
id="path4602-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 22.533738,41.165799 31.726124,44.524556 31.549346,55.838264 21.82663,52.30273 Z"
id="path4604-6-5"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.49222159;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 48.238282,38.920017 7.376817,-3.151555 -0.08782,9.044081 -7.406517,4.063238 z"
id="path4604-0-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.49222159;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 35.333583,17.35326 7.376817,-3.151555 0.442514,9.927964 -7.406517,3.356132 z"
id="path4604-0-3-0"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 21.649853,13.942188 8.308504,2.828428 -0.176778,12.020815 -8.131726,-3.181981 z"
id="path4604-6-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,525 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="EM_VHConductor.svg"
inkscape:version="0.91 r13725"
version="1.1"
id="svg2816"
height="64px"
width="64px">
<title
id="title4210">EM Workbench</title>
<defs
id="defs2818">
<linearGradient
inkscape:collect="always"
id="linearGradient4584">
<stop
style="stop-color:#fcaf3e;stop-opacity:1"
offset="0"
id="stop4586" />
<stop
style="stop-color:#f57900;stop-opacity:1"
offset="1"
id="stop4588" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3789">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3781">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-576.62397 : 353.91041 : 1"
inkscape:vp_y="0 : 1312.2305 : 0"
inkscape:vp_z="612.8902 : 417.51808 : 1"
inkscape:persp3d-origin="26.615276 : 18.425936 : 1"
id="perspective2824" />
<inkscape:perspective
id="perspective3622"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3622-9"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3653"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3675"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3697"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3720"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3742"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3764"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3785"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3806"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3806-3"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3835"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781"
id="linearGradient3787"
x1="93.501396"
y1="-0.52792466"
x2="92.882462"
y2="-7.2011309"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789"
id="linearGradient3795"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-6"
id="linearGradient3804-3"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.882462"
y2="-7.2011309" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-6">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-7" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-5" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-5"
id="linearGradient3806-3"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-5">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-6" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-2" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-0"
id="linearGradient3804-36"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.882462"
y2="-7.2011309" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-0">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-6" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-2" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-1"
id="linearGradient3806-6"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-1">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-8" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-7" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-8"
id="linearGradient3804-2"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.814743"
y2="-5.3353744" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-8">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-9" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-7" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-12"
id="linearGradient3806-36"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-12">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-9" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-3" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-03"
id="linearGradient3804-5"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.814743"
y2="-5.3353744" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-03">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-61" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-0" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-2"
id="linearGradient3806-63"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-2">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-0" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-6" />
</linearGradient>
<radialGradient
r="18.0625"
fy="41.625"
fx="25.1875"
cy="41.625"
cx="25.1875"
gradientTransform="matrix(1,0,0,0.32526,0,28.08607)"
gradientUnits="userSpaceOnUse"
id="radialGradient3169"
xlink:href="#linearGradient2269-0"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
id="linearGradient2269-0">
<stop
offset="0"
id="stop2271-4"
style="stop-color:#000000;stop-opacity:1;" />
<stop
offset="1"
id="stop2273-87"
style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590"
x1="-19.915104"
y1="69.038132"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9992023,0,0,1.0160986,13.065682,-38.47659)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590-6"
x1="-19.915104"
y1="69.038132"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9992023,0,0,1.0160986,30.329136,-62.585748)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590-1"
x1="-11.44561"
y1="71.67289"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9992023,0,0,1.0160986,42.501977,-64.136961)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590-1-9"
x1="-19.915104"
y1="69.038132"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9992023,0,0,1.0160986,9.3592007,-70.605907)" />
</defs>
<sodipodi:namedview
inkscape:snap-to-guides="false"
inkscape:snap-nodes="true"
inkscape:snap-global="false"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1018"
inkscape:window-width="1920"
inkscape:object-nodes="true"
inkscape:object-paths="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:bbox-nodes="true"
inkscape:bbox-paths="true"
inkscape:snap-bbox="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
showgrid="true"
inkscape:current-layer="layer1"
inkscape:cy="60.824856"
inkscape:cx="5.1161511"
inkscape:zoom="5.6568543"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:snap-grids="false">
<inkscape:grid
type="xygrid"
id="grid3005"
empspacing="2"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
spacingx="1"
spacingy="1"
dotted="true" />
</sodipodi:namedview>
<metadata
id="metadata2821">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>EM Workbench</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>FastFieldSolvers S.R.L.</dc:title>
</cc:Agent>
</dc:creator>
<dc:date>2019/01/10</dc:date>
<dc:relation>https://www.freecadweb.org/wiki/Artwork_Guidelines</dc:relation>
<dc:publisher>
<cc:Agent>
<dc:title>FreeCAD</dc:title>
</cc:Agent>
</dc:publisher>
<dc:identifier />
<dc:rights>
<cc:Agent>
<dc:title>LGPL2+</dc:title>
</cc:Agent>
</dc:rights>
<cc:license>https://www.gnu.org/copyleft/lesser.html</cc:license>
<dc:contributor>
<cc:Agent>
<dc:title />
</cc:Agent>
</dc:contributor>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4590-1);fill-opacity:1;fill-rule:evenodd;stroke:#321900;stroke-width:2.01523018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 26,56 c 3.413243,-3.172029 4.867753,-7.928247 3.8125,-12.466797 -1.055052,-4.538112 -4.458012,-8.164607 -8.919921,-9.50586 -1.040343,-0.312733 -2.115783,-0.493832 -3.201172,-0.539062 -3.510791,-0.146579 -6.931393,1.134298 -9.482422,3.550781 l 30,-26 c 2.551029,-2.416483 5.971631,-3.69736 9.482422,-3.550781 1.085389,0.04523 2.160829,0.226329 3.201172,0.539062 4.461909,1.341253 7.864869,4.967748 8.919921,9.50586 C 60.867753,22.071753 59.413243,26.827971 56,30 Z"
id="path4227-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccsccccsccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:1.7408402;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill-opacity:1;stroke-dashoffset:0;filter-blend-mode:normal;filter-gaussianBlur-deviation:0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="M 17.141289,31.901345 37.823223,14"
id="path4602"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<circle
style="fill:url(#linearGradient4590);fill-opacity:1;stroke:#321900;stroke-width:2.01523018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill-rule:evenodd;filter-blend-mode:normal;filter-gaussianBlur-deviation:0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="path4227"
cx="17.714096"
cy="46.136932"
r="13" />
<ellipse
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:1.7408402;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="path4227-3"
cx="17.736622"
cy="46.334522"
rx="11.096648"
ry="11.53859" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:1.7408402;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="path4227-3-0"
sodipodi:type="arc"
sodipodi:cx="46.272209"
sodipodi:cy="21.719374"
sodipodi:rx="11.096648"
sodipodi:ry="11.53859"
sodipodi:start="3.9700777"
sodipodi:end="0.4338804"
d="m 38.770954,13.216493 a 11.096648,11.53859 0 0 1 14.049387,-0.812571 11.096648,11.53859 0 0 1 3.520315,14.166215"
sodipodi:open="true" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:1.7408402;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="M 32.08544,48.201935 55.595801,27.64894"
id="path4602-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -0,0 +1,275 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="EM_VHInputFile.svg"
viewBox="0 0 64 64">
<title
id="title4159">EM Workbench</title>
<defs
id="defs4">
<linearGradient
id="linearGradient3138">
<stop
id="stop3140"
offset="0"
style="stop-color:#fcaf3e;stop-opacity:1" />
<stop
id="stop3142"
offset="1"
style="stop-color:#f57900;stop-opacity:1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3842-62"
id="linearGradient3039-0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.4166667,0,0,0.75000005,14.416666,1024.6122)"
x1="49"
y1="16"
x2="48"
y2="4" />
<linearGradient
inkscape:collect="always"
id="linearGradient3842-62">
<stop
style="stop-color:#204a87;stop-opacity:1"
offset="0"
id="stop3844-61" />
<stop
style="stop-color:#729fcf;stop-opacity:1"
offset="1"
id="stop3846-8" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3830-9"
id="linearGradient3041-7"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.625,0,0,0.28571424,4.625,1034.6479)"
x1="44.53846"
y1="65.5"
x2="43"
y2="14" />
<linearGradient
inkscape:collect="always"
id="linearGradient3830-9">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3832-20" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3834-23" />
</linearGradient>
<linearGradient
y2="43.559998"
x2="41.689651"
y1="21.799999"
x1="35.482758"
gradientTransform="matrix(1.4500001,0,0,1.4705882,-27.45,-31.058821)"
gradientUnits="userSpaceOnUse"
id="linearGradient3012"
xlink:href="#linearGradient3895"
inkscape:collect="always" />
<linearGradient
id="linearGradient3895">
<stop
style="stop-color:#729fcf;stop-opacity:1;"
offset="0"
id="stop3897" />
<stop
style="stop-color:#204a87;stop-opacity:1;"
offset="1"
id="stop3899" />
</linearGradient>
<linearGradient
y2="43.559998"
x2="41.689651"
y1="21.799999"
x1="35.482758"
gradientTransform="matrix(1.4500001,0,0,1.4705882,-27.45,983.3034)"
gradientUnits="userSpaceOnUse"
id="linearGradient3087"
xlink:href="#linearGradient3138"
inkscape:collect="always" />
<linearGradient
gradientTransform="matrix(0.50862782,0,0,0.50862782,5.6468543,917.75705)"
inkscape:collect="always"
xlink:href="#linearGradient3138"
id="linearGradient4148-5"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
<linearGradient
gradientTransform="matrix(0.50862782,0,0,0.50862782,15.408648,27.042116)"
inkscape:collect="always"
xlink:href="#linearGradient3138"
id="linearGradient4191"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="6.1875"
inkscape:cx="-6.8686869"
inkscape:cy="36.107744"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:window-width="1598"
inkscape:window-height="836"
inkscape:window-x="101"
inkscape:window-y="110"
inkscape:window-maximized="0"
inkscape:snap-global="true"
borderlayer="true">
<inkscape:grid
type="xygrid"
id="grid11622"
empspacing="2"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>EM Workbench</dc:title>
<dc:date>2019/01/10</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>FreeCAD icon, plus FastFieldSolvers S.R.L. modifications</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title>LGPL2+</dc:title>
</cc:Agent>
</dc:rights>
<dc:publisher>
<cc:Agent>
<dc:title>FreeCAD</dc:title>
</cc:Agent>
</dc:publisher>
<dc:relation>https://www.freecadweb.org/wiki/Artwork_Guidelines</dc:relation>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-988.36218)">
<g
transform="translate(-59,-31.000003)"
id="g3054-7">
<rect
style="fill:none;stroke:#204a87;stroke-width:6.00000048;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:6"
id="rect3020-5"
width="44"
height="30"
x="64"
y="1028.3622" />
<rect
style="fill:none;stroke:#729fcf;stroke-width:1.99999976;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:6"
id="rect3020-6-9"
width="44"
height="30"
x="64"
y="1028.3622" />
<rect
style="fill:url(#linearGradient3039-0);fill-opacity:1;stroke:#729fcf;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:6"
id="rect3826-2"
width="44"
height="6.0000005"
x="64"
y="1028.3622" />
<rect
style="fill:url(#linearGradient3041-7);fill-opacity:1;stroke:#ffffff;stroke-width:1.99999963999999997;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:6"
id="rect3828-2"
width="36"
height="16"
x="68"
y="1038.3622" />
<path
style="fill:none;stroke:#204a87;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 65,1036.3622 41,0"
id="path3838-8"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;stroke:#ffffff;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 65,1031.3622 8,0"
id="path3840-9"
inkscape:connector-curvature="0" />
</g>
<path
inkscape:connector-curvature="0"
style="fill:url(#linearGradient3087);fill-opacity:1;fill-rule:evenodd;stroke:#321900;stroke-width:1.99999988;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
d="m 37,1011.3622 0,12 -22,0 0,14 22,0 0,12 24,-19 z"
id="path3343"
sodipodi:nodetypes="cccccccc"
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/changeprop.png"
inkscape:export-xdpi="4.1683898"
inkscape:export-ydpi="4.1683898" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#fcaf3e;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
d="m 39,1015.4831 0,9.8791 -22,0 0,10 22,0 0,9.945 18.999994,-14.773 z"
id="path3343-2"
sodipodi:nodetypes="cccccccc"
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/changeprop.png"
inkscape:export-xdpi="4.1683898"
inkscape:export-ydpi="4.1683898" />
<rect
style="fill:#ffffff;fill-opacity:0.85789472;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4204"
width="45.81818"
height="32"
x="8.5050488"
y="999.37225" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32.55217743px;line-height:125%;font-family:Georgia;-inkscape-font-specification:Georgia;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4148-5);fill-opacity:1;stroke:#241c1c;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4.0999999"
x="10.363224"
y="945.22296"
id="text3014-6"
sodipodi:linespacing="125%"
transform="scale(0.91885745,1.0883081)"><tspan
sodipodi:role="line"
id="tspan3016-1"
x="10.363224"
y="945.22296"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Georgia;-inkscape-font-specification:Georgia;fill:url(#linearGradient4148-5);fill-opacity:1;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none">VH</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.8 KiB

559
Resources/EM_VHPort.svg Normal file
View File

@ -0,0 +1,559 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="EM_VHPort.svg"
inkscape:version="0.91 r13725"
version="1.1"
id="svg2816"
height="64px"
width="64px">
<title
id="title4210">EM Workbench</title>
<defs
id="defs2818">
<linearGradient
inkscape:collect="always"
id="linearGradient4584">
<stop
style="stop-color:#fcaf3e;stop-opacity:1"
offset="0"
id="stop4586" />
<stop
style="stop-color:#f57900;stop-opacity:1"
offset="1"
id="stop4588" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3789">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3781">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-576.62397 : 353.91041 : 1"
inkscape:vp_y="0 : 1312.2305 : 0"
inkscape:vp_z="612.8902 : 417.51808 : 1"
inkscape:persp3d-origin="26.615276 : 18.425936 : 1"
id="perspective2824" />
<inkscape:perspective
id="perspective3622"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3622-9"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3653"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3675"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3697"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3720"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3742"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3764"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3785"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3806"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3806-3"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3835"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781"
id="linearGradient3787"
x1="93.501396"
y1="-0.52792466"
x2="92.882462"
y2="-7.2011309"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789"
id="linearGradient3795"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-6"
id="linearGradient3804-3"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.882462"
y2="-7.2011309" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-6">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-7" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-5" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-5"
id="linearGradient3806-3"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-5">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-6" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-2" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-0"
id="linearGradient3804-36"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.882462"
y2="-7.2011309" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-0">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-6" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-2" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-1"
id="linearGradient3806-6"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-1">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-8" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-7" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-8"
id="linearGradient3804-2"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.814743"
y2="-5.3353744" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-8">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-9" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-7" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-12"
id="linearGradient3806-36"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-12">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-9" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-3" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-03"
id="linearGradient3804-5"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.814743"
y2="-5.3353744" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-03">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-61" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-0" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-2"
id="linearGradient3806-63"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-2">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-0" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-6" />
</linearGradient>
<radialGradient
r="18.0625"
fy="41.625"
fx="25.1875"
cy="41.625"
cx="25.1875"
gradientTransform="matrix(1,0,0,0.32526,0,28.08607)"
gradientUnits="userSpaceOnUse"
id="radialGradient3169"
xlink:href="#linearGradient2269-0"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
id="linearGradient2269-0">
<stop
offset="0"
id="stop2271-4"
style="stop-color:#000000;stop-opacity:1;" />
<stop
offset="1"
id="stop2273-87"
style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590"
x1="-19.915104"
y1="69.038132"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9992023,0,0,1.0160986,13.065682,-38.47659)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590-6"
x1="-19.915104"
y1="69.038132"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9992023,0,0,1.0160986,30.329136,-62.585748)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590-1-9"
x1="-19.915104"
y1="69.038132"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9992023,0,0,1.0160986,9.3592007,-70.605907)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590-15"
x1="-19.915104"
y1="69.038132"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9992023,0,0,1.0160986,42.550963,-64.277366)" />
<linearGradient
gradientTransform="matrix(0.63706622,-0.58872562,0.47520672,0.47955333,-7.3935138,39.151786)"
y2="36.079998"
x2="21.689653"
y1="29.279999"
x1="56.172409"
gradientUnits="userSpaceOnUse"
id="linearGradient3036"
xlink:href="#linearGradient3895"
inkscape:collect="always" />
<linearGradient
id="linearGradient3895">
<stop
style="stop-color:#729fcf;stop-opacity:1;"
offset="0"
id="stop3897" />
<stop
style="stop-color:#204a87;stop-opacity:1;"
offset="1"
id="stop3899" />
</linearGradient>
</defs>
<sodipodi:namedview
inkscape:snap-to-guides="false"
inkscape:snap-nodes="true"
inkscape:snap-global="false"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1018"
inkscape:window-width="1920"
inkscape:object-nodes="true"
inkscape:object-paths="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:bbox-nodes="true"
inkscape:bbox-paths="true"
inkscape:snap-bbox="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
showgrid="true"
inkscape:current-layer="layer1"
inkscape:cy="59.322254"
inkscape:cx="-24.405557"
inkscape:zoom="5.6568543"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:snap-grids="false">
<inkscape:grid
type="xygrid"
id="grid3005"
empspacing="2"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
spacingx="1"
spacingy="1"
dotted="true" />
</sodipodi:namedview>
<metadata
id="metadata2821">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>EM Workbench</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>FastFieldSolvers S.R.L.</dc:title>
</cc:Agent>
</dc:creator>
<dc:date>2019/01/10</dc:date>
<dc:relation>https://www.freecadweb.org/wiki/Artwork_Guidelines</dc:relation>
<dc:publisher>
<cc:Agent>
<dc:title>FreeCAD</dc:title>
</cc:Agent>
</dc:publisher>
<dc:identifier />
<dc:rights>
<cc:Agent>
<dc:title>LGPL2+</dc:title>
</cc:Agent>
</dc:rights>
<cc:license>https://www.gnu.org/copyleft/lesser.html</cc:license>
<dc:contributor>
<cc:Agent>
<dc:title />
</cc:Agent>
</dc:contributor>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:1.7408402;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="path4227-3-0"
sodipodi:type="arc"
sodipodi:cx="46.272209"
sodipodi:cy="21.719374"
sodipodi:rx="11.096648"
sodipodi:ry="11.53859"
sodipodi:start="3.9700777"
sodipodi:end="0.4338804"
d="m 38.770954,13.216493 a 11.096648,11.53859 0 0 1 14.049387,-0.812571 11.096648,11.53859 0 0 1 3.520315,14.166215"
sodipodi:open="true" />
<circle
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4590-15);fill-opacity:1;fill-rule:evenodd;stroke:#321900;stroke-width:2.01523018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="path4227-4"
cx="47.199375"
cy="20.336157"
r="13" />
<ellipse
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:1.7408402;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="path4227-3-7"
cx="47.199379"
cy="20.336155"
rx="11.096648"
ry="11.53859" />
<path
inkscape:connector-curvature="0"
style="fill:url(#linearGradient3036);fill-opacity:1;fill-rule:evenodd;stroke:#0b1521;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 27.128432,21.029885 4.567904,4.524747 -14.059391,12.992565 7.109092,7.174117 14.059392,-12.992565 4.480033,4.60595 3.388676,-18.749467 z"
id="path3343"
sodipodi:nodetypes="cccccccc"
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/changeprop.png"
inkscape:export-xdpi="4.1683898"
inkscape:export-ydpi="4.1683898" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#729fcf;stroke-width:1.90131521;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 31.425903,22.668448 3.202293,3.35658 -13.256229,12.450922 3.890186,4.206937 13.433006,-13.158028 3.732624,3.886911 1.483539,-12.296836 z"
id="path3343-2"
sodipodi:nodetypes="cccccccc"
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/changeprop.png"
inkscape:export-xdpi="4.1683898"
inkscape:export-ydpi="4.1683898" />
<circle
style="fill:url(#linearGradient4590);fill-opacity:1;stroke:#321900;stroke-width:2.01523018;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill-rule:evenodd;filter-blend-mode:normal;filter-gaussianBlur-deviation:0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="path4227"
cx="17.714096"
cy="46.136932"
r="13" />
<ellipse
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:1.7408402;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="path4227-3"
cx="17.736622"
cy="46.334522"
rx="11.096648"
ry="11.53859" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 20 KiB

247
Resources/EM_VHSolver.svg Normal file
View File

@ -0,0 +1,247 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64px"
height="64px"
id="svg2860"
sodipodi:version="0.32"
inkscape:version="0.91 r13725"
sodipodi:docname="EM_VHSolver.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<title
id="title4146">EM Workbench</title>
<defs
id="defs2862">
<linearGradient
id="linearGradient4150">
<stop
style="stop-color:#fcaf3e;stop-opacity:1"
offset="0"
id="stop4152" />
<stop
style="stop-color:#f57900;stop-opacity:1"
offset="1"
id="stop4154" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3692"
cx="45.883327"
cy="28.869568"
fx="45.883327"
fy="28.869568"
r="19.467436"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3703"
gradientUnits="userSpaceOnUse"
cx="135.38333"
cy="97.369568"
fx="135.38333"
fy="97.369568"
r="19.467436"
gradientTransform="matrix(0.97435,0.2250379,-0.4623105,2.0016728,48.487554,-127.99883)" />
<linearGradient
id="linearGradient3377">
<stop
id="stop3379"
offset="0"
style="stop-color:#faff2b;stop-opacity:1;" />
<stop
id="stop3381"
offset="1"
style="stop-color:#ffaa00;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="radialGradient3705"
gradientUnits="userSpaceOnUse"
cx="148.88333"
cy="81.869568"
fx="148.88333"
fy="81.869568"
r="19.467436"
gradientTransform="matrix(1.3852588,-5.1367833e-2,3.7056289e-2,0.9993132,-60.392403,7.7040438)" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective2868" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4148"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1846386,0,0,1.1846386,-9.501508,-5.4148589)" />
<linearGradient
gradientTransform="translate(9.9161935,2.2059659)"
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4148-7"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4159"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
<linearGradient
gradientTransform="matrix(0.50862782,0,0,0.50862782,14.023529,27.042116)"
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4148-5"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4150"
id="linearGradient4172"
x1="16.556818"
y1="7.794034"
x2="47.247158"
y2="52.521305"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.5"
inkscape:cx="-22.636364"
inkscape:cy="26.215803"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1920"
inkscape:window-height="1018"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:snap-grids="true"
showguides="false"
inkscape:snap-nodes="true"
inkscape:snap-others="true"
inkscape:snap-to-guides="false"
inkscape:snap-global="true">
<inkscape:grid
type="xygrid"
id="grid4187"
spacingx="1"
spacingy="1"
visible="true"
empspacing="2" />
</sodipodi:namedview>
<metadata
id="metadata2865">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>EM Workbench</dc:title>
<dc:date>2019/01/10</dc:date>
<dc:creator>
<cc:Agent>
<dc:title>FastFieldSolvers S.R.L.</dc:title>
</cc:Agent>
</dc:creator>
<dc:rights>
<cc:Agent>
<dc:title>LGPL2+</dc:title>
</cc:Agent>
</dc:rights>
<dc:publisher>
<cc:Agent>
<dc:title>FreeCAD</dc:title>
</cc:Agent>
</dc:publisher>
<dc:relation>https://www.freecadweb.org/wiki/Artwork_Guidelines</dc:relation>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:75.81687164px;line-height:125%;font-family:Georgia;-inkscape-font-specification:Georgia;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4148);fill-opacity:1;stroke:#241c1c;stroke-width:2.918185;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4.0999999"
x="1.483322"
y="58.55563"
id="text3014"
sodipodi:linespacing="125%"
transform="scale(1.0619928,0.94162596)"><tspan
sodipodi:role="line"
id="tspan3016"
x="1.483322"
y="58.55563"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Georgia;-inkscape-font-specification:Georgia;fill:url(#linearGradient4148);fill-opacity:1;stroke-width:2.918185;stroke-miterlimit:4;stroke-dasharray:none">S</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:64px;line-height:125%;font-family:'DejaVu Serif';-inkscape-font-specification:'DejaVu Serif';letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4148-7);fill-opacity:1;stroke:#241c1c;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4.0999999"
x="19.188921"
y="56.205967"
id="text3014-3"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan3016-8"
x="19.188921"
y="56.205967"
style="fill:url(#linearGradient4148-7);fill-opacity:1" /></text>
<rect
style="fill:#ffffff;fill-opacity:0.85789472;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4204"
width="45.81818"
height="32"
x="12"
y="30" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32.55217743px;line-height:125%;font-family:Georgia;-inkscape-font-specification:Georgia;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4148-5);fill-opacity:1;stroke:#241c1c;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4.0999999"
x="18.739897"
y="54.508018"
id="text3014-6"
sodipodi:linespacing="125%"
transform="scale(0.91885745,1.0883081)"><tspan
sodipodi:role="line"
id="tspan3016-1"
x="18.739897"
y="54.508018"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Georgia;-inkscape-font-specification:Georgia;fill:url(#linearGradient4148-5);fill-opacity:1;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none">VH</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -0,0 +1,700 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="EM_VHVoxelizeAll.svg"
inkscape:version="0.91 r13725"
version="1.1"
id="svg2816"
height="64px"
width="64px">
<title
id="title4210">EM Workbench</title>
<defs
id="defs2818">
<linearGradient
inkscape:collect="always"
id="linearGradient4584">
<stop
style="stop-color:#fcaf3e;stop-opacity:1"
offset="0"
id="stop4586" />
<stop
style="stop-color:#f57900;stop-opacity:1"
offset="1"
id="stop4588" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3789">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3781">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="-576.62397 : 353.91041 : 1"
inkscape:vp_y="0 : 1312.2305 : 0"
inkscape:vp_z="612.8902 : 417.51808 : 1"
inkscape:persp3d-origin="26.615276 : 18.425936 : 1"
id="perspective2824" />
<inkscape:perspective
id="perspective3622"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3622-9"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3653"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3675"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3697"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3720"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3742"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3764"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3785"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3806"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3806-3"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<inkscape:perspective
id="perspective3835"
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
inkscape:vp_z="1 : 0.5 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781"
id="linearGradient3787"
x1="93.501396"
y1="-0.52792466"
x2="92.882462"
y2="-7.2011309"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789"
id="linearGradient3795"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-6"
id="linearGradient3804-3"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.882462"
y2="-7.2011309" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-6">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-7" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-5" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-5"
id="linearGradient3806-3"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-5">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-6" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-2" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-0"
id="linearGradient3804-36"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.882462"
y2="-7.2011309" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-0">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-6" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-2" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-1"
id="linearGradient3806-6"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-1">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-8" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-7" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-8"
id="linearGradient3804-2"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.814743"
y2="-5.3353744" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-8">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-9" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-7" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-12"
id="linearGradient3806-36"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-12">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-9" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-3" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3781-03"
id="linearGradient3804-5"
gradientUnits="userSpaceOnUse"
x1="93.501396"
y1="-0.52792466"
x2="92.814743"
y2="-5.3353744" />
<linearGradient
inkscape:collect="always"
id="linearGradient3781-03">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3783-61" />
<stop
style="stop-color:#ffffff;stop-opacity:1"
offset="1"
id="stop3785-0" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3789-2"
id="linearGradient3806-63"
gradientUnits="userSpaceOnUse"
x1="140.23918"
y1="124.16501"
x2="137.60997"
y2="117.06711" />
<linearGradient
inkscape:collect="always"
id="linearGradient3789-2">
<stop
style="stop-color:#888a85;stop-opacity:1;"
offset="0"
id="stop3791-0" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1"
offset="1"
id="stop3793-6" />
</linearGradient>
<radialGradient
r="18.0625"
fy="41.625"
fx="25.1875"
cy="41.625"
cx="25.1875"
gradientTransform="matrix(1,0,0,0.32526,0,28.08607)"
gradientUnits="userSpaceOnUse"
id="radialGradient3169"
xlink:href="#linearGradient2269-0"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
id="linearGradient2269-0">
<stop
offset="0"
id="stop2271-4"
style="stop-color:#000000;stop-opacity:1;" />
<stop
offset="1"
id="stop2273-87"
style="stop-color:#000000;stop-opacity:0;" />
</linearGradient>
<linearGradient
gradientTransform="matrix(0.97680075,0,0,0.69188009,-11.11216,25.576416)"
inkscape:collect="always"
xlink:href="#linearGradient3884"
id="linearGradient3890"
x1="50.11961"
y1="38.894291"
x2="45.327534"
y2="21.83534"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient3884">
<stop
style="stop-color:#f57900;stop-opacity:1"
offset="0"
id="stop3886" />
<stop
style="stop-color:#fcaf3e;stop-opacity:1"
offset="1"
id="stop3888" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590"
x1="-19.915104"
y1="69.038132"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.76211734,0,0,0.80863943,24.338538,-10.615285)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590-9"
x1="-19.915104"
y1="69.038132"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.76211734,0,0,0.80863943,34.323311,-28.123495)" />
<linearGradient
gradientTransform="matrix(0.97680075,0,0,0.69188009,-11.11216,5.0296174)"
inkscape:collect="always"
xlink:href="#linearGradient3884"
id="linearGradient3890-4"
x1="50.11961"
y1="38.894291"
x2="45.327534"
y2="21.83534"
gradientUnits="userSpaceOnUse" />
<linearGradient
gradientTransform="matrix(0.97680075,0,0,0.69188009,0.06348778,-3.5632369)"
inkscape:collect="always"
xlink:href="#linearGradient3884"
id="linearGradient3890-4-1"
x1="50.11961"
y1="38.894291"
x2="45.327534"
y2="21.83534"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590-9-3"
x1="-19.915104"
y1="69.038132"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.76211734,0,0,0.80863943,45.498959,-36.716348)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4584"
id="linearGradient4590-0"
x1="-19.915104"
y1="69.038132"
x2="-19.85965"
y2="87.953239"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.76211734,0,0,0.80863943,35.514186,-19.208138)" />
<linearGradient
gradientTransform="matrix(0.97680075,0,0,0.69188009,0.06348778,16.983562)"
inkscape:collect="always"
xlink:href="#linearGradient3884"
id="linearGradient3890-1"
x1="50.11961"
y1="38.894291"
x2="45.327534"
y2="21.83534"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
inkscape:snap-to-guides="false"
inkscape:snap-nodes="true"
inkscape:snap-global="false"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:window-height="1018"
inkscape:window-width="1920"
inkscape:object-nodes="true"
inkscape:object-paths="true"
inkscape:snap-bbox-midpoints="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:bbox-nodes="true"
inkscape:bbox-paths="true"
inkscape:snap-bbox="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
showgrid="true"
inkscape:current-layer="layer1"
inkscape:cy="15.94637"
inkscape:cx="-24.405557"
inkscape:zoom="5.6568543"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base">
<inkscape:grid
type="xygrid"
id="grid3005"
empspacing="2"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
spacingx="1"
spacingy="1" />
</sodipodi:namedview>
<metadata
id="metadata2821">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>EM Workbench</dc:title>
<dc:creator>
<cc:Agent>
<dc:title>FastFieldSolvers S.R.L.</dc:title>
</cc:Agent>
</dc:creator>
<dc:date>2019/01/10</dc:date>
<dc:relation>https://www.freecadweb.org/wiki/Artwork_Guidelines</dc:relation>
<dc:publisher>
<cc:Agent>
<dc:title>FreeCAD</dc:title>
</cc:Agent>
</dc:publisher>
<dc:identifier />
<dc:rights>
<cc:Agent>
<dc:title>LGPL2+</dc:title>
</cc:Agent>
</dc:rights>
<cc:license>https://www.gnu.org/copyleft/lesser.html</cc:license>
<dc:contributor>
<cc:Agent>
<dc:title />
</cc:Agent>
</dc:contributor>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="fill:url(#linearGradient3890);fill-opacity:1;stroke:#321900;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 47.682071,37.522665 47.42363,49.25808 27.583303,58.952735 27.454083,46.726913 Z"
id="path3838"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#linearGradient4590);fill-opacity:1;fill-rule:evenodd;stroke:#321900;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 27.454083,46.219491 0,12.733244 -21.6336767,-7.958278 0,-12.733243 z"
id="path4570"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#fcaf3e;fill-rule:evenodd;stroke:#321900;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 47.842479,37.497096 27.454083,46.219491 5.8204063,38.261214 25.789954,28.711281 Z"
id="path4602"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#321900;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 15.715738,53.885398 0.14709,-0.140684 0.441269,-11.254703 19.47063,-9.003764"
id="path4244"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#321900;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 15.228321,33.425548 22.210535,8.018977 0,12.733243"
id="path4250"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 8.0235255,41.65552 5.8525505,2.250941 0.02969,7.621954 -5.5286846,-2.178755 z"
id="path4604-6"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 29.944233,48.394119 5.225762,-2.580281 -0.249847,6.912476 -5.191101,2.598716 z"
id="path4604-0"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#linearGradient4590-9);fill-opacity:1;fill-rule:evenodd;stroke:#321900;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 26.525401,24.780417 0,12.873928 -10.720221,-4.168098 0,-12.733243 z"
id="path4570-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#linearGradient3890-4);fill-opacity:1;stroke:#321900;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 37.291766,20.753004 37.438856,32.782829 27.11376,37.557795 26.718635,24.683868 Z"
id="path3838-5"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#fcaf3e;fill-rule:evenodd;stroke:#321900;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 37.136377,20.93912 26.455895,24.456215 15.853939,20.718451 26.115572,16.936555 Z"
id="path4602-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 18.784066,45.824342 6.411221,2.319439 -0.323867,7.235995 -5.968606,-2.106569 z"
id="path4604-6-5"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 39.995127,44.037086 5.430881,-2.68487 -0.07307,6.490423 -5.632369,2.349754 z"
id="path4604-0-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 29.080809,26.696887 5.784434,-1.977765 -0.16213,6.663512 -5.455593,2.494126 z"
id="path4604-0-3-0"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 18.048617,24.335815 5.675774,1.720611 0.02969,7.445178 -5.351907,-2.001979 z"
id="path4604-6-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#linearGradient3890-1);fill-opacity:1;stroke:#321900;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 58.857719,28.929812 58.599278,40.665227 38.758951,50.359882 38.629731,38.13406 Z"
id="path3838-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#linearGradient4590-0);fill-opacity:1;fill-rule:evenodd;stroke:#321900;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 38.629731,37.626638 0,12.733244 -21.633677,-7.958278 0,-12.733243 z"
id="path4570-3"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#fcaf3e;fill-rule:evenodd;stroke:#321900;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 59.018127,28.904243 38.629731,37.626638 16.996054,29.668361 36.965602,20.118428 Z"
id="path4602-22"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#321900;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 26.891386,45.292545 0.14709,-0.140684 0.441269,-11.254703 19.47063,-9.003764"
id="path4244-4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#321900;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 26.403969,24.832695 22.210535,8.018977 0,12.733243"
id="path4250-8"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 19.199173,33.062667 5.852551,2.250941 0.02969,7.621954 -5.528685,-2.178755 z"
id="path4604-6-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 41.119881,39.801266 5.225762,-2.580281 -0.249847,6.912476 -5.191101,2.598716 z"
id="path4604-0-1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#linearGradient4590-9-3);fill-opacity:1;fill-rule:evenodd;stroke:#321900;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 37.701049,16.187563 0,12.873929 -10.720221,-4.168098 0,-12.733244 z"
id="path4570-2-9"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:url(#linearGradient3890-4-1);fill-opacity:1;stroke:#321900;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 48.467414,12.16015 0.14709,12.029826 -10.325096,4.774966 -0.395125,-12.873928 z"
id="path3838-5-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#fcaf3e;fill-rule:evenodd;stroke:#321900;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 48.312025,12.346266 37.631543,15.863361 27.029587,12.125597 37.29122,8.3437006 Z"
id="path4602-2-4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 29.959714,37.231489 6.411221,2.319439 -0.323867,7.235995 -5.968606,-2.106569 z"
id="path4604-6-5-4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 51.170775,35.444233 5.430881,-2.68487 -0.07307,6.490423 -5.632369,2.349754 z"
id="path4604-0-3-8"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 40.256457,18.104034 5.784434,-1.977766 -0.16213,6.663513 -5.455593,2.494126 z"
id="path4604-0-3-0-5"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#fcaf3e;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 29.224265,15.742961 5.675774,1.720612 0.02969,7.445178 -5.351907,-2.001979 z"
id="path4604-6-2-8"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -296,13 +296,6 @@ def export_segs2(filename="", disc=3, custDot="", FHbug=False, breakSeg=False, w
# sort the edges. If the selected path is disconnected, the path will be broken!
edges = Part.__sortEdges__(edges_raw)
# TBC: join parts with additional edges, or .equiv-ing them, using distToShape between the obj.Shape
# Can happen with a compound containing different edges / wires / stetches
#edge = Part.Edge(Part.Line(Vector(154.0002, -62.6872,0), Vector(154.0002,-53.1876,0)))
#v = Part.Vertex(edges[0].Curve.StartPoint)
#v.Tolerance
#App.ActiveDocument.Shape.Shape.Vertexes[1].distToShape(App.ActiveDocument.Shape001.Shape.Vertexes[0])
# scan edges and derive nodes
nodes = []
for edge in edges: