Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with components under pcb like sdcard in dimension calculation #2

Open
HansH111 opened this issue Jul 17, 2014 · 1 comment

Comments

@HansH111
Copy link

I am trying to adapt your library for a different pcb layout

so I created a rpiplusComponent list.
The problem with this is that it has an underneath sdcard and in the calculation of the componentsDimensions it effects the overall height.
The SDcard space (negative z value) is already compensated by the standoffheight.

if there a simple way to exclude or not to accept negative z values in the componentsDimensions function .

@HansH111
Copy link
Author

solved it by changing the minVec function into

//Return the minimum values between two vectors of either length 2 or 3. 2D Vectors are treated as 3D vectors who final value is 0.
function minVec( vector1, vector2 ) =
[min(vector1[0], vector2[0]), min(vector1[1], vector2[1]), min((vector1[2] == undef ? 0 : (vector1[2] < 0 ? 0 : vector1[2])), (vector2[2] == undef ? 0 : (vector2[2] < 0 ? 0 : vector2[2])) )];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant