Skip to content

Commit

Permalink
improving kv8 3D model pushing position cmtnum=694
Browse files Browse the repository at this point in the history
  • Loading branch information
easyw committed Jan 16, 2025
1 parent c0690b3 commit 05ca2b7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
8 changes: 4 additions & 4 deletions InitGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
#* Kicad STEPUP (TM) is a TradeMark and cannot be freely usable *
#* *

ksu_wb_version='v 11.05.1'
ksu_wb_version='v 11.05.2'
global myurlKWB, ksuWBpath
myurlKWB='https://github.com/easyw/kicadStepUpMod'
global mycommitsKWB
mycommitsKWB=693 # v11.05.1 NB all the commits must have commit message ending with _cmtnum=nnn
# cmtnum=693'
mycommitsKWB=694 # v11.05.2 NB all the commits must have commit message ending with _cmtnum=nnn
# cmtnum=694'
global verKSU
verKSU="12.4.1"
verKSU="12.4.2"

import FreeCAD, FreeCADGui, Part, os, sys
import re, time
Expand Down
13 changes: 8 additions & 5 deletions kicadStepUptools.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@
pythonopen = builtin.open # to distinguish python built-in open function from the one declared here

## Constant definitions
___ver___ = "12.4.1"
___ver___ = "12.4.2"
__title__ = "kicad_StepUp"
__author__ = "maurice & mg"
__Comment__ = 'Kicad STEPUP(TM) (3D kicad board and models exported to STEP) for FreeCAD'
Expand Down Expand Up @@ -16940,6 +16940,9 @@ def PushFootprint():
# say_warning(msg)
# msg="Save to an EXISTING KiCad pcb file to update your Edge!"
# sayerr(msg)
#elif 'Shape2DView' in sel[0].Name: #TBD Shape2DView to fp
# if 'F_Silks' in o.Label or 'F_Fab' in o.Label or 'F_CrtYd' in o.Label \
# or 'Dwg' in o.Label or 'Cmts' in o.Label:
else:
msg="""Select Group or Sketch/Text elements to be converted to KiCad Footprint!"""
sayerr(msg)
Expand Down Expand Up @@ -21808,7 +21811,7 @@ def push3D2pcb(s,cnt,tsp):
if float(new_ref_angle) == 0:
new_ref_angle=''
ln=cnt[idx_ref]
if ('at' in ln): # pre kv8
if ('(at' in ln): # pre kv8
cnt[idx_ref] = ln.split('(at ')[0]+'(at ' + ref_values[0] +' '+ ref_values[1]+new_ref_angle+ln[ln.index(') '):]
else:
ln_n=cnt[idx_ref+1]
Expand All @@ -21819,7 +21822,7 @@ def push3D2pcb(s,cnt,tsp):
if float(new_val_angle) == 0:
new_val_angle=''
ln=cnt[idx_val]
if ('at' in ln): # pre kv8
if ('(at' in ln): # pre kv8
cnt[idx_val] = ln.split('(at ')[0]+'(at ' + val_values[0] +' '+ val_values[1]+new_val_angle+ln[ln.index(') '):]
else:
ln_n=cnt[idx_val+1]
Expand All @@ -21831,7 +21834,7 @@ def push3D2pcb(s,cnt,tsp):
new_usr_angle=''
ln=cnt[idx_usr]
#print(ln)
if ('at' in ln): # pre kv8
if ('(at' in ln): # pre kv8
cnt[idx_usr] = ln.split('(at ')[0]+'(at ' + usr_values[0] +' '+ usr_values[1]+new_usr_angle+ln[ln.index(') '):]
else:
ln_n=cnt[idx_usr+1]
Expand All @@ -21845,7 +21848,7 @@ def push3D2pcb(s,cnt,tsp):
ln = cnt[p2r[1]]
pad_val = p2r[2]
#print(ln)
if ('at' in ln): # pre kv8
if ('(at' in ln): # pre kv8
cnt[p2r[1]] = ln.split('(at ')[0]+'(at ' + pad_val[0] +' '+ pad_val[1]+new_pad_angle+ln[ln.index(') '):]
else:
ln_n=cnt[p2r[1]+1]
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package format="1" xmlns="https://wiki.freecad.org/Package_Metadata">
<name>KicadStepUp Workbench</name>
<description>A bidirectional ECAD/MCAD collaboration between KiCAD and FreeCAD.</description>
<version>11.05.1</version>
<version>11.05.2</version>
<maintainer email="easyw@katamail.com">Maui</maintainer>
<license file="LICENSE">AGPLv3.0</license>
<url type="repository" branch="master">https://github.com/easyw/kicadStepUpMod</url>
Expand Down

0 comments on commit 05ca2b7

Please sign in to comment.