Inkscape Gcodetools plug-in English support forum

cnc-club.ru for English speaking users

What function should we develope next?

Можно выбрать до 5 вариантов ответа

 
 
Результаты голосования

Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

Generated Gcode in EMC2 (1316766 просмотров) <a class='original' href='./download/file.php?id=508&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (21.99 КБ)</a>
Generated Gcode in EMC2
TypeExtension of vector
graphics editor Inkscape
DeveloperGcodetools develop team
Written inPython
OSCross-Platform (Windows, Linux, MacOS)
Version1.6.03
LicenseGNU GPL
Downloads7800+

Gcodetools

Gcodetools is a plug-in for Inkscape. It prepares and converts paths from Inkscape to Gcode, using biarc interpolation.
This article is unfinished. You can help cnc-club expanding it.
Screenshots and photos are needed. Please post them at this thread.
Features (для просмотра содержимого нажмите на ссылку)

Features

Preview of the generated Gcode in EMC (1319690 просмотров) <a class='original' href='./download/file.php?id=130&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (154.76 КБ)</a>
Preview of the generated Gcode in EMC
Gcodetools area pocketing (1305793 просмотра) <a class='original' href='./download/file.php?id=772&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (147.75 КБ)</a>
Gcodetools area pocketing
Gcodetools lathe (1312114 просмотров) <a class='original' href='./download/file.php?id=642&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (21.98 КБ)</a>
Gcodetools lathe
Gcodetools engraving by Rene (1312279 просмотров) <a class='original' href='./download/file.php?id=631&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (233.84 КБ)</a>
Gcodetools engraving by Rene
Bears by Durachko (1247737 просмотров) <a class='original' href='./download/file.php?id=5429&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (89.93 КБ)</a>
Bears by Durachko
Export to Gcode
  • Export paths to Gcode
  • Using circular (biarc approximation) or straight line interpolation
  • Automatic path subdivision to reach defined tolerance
  • Multiply tool processing
  • Export Gcode in parametric of flat form
  • Including personal headers and footers
  • Choosing units
  • Multi-pass processing
  • Numeric suffix is added to generated files to avoid overwriting
Lathe Gcode
  • Compute trajectories for lathe
  • Fine cut
  • Define fine cut's depth
  • Define fine rounds
  • Two different computation functions for fine cut
  • Standard axis remapping

Path's area processing
  • Building area paths
  • Area paths could be modified
Engraving
  • Building trajectory according to the cutter's shape
  • Defining different cutter's shapes
Tool's library
  • Defining different tool's parameters (diameter, feed, depth step, penetration feed, personal Gcode before/after each path, cutters shape, personal tool's changing Gcode)
  • Tools can be managed by Inkscape's standard procedures (copy, delete, assigned to different layer)
  • Multiply tools processing
Orientation system
  • Applying scale along any axis
  • Apply rotate in the ХY plane
  • Apply translation along any axis
  • Apply transforms according to arbitrary points
Post-processor
  • You can create custom post-processor by writing down the commands or choose from the list of default post-processors
  • Scale and offset Gcode
  • Gcode commands remapping
  • Parameterize Gcode
  • Round floating point values to specified precision
Verifying tools for the scene
  • Select and remove small paths (area artefacts)
  • Tool's alignment check
  • Cutting order check
Plotter cutting
  • Export to Gcode for plotter with tangential knife. Forth axis A is knife's rotation.
Install (для просмотра содержимого нажмите на ссылку)

Install

Windows
Unpack and copy all the files to the following directory Program Files\Inkscape\share\extensions\ and restart inkscape
Linux
Unpack and copy all the files to the following directory /usr/share/inkscape/extensions/ and restart inkscape
Screenshots (для просмотра содержимого нажмите на ссылку)

Screenshots

Gcodetools plug-in tutorial (2600*1300 px png ~ 700Kb) (1319693 просмотра) <a class='original' href='./download/file.php?id=127&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (752.7 КБ)</a>
Gcodetools plug-in tutorial (2600*1300 px png ~ 700Kb)
Curve to Gcode result (1319699 просмотров) <a class='original' href='./download/file.php?id=103&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (1023.52 КБ)</a>
Curve to Gcode result
Preview of the generated Gcode in EMC (1319690 просмотров) <a class='original' href='./download/file.php?id=130&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (154.76 КБ)</a>
Preview of the generated Gcode in EMC
Get latest version (для просмотра содержимого нажмите на ссылку)

