Delphi Trigonometry: Useful for PCB Scripts.
Intersection of two straight lines - Online Simulation
Simulation Source: Math open Reference
Delphi code to Get Angle
const
RADIANS=57.29577951;
// If Angle is outside of 0-360 then put it within 0-360
function FixAngle(angle:double):double;
begin
while angle>= 360.0 do
angle := angle - 360.0;
while angle < 0 do
angle := angle + 360.0;
result:=angle;
end;
// Angle going from x1,y1 to x2,y2
function GetAngleDegrees(x1,y1,x2,y2:double):double;
var
part1, part2:double;
angle:double;
begin
if (x1=x2) and (y1=y2) then
begin
result:=0.0;
exit;
end;
part1:=abs(y2-y1);
if (part1=0) then begin part1:=0.0000001; y1:=y1+0.0000001; end;
part2:=abs(x2-x1);
if (part2=0) then begin part2:=0.0000001; x1:=x1+0.0000001; end;
angle:=arctan(part1/part2)*RADIANS;
if ((x1>x2) and (y1<y2)) then angle:=180-angle;
if ((x1>x2) and (y1>y2)) then angle:=angle +180;
if ((x1<x2) and (y1>y2)) then angle:=360-angle;
angle:=FixAngle(angle);
result:=angle;
end;
'via Blog this'
Saturday, April 29, 2017
Saturday, April 22, 2017
Toolbar Buttons
When creating your own custom Toolbars you may want to find or create some button faces.
In AD17 Button Faces can be Found at:
In AD17 Button Faces can be Found at:
Thursday, April 20, 2017
Scripting - Online Documentation for Altium
Script Examples Reference | Online Documentation for Altium Products
System API Low-level Routines (i.e. Hourglass, Esckey):
Using the PCB API
IPCB_SystemOptions (DXP Preferences)
PCB API System Interfaces | Online Documentation for Altium Products
PCB API System Interface References (example scripts)
System API Low-level Routines (i.e. Hourglass, Esckey):
Using the PCB API
IPCB_SystemOptions (DXP Preferences)
PCB API System Interfaces | Online Documentation for Altium Products
PCB API System Interface References (example scripts)
Wednesday, April 19, 2017
How to Add “Take Ownership” to the Right-Click Menu in Windows Explorer
Ok, your thinking what's this got to do with Altium. Well many users including myself ran into some issues after installing or upgrading Windows 10.
For example I had to take ownership of "C:\temp" and "C:\Program Files (x86)\Altium\AD17"
click on images to view
At "C:\Program Files (x86)\Altium\AD17"
Application Packages (like Altium) need Full Control to install and update the software.
And I have given myself Full Control (you need Admin Privileges)
Related Links:
How to Add “Take Ownership” to the Right-Click Menu in Windows Explorer:
https://support.microsoft.com/en-us/help/2623670/-access-denied-or-other-errors-when-you-access-or-work-with-files-and-folders-in-windows
That's it !
For example I had to take ownership of "C:\temp" and "C:\Program Files (x86)\Altium\AD17"
click on images to view
At "C:\Program Files (x86)\Altium\AD17"
Application Packages (like Altium) need Full Control to install and update the software.
And I have given myself Full Control (you need Admin Privileges)
Related Links:
How to Add “Take Ownership” to the Right-Click Menu in Windows Explorer:
https://support.microsoft.com/en-us/help/2623670/-access-denied-or-other-errors-when-you-access-or-work-with-files-and-folders-in-windows
That's it !
Sunday, April 9, 2017
Using Project Templates
File > New Project
click on image to view
DXP Prefs > Data Management > Templates > Template location
click on image to view
Any folders and sub folders found in the Template location path will be searched for *.PrjPcb files, all found *.PrjPcb files will be offered as project templates.
That's it !
click on image to view
DXP Prefs > Data Management > Templates > Template location
click on image to view
Any folders and sub folders found in the Template location path will be searched for *.PrjPcb files, all found *.PrjPcb files will be offered as project templates.
That's it !
Tuesday, April 4, 2017
Altium Performance Tweaks
With each release of Altium users are challenged to find ways to solve performance issues introduced by the latest round of new features.
What Altium needs is a performance mode, something kinda like Telsa's ludicrous button.
Here are some tweaks to increase performance for larger designs.
Start and Save Projects:
Supplier Links - Disable all live supplier links and supplier data for faster startup, fast BOMs and a more responsive Library Panel.
Live Supplier data causes lags when scrolling the Library Panel, this is due to real time supplier website searches.
The engineers I'm working with prefer to go to directly Digi-Key, Mouser or Octopart and search for parts, they do not use Altium's built-in Supplier Search feature.
During Layout:
Uncheck Cross Select Mode. Large projects with many schematic sheets will cause the tool to craw.
Online DRCs - Turn off online DRC Checks in DXP Preferences. Or minimize Online DRCs.
Live Drill Table - Delete and do not display the live drill table until you are ready to generate the fabrication data. The live drill table causes sluggish routing and via placement lags in large projects. This was fixed in later versions of Altium Designer by disabling live Drill tables.
PCB Panel - Keep the PCB panel keep it closed unless it is needed, live updates occur while routing when the PCB Panel is open causing sluggish routing.
Delete Rules - Delete unused rules, disabling rules may not help.
What Altium needs is a performance mode, something kinda like Telsa's ludicrous button.
Here are some tweaks to increase performance for larger designs.
Start and Save Projects:
Supplier Links - Disable all live supplier links and supplier data for faster startup, fast BOMs and a more responsive Library Panel.
Live Supplier data causes lags when scrolling the Library Panel, this is due to real time supplier website searches.
The engineers I'm working with prefer to go to directly Digi-Key, Mouser or Octopart and search for parts, they do not use Altium's built-in Supplier Search feature.
During Layout:
Uncheck Cross Select Mode. Large projects with many schematic sheets will cause the tool to craw.
Online DRCs - Turn off online DRC Checks in DXP Preferences. Or minimize Online DRCs.
Live Drill Table - Delete and do not display the live drill table until you are ready to generate the fabrication data. The live drill table causes sluggish routing and via placement lags in large projects. This was fixed in later versions of Altium Designer by disabling live Drill tables.
PCB Panel - Keep the PCB panel keep it closed unless it is needed, live updates occur while routing when the PCB Panel is open causing sluggish routing.
Delete Rules - Delete unused rules, disabling rules may not help.
Minimalize Rules - Try disabling rules. Or Export rule and Import after routing.
Polygon Repours - Turn off "Repour Polygons After Modification" option in DXP Preferences/PCB Editor/ General
Polygon pours - Use coarse Arc Approximations, fine arcs take longer to process. Note coarse Arc Approximations will effect copper clearances. For co-planar (CPW) RF traces you may want to use finer settings for Arc Approximation. Use finer settings after the routing is done.
PCB Rules and Violations Panel - Keep the Panel closed to eliminate sluggish lags while moving tracks to fix DRCs.
Via Stitching - Do NOT Use Via Stitching !
Disable the Cross Select Mode
Polygon Repours - Turn off "Repour Polygons After Modification" option in DXP Preferences/PCB Editor/ General
Polygon pours - Use coarse Arc Approximations, fine arcs take longer to process. Note coarse Arc Approximations will effect copper clearances. For co-planar (CPW) RF traces you may want to use finer settings for Arc Approximation. Use finer settings after the routing is done.
PCB Rules and Violations Panel - Keep the Panel closed to eliminate sluggish lags while moving tracks to fix DRCs.
Via Stitching - Do NOT Use Via Stitching !
Disable the Cross Select Mode
Disable Live Highlighting
Disable Online DRCs
Close the Properties Panel
Set GND Net to Hidden.
Keep the PCB Panel Closed
Close the Properties Panel
Set GND Net to Hidden.
Keep the PCB Panel Closed
Disable the Navigation Tool Bar
Disable Auto Save (Prefs > Data Management > Backup > Auto Save
Disable Glossing.
Enable Legacy Push and Shove. ?
Enable Legacy Internal Glossing. ?
Disable Auto Save (Prefs > Data Management > Backup > Auto Save
Disable Glossing.
Enable Legacy Push and Shove. ?
Enable Legacy Internal Glossing. ?
Subscribe to:
Posts (Atom)