MoI discussion forum
MoI discussion forum

Full Version: Export equidistant curve points ?

From: TOM (SIRTOM)
31 Jul 2020   [#1]
Hi,

I want to import curves to Cinema as splines. For an animation I
do need those curves with equidistant points in Cinema respectively
with exactly the same point configurĀ“ration / position as in MOI.

Problem : DXF -export does not have an "equidistant points-options.

I can generate points manually and export them as a txt - file but Cinema
does not import txt.

Question : How can I get curves from MOI with exactly the same point
configuration into Cinema ?

TOM
From: Michael Gibson
31 Jul 2020   [#2] In reply to [#1]
Hi Tom, you can generate equally spaced points (measured by disance traveled along the curve) by making one point to start with and then use the Transform > Array> Curve to duplicate it along the path at equally sized intervals.

- Michael
From: TOM (SIRTOM)
31 Jul 2020   [#3] In reply to [#2]
Hi Michael - yes, I did that.
But I cant export this equidistant point configuration
to DXF ...
From: Michael Gibson
31 Jul 2020   [#4] In reply to [#3]
Hi Tom, can you post the .3dm model file with the points in it that are not exporting to DXF for you?

Maybe the points are exporting out to your DXF file but Cinema4D might not support reading in point entities from DXF files?

- Michael
From: TOM (SIRTOM)
31 Jul 2020   [#5]
I found a workaround for the animation in Cinema now fortunately _ I
guess there is no way of exporting curves with equidistant points ?
From: Michael Gibson
31 Jul 2020   [#6] In reply to [#5]
Hi Tom, MoI can export point objects to DXF files and also to 3DM, IGS, SAT, and STP formats.

Maybe I'm not understanding what you mean by "exporting curves with equidistant points", do you mean a curve with points on it like this? :



- Michael

Image Attachments:
tom_points.jpg 


From: TOM (SIRTOM)
31 Jul 2020   [#7] In reply to [#4]
The curve ist exported to DXF perfectly, but it changes the
distance between the points as the export options require
an angle.

Attachments:
Curve.3dm


From: TOM (SIRTOM)
31 Jul 2020   [#8] In reply to [#6]
Hi Michael - I posted a file - the "export"-curve is how I would
need it in Cinema, and the "import" - curve ist what I get when
I export to DXF.

I will have a look at the other formats you mentioned.
From: Michael Gibson
1 Aug 2020   [#9] In reply to [#7]
Hi Tom, Ok I think I understand what you mean now.

Are you talking about exporting the curve to DXF format, using the "Write curves as Polylines" option? This one here:



That option converts the curve into line segments and writes it as a POLYLINE entity in the DXF file. The way the conversion to line segments works is that it will repeatedly subdivide the curve into smaller lines until the curve tangents at the line vertices are within the given angle deviation.

The reason behind that strategy is to give a higher density of lines in bendy areas of the curve and a lower density in flatter areas, like this:



That's correct that there is not any method for the conversion to line segments that will generate lines that are all the same length.

The method that I was talking about before was to generate "Point objects" at equally spaced lengths as traveled along the curve. That can be done using the Transform > Array > Curve command to make points like shown above. You could then use Draw curve > Line > Polyline to draw a polyline through those points and export that if that is any help?

You could also use "Distance constraint" while drawing a polyline to make a polyline of all the same length lines and snap the ends of the lines onto the curve. You do that by entering in a number and pushing enter while in the draw polyline command. When distance constraint is active there will be an intersection snap point that you can use to snap on to the curve.

- Michael

Image Attachments:
tom_dxf_curves.jpg  tom_dxf_curves2.jpg 


From: Michael Gibson
1 Aug 2020   [#10] In reply to [#8]
Hi Tom, ok for this part:

> Hi Michael - I posted a file - the "export"-curve is how I would
> need it in Cinema, and the "import" - curve ist what I get when
> I export to DXF.

Ok, so you can do this conversion in MoI using the draw polyline tool and then export that polyline that you built yourself rather than using the automatic converter.

You would want to use the distance constraint function in MoI for each point that you place using the draw polyline command. You do that by typing in a number and pushing enter, then that polyline segment will be forced to be of that length and there will be an "int" snap point on the curve you can snap on to.

Here's an example - I'm typing 5 [enter] before placing each point:



- Michael
From: TOM (SIRTOM)
1 Aug 2020   [#11]
Thanks for your help, Michael. So if I understood right : A different method of
building up the curve will influence the way how it is exported as DXF ?

Till now, I just used the script > reconstruct curve.

Noew I built the curve like you explained, but when I export this version as
DXF I still get a different point number and position ?
From: Michael Gibson
1 Aug 2020   [#12] In reply to [#11]
Hi Tom, yes if you convert any smooth curves into polylines and then export only the polyline, I would expect that the polyline should not be changed in the transfer.

re:
> Noew I built the curve like you explained, but when i export thos version as
> DXF I still get a different point number and position ?

Can you please post the .3dm model file with the curve you built in it and the DXF file you made from it that is giving you different points in it?

- Michael
From: TOM (SIRTOM)
1 Aug 2020   [#13]
Oh sorry - I had overlooked that "polyline" is a specific command in MOI, I
thought that you had used it as synonyme for "curve" !

That means that I need to export curves with hard edges and than in
Cinem change them to Splines with rounded egdes - that is the work -
around, yes ?!
From: Michael Gibson
1 Aug 2020   [#14] In reply to [#13]
Hi Tom,

re:
> That means that I need to export curves with hard edges and than in
> Cinem change them to Splines with rounded egdes - that is the work -
> around, yes ?!

Yes, I think so. If you export a curve that has been converted to only have line segments in it and not any smooth pieces (this kind of curve is called a polyline), then I would think you should not have any variations in point arrangement or density in the transfer.

- Michael