Get latest versions

Latest stable version Gcodetools 1.7
gcodetools.tar.gz
Gcodetools 1.7
(75.25 КБ) 102141 скачивание
Older versions(ver 1.5)
gcodetools-1.6.tar.gz
Gcodetools 1.6
(56.6 КБ) 14967 скачиваний
(ver 1.5)
gcodetools.tar.gz
Gcodetools 1.5
(21.32 КБ) 10545 скачиваний
(ver 1.4)
gcodetools.tar.gz
(14.72 КБ) 27093 скачивания
(ver 1.2)
extensions.tar.gz
(9.01 КБ) 10328 скачиваний

Dev-version

You can try the newest development version by getting it from github repository https://github.com/cnc-club/gcodetools via web interface or using git clone git@github.com:cnc-club/gcodetools.git .
You'll need to run python create_inx.py to create inx files. After that install procedure is the same with the stable version.

Translations

Gcodetools is included into Inkscape v 0.49 so it will have native translations as other Inkscape's extensions. Until it is released you can use some self made translation packs:
Credits (для просмотра содержимого нажмите на ссылку)

Credits

Developers:
  • Nick Drobchenko (Nick)
  • Vladimir Kalyaev (Dormouse)
  • Henry Nicolas (Alfcnc)
  • Chris Lusby Taylor (ChrisInNewbury)
Translators:
  • John Brooker (greybeard from cnczone.com)
Develop (для просмотра содержимого нажмите на ссылку)

Develop

At the moment following features are being developed:
  • Plasma cutter extension
  • Turning lathe extension
  • Plotter extension
You can help us improve Gcodetools in several ways
  • Writing a report / bug report
  • Improve help and manuals
  • Publish G-codes / SVGs / other code
  • Publish photos / videos
  • Make a bug report
  • Help develop new features
  • Suggest a new feature
Tested on (для просмотра содержимого нажмите на ссылку)

Tested on

Linux
Ubuntu 9.10 14.04 + inkscape 0.48 (older Gcodetools versions also work with 0.46, 0.47)
Windows
Windows XP, Windows Vista, Windows 7 + inkscape 0.46, inkscape 0.47
MacOS
There are some reports on successful work on MacOs.
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

Yes file from Inkscape.
If that one after convert is not to big (<1Mb).
You'll have to register in the forum. Only registered users can attach files. There's a tab "Upload attachment" in the answer form near the Submit button.
aguseguedre
Новичок
Сообщения: 26
Зарегистрирован: 13 апр 2011, 23:11
Репутация: 0
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение aguseguedre »

Hello root,

I tried but the file is too big more than 12 MBI
I am goin to try again from the beginning. I make paths to G code from a file saved the day before with the area.

Regards.
aguseguedre
Новичок
Сообщения: 26
Зарегистрирован: 13 апр 2011, 23:11
Репутация: 0
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение aguseguedre »

Hello again ,

I do not know what I am doing wrong . I have delete the Area 's paths . I deleted the outlines of the logo and letters many times perhaps 20 ,30 times. They are cloned?

I have start from a file with 31,5 Kib
I click ungroup objects
I click objects to paths
I cick Gcode Tools ---> Area---max curves cutting 100 area width 80
area artefacts ---artefacts diameter 2( this is the size of the tool?)
Paths to g code--- Biarc interpolation tolerance 0,5 Maximum splitting deep 4
Options-----scale along z axis 0 offset along z axis 0 Minimum Arc Radius 0,3
In area tab I click Apply............ After a while the area is created and the file is 1.3 MBI

I ungroup the objects and ..............................more while I start to thinking something is bad in my PC some days ago it go extremely slow.
I click --objects to paths
I click ----- extensions---Gcode tools ---Area---Paths to G code I tried two times but the only marked is the outlines and the letters.
I click undo I tried again and now all paths are marked but the file has 12,2 MBI

I don't know what's the problem.
Regards.
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

Attach your initial svg.

1. To create area paths do the following. Open Gcodetools -> Area and assign Area width, it is the width of the thickest part of the path. You can find thickest path by creating dynamic offset from the path (Ctrl+J) and contract it using node editing tool F2.
gcode pocketing.png (9650 просмотров) <a class='original' href='./download/file.php?id=1399&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (16.52 КБ)</a>
2. Tool's diameter can be set using tools library by adding tool's definition. If there's no tools definition in the drawing before Area function is applied the default tool will be automatically added to the drawing.

