
Research
/Security News
11 Malicious Go Packages Distribute Obfuscated Remote Payloads
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Precision at the core: total tolerance stack‑up, intelligently fused.
StackCore is a lightweight Python package for mechanical tolerance stack‑up analysis, integrating Monte Carlo simulation and data‑driven intelligence.
Stack
, PStack
, MStack
pip install stackcore
To import the stackcore
module, use
import stackcore
The main component, the Stack
can be imported as follows:
from stackcore import Stack
The Stack
Component taks a few key arguments:
The main plane is defined by a set of 3 points, and defines the main plane that the tolerance stack up will measure against. Here's an example:
m=np.array([[3, 2, -1],
[0, 3, 3],
[-1, 2, 4]])
The components variable contains a dictioary of planes and their respective tolerances, with many various tolerance types such as displacement and radial (axis). Here's an example:
components = [
{'plane': np.array([[-8, 1, 5],
[-4, 7, 3],
[-3, 2, 6]]),
'tolerances': [{'type': 'cylindrical',
'tol': [-0.1, +0.1],
'axis': np.array([[0,0,1],
[0,0,1],
[-.7, -0.9, 0.]])},
{'type': 'displacement',
'tol' : [-0.1, +0.1],
'axis': np.array([[0,0,1],
[0,0,1],
[-.7, -0.9, 0.]])}]}
]
The metrics variable contains a dictionary of the targeted metrics and their reference type. The 2 tolerance types currently supported are 'Angular'
and 'Linear'
Here's an example:
metrics = [
{ 'name': 'alpha',
'type': 'Angular'
}
]
The path variable defines where any generated figures should be stored. Here's an example:
path = 'path/to/figures/'
For faster processing, the PStack
object is provided that uses the numba
package to parallelize the loops in the monte carlo simulation. To use the PStack
, import it using:
from stackcore import PStack
All of the same functions of the Stack
object are available in the PStack
object.
(v0.3.0) StackCore now supports component compatibility testing via metrology data.
To access this, use the MStack
object, which takes the same inputs as the serial and parallel stacks above. To use the MStack
object:
from stackcore import Mstack
For metrology, the component
input looks a little different. Each component is defined by 3 points, and each point has its own metrology (∂x, ∂y, ∂z) associated with it. Here's an example:
[
{
"name": "Component",
"points": [
{
"coordinates": [
-20,
10,
6
],
"dx": 1.0,
"dy": -1.0,
"dz": 0.0
},
{
"coordinates": [
-15,
12,
5
],
"dx": 0.0,
"dy": 0.2,
"dz": 0.3
},
{
"coordinates": [
-3,
5,
6
],
"dx": -1.0,
"dy": 0.01,
"dz": -0.4
}
]
}
]
For a full example, see example.py
To use a GUI interface, see StackFuse: A Fusion360 add-in that connects with stackcore
to create an intuitive way to tolerance and analyze mechanical assemblies.
FAQs
A lightweight Python package for mechanical tolerance stack‑up analysis.
We found that stackcore demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).