Creating line between two objects in svg - html

How to create a line/path between two objects. Start and end point of path/line should not begin/end at the center of the respective object. Below i'm attaching the screenshot of sample. I need to calculate the logic to find the red line at any position. Black line is wrong one.
And it is purely based on SVG not html elements.
Thanks in advance

I found the solution without using any library based on the given below URL's.
URL 1: How to find the intersection point between a line and rectangel
URL 2: Calculating the intersection of two lines

Related

Oracle APEX: Adding single data points/marked positions to a bar chart

Does anybody know how to add a single marked position to each bar of a bar chart? I'm new in Oracle APEX and after long research I didn't find a solution. Also the example plots didn't helped with my need. I know I can combine a bar- and a line-chart but I don't want to have a line, just single positions to be marked. The exact representation of the values is not important (points, circles, dashes, stars, ...) but they shouldn't be combined. It could look like this:
Is there an option in Oracle Apex without changing the source code (I don't have this option)?
Thanks in advance!
It is possible to set the type of a line chart to none and activate markers so no lines between the dots were displayed.

Dynamically change line color dcc.Graph Plotly Dash between annotations

I'm writing a 'template creation' app using the dcc.Graph image annotation features in Plotly Dash.
The user adds multiple rectangles for specific features in the image (an invoice) and my callback captures the coordinates of each rectangle via the relayoutData variable. I want to use a different color for each rectangle, but can't figure out how to do it.
It seems like the only way to change the newshapes fillcolor
property is to replace the whole figure, but then I lose all previous shapes
All and any help appreciated.
Andrew
I have just found the following demo that does exactly what I am trying to do:
https://dash-gallery.plotly.host/dash-image-annotation/
Now to unpack the logic and adapt it to my context ... Happy 2021!
Andrew

Transformers cannot loop over list elements

I am trying to figure out with ESB. Software Ag Designer.
I am getting error.
Transformers cannot loop over list elements.
When I am doing transform.
Please help.
The documentList that you are trying to calculate the size of relatedPartyRef is a part of another Document List requestedTimeSlot. Please loop over the first DocumentList requestedTimeSlot and find the size of child DocumentList inside the loop.
If I see it correctly in your screenshot, in your "sizeOfList" transformer you are not getting the reference to the single "requestedTimeSlot" item in the loop, but to the whole "searchTimeSlot/requestedTimeSlot[]" array (notice the difference in the icons between your screenshot and the example below).
Try removing the map step containing the transformer and adding it back again. If that does not help, maybe you need to install the latest fixes for your version.
Example of mapping in nested loop
hope this helps

Solidworks hollow/shell a STL Part

I'm pretty new at solidworks!!
But I've been able to create a solid from a stl files. It's a Truncated tetrahedron shape.
Now I wanted this shape to be hollow (for 3D printing and adding threads).
So I've searched for a while and found a tutorial for the shell tool. This didn't work out because it gave me an error. That the faces may offset in adjacent spaces.
So I thought if I had one part and then a the same part but scale it 3mm. Place them on the same spot and then subtract them of some sort. It would give me the same shelled shape I want.
Would this work and does anybody know a way to do this or has a better way to hollow out my solid.
STL & PART upload.
Files Google Drive
If you have SOLIDWORKS Professional or Premium, you can use ScanTo3D to turn the part into a Solid / Surface body. At that point, you can manipulate the geometry as you would anything else in SOLIDWORKS.
Here's a video showing both turning on ScanTo3D and how to use it.
https://youtu.be/ZjzqWCfNfmQ
"So I thought if I had one part and then a the same part but scale it
3mm. Place them on the same spot and then subtract them of some sort.
It would give me the same shelled shape I want."
use the move/copy body command to copy it
use the scale command to scale it
use the combine feature to subject the smaller body from the main body
Alternatively use the check geometry feature to find any faulty faces and ALWAYS run import diagnostics on an imported body. if you can find and fix a faulty face try the shell tool again. If the minimum radius is too small then you will need to manually offset faces using the offset surface command

Problems positioning multiple d3 graphs on html page

I need to position multiple (ultimately 4, but I am starting with two here) d3 graphs on one web page. Following this tutorial, I created two divs:
<div id="donut"></div>
<div id="line-graph"></div>
And then I appended the graphs to their respective divs like so:
var svg = d3.select("#line-graph").append("svg")
AND
var svg = d3.select("#donut").append("svg")
Yet, they are still on top of each other on the page. What am I missing?
I know there are other people who have had this problem, but a lot of those questions are either unanswered, or the answer did not solve my problem. You can see what I am talking about here.
Thanks in advance.
Both your scripts declare global variables named 'svg' and then reference this global variable in the callback after the file is loaded. If you inspect your graphs, you'll see that they are actually both on the same SVG element and the SVG element that the line graph should be on is empty.
You need to rename your variables in your second script so that they have different names than the variables in the first script.