3. In Gcodetools-dev there are some new functions to create area paths. They usually work better than Area function from the Gcodetools 1.6. And allow to get path's like this:
gcode area pocketing.png (9650 просмотров) <a class='original' href='./download/file.php?id=1400&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (20.59 КБ)</a>
I highly recommend to use gcodetools-dev. See the header of the thread to know how to get Gcodetools-dev.
aguseguedre
Новичок
Сообщения: 26
Зарегистрирован: 13 апр 2011, 23:11
Репутация: 0
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение aguseguedre »

Hello Nick,

Thanks for the answer.
Here I enclose a file with my initial the G code program have 10 295 lines it is reasonable? . The dimension are 60*60 mm.

I' m going to try again with the cnc -club .ru because I think I had a mistake. I deleted the area's path but I keep the orientation points and the tool from the other Gcodetools version.

Best regards.
Вложения
Inicial.svg
(314 КБ) 1111 скачиваний
aguseguedre
Новичок
Сообщения: 26
Зарегистрирован: 13 апр 2011, 23:11
Репутация: 0
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение aguseguedre »

Hello,
I have tried but the file is too big too and the PC stay blocked when I try to undo the area's paths. Could be problems with the graphic card?

Regards.
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

The problem is that area width is to big. You can notice that after area function you have a group with 61 path. And you have about 55 copyes of outer path. Gcdetools will create (Area width)/(tool diameter) paths. So you have to set area width more carefuly.
Here's a how-to. You can open it in inkscape and try the thing out:
svg to gcode pocketing.svg
(247.18 КБ) 1290 скачиваний
cnc pocketing with inkscape.png (9638 просмотров) <a class='original' href='./download/file.php?id=1403&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (335.98 КБ)</a>
And here's generated Gcode from one of trials:
Вложения
output.ngc
(31.26 КБ) 1414 скачиваний
aguseguedre
Новичок
Сообщения: 26
Зарегистрирован: 13 апр 2011, 23:11
Репутация: 0
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение aguseguedre »

Hello NIck,

Thanks for your e-mail and your patience . I'm going to do how you said . I will contact .

Regards.
aguseguedre
Новичок
Сообщения: 26
Зарегистрирован: 13 апр 2011, 23:11
Репутация: 0
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение aguseguedre »

Hello again,
I enclose I file with my try . It is a little bit different that your ( left arrow and a bigger issue). The G code file is 1140 lines a success don't you think.
One mistake I had is that I do not delete the original draw.

In reference to the step 1 of your "M" tutorial could you explain to me like I was three years old. I Have not experience with inkscape.
In the steep 2 I know is other option to obtain the same that the first steep but I have the doubt what I must to measure ? the thickest part /2
I will try to do the second part of tutorial as soon as possible.

Thanks again for your time.

Regards.
Вложения
Inicial.svg
(63.53 КБ) 1076 скачиваний
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

Step 1.

1. Select the path. Make sure it's one path not a Group or several paths.
2. Press Crtl+D to duplicate it.
3. Ctrl+J to make it not Path but Dynamic offset.
4. Press F2 to select Node Editing tool.
5. You'll see only one node on the path. Dragging that node will offset/inset the path.
6. So contract the path to find the thickest place.

Yes yes yes try the second part. To be true Area function was the second function I've made just after Path to Gcode, and it was the second time I programmed python. So it's far not perfect. And it's a kind of difficult thing to work with offsets.
Fill area is one of the last functions and filling the path with straight lines is much easier, so usually Fill area works better, faster, easier, etc. :)

>> Inicial.svg
Great work! Best possible with Area function not from gcodetools-dev version.
aguseguedre
Новичок
Сообщения: 26
Зарегистрирован: 13 апр 2011, 23:11
Репутация: 0
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение aguseguedre »

Hello NIck,

I have been practising with Inkscape a little. I have edit manually the paths and seem the issues have dissapear. I tried to mill but I have some accuracy, problems with the Z axis and force in my machine ( It is made from printers parts). I need the smaller steeps for Z steps but I do not know how to setup.

Regads.
Вложения
inicial 2.svg
(57.51 КБ) 1189 скачиваний
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

