Question

Create a point in the middle of an arc

  • 16 September 2014
  • 7 replies
  • 5 views

Hello,

 

 

I import arcs from a dwg file and I need to create a point in the middle of  these arcs.

 

 

How I can do?

 

 

Thanks

 

Mica

7 replies

Userlevel 2
Badge +17
Hi Mica,

 

 

You can use the Snipper to create the middle point of a curve including arc.

 

Firstly, calculate the half length of the arc. LengthCalculator and ExpressionEvaluator can be used, for example. And then use the Snipper with these settings:

 

Snipping Mode: Distance (Value)

 

Starting Location: <the half length>

 

Ending Location: <the half length>

 

 

Hope this helps.

 

 

Takashi
Thank you Takashi!

 

 

It's exactly what I need.
Badge +3
Hi,

 

 

The easiest way omi. 

 

 

First arcs must have some ID

 

1) use a boundingboxreplacer on the arcs. Set it to orientedboundingbox.

 

Replace with its centerpoint. Extract coordinates.

 

2)

 

Paralell to this: stroke the arc and extract 1st and last coordinate.

 

Extract coordinates.

 

 

3) Merge 1 and 2 by ID.

 

Use creator to midpoint of points found at 2)

 

Vertexcreate, set to replace.

 

Vertexcreate cordinates from step1) Set to add.

 

 

This should give u a line troug center of outerpoints of arc.

 

Extende by at least half of shortlength of boundingbox (this is a attribute of the boundingboxreplacer).

 

 

Intersect this line with the boundingbox.

 

You should end up with the midpoint of arc.

 

Userlevel 2
Badge +17
Oh, I've overlooked "Distance (Percentage)" mode. You don't need to calculate the lentgh.

 

Snipping Mode: Distance (Percentage)

 

Starting Location: 50

 

Ending Location: 50
Badge +3
To actualy get the vertex using snipping you would have to :

 

 

Badge +3
Badge +3
Yes i forgot, it outputs the point if start and end are same...erhmm.

Reply