fullcontrolxyz / fullcontrol Goto Github PK
View Code? Open in Web Editor NEWPython version of FullControl for toolpath design (and more) - the readme below is best source of information
License: GNU General Public License v3.0
Python version of FullControl for toolpath design (and more) - the readme below is best source of information
License: GNU General Public License v3.0
Hello,
Thank you for the useful program.
Just one thing,
I am trying to use offset_path on my laptop but I am receiving following error:
module 'lab.fullcontrol' has no attribute 'offset_path'
I have added Fullcontrol package by following command again, but there is still the error mentioned above.
pip install git+https://github.com/FullControlXYZ/fullcontrol
Thank you
Mohsen
I'm hoping to make something of a "Vase Mode" object by describing the path with FullControl, which is relatively straightforward, but I'd like to be able to vary the amount of material extruded to get a thicker line. Similar to the way the Pin Support Challenge has a parameter for Pillar Diameter.
I'd appreciate any help in finding the direction to start. If I could replicate just that pillar, I think I'd be a bit on my way to the solution I'm seeking.
I think I want to have some multiplier for the E
parameter in a G1
code, but I'm not sure if that's the right direction, nor how to express that with this library.
Any guidance would be appreciated. Thanks!
Hi,
Would you know how to switch between absolute/relative positioning on FullControl?
Thank you,
Is there a repo for the fullcontrol.xyz website? I'd like to make some contributions
Is your feature request related to a problem? Please describe.
There appears to be no way to understand what to do if there is a security bug
Describe the solution you'd like
Add a policy to the security tab
Describe alternatives you've considered
Can be in the readme but the security tab is probably best
Additional context
NA
Please add a repository description here on GitHub. For example, just copy the first sentence from your README there.
Among other places, this description shows up in "social Media Preview" of the repo, so for example when you post the link to the repo on Telegram.
The current implementation of the offset path function exhibits undesired behavior near corners, where points that are close together result in an offset that may not align with user expectations. This is primarily due to the function offsetting each point normal to the instantaneous path direction.
Thank you for all the work put into creating the examples in the python notebooks.
I'd imagine you'd be adding much more functions to FC. Going forward, may I suggest creating a wiki?
I always found the doc pages for Processing to be very convenient to use.
Thank you!
Technique presented by u/Vicckkky on Reddit, and
based on a research paper called Dual-Color Mixing for Fused Deposition Modeling Printers by Tim Reiner, Nathan Carr, Radomír Mech, Ondrej Štava, Carsten Dachsbacher & Gavin Miller.
Illustrative screenshots taken from the posted video:
I haven't looked at the paper, but from the display it seems to be two anti-phase-locked sinusoids of different colours that are offset, and either the offset or amplitude is varied to provide a variable proportion between the two colours. The technique could be applied to a flat shape, but for structural stability during printing it likely makes sense to include some base curvature unless it's part of an existing more stable structure.
I have described a profile via its point coordinates that represents the outer wall of a design. Is there an elegant way to turn these steps into multiple walls, each correctly offset in x and y by the extrusion width?
Hello, I wanted to know if there is documentation of how to add a new printer. I have an Ender-6. Thank you in advance.
Issue Description:
The project is not working with pydantic version 2.0.2. I guess v2 and above. At import (import fullcontrol as fc
) the following ValidationError is thrown:
File "~\Projects\fullcontrol\fullcontrol\gcode\state.py", line 24, in State
point: Optional[Point] = Point()
File "~\Projects\fullcontrol\.venv\lib\site-packages\pydantic\main.py", line 150, in __init__
__pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)
pydantic_core._pydantic_core.ValidationError: 3 validation errors for Point
x
Field required [type=missing, input_value={}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.1.2/v/missing
y
Field required [type=missing, input_value={}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.1.2/v/missing
z
Field required [type=missing, input_value={}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.1.2/v/missing
Current Environment:
Commit 0e89b2f
Pydantic version: 2.0.2
Other dependencies: plotly, numpy
Expected Behavior:
No error at import.
Steps to Reproduce:
Install Pydantic version 2.0.2.
Run import fullcontrol as fc
Should cause a ValidationError.
Fix Proposal:
Include the recommended version ranges in the requirements.txt
file (eg. pydantic<2.0.0) or update the type definitions so that pydantic v2 is happy. I tested and verified it is working with the versions pydantic-1.10.11 and pydantic-1.10.5.
If you require any further details, please let me know.
btw. really love your work, can't wait to try it, thank you!
When using fc.move to repeat a part (or segment of a part in this case) in the x,y plane, a print line is created between the parts.
Is the a way to make this a travel move?
I have the list of commands being repeated ending with
rep.append(fc.Extruder(on=False))
it ends up looking something like this
Many thanks
The above model was created with FC Web using the ripple texture demo and printed on a Prusa MK3S+.
The flat surface that you see is caused by the model exceeding the printable area.
Would it possible to integrate a "safety check" function where the design is evaluated against the printer profile such as the bedsize and other hardware limits (temperature, travel speed)?
Thank you for making FC!
This is very minor but may I suggest adding slightly more detailed information for using the notebooks locally. I'm just thinking about newcomers and beginners wanting to dip their toes into FC.
I'm currently using the FC notebooks with VSCODE (with python and jupyter extensions) and works great.
SVG import function will be awesome. I want to integrate typography and other shapes to use in FC to create some cool designs.
I think this will be very useful for those using FC with a laser cutter, pen plotter, and vinyl cutter(?).
Thank you!
What are you trying to do?
I'd like to create a pyramid (3 faces) with an infill, making possible to adjust the dimension of this pyramid without breaking the infill. All of this in a continuous path.
What have you done so far?
I succeeded creating the first two layers of the pyramid but struggle with the next layers as followed:
What do you still need to do?
I'd to complete the pyramid and getting that continuous path.
What is your question
I'm looking for technical advice using FullControl, such as which feature is better to use in that case and how to achieve it.
Thank you!
Tim
I have been attempting to my printer to the printer_library but have been running into some problems. I followed the steps in the read me:
However, when I run my design I keep getting this error:
ModuleNotFoundError: No module named 'fullcontrol.gcode.printer_library.singletool.ender_3copy'
I initially got this with my printer profile (UDIO) but to check it wasn't something I broke in the printer module, I ran it with a unchanged copy of the ender 3 profile titled ender_3copy (saved in the same singletool folder). It runs fine when I set my gcodeControls object to the ender_3 module, but get that error when I use the idential module titled ender3_copy.
Im not sure if im doing something wrong with the GcodeComand in my design or if im missing a step in making the new module for my printer.
Or something else?
Thanks
I made a new wave type, its basically a square wave with circular peaks and troughs. It was just for a small test project I was trying but figured it may have use elsewhere so I have made a gist for the wave and included example output below showing that it has the same flexibility as the existing square wave.
Let me know what you all think
Github has quite extensive support for Issue and PR templates, which can be quite helpful for recommending a particular structure for suggestions and bug reports/fixes and the like, while also automatically adding some labels to them.
This isn't particularly critical for a small project, but guided steps lower the barrier for entry to newcomers making valuable suggestions and contributions, and becomes more important as the number of submissions grows.
If it's of interest, these are the issue templates my work uses.
For example:
gcode = fc.transform(steps, 'gcode', gcode_controls)
print(gcode)
will output:
None
It does however generate a file
Basically make a Jupyter collab with https://fullcontrol.xyz/#/models/4d0e78
and it to the examples section and it to https://github.com/FullControlXYZ/fullcontrol/blob/master/docs/README.md
Hi everyone,
I'm trying to print foamy material using FullControl. However and as I'm new to it, I encountered some difficulties.
I'm using an Artillery SWX2 printer, on which I've installed a print head (motor-driven piston syringe). The syringe has a capacity of 300mL and the extruded material is foamy. This is cold printing. I'd also like to be able to create a single print layout.
Would you have any idea on how I could:
-Correctly fill-in the parameters of this type of bespoke printer in the sheet
-Handle the flow rate of foamy material during the print
Thank you very much in advance,
All the best,
Tim
Hello,
Our setup does not recognize G0 so I am wondering how I can write non-printing movements with G1 and E0 instead of G0.
Thank you in advance
I am designing a variable line width pen plotter with a rotating z axis. The line thickness is determined by the rotation of the marker tool. (perpendicular/90deg to tool path tangent = on/full width)
I am using Blender's geometry nodes to pre-visualize/design a variable line width plot. I'm then exporting as an indexed, 3 coordinate list. Below is a sample of the .ply data from Blender (X, Y, Rotation in Radians)
ply #concise coordinate in meters, x,y,rotation
format ascii 1.0
comment Created in Blender version 4.0.2
element vertex 9216
property float x
property float y
property float z #radians
element edge 9088
property int vertex1
property int vertex2
end_header
5.5847714e-08 1.8739383 0.676805 #first coordinate with rot value
0.014846257 1.8739147 0.67858016 #second...
0.029689893 1.8737563 0.6825235
0.04452504 1.8733462 0.68454605
0.05934261 1.8725877 0.6866971
0.074131355 1.8714039 0.6933933
0.08887847 1.8697386 0.702613
0.103570454 1.8675553 0.708761
0.118194 1.864838 0.7144503
I plan on building a CoreXY rig with a stepper at the head controlling marker rotation, converting that z coordinate into degrees rotation. Currently, I'm appending/replacing the z coordinate with the calculated rotation (based off of the sampled image/curve tangent) out of convenience. This format could change, it would just be a matter of appending the rotation value to one of the 3 color coordinates that .ply can also store. Whatever makes more sense for this implementation.
I don't have Excel and was reading the overview doc for the python implementation. Are there objects/templates that allow for the import of a coordinate list like the one above (or any indexed coordinate list, was using .ply as a debug) for it to be properly read by FC?
Additionally, curious how you all would approach the z-axis rotation. That would be messing with the FC design, as this plotter is a thing that does not factor in states associated with FDM. (working exclusively in travel paths, no layer heights, etc.). I am a complete python/scripting novice, so would appreciate a layman's response (if possible).
Thanks
dhumpo
I ran into a issue that took me a bit to figure out. if you create a helix without defining a z coordinate (even if its starting at the same point as the previous line) the helix is flattened into a circle or a spiral if the helix is tapered.
I resolved my issue by defining the z coordinate in the helix center point
I made a practical design for use as a LED Matrix diffusor.
https://colab.research.google.com/gist/scamiv/92495fe963bf4ebaec8c7f5f459fb99d/fullcontrol_ledMatrix_grid.ipynb
Thing: https://www.printables.com/model/709532-fast-print-fully-parametric-led-matrix-cover-diffu
I would greatly appreciate any feedback on how to solve this more elegantly.
Problems i had/have:
Currently the size of the base plate wave seems slightly smaller than expected.
Is there a function the get the last point in a step list? Especially if the last object is a settings change rather then a move?
Could the rectangle direction be expressed as a vector?
Midpoint or bounding box for Square-Wave would be super useful.
Would it be possible to show the print bed or work area in the plot?
I think this will help tremendously for people that want to maximize the print area of their machines.
Thank you!
Is there a way to set the travel speed to a different value for the z axis?
Ive got a unique printer and it can run at pretty high travel speeds (18000 mm/min) but the z axis needs to move considerably slower (1000 mm/min)
Thanks
-Ben
Hello,
I am wondering if there is any pre-defined function to create gyroid infill.
if no, could you please give me any hints about how to create it?
Thank you very much in advance
Kind regards,
Mohsen
Quite a few 3D printers today support true arc commands which have some worthwhile benefits. These GCODE commands (G03
and G03
) produce smooth arcs with significantly less GCODE which eliminates faceting on model surfaces during prints, makes for less machine jerking, and in some printers, helps with buffer overflow.
Some slicers today implement these movements either by accepting vector model files (step
for example) or by utilizing ArcWelder and similar approaches to transform sets of 2D moves that look like arcs back into proper arc commands.
As a simple example of how this plays out, this draws 4 circles in a row (my example here was based around experiments for making FullControl parameterized battery pack cell holders):
from math import tau
steps = []
cell_diameter = 21.2
segments = 90
clockwise = True
for i in range(4):
circle_center = fc.Point(x=50 + (cell_diameter*i), y=50, z=0)
steps.extend(fc.travel_to(fc.geometry.polar_to_point(circle_center, cell_diameter/2, 0.25*tau)))
steps.extend(fc.circleXY(
circle_center, cell_diameter/2, 0.25*tau, segments, clockwise
))
fc.transform(steps, 'plot')
The GCODE produced from this, excluding all the printer start/prime/stop stuff, is something to the tune of 364 commands.
Here's the same result (minus E
amount, I don't know how to calculate that):
G21 ; set units to millimeters
G91 ; relative positioning, makes the below coordinate movement easier
G0 X21.2 Y21.2
G2 I0 J-10.6
G0 X21.2 Y0
G2 I0 J-10.6
G0 X21.2 Y0
G2 I0 J-10.6
G0 X21.2 Y0
G2 I0 J-10.6
The end result of 4 printed circles is the same, but the G2 commands will produce much better print results.
It'd be nifty for people to be be able to put in some text or an image and get a meaningful gcode output, for things like drawing with a pen (or painting) on a page, or printing a design onto some fabric, or printing as a top layer that then gets painted or used as a stamp.
A couple of spit-balled ideas:
pip install fullcontrol[all]
vs pip install fullcontrol[minimal]
and such)This could be varying degrees of difficult depending on how it's approached, but it seems like a valuable feature for any kind of tool-path generation software.
My personal preference would be the codebase being refactored such that everything stems from a base Machine
class, which has 3D Printer
as a sub-class, and 3D printer types can have specified frame and bed geometries, and get initialised with a particular nozzle. The tool-path generation and plotting could both be handled by the selected machine, which should simplify plotting different types of machines (and animations once that's relevant) and should also simplify the logic for when a collision could occur (because e.g. a cartesian printer will have some different collision opportunities compared to a delta or polar printer).
That said, I'm sure it's also possible by adding a more general collision detection module into the existing functionality-focused abstraction.
It was raised in #18 that it could be desirable to export the generated mesh of the printed extrusion, potentially as an STL file or similar.
Conceptually that should mostly involve a small amount of data wrangling to create data in an appropriate format, but I think it's important to establish the context and desired features first, so we can determine which file format(s) are most valuable to support exporting as.
A few potential considerations as a starting point for discussion:
capped
option in tube_mesh.py
I think we should make a list of features we care about, then turn that into a comparison table for viable file type options, and use that to determine which file types make the most sense to implement. Here's a quick first pass:
File Type | Colours? | Normals? | Lines? | Multi-part? | Physical Units? | Animation? | File Size? | Expected Implementation Difficulty? |
---|---|---|---|---|---|---|---|---|
STL | Non-standard | Required | No | ? | Non-standard | No | Ascii: big Binary: small |
Easy-ish (need normals) |
OBJ | Yes (external) |
Optional | Yes | ? | Non-standard | No | big-ish | Easy-ish |
PLY | Optional | Optional | Optional | Optional | Non-standard | No | Ascii: big Binary: small-ish |
? |
AMF | Optional | Implicit | No | Yes | ? | No | XML: big zipped: small |
? |
3MF | Optional | ? | ? | Yes | Yes | ? | XML: big-ish? | ? |
glTF | Yes | Optional | ? | Yes | ? | Yes | ASCII/JSON: small-ish? binary: small |
Likely complicated |
Came across this video and found it interesting.
Haven't seen / thought of that type of machine before, but it seems like the kind of thing that could benefit from a full-control gcode creation process. It's like a polar printer, but instead of having a rotating circular platform as its base, it has a rotating cylinder that the filament attaches to and is built up around, which makes it possible to make some interesting shear- and bending-resistant springs and tubes and the like.
Hi there!
I created an implementation for an arc which goes through three points, it is functioning in my fork of fullcontrol, it's called three_point_arcXY. It has several added functions to achieve this. It uses arcXY to draw the final arc, with the arc_angle being obtained from the angleXY_between_3_points. In three out of four cases, the arc_angle is displayed correctly, however, one out of four cases has the outside angle around three points displayed.
I could not resolve this, so I added an invert option to three_point_arcXY in the meantime.
My guess is that this is because of something in angleXY_between_3_points going wrong.
Hope you can help me out :)
Best regards,
Hannah
I'm wondering if there's a way to disable extrusion when the print head is moving to the starting point of a circle. I'm using using a custom printer with custom start and end gcode and a custom primer, and then want to go into my actual print. I've noticed that when I define a circle, the line from where I am at the end of my primer to the beginning of the circle is extruding.
The obvious workaround is to do a travel_to to the starting point of the circle but then I have to code in that starting point based on the center point, start angle and radius. Not the end of the world but I could see this getting cumbersome for more complex shapes & gcodes.
Idea originally shown and explained by u/Vicckkky on Reddit.
Most illustrative snippet of their posted video:
this line;
fc.transform(steps, 'plot',fc.PlotControls(style='line')) works perfectly but,
fc.transform(steps, 'plot',fc.PlotControls(style='tube')) couse errors;
TypeError Traceback (most recent call last)
in <cell line: 33>()
32
---> 33 fc.transform(steps, 'plot',fc.PlotControls(style='tube'))
34
/usr/local/lib/python3.10/dist-packages/numpy/lib/function_base.py in diff(a, n, axis, prepend, append)
1445 op = not_equal if a.dtype == np.bool_ else subtract
1446 for _ in range(n):
-> 1447 a = op(a[slice1], a[slice2])
1448
1449 return a
TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'
code link: https://colab.research.google.com/drive/1fwnmY33js1wj_RPKJqOIKz8EYxWbbSyh?usp=sharing
I just came across string/thread art and thought it was really cool, so figured I'd note it down here for future reference (by me or whoever decides to pick it up) as something it'd be neat to have an example of.
There are apparently some pretty crazy string art pieces, and I suspect we can likely do something similar either with a plotter (e.g. #15) and/or as a printed border with bridge lines in between (e.g. as a fancy case of #23). There are a variety of existing free and paid tools that we could adapt the output of (which is likely good as a starting point), but it could also be fun to have our own open-source algorithm implementation 🤷♂️
For reference,
I've seen some cool projective perspective examples recently where depending on the angle an object is looked at it can show different things. I had some offline time on a flight and decided to try my hand at it for "Full Control", and thought the result was worth sharing:
https://gist.github.com/ES-Alexander/84a0f12d097d409bf70fed07f252ae91
Currently this is a relatively low level example of tube mesh generation, but if we wanted to we could turn it into a gcode example that then goes through the standard plotting process, with the caveat that although it looks cool it's likely not particularly practical as a 3D print.
No idea if there's interest in changing the project logo, but my idea there is it could be fun/interesting to have an icon/image that starts with F_U_L_L
at the top, then shows one or more transition angles below, followed by CONTROL
at the bottom. In my head that (for some reason I don't understand) feels like a nice indicator of what kinds of things can be created/done with the project.
e.g. something like the following (left ones have a transparent background, bottom ones have thicker letters and shrunken transition displays):
Could be used for things like
A good starting point would just be radial density variation, but from there it could be expanded to follow an arbitrary 2D (XY) vector field, then a 3D vector field and/or clustering around particular points or edges.
I've been getting some really cool shapes in FC and want to export it to SVG.
Since FC can do SVG import now, is it possible to export the paths/points in FC to SVG?
Thank you!
Please note minimum Python version:
ERROR: Package 'fullcontrol' requires a different Python: 3.8.13 not in '>=3.9'
For Windows note that it will be necessary to install:
and it would be very helpful to have a specific link to a complete, minimal working example, as well as notes on how the G-code will be previews.
Somewhat following on from #18, why stop at physical volumes? Perhaps it's worth considering additional features that would turn the gcode tool-path into a physically realistic display.
I'm opening this issue as a general/overview thread, with the intent that in-depth discussion of any given feature can be split off into a separate issue / PR. It's possible some ideas will be out of scope for what this project is intended to do/include (e.g. if overly focused on 3D printing).
Some starting ideas
Having templates would allow for consistency across common types of issues and pull requests along with automatically tagging them as appropriate
The default ones can help with getting enough context and scale up contributions
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests
Disabling 'include_date' not only removes the date and time, but also the .gcode extension
Is there is a way to turn off the automatic appending of the date and time to the gcode file name?
I would like to have FC export the gcode the same as the design name only without the date and time so it fits within my workflow.
Thank you!
I'm using color_type='manual'
to highlight property changes (e.g. speed) in the design. The transition between the different colors make the result look wrong.
Is there a way to have a hard cut over to a new color?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.