You can define Zstep by changing it in tool's defifnition. Use Text tool (F8) to edit the values.
aguseguedre
Новичок
Сообщения: 26
Зарегистрирован: 13 апр 2011, 23:11
Репутация: 0
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение aguseguedre »

Hello Nick,

Thanks for your e-mail.

I had tried this before but some error message appear . I have try today again to show you the message but fortunately it work .

Thanks again for your patience.

Regards.
ChrisInNewbury
Новичок
Сообщения: 20
Зарегистрирован: 19 апр 2011, 02:32
Репутация: 0
Откуда: Newbury, Berkshire, England
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение ChrisInNewbury »

Greetings,
I've just joined, having downloaded Inkscape and Gcodetools a day or two ago. Very impressed. :D
I make sundials, so have been looking for ways to do good quality v-carved text engraving.

Gcodetools' Area function seems to work well, though with a few artefacts one can edit out. It seems that small changes to parameters can greatly affect whether it generates artefacts, but I guess this is an Inkscape bug, not Gcodetools.

But Engraving function seems very poor (I don't have the dev version). It often generates apparently random walks. I've never used Python before but know how Beziers work and speak other languages fluently, so am willing to try to debug it. Is there any documentation on its algorithm? The .py file is so big I'm struggling to find my way round it. Just as you use Inkscape to calculate Area-filling toolpaths from offsets, I wonder if you could use the same function to provide hints to the engraving code? It is safe to have a conical cutter on a dynamic offset with radius r with Z=-r.
By the way, depending on what you're trying to make, the engraving gcode should follow the entire path, not assume that a cylindrical milling cutter has been able to get in close. You might want to create a bevelled v-shaped profile all the way.

Part of my problem may be that I don't fully understand the parameters - notably the critical angle and path length.
By the way, I do speak English fluently and am willing to provide better English messages and labels. I think you asked for someone to do this a year ago and it seems nobody has done so. Another suggestion is to put tool information into the Gcode as comments to help the operator.
Chris
Newbury
England
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

"Inkscape bug, not Gcodetools", yes Gcodetools uses Inkscape's internal offset function. But I would not blame Inkscape for that bugs. Offset of the Bezier's curve is very very complex problem. I've not seen any program that do it without bugs, even powerful CAD's such as Rhino have problems with offset (taking in account that Rhino makes simpler offset).

Engraving has some bugs to :). There's no Inkscape function that uses variable radius offset. To find Engraving function in the code search for "def engraving", ant it lasts until the orientation function.
Here's approximate algorithm of Engraving Function:
1. Go trough all path's segments.
2. Get offset for the 4 points of the segment in t=0,0.25,0.75,1.
3. Calculate maximum radius of the circle which will lie inside the path and have center at the normal to the path at specified points. this radius is calculated using numerical methods solving one of these systems:
formula.png (9592 просмотра) <a class='original' href='./download/file.php?id=1427&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (31.34 КБ)</a>
4. Then a new segment that goes through offsetted points is created.

Most of artifacts appear if there's a lack of nodes in the path near the corners or on the very long segments. You can find problem places turning on show additional debug graphics.

To make engraving trajectory for whole path, not only thing places set Maximum distance for engraving to large value.

To do comments in the Gcode about the tool I belive you can use "tool's change Gcode" and put all comments there. This Gcode will appear just before using current tool, or put it Gcode before path (will appear before cutting each path).

Glad to hear that you can help us to make messages better! If you have any suggestions write them down and I'll include it in to the code. Or you can include it yourself to the Bazaar pool at https://launchpad.net/gcodetools , you'll need to have an account at Launchpad, and I'll include you to Gcodetools team so you can post to the code.

PS attach your svg for engraving I'll try to give some advises.
aguseguedre
Новичок
Сообщения: 26
Зарегистрирован: 13 апр 2011, 23:11
Репутация: 0
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение aguseguedre »

Hello Nick,

I can not set the Z steep . I have tried in the first file I send you " inicial svg" and it works, but I did a new file and it not works at all.
I put depth step= 0,5 in the tool's green rectangle but this error message appear:

"Warning tool's and default tool's parameter's (depth step) types are not the same (type (`0,5')!= type((`1.0`))."

