apply SVN commit 5432 to Git
This commit is contained in:
parent
7396c528e1
commit
88370f19dd
|
@ -419,7 +419,7 @@ Py::Object View3DInventorPy::viewRotateLeft(const Py::Tuple& args)
|
|||
SbRotation rot = cam->orientation.getValue();
|
||||
SbVec3f vdir(0, 0, -1);
|
||||
rot.multVec(vdir, vdir);
|
||||
SbRotation nrot(vdir, M_PI/2);
|
||||
SbRotation nrot(vdir,float( M_PI/2));
|
||||
cam->orientation.setValue(rot*nrot);
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
|
@ -445,7 +445,7 @@ Py::Object View3DInventorPy::viewRotateRight(const Py::Tuple& args)
|
|||
SbRotation rot = cam->orientation.getValue();
|
||||
SbVec3f vdir(0, 0, -1);
|
||||
rot.multVec(vdir, vdir);
|
||||
SbRotation nrot(vdir, -M_PI/2);
|
||||
SbRotation nrot(vdir, float(-M_PI/2));
|
||||
cam->orientation.setValue(rot*nrot);
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
|
|
|
@ -36,6 +36,9 @@ SET(IdfLibs_SRCS
|
|||
lib/TSM_104_01_L_DV_A.stp
|
||||
lib/TSS0P_8.stp
|
||||
lib/VC0603_SMD.stp
|
||||
lib/RLF_12545.igs
|
||||
lib/SOT23.igs
|
||||
lib/SOT404.igs
|
||||
)
|
||||
SOURCE_GROUP("Idflibs" FILES ${IdfLibs_SRCS})
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
import FreeCAD, Part, os, FreeCADGui, __builtin__
|
||||
from FreeCAD import Base
|
||||
from math import *
|
||||
import ImportGui
|
||||
|
||||
##########################################################
|
||||
# Script version dated 19-Jan-2012 #
|
||||
|
@ -45,7 +46,7 @@ EmpDisplayMode=2 # 0='Flat Lines', 1='Shaded', 2='Wireframe', 3='Points'; recomm
|
|||
|
||||
IDF_sort=0 # 0-sort per refdes [1 - part number (not preffered)/refdes] 2-sort per footprint/refdes
|
||||
|
||||
IDF_diag=1 # 0/1=disabled/enabled output (footprint.lst/missing_models.lst)
|
||||
IDF_diag=0 # 0/1=disabled/enabled output (footprint.lst/missing_models.lst)
|
||||
IDF_diag_path="/tmp" # path for output of footprint.lst and missing_models.lst
|
||||
|
||||
|
||||
|
@ -330,7 +331,8 @@ def place_steps(doc,placement,board_thickness):
|
|||
model_lines=model_file.readlines()
|
||||
model_file.close()
|
||||
model_dict=[]
|
||||
model_file=pythonopen(IDF_diag_path+"/missing_models.lst", "w")
|
||||
if IDF_diag==1:
|
||||
model_file=pythonopen(IDF_diag_path+"/missing_models.lst", "w")
|
||||
keys=[]
|
||||
#prev_step="*?.*?" #hope nobody will insert this step filename
|
||||
step_dict=[]
|
||||
|
@ -342,11 +344,20 @@ def place_steps(doc,placement,board_thickness):
|
|||
model_dict=dict(model_dict)
|
||||
validkeys=filter(lambda x:x in [place_item[2] for place_item in placement], model_dict.keys())
|
||||
FreeCAD.Console.PrintMessage("Step models to be loaded for footprints: "+str(validkeys)+"\n")
|
||||
grp=doc.addObject("App::DocumentObjectGroup", "Step Models")
|
||||
grp=doc.addObject("App::DocumentObjectGroup", "Step Lib")
|
||||
for validkey in validkeys:
|
||||
step_dict.append((validkey,Part.read(step_path+model_dict[validkey])))
|
||||
ImportGui.insert(step_path+model_dict[validkey],FreeCAD.ActiveDocument.Name)
|
||||
#partName=FreeCAD.ActiveDocument.ActiveObject.Name
|
||||
impPart=FreeCAD.ActiveDocument.ActiveObject
|
||||
#impPart.Shape=FreeCAD.ActiveDocument.ActiveObject.Shape
|
||||
#impPart.ViewObject.DiffuseColor=FreeCAD.ActiveDocument.ActiveObject.ViewObject.DiffuseColor
|
||||
impPart.ViewObject.Visibility=0
|
||||
impPart.Label=validkey
|
||||
grp.addObject(impPart)
|
||||
step_dict.append((validkey,impPart))
|
||||
FreeCAD.Console.PrintMessage("Reading step file "+str(model_dict[validkey])+" for footprint "+str(validkey)+"\n")
|
||||
step_dict=dict(step_dict)
|
||||
grp=doc.addObject("App::DocumentObjectGroup", "Step Models")
|
||||
for place_item in placement:
|
||||
if step_dict.has_key(place_item[2]):
|
||||
step_model=doc.addObject("Part::Feature",place_item[0]+"_s")
|
||||
|
@ -354,7 +365,8 @@ def place_steps(doc,placement,board_thickness):
|
|||
#if prev_step!=place_item[2]:
|
||||
# model0=Part.read(step_path+"/"+model_dict[place_item[2]])
|
||||
# prev_step=place_item[2]
|
||||
step_model.Shape=step_dict[place_item[2]]
|
||||
step_model.Shape=step_dict[place_item[2]].Shape
|
||||
step_model.ViewObject.DiffuseColor=step_dict[place_item[2]].ViewObject.DiffuseColor
|
||||
z_pos=0
|
||||
rotateY=0
|
||||
if place_item[6]=='BOTTOM':
|
||||
|
@ -366,7 +378,7 @@ def place_steps(doc,placement,board_thickness):
|
|||
else:
|
||||
if IDF_diag==1:
|
||||
model_file.writelines(str(place_item[0])+" "+str(place_item[2])+"\n")
|
||||
model_file.close()
|
||||
model_file.close()
|
||||
|
||||
def toQuaternion(heading, attitude,bank): # rotation heading=arround Y, attitude =arround Z, bank attitude =arround X
|
||||
"""toQuaternion(heading, attitude,bank)->FreeCAD.Base.Rotation(Quternion)"""
|
||||
|
|
|
@ -31,6 +31,6 @@
|
|||
|
||||
|
||||
|
||||
# an option for IDF added by Milos Koutny (12-Feb-2010)
|
||||
# two options for IDF added by Milos Koutny (12-Feb-2010)
|
||||
FreeCAD.addImportType("IDF emn file File Type (*.emn)","Idf")
|
||||
|
||||
#FreeCAD.addImportType("IDF emp File Type (*.emp)","Import_Emp")
|
||||
|
|
File diff suppressed because it is too large
Load Diff
2702
src/Mod/Idf/lib/RLF_12545.igs
Normal file
2702
src/Mod/Idf/lib/RLF_12545.igs
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
9026
src/Mod/Idf/lib/SOT23.igs
Normal file
9026
src/Mod/Idf/lib/SOT23.igs
Normal file
File diff suppressed because it is too large
Load Diff
4419
src/Mod/Idf/lib/SOT404.igs
Normal file
4419
src/Mod/Idf/lib/SOT404.igs
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
"FOOTPRINT" "STEP FILE"
|
||||
"SOT23-R" "SOT23.stp"
|
||||
"SOT23-R" "SOT23.igs"
|
||||
"SMD_C_0805-R" "0805_SMD.stp"
|
||||
"SMD_C_1210-R" "1210_SMD.stp"
|
||||
"SMD_R_1206-R" "1206_SMD.stp"
|
||||
|
@ -13,7 +13,7 @@
|
|||
"MSOP10E_LT" "MSOP_10.stp"
|
||||
"TCMT11XX" "TCMT1107_4.stp"
|
||||
"SMB-TB" "SMB_DO_214AA.stp"
|
||||
"SOT404-GDS-R" "SOT404.stp"
|
||||
"SOT404-GDS-R" "SOT404.igs"
|
||||
"SOT428-A1-A2C-R" "SOT428_DPAK.stp"
|
||||
"SOT96-1-R" "SOT_96.stp"
|
||||
"SOT323-BEC-R" "SOT_323_3.stp"
|
||||
|
@ -22,9 +22,9 @@
|
|||
"SOD523-R" "SOD_523.stp"
|
||||
"TSM-104-01-L-DV" "TSM_104_01_L_DV_A.stp"
|
||||
"TSM-103-01-L-DV-A" "TSM_103_01_L_DV_A.stp"
|
||||
"SOD323-R" "SOD_323.stp"
|
||||
"SOD323-R" "SOD_323.igs"
|
||||
"VC0603-R" "VC0603_SMD.stp"
|
||||
"RLF12545" "RLF_12545.stp"
|
||||
"RLF12545" "RLF_12545.igs"
|
||||
"CAPAE830X1050" "CAP_50SGV_8_10.stp"
|
||||
"RLF7030-R" "RLF_7030.stp"
|
||||
"EPS_B66285E" "EPL22_6_16.stp"
|
||||
|
|
Can't render this file because it contains an unexpected character in line 1 and column 11.
|
|
@ -195,7 +195,7 @@ int DrawSketchHandler::seekAutoConstraint(std::vector<AutoConstraint> &suggested
|
|||
const float tangDeviation = 2.;
|
||||
|
||||
int tangId = Constraint::GeoUndef;
|
||||
float smlTangDist = 1e15;
|
||||
float smlTangDist = 1e15f;
|
||||
|
||||
// Get geometry list
|
||||
const std::vector<Part::Geometry *> geomlist = sketchgui->getSketchObject()->getCompleteGeometry();
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
<File Id="PartInitGuiPy" Name="InitGui.py" DiskId="1" />
|
||||
<File Id="Partpyd" Name="Part.pyd" DiskId="1" />
|
||||
<File Id="PartGuipyd" Name="PartGui.pyd" DiskId="1" />
|
||||
<File Id="TestPartAppPy" Name="TestPartApp.py" DiskId="1" />
|
||||
<File Id="TestPartGuiPy" Name="TestPartGui.py" DiskId="1" />
|
||||
</Component>
|
||||
</Directory>
|
||||
</Include>
|
|
@ -28,6 +28,8 @@
|
|||
<File Id="PartDesignInitGuiPy" Name="InitGui.py" DiskId="1" />
|
||||
<File Id="PartDesignpyd" Name="PartDesign.pyd" DiskId="1" />
|
||||
<File Id="PartDesignGuipyd" Name="PartDesignGui.pyd" DiskId="1" />
|
||||
<File Id="TestPartDesignAppPy" Name="TestPartDesignApp.py" DiskId="1" />
|
||||
<File Id="TestPartDesignGuiPy" Name="TestPartDesignGui.py" DiskId="1" />
|
||||
<File Id="PartDesign__init__py" Name="__init__.py" />
|
||||
</Component>
|
||||
<Directory Id="ModPartDesignScripts" Name="Scripts" FileSource="../../Mod/PartDesign/Scripts">
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<File Id="SketcherInitGuiPy" Name="InitGui.py" DiskId="1" />
|
||||
<File Id="Sketcherpyd" Name="Sketcher.pyd" DiskId="1" />
|
||||
<File Id="SketcherGuipyd" Name="SketcherGui.pyd" DiskId="1" />
|
||||
<File Id="SketcherTestsAppPy" Name="SketcherTestsApp.py" DiskId="1" />
|
||||
<File Id="TestSketcherAppPy" Name="TestSketcherApp.py" DiskId="1" />
|
||||
</Component>
|
||||
</Directory>
|
||||
</Include>
|
Loading…
Reference in New Issue
Block a user