Commit d6207236 authored by Thomas Karl Pietrowski's avatar Thomas Karl Pietrowski
Browse files

Merge remote-tracking branch 'origin/master-testing-latest-ciu'

parents c6df5e55 732e71e3
......@@ -12,7 +12,10 @@ all:
- type:shell
script:
- curl https://thopiekar.eu:5443/cura-plugins/CuraPluginOven/raw/deployment/cpo.py?inline=false --output cpo.py
- python3 ./cpo.py --create=package6 --source=./
- python3 ./cpo.py --create=package610 --source=./
- python3 ./cpo.py --create=package600 --source=./
- python3 ./cpo.py --create=package5 --source=./
- python3 ./cpo.py --create=package4 --source=./
- python3 ./cpo.py --create=plugin4 --source=./
- python3 ./cpo.py --create=source --source=./
only:
......
......@@ -5,26 +5,27 @@ import os
import platform
# Uranium
from UM.Application import Application # @UnresolvedImport
from UM.Logger import Logger # @UnresolvedImport
from UM.i18n import i18nCatalog # @UnresolvedImport
from UM.Version import Version # @UnresolvedImport
from UM.Application import Application # @UnresolvedImport
from UM.Logger import Logger # @UnresolvedImport
from UM.i18n import i18nCatalog # @UnresolvedImport
from UM.Version import Version # @UnresolvedImport
# Since 3.4: Register Mimetypes:
if Version("3.4") <= Version(Application.getInstance().getVersion()):
from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType
# CadIntegrationUtils
from .CadIntegrationUtils.CommonCLIReader import CommonCLIReader # @UnresolvedImport
# CIU
from .CadIntegrationUtils.CommonCLIReader import CommonCLIReader # @UnresolvedImport
i18n_catalog = i18nCatalog("FreeCADPlugin")
class FreeCADReader(CommonCLIReader):
def __init__(self):
super().__init__("FreeCAD")
super().__init__()
if Version("3.4") <= Version(Application.getInstance().getVersion()):
MimeTypeDatabase.addMimeType(MimeType(name = "application/x-extension-fcstd",
MimeTypeDatabase.addMimeType(MimeType(name="application/x-extension-fcstd",
comment="FreeCAD files",
suffixes=["fcstd"]
)
......@@ -42,7 +43,7 @@ class FreeCADReader(CommonCLIReader):
return super().openForeignFile(options)
def exportFileAs(self, options, quality_enum = None):
def exportFileAs(self, options, quality_enum=None):
Logger.log("d", "Exporting file: %s", options["tempFile"])
cli = 'FreeCADCmd'
......@@ -58,14 +59,18 @@ class FreeCADReader(CommonCLIReader):
"--stl",
options["tempFile"],
]
cwd = os.path.split(options["foreignFile"])[0]
try:
ret = self.executeCommand([cli, ] + opt,
cwd = os.path.split(options["foreignFile"])[0],
cwd=cwd,
)
except:
cli = cli.lower() # Ubuntu: Command name is since bioic in lowercase.
# Ubuntu: Command name is since bioic in lowercase.
cli = cli.lower()
ret = self.executeCommand([cli, ] + opt,
cwd = os.path.split(options["foreignFile"])[0],
cwd=cwd,
)
if ret != 0:
Logger.log("c", "Returncode is not 0!")
# Copyright (c) 2016 Thomas Karl Pietrowski
# Copyright (c) 2019 Thomas Karl Pietrowski
__plugin_name__ = "FreeCAD plugin"
__plugin_id__ = "CuraFreeCADPlugin"
# Uranium
from UM.Platform import Platform # @UnresolvedImport
from UM.Logger import Logger # @UnresolvedImport
from UM.i18n import i18nCatalog # @UnresolvedImport
i18n_catalog = i18nCatalog("FreeCADPlugin")
from UM.Platform import Platform # @UnresolvedImport
from UM.Logger import Logger # @UnresolvedImport
from UM.i18n import i18nCatalog # @UnresolvedImport
i18n_catalog = i18nCatalog(__plugin_id__)
# This plugins
from . import FreeCADReader
def getMetaData():
return {
"plugin": {
"name": i18n_catalog.i18nc("@label", "FreeCADPlugin"),
"name": __plugin_name__,
"author": "Thomas Karl Pietrowski",
"version": "0.1.0",
"description": i18n_catalog.i18nc("@info:whatsthis", "Gives you the possibility to open *.FCStd files."),
"description": i18n_catalog.i18nc("@info:whatsthis",
"Gives you the possibility to open *.FCStd files."),
"api": 3
},
"mesh_reader": [
{
"extension": "FCStd",
"description": i18n_catalog.i18nc("@item:inlistbox", "FreeCAD files")
"description": i18n_catalog.i18nc("@item:inlistbox",
"FreeCAD files")
},
]
}
def register(app):
if Platform.isWindows() or Platform.isLinux() or Platform.isOSX():
from . import FreeCADReader # @UnresolvedImport
return {"mesh_reader": FreeCADReader.FreeCADReader()}
else:
Logger.logException("i", "Unsupported OS!")
return {}
metadata = {}
try:
reader = FreeCADReader.FreeCADReader()
metadata["mesh_reader"] = reader
except:
Logger.logException("e", "An error occured, when loading the reader!")
return metadata
......@@ -3,11 +3,12 @@
"id" : "CuraFreeCADPlugin",
"author": "Thomas Karl Pietrowski",
"email" : "thopiekar@gmail.com",
"version": "0.3.1",
"version": "0.3.2",
"website": "https://thopiekar.eu/cura/plugins/cad/freecad/",
"supported_sdk_versions":
["5.0.0",
"6.0.0",
"6.1.0",
"7.0.0"
],
"api": 5,
......
File mode changed from 100644 to 100755
......@@ -12,8 +12,8 @@
viewBox="0 0 150 150"
version="1.2"
id="svg7"
sodipodi:docname="FreeCAD.V1.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)">
sodipodi:docname="icon.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
<metadata
id="metadata13">
<rdf:RDF>
......@@ -38,14 +38,14 @@
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-height="993"
id="namedview9"
showgrid="true"
inkscape:zoom="2.1213203"
inkscape:cx="126.11428"
inkscape:cy="73.929893"
inkscape:window-x="-8"
inkscape:window-y="32"
inkscape:zoom="2.9999999"
inkscape:cx="90.057333"
inkscape:cy="88.428228"
inkscape:window-x="0"
inkscape:window-y="58"
inkscape:window-maximized="1"
inkscape:current-layer="svg7"
showguides="false"
......@@ -54,40 +54,31 @@
type="xygrid"
id="grid16" />
</sodipodi:namedview>
<path
style="fill:#d32f2f;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 49.5,0 0,51 v 99 H 150 V 0"
id="background"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:56px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.75"
x="72.244751"
y="100.56248"
id="text4782"><tspan
sodipodi:role="line"
x="72.244751"
y="100.56248"
id="tspan4780"
style="stroke-width:0.75"><tspan
x="72.244751"
y="100.56248"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:72px;font-family:'Noto Mono';-inkscape-font-specification:'Noto Mono';text-align:center;writing-mode:lr-tb;direction:ltr;text-anchor:middle;fill:#ffffff;stroke-width:0.75"
id="tspan4778">FC</tspan></tspan></text>
<g
id="surface604"
transform="translate(0,8.2700062)"
style="fill:#d32f2f;fill-opacity:1">
<path
style="fill:#d32f2f;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 49.5,-8.2700062 0,42.729994 V 141.72999 H 150 V -8.2700062"
id="path2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
</g>
<flowRoot
xml:space="preserve"
id="flowRoot8"
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
transform="translate(0,8.2700062)"><flowRegion
id="flowRegion10"><rect
id="rect12"
width="120.60162"
height="118.3368"
x="36.237106"
y="44.024906" /></flowRegion><flowPara
id="flowPara14" /></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot24"
style="font-style:normal;font-weight:normal;font-size:74.66666412px;line-height:1.25;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke:none"
transform="matrix(0.75000002,0,0,0.75000002,2.7123106,33.724065)"><flowRegion
id="flowRegion26"
style="font-size:74.66666412px;text-align:center;text-anchor:middle;fill:#ffffff"><rect
id="rect28"
width="188.90787"
height="189.14717"
x="0.062903889"
y="-0.14815156"
style="font-size:74.66666412px;text-align:center;text-anchor:middle;fill:#ffffff" /></flowRegion><flowPara
id="flowPara30"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:96px;font-family:'Noto Mono';-inkscape-font-specification:'Noto Mono';text-align:center;writing-mode:lr-tb;direction:ltr;text-anchor:middle;fill:#ffffff">FC</flowPara></flowRoot></svg>
style="display:inline;fill:#d32f2f;fill-opacity:1"
inkscape:label="icon"
inkscape:groupmode="layer" />
</svg>
......@@ -3,7 +3,7 @@
"package_type": "plugin",
"display_name": "FreeCAD Integration",
"description": "Help to open FreeCAD files directly in Cura.",
"package_version": "0.3.1",
"package_version": "0.3.2",
"sdk_version": 6,
"sdk_version_semver": "7.0.0",
"website": "https://thopiekar.eu/cura/plugins/cad/freecad/",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment