dinther / pathbuilder Goto Github PK
View Code? Open in Web Editor NEWPathbuilder tool to easily create complex 2D shapes for use in openSCAD.
Home Page: https://github.com/dinther/pathbuilder/wiki
License: MIT License
Pathbuilder tool to easily create complex 2D shapes for use in openSCAD.
Home Page: https://github.com/dinther/pathbuilder/wiki
License: MIT License
I used the latest version (Sep 30) of pathbuilder.
I build something in Inkscape and wanted to extrude it in OpenSCAD. But there is an error when svgShape()ing it:
DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated in file ../../../../../OpenSCAD/libraries/pathbuilder.scad, line 673
attached is the svg, 3 layers, one for each form.
attached is the scad file, using the Inkscape/XML Editor/path content as "form1", "form2" and "betwn"
In scad I let "svgShape()" each form, but only the (simplest) "betwn" gets rendered. "form1" and "form2" get Deprecated..
Attachment: Towelclip_v2.zip
I started again with a new version of the brackets. One side is:
and just tried the form to render via pathbuilder:
The problem:
.
some notes what happened in inkscape (beside a lot of point edits):
after finishing the form design I copied the inkscape/xml/d content and pasted it into the variable "f1" (and f2, f1hole, f2betw).
here is .svg and .scad
Although earlier implementations were incorrect. The latest change made it impossible to generate open ended point lists.
pts=svgPoints("M0 0H100V100H0")[0];
echo("points are: ",pts);
ECHO: "points are: ", [[0, 0], [100, 0], [100, 100], [0, 100], [0, 0]]
Expected is
ECHO: "points are: ", [[0, 0], [100, 0], [100, 100], [0, 100]]
Although typically paths in the context of polygons are closed by the nature of a polygon, this is not always desired when a pathBuilder is used to generate a list of points.
Hello,
I was just trying the Quick test with OpenSCAD version 2021.01 and was quite frustrated to see nothing.
When I remove the "z" in the end of the path string I see at least a shape similar to the one in your Readme.
As I'm quite new into your library, I have no clue yet, what the problem is, but I might find out later.
I just wanted to let you know.
Cheers, Matthias
using OpenSCAD 2022.11.18.ci12805 I'm getting a few issues.
there are a couple of sequential commas (line 73, iirc)
and also in line 618 (and also elsewhere) it doesn't like n=$pb_spline. I set n=10, and it now seems to run., but running into the non closed polygon issues mentioned previously.
Maybe it runs fine on other versions of Openscad.
I tried further, sometimes OpenSCAD froze, sometimes it printed without end errors until I had to quit it immediately and sometimes it worked... very mixed.
My approach is like this:
It has the great advantage that you can work with many objects in Inkscape but use selected objects for OpenSCAD (in contrast to using .svg: unfortunately nothing can be filtered out, i need to delete every other objects). But it has the "disadvantage" that I have to take the object as I see it, whether it is rx2 or rx3 ;) it looks correct, but pathfinder gets problems with it. It often just froze. With the svg import I do not have such problems.
long story short:
I have found one special difference what may be connected with the freezes/neverending errors:
I built a single shape for testing as svg and pathbuilder. Pathbuilder can render that - with an interesting detail I think. Have a look at the scad file:
testform_1.zip
is this maybe the rx*2>d problem?
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.