Comments (1)
I'm having similar issues trying to visualize a ground plane with a hole for a via, as shown below. This portion for drawing a plane with via holes is adapted from documentation of the MATLAB portion here
bounding = {
'x': mesh.GetSimArea()[:, 0],
'y': mesh.GetSimArea()[:, 1],
'z': mesh.GetSimArea()[:, 2],
}
p = np.zeros((2, 26))
p[:, 0] = [bounding['x'][0], bounding['y'][0]]
p[:, 1] = [0, bounding['y'][0]]
a = np.linspace(-np.pi, np.pi, 19)
p[:, 2:21] = [
(VIA_GAP + VIA_OUTTER_DIAMETER/2) * np.sin(a),
(VIA_GAP + VIA_OUTTER_DIAMETER/2) * np.cos(a)
]
p[:, 21] = [0, bounding['y'][0]]
p[:, 22] = [bounding['x'][-1], bounding['y'][0]]
p[:, 23] = [bounding['x'][-1], bounding['y'][-1]]
p[:, 24] = [bounding['x'][0], bounding['y'][-1]]
p[:, 25] = [bounding['x'][0], bounding['y'][0]]
gnd.AddPolygon(p, 'z', elevation=(OUTTER_SUBSTRATE_THICKNESS + MIDDLE_SUBSTRATE_THICKNESS), priority=10)
Where a polygon is expected on the entire top plane.
Modifying the code as such...
bounding = {
'x': mesh.GetSimArea()[:, 0],
'y': mesh.GetSimArea()[:, 1],
'z': mesh.GetSimArea()[:, 2],
}
p = np.zeros((2, 25))
p[:, 0] = [bounding['x'][0], bounding['y'][0]]
p[:, 1] = [0, bounding['y'][0]]
a = np.linspace(-np.pi, np.pi, 19)
p[:, 2:21] = [
(VIA_GAP) * np.sin(a),
(VIA_GAP) * np.cos(a)
]
p[:, 21] = [0, bounding['y'][0]]
p[:, 22] = [bounding['x'][-1], bounding['y'][0]]
p[:, 23] = [bounding['x'][-1], bounding['y'][-1]]
p[:, 24] = [bounding['x'][0], bounding['y'][-1]]
gnd.AddPolygon(p, 'z', elevation=(OUTTER_SUBSTRATE_THICKNESS + MIDDLE_SUBSTRATE_THICKNESS), priority=10)
creates this, where the polygon doesn't have the hole in the middle and is simply a triangle.
Plotting the object p
in MatPlotLib verifies we have (at least geometrically) properly created the object.
from appcsxcad.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appcsxcad.