×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

#### Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
To Your Posts
• Keyword Search
• One-Click Access To Your
Favorite Forums
• Automated Signatures
On Your Posts
• Best Of All, It's Free!
• Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

# Simplify Circle2D with lines3

 Forum Search FAQs Links MVPs

## Simplify Circle2D with lines

(OP)
Any idea how I could take one Circle2D and simplify it with lines?
I would need something like below.

### RE: Simplify Circle2D with lines

Hi iscariot,
I think maybe even easier is to simplify it with a spline. Take points from an arc and connect them with a spline curve. To create a spline you just provide spline poles as parameters to a CreateSpline. This way you do it in one shot ...

Tesak
http://scripts4all.eu/txtoncurve/ - Text along a curve for Catia V5

### RE: Simplify Circle2D with lines

Create equidistant points on the circle, then join them with lines...

Eric N.
indocti discant et ament meminisse periti

### RE: Simplify Circle2D with lines

(OP)
As input I have only arcs of circle, not full circles. I need only to simplify with lines this arcs of circle.
I am able to get from Circle 2D the radius, center point, start and end point but no more.

The question is how to create the necessary points only on the arc of circle and not on empty side?
Maybe I could create some equidistant points for complete circle (as told by itsmyjob) and next to check somehow which point intersects the Circle2D (arc of circle in my case).

### RE: Simplify Circle2D with lines

Circle2D is just a curve, and all basic types (line, circle, spline, ellipse, line) seem to inherit methods from Curve2D. You can use Curve2D methods like GetParamExtents to get extents of a curve and then get points by GetPointAtParam method. Then it is up to you how you join them together.

Tesak
http://scripts4all.eu/txtoncurve/ - Text along a curve for Catia V5

### RE: Simplify Circle2D with lines

(OP)
Tesak, this was the first thing to try for me but unfortunately for Circle2D it creates the points on almost complete the circle, not only for my arc. It ignore somehow that my curve is only arc and somehow it takes the curve as full circle.

### RE: Simplify Circle2D with lines

2
I am afraid you do not use parametric extents properly. If your extents are p(0) and p(1) and your iParam for function GetPointAtParam(double iParam, CATSafeArrayVariant oPoint) is between p(0) and p(1), then you get points only on a visible part of a circle. If your arc is divided in x = 10 parts, then you get other points with a loop like this:

#### CODE --> VBA

For i = 1 To x
iParam = p(0) + (p(1) - p(0)) / x * i

myCurve.GetPointAtParam iParam, currPoint
fact2D.CreatePoint currPoint(0), currPoint(1)
Next 

What you get is shown below:

.

p(0) and p(1) are parametric equivalents of the end-points of a curve, points in between extents lie on a curve.

Tesak
http://scripts4all.eu/txtoncurve/ - Text along a curve for Catia V5

### RE: Simplify Circle2D with lines

(OP)
Thank you Tesak, you are fully right, now it is working.

### RE: Simplify Circle2D with lines

Hi iscariot.

A parameter of an arc indicates the angle of the arc by the experience I tried.
(For the unit, the radian)

When acquiring many coordinates, the person who calculated from the angle,
a central coordinate and the radius is quick.

I have here for the sample from which 2D curved line is changed to a polyline within a tolerance.
Link

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

### Reply To This Thread

#### Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!

Already a member? Close this window and log in.