Regards.
ChrisInNewbury
Новичок
Сообщения: 20
Зарегистрирован: 19 апр 2011, 02:32
Репутация: 0
Откуда: Newbury, Berkshire, England
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение ChrisInNewbury »

Hi Nick,
Thanks for the formulae for engraving radius. Wow! Newton Raphson solution of cubics. I can see it in the code, now. There is surely an easier way. I'll give it some thought.
By the way, I found a bug in bezmisc.py. The function bezierslopeatt returns dx=dy=0 if t=0 and the bezier's first control point is at its start point. It calls bezierparameterize which will return cx=cy=0 which is correct but means that dx/dt=0 and dy/dt=0 but this is not helpful if you are using it to find dy/dx.
Oh - just spotted that a correct version is in gcodetools.py No problem, then. By the way, several functions in gcodetools don't seem to be called. I guess they are left over from previous versions.
Question? Does Inkscape generate all the possible path data elements, such as s ? It seems to use c for symmetric nodes, so I guess it calculates that a node is symmetric from its geometry, not from the user having specified it.

Minor point- gcodetools version strings on the help tabs (i.e. when you run gcodetools) say 1.6.01

I've attached a file that shows erratic paths from the engraving function. Also, an on-line tutorial on Area is out of date, I think. It tells you to create vertical bars.
Regards
Chris
Вложения
engravingTutorial.svg
See my annotations regarding errors in gcodetools
(318.26 КБ) 1118 скачиваний
ChrisInNewbury
Новичок
Сообщения: 20
Зарегистрирован: 19 апр 2011, 02:32
Репутация: 0
Откуда: Newbury, Berkshire, England
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение ChrisInNewbury »

Hi Nick/All
Attached is a file with my initial thoughts on how to calculate the engraving path. Is this how it already works, or might I be on to something? I don't want to waste time if it isn't original.
By the way, I just love the de Casteljau method for dividing a Bezier into two halves in a few nanoseconds. Are you all familiar with it? When working with Beziers there is usually, in my experience, no need ever to get involved in cubic equations or their derivitives.

Thanks for any thoughts anyone else may have
Chris
Вложения
MyEngravingIdeas1.svg
My thoughts on calculating engraving path
(204.9 КБ) 1219 скачиваний
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

I'm short of time now so
1. Bezier's slope at the point is calculated from it's parameterisation x(t) and y(t). see csp_slpoe or csp_normalized_slope. There could be some problems in case if slope value equals (0,0) for the point (if one of the control points equals to the end point). There are some ways to go around that.
2. Yes of coarse we use Casteljau. see def split() or def csp_split

I'll post back with more details of the algorithm.
Аватара пользователя
Nick
Мастер
Сообщения: 22776
Зарегистрирован: 23 ноя 2009, 16:45
Репутация: 1735
Заслуга: Developer
Откуда: Gatchina, Saint-Petersburg distr., Russia
Контактная информация:

Re: Inkscape Gcodetools plug-in English support forum

Сообщение Nick »

.....
Here's a little more detailed explanation of algorithm:
Lets assume these points:
engraving gcode.png (9555 просмотров) <a class='original' href='./download/file.php?id=1446&sid=106d74c8223da15786a30f2b90b6c02d&mode=view' target=_blank>Загрузить оригинал (53.3 КБ)</a>
What we have: a number of Besier's cubic curve segments P1P2 P2P3 and P3P1, and we are given point A1.
What we want: find maximum radius "r" of the circle that lies inside the curve for the given Point A1.
Unfortunately we do not know the point on the other side of the curve (G1).
What do we know about the circle:
1. It's center lies on the normal to the curve at the point A1 (A1D1).
2. It's center lies on the normal to the curve at point G1, we do not know where G point is but know about the normal.
3. Distance A1C1 = r and G1C1 = r.

These give us three equations:
1,2) C1 = A1 + t1*n1 = G1 + t2*n2 // this gives two equations because all points and normals are defined by two parametric functions x(t) and y(t)
3) |A1C1| = |G1C1|
so this gives us the system (last system from my previous post) from 3 parameters t1,t2 and t3. Solving this system we get exact position of point C1 and value for radius r.

When we solve such system for all segments of the curve we can get the maximum radius of the circle that liec inside the curve and touches the path at given point A1. Problem solved :).
Вложения
engraving.svg
(20.73 КБ) 1035 скачиваний
Ответить

Вернуться в «English forum»