Jump to content

construct circle


Recommended Posts

Please sign in to view this quote.

Think of it as a 3 sided box. I need Tangent to two sides(roughly parallel to each other) and bottom(perpendicular to other two lines) , and report center location and diameter. I tried circle in contour but not having any success.

Your method would work if the were formed as a polygon.
Link to comment
https://qualityforum.zeiss.com/topic/16124-construct-circle/#findComment-89310
Share on other sites

Dane - You nailed it - That's what I would do. Works great - check this out:
3148_214ecfbe2387edb928c7dd6584366ae1.jpg
Just make sure to scan the lines with lots of points. Recall Feature Points into a circle and choose MAXIMUM INSCRIBED or INNER TANGENTIAL in the EVALUATION. Make sure to Update your nominals to the Acutals so you get a current visualization in Calypso.
Link to comment
https://qualityforum.zeiss.com/topic/16124-construct-circle/#findComment-89312
Share on other sites

Please sign in to view this quote.

Well then, the only thing controlling the Circle is the two sides. Do a Cartesian Distance between the two sides - that's the Diameter you are looking for. The Center would be the intersection of the CONSTRUCTION>SYMMETRY of the two sides and the CONSTRUCTION>PLANE WITH OFFSET from the Bottom Plane offset by the distance (input as a formula).

Good luck!
Link to comment
https://qualityforum.zeiss.com/topic/16124-construct-circle/#findComment-89314
Share on other sites

Please sign in to view this quote.

A symmetry of the two parallel lines intersecting the perpendicular line gives me what would be a tangent point and constraint of translation in one axis. I haven't worked out how to intersect the other two tangents.. If I could a 3 point circle would work.
Link to comment
https://qualityforum.zeiss.com/topic/16124-construct-circle/#findComment-89322
Share on other sites

Please sign in to view this quote.

I should have clarified, if the two lines are parallel. If they are not parallel, then the circle would be fully constrained (location wise). The third line in this sense could only work in controlling the size.

I guess that's what they are going for?
Link to comment
https://qualityforum.zeiss.com/topic/16124-construct-circle/#findComment-89324
Share on other sites

Richard: Calculate a circle based on two parallell lines is impossible. You might have a diameter and one center coordinate. But you cant make a circle out of that.

Calculate a circle based on two lines that isn't parallell is also impossible. Then you dont have either radius or any coordinate for the center.

To calculate a circle you need atleast 3 points.
See example:
Find distance between p1 and p2.
Find distance between p2 and p3.
Find symmetry between p1 and p2.
Find symmetry between p2 and p3
Calculate projection from sym p1 p2 perp to distance line.
Same with p2 p3.
Intersection point from both projections is circle center.
Calculate distance from center point to either p1, p2 or p3. Thats radius.
p1=point(1.1368683772162e-13,1898.5,0)
p2=point(-16.567327643663,1898.4277109373,0)
p3=point(-33.133393621183,1898.2108492544,0)

x1=p1.x
y1=p1.y

x2=p2.x
y2=p2.y

x3=p3.x
y3=p3.y

temp = (x2 * x2) + (y2 * y2)
bc = (x1 * x1 + y1 * y1 - temp) / 2
cd = (temp - x3 * x3 - y3 * y3) / 2
det = (x1 - x2) * (y2 - y3) - (x2 - x3) * (y1 - y2)

if abs(det) < 0
    message("Ingen beräkning kan ske då punkterna bildar en linje"+cr()+"Allvarligt fel")
else
	cx = (bc*(y2 - y3) - cd*(y1 - y2)) / det
	cy = ((x1 - x2) * cd - (x2 - x3) * bc) / det
	display("Center: "+cx+" "+cy)
	display("Radius: "+sqrt((cx - x1)**2 + (cy - y1)**2))
endif
Link to comment
https://qualityforum.zeiss.com/topic/16124-construct-circle/#findComment-89332
Share on other sites

×
×
  • Create New...