[HN Gopher] CAD/CAM constraint-based geometry sketcher for Blender
___________________________________________________________________
CAD/CAM constraint-based geometry sketcher for Blender
Author : justinclift
Score : 148 points
Date : 2022-03-10 10:33 UTC (12 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| sydthrowaway wrote:
| Related: how to become a genius in CAD?
| detritus wrote:
| Practice.
| danboarder wrote:
| To complement this, a collection of Blender addons to make CAD
| design with Blender even more enjoyable:
|
| https://github.com/EleotleCram/blender-cad-tools
| monkmartinez wrote:
| Those look awesome and I did not know they exist. Thank you for
| sharing!
|
| On another note, I would love a version of Blender for the
| iPad. Shapr3D is, imo, ridiculously overpriced for what it is.
| An OSS 3D creation environment with the Apple pencil would be
| amazing.
| anchpop wrote:
| Unfortunately Blender is GPL and so can't be ported to iOS or
| iPadOS :(
| outworlder wrote:
| More specifically, because Apple won't allow GPL apps.
| starky wrote:
| I don't understand what market Shapr3D is trying to target,
| it would be a great piece of software for doing quick designs
| for 3D printing when I don't need a full CAD solution, but
| the pricing is too high for anyone doing that. At the same
| time the extra cost to Fusion360 for professional work is
| well worth it for the extra features.
| monkmartinez wrote:
| I agree. I use the free version to noodle around, but I
| don't spend a lot of time on the models for a variety of
| reasons. I may be too used to the feature tree and
| rollbacks. Also, I am addicted to equations and variables
| for parametric designing. They have a cool app and I would
| pay $5 a month for it to be sure, but I am not going to
| spend $20 per month for it unless it nearly replaces f360,
| Solidworks, OpenSCAD, FreeCAD... I don't think it beats any
| of them right now.
|
| TinkerCAD is on the iPad and actually fun to noodle with
| FYI.
| pdc56 wrote:
| Thanks for this. I just got a surface studio with pen and
| was looking for something like this but failed to find
| anything.
|
| I did the tutorial and it worked fine, but then when I
| started fresh I got a bug where I couldn't see any geometry
| until after I finished the pen operation, rendering it
| useless. What a shame. I'll try it again one day after they
| hopefully fix it
| moffkalast wrote:
| If there was one thing I would love for Blender to add is to
| have a way to scale selections to a specific size. Right now
| there's literally no way to do it except splitting it out as a
| separate object and then doing it via geometry bounds. The
| ruler tool is also so hard to limit to a specific axis and a
| general pain to use.
|
| Like is it so hard to always draw some text for all 3 axis to
| say what the selection bounds are? I'm perplexed that none of
| the so called CAD plugins didn't add this as a first order of
| business, but they bothered adding something as useless as an
| outline renderer.
|
| When I need anything that's dimensionally accurate in Blender I
| have to set up and scale the critical parts in Tinkercad first,
| then import into Blender to finish it up properly ffs.
| phkahler wrote:
| That is really great! I wonder if Blender would adopt some of
| these CAD features into the official software. Even animators
| must need to do more technical designs at times right?
| detritus wrote:
| Problem with that is that they risk ending up with feature
| bloat, as much as I agree with you!
| paparush wrote:
| Thanks for contributing to Blender!!
| iseanstevens wrote:
| Amazing
| bondarchuk wrote:
| Nice. Always found it unreasonable how difficult it is to just
| create a simple object with 100% accurate dimensions/angles
| according to a well-defined spec.
| bayesian_horse wrote:
| Just came to say FreeCAD is also really good.
| [deleted]
| the__alchemist wrote:
| Compared to what? I can't think of a CAD program I could
| compare it to, and say this about!
| IshKebab wrote:
| It's really bad compared to every commercial parametric CAD
| program I've used (SOLIDWORKS, Pro/E, NX, Fusion 360).
|
| It's pretty bad compared to Solvespace too.
|
| One of those FOSS programs like KiCAD where it is full of
| features but they've done absolutely zero work on UX, which
| makes using it a frustrating "ok you don't do it the obvious
| way, let me spend 15 minutes googling how to extrude a
| square" experience.
| phkahler wrote:
| >> It's pretty bad compared to Solvespace too.
|
| That sounds like a partial dig toward Solvespace. Aside
| from lack of features and the 90's UI look, what don't you
| like about it? Asking as one of the people trying to make
| it better.
| IshKebab wrote:
| I didn't mean to give that impression - I do really like
| Solvespace! It has a slightly unusual but pretty
| intuitive UI and the modelling actually works!
|
| But it's still clearly in another class to the commercial
| software I listed. Both in terms of UI polish and
| features. Though in fairness it's way ahead of them in
| terms of being light and quick to run.
|
| The main issues I ran into were no bevels/fillets/drafts,
| and the fact that small circles become octagons. Last I
| looked into it the latter was fixable, it just hasn't
| been fixed, and the former was too difficult to implement
| with the surface representation it uses.
|
| I got the impression that only the guy who originally
| wrote it understands the actual CAD stuff, and he doesn't
| work on it any more so the fundamental CAD operations are
| probably fixed now.
| traverseda wrote:
| The person you're responding to has done some great work
| on the fundamental CAD stuff, moving some functions to
| use eigan for significant performance increases. They
| seem to me like they've got a pretty solid grasp of the
| underlying CAD kernel.
|
| I think it would be great if some other people were able
| to step up and help modernizing other parts of it, making
| distribution easier, that kind of stuff. I think phkahler
| has the skills to revive solvespace, but there needs to
| be some other core contributors who can help out with the
| build, UI, on-disk format, and the like.
| pasabagi wrote:
| I think the edge solvespace has over the closed-source
| competition is that it's actually _enjoyable to use_.
| Every time I think about sitting down to make something
| with solidworks, my heart sinks. On the other hand, I
| actually enjoy using solvespace.
|
| Obviously, there are some lacking features, occasional
| jank, and (much less these days) weird pathological
| performance edge cases, but it's like all open source
| software: as it gets more polished, as more features get
| added, you have less and less reason to fire up the
| horrible UX closed source programs.
| phkahler wrote:
| >> I think the edge solvespace has over the closed-source
| competition is that it's actually _enjoyable to use_.
|
| That is IMHO exactly why people use it, myself included.
| It really encourages a sort of "play" with the model
| which seems to come from heavy use of the constraint
| solver. You never enter dimensions in a property window
| somewhere, you enter them right on the sketch which means
| your focus is almost always right there. The
| interactivity is very high for a CAD tool.
| pasabagi wrote:
| For me it's the orthogonality - sometimes I hit some
| weird thing that's really tricky to do, or surprising,
| but mostly, solvespace gives you a very elegant set of
| tools for building shapes.
|
| That means that instead of stopping every five minutes to
| fiddle with all the little switches and toggles on some
| inane popup window you're in a flow state a lot of the
| time. It's like geometry, where you build complex forms
| through a straight edge and compass. For this reason, I
| think that even if solvespace was completely abandoned
| tomorrow, it would still be of interest to future
| programmers making future CAD programs.
| phkahler wrote:
| >> I got the impression that only the guy who originally
| wrote it understands the actual CAD stuff, and he doesn't
| work on it any more so the fundamental CAD operations are
| probably fixed now.
|
| That was true for a few years, but I've got a pretty good
| handle on it, as does one of the other maintainers who
| implemented boolean intersection. I added the helix and
| revolve (vs lathe) groups, and have fixed a lot of bugs
| in triangulation and NURBS code.
|
| >> The main issues I ran into were no
| bevels/fillets/drafts, and the fact that small circles
| become octagons.
|
| The octagon issue is fixed - they become 16-gons minimum,
| and the chord tolerance can be lowered to get more edges.
| If you're exporting NURBS that doesn't really mater
| because the actual curves are exported in STEP.
|
| As for the other features, I had been working on that
| here: ]https://github.com/solvespace/solvespace/issues/45
| 3#issuecom...
|
| Although my implementation will be strictly for the ends
| of extrusions and not a general purpose edge modifier
| tool. I also don't know when it will land.
|
| We just keep plugging away at whatever pace we have time
| for ;-)
|
| There have been some new contributors too and some of
| them even dig in pretty deep.
| IshKebab wrote:
| Nice! Keep up the good work.
| jbay808 wrote:
| Extruding a square is exactly the same as SolidWorks
| though?
|
| You sketch a square on any plane, then extrude it (they
| call it the "pad" tool instead of "extrude" but otherwise
| it's identical).
|
| I think the only thing FreeCAD users have to know, which
| SolidWorks users don't, is that there is a "Part Design"
| workbench where this SolidWorks-style workflow is located.
| There are also many other workbenches for other things like
| drafting, architecture, or CSG, and it's not immediately
| obvious which workbench you want to choose for the
| SolidWorks-style experience.
| Sophira wrote:
| I've only just begun using FreeCAD (and CAD in general,
| especially parametric CAD), but one of the problems I've
| seen when sketching on a plane has been the topological
| naming problem[0]. I don't know how it's changed since
| 0.19, but basically, making changes to your model after
| sketching on a plane can cause the sketch to anchor to
| another plane instead.
|
| I was fist introduced to this problem in a video[1] made
| by Flowwie, who makes some fantastic introductory videos
| for FreeCAD. I'd strongly suggest watching it, because
| this isn't something the tutorial on the wiki[2] warns
| you about. Flowwie goes on to suggest an alternate method
| of working around this problem which works by using
| reference measurements (measurements within a sketch that
| aren't _specified_ , but _calculated_ for use in other
| sketches).
|
| [0]
| https://wiki.freecadweb.org/Topological_naming_problem
|
| [1] https://youtube.com/watch?v=FVKhejma69U
|
| [2] https://wiki.freecadweb.org/Creating_a_simple_part_wi
| th_Part...
|
| [edit: I accidentally linked to a video I didn't mean to
| link to! This one is the one I intended.]
| jbay808 wrote:
| A fix is in progress -- developer realthunder has
| submitted a patch last year to solve the topological
| naming problem, and you can try it in their development
| branch.
| serf wrote:
| >You sketch a square on any plane, then extrude it (they
| call it the "pad" tool instead of "extrude" but otherwise
| it's identical).
|
| yeah , but that's exactly the complaint; a lexicon of
| terms is required to use FreeCAD whenever you're
| accustomed to (any) of the industry standards.
|
| I hop between F360 and SolidWorks routinely with little
| issue, FreeCAD is always the odd one that requires
| searching.
|
| I _want_ to like FreeCAD; I keep trying it every year. I
| hate the anti-user tactic of Autodesk and I hate the cost
| of SolidWorks -- but it hasn 't reached parity yet for my
| uses.
| IshKebab wrote:
| > they call it the "pad" tool instead of "extrude" but
| otherwise it's identical
|
| They call it something Illogic and non-standard _which
| means you have to Google it_ but otherwise it 's
| identical!
|
| To be honest extruding a square was meant to be an
| exaggerated example but it sounds like it wasn't such an
| exaggeration!
| jbay808 wrote:
| You don't have to google it. First of all, "pad" is not
| illogical, and it's arguably a more familiar word to non-
| native speakers than "extrude". Secondly, the tool's icon
| looks just like an extruded cube, so it's what you're
| likely to reach for first if you're just experimenting
| for the first time. It's also right next to the revolve
| tool, just like in SolidWorks. When you click on it
| you'll immediately see a preview of the extruded cube
| that you expected, so you did the right thing. And
| lastly, if the name of the pad tool bugs you a lot, you
| can submit a patch.
| seanw444 wrote:
| All the reviews I hear about it are generally poor. That said,
| I hear a lot of poor reviews on open-source software, which I
| generally have a good experience with. I don't do any CAD, and
| haven't used FreeCAD personally, so I can't say for certain.
| dylan604 wrote:
| Tranlasted: "I have no knowledge of the subject you speak,
| but here is some hearsay information for you that I can't
| personally vouche for or dispell."
|
| Love it
| ramses0 wrote:
| Also consider OpenSCAD:
| https://files.openscad.org/examples/Basics/union.html
|
| difference(); union(); def my_obj(p1, p2, p3) { for(...p1...) {
| sphere(p2); cube(p3); } }; ...etc...
| moffkalast wrote:
| Does it have the option to lock the camera rotation around the
| Z axis yet like any other sane 3D viewer? Otherwise hard pass,
| because it's impossible to rotate the view properly.
| blutack wrote:
| It is, I also have a big soft spot for SolveSpace[1] - the
| feature to speed/binary size ratio is fantastic.
|
| 1: https://solvespace.com
| speps wrote:
| You didn't read the link, it's a Blender plugin to use
| SolveSpace inside of it.
| blutack wrote:
| It uses the same python sketch constrainting module derived
| from a SolveSpace internals fork that FreeCAD also uses
| [1]. I'll give the parent project a go anyway, it's a cool
| idea.
|
| 1: https://github.com/realthunder/slvs_py
| jstanley wrote:
| Just to nitpick: this is not used by the normal Sketcher
| workspace in FreeCAD for constraint solving. According to
| the link it is used for constraint solving in the
| assembly3 workbench, which is much more niche than
| Sketcher.
| blutack wrote:
| Sorry yes, should have clarified!
| rbanffy wrote:
| And it's also worth noting one of the SolveSpace folks is
| in Ukraine and his people could use our support.
|
| https://twitter.com/app4soft/status/1499029843689852934?s
| =20...
| phkahler wrote:
| That guy is... Well, he was a large contributing factor
| to the previous Solvespace lead maintainer quitting. I
| find him both useful for bug reports and some feature
| ideas, but he can also be one to overstep (to put it
| kindly). He goes under multiple user names, and it's not
| entirely clear if he Ukrainian or Russian - he did
| contribute one of those language translations, but I
| forget which one.
| rbanffy wrote:
| Interesting.
| ArtWomb wrote:
| Exact package that got me back into Blender again, and
| discovered right here on HN too ;)
| ynniv wrote:
| I assume this project is about making it easier to make
| renderable models in Blender, not about using Blender as a true
| CAD/CAM tool, so it wouldn't compete with FreeCAD.
| fartcannon wrote:
| I use Freecad everyday and I love it. Version 0.20 is very
| stable. I build relatively complex robot assemblies for 3D
| printing in it. Reminds me of solidworks.
| 0xdeadbeefbabe wrote:
| Are you using Assembly3 or 4 or dodo? Do you ever use
| spreadsheet to control the whole assembly or just each part?
| fartcannon wrote:
| Assembly 3! I've never used 4 or dodo. Do you recommend?
| taneq wrote:
| Last time I tried FreeCAD it seemed like a bunch of really good
| tools that had kind of been thrown in a bag and shaken around a
| bit. All the bits were there but it just seemed so clunky. Then
| I tried Fusion 360 and it's like the exact same Lego pieces had
| been rearranged into something that made sense, with the
| timeline and nonlinear editing tying it all together.
|
| Is FreeCAD different now, or was I expecting it to be something
| it's not, or was I just using it wrong?
| phkahler wrote:
| >> Last time I tried FreeCAD it seemed like a bunch of really
| good tools that had kind of been thrown in a bag and shaken
| around a bit. All the bits were there but it just seemed so
| clunky.
|
| That's my impression too - and it tends to crash. If you look
| at how FreeCAD imports DWG files for example, it runs an
| external instance of a DWG->DXF converter built from (I
| think) LibreDWG, and then it uses their other python DXF
| importer to bring it in. In a way it makes sense because
| LibreDWG is GPLv3 only (not LGPL) so they can't directly
| incorporate it. But the awkward way it gets used feels like
| the way a lot of FreeCAD is put together. OTOH it can do a
| LOT and it is Free Software.
| dymk wrote:
| This has nothing to do with CAM. Nice to see a constraint solver
| for Blender though!
| danboarder wrote:
| True, however there are CAM tools to generate NC
| toolpaths/gcode from within blender, check out BlenderCAM:
| https://github.com/vilemduha/blendercam
| matthewfcarlson wrote:
| This is one of my biggest problems with my workflow. I use
| SketchUp to quickly get the general shape of the thing but then
| to get decent renders, it's very difficult to recreate the model
| in blender accurately. Perhaps this might encourage me to stay in
| blender the whole time.
| phkahler wrote:
| Can't you export to some format that can be imported in
| Blender? Blender supports .obj and .stl import.
| gilleain wrote:
| How do geometric constraint solvers work, broadly? I know how
| constraint logic programming works (roughly!) with techniques
| like backtracking and so on.
|
| I guess you can randomly adjust points, check the constraints and
| iterate, but that sounds inefficient.
| phkahler wrote:
| Someone wrote a similar algebraic constraint solver in Rust and
| wrote all about it here: https://users.rust-
| lang.org/t/geometric-constraint-solvers-p...
|
| He based this on the principles in the Solvespace constraint
| solver which is used in the blender add-on.
| q3k wrote:
| > In SolveSpace, constraints are represented as equations in a
| symbolic algebra system. In general, these equations are solved
| numerically, by a modified Newton's method. Some special cases
| are handled, for any equation that can be solved by forward-
| substitution, and equations that are soluble alone.
|
| > If the sketch is not fully constrained, then the Jacobian is
| solved in a least squares sense, with each equation written in
| such a way as to make the quantity being minimized a useful
| penalty metric. This tends to yield "less surprising" results
| when dragging points in an underconstrained sketch, compared to
| approaches that use weak dimensions to keep the sketch always
| fully constrained.
|
| https://solvespace.com/tech.pl
|
| Not sure what the Big Players (Autodesk, Dassault Systemes,
| Siemens, ...) use, though.
| gilleain wrote:
| Ah, should have read the docs, thanks!
|
| It occurred to me after I posted that this is similar in a
| way to molecular dynamics simulations, which are essentially
| constrained sets of points (constraints like atoms have to be
| within a certain distance range or angle/torsion).
|
| In those you use techniques like gradient descent (similar to
| Newton's method it seems) and forcefields and so on. I guess
| it's all numerical optimization in the end.
| delhanty wrote:
| The big players nearly all use D-Cubed 2D DCM
|
| https://www.plm.automation.siemens.com/global/en/products/pl.
| ..
|
| Siemens PLM - NX and SolidEdge
|
| Dassault - CATIA & SolidWorks
|
| Autodesk - Inventor & Fusion
|
| PTC - not sure ProEngineer's original sketcher predates 2D
| DCM of course because they invented history-based feature
| modeling for 3D CAD.
|
| OnShape also.
|
| Russian systems tend to use LEDAS
|
| https://levindavid.blogspot.com/2011/10/providing-
| geometric-...
|
| 2D DCM is now owned and sold by Siemens PLM but originally
| created by John Owen at D-Cubed Ltd (Cambridge UK) from circa
| 1989 before he sold the company to Siemens in 2004
|
| https://www.plm.automation.siemens.com/global/en/our-
| story/n...
|
| Original 2D DCM paper by John Owen from 1991
|
| Algebraic Solution for Geometry from Dimensional. Constraints
|
| http://papers.cumincad.org/data/works/att/9ad2.content.pdf
|
| (The split the graph into biconnected components doesn't
| really cover variable radius circles though.)
|
| Other more recent papers by John Owen on arXiv
|
| https://arxiv.org/search/math?searchtype=author&query=Owen%2.
| ..
|
| (Some of these are for 3D DCM.)
|
| Disclaimer: D-Cubed Ltd employee from 1995-2000.
| gilleain wrote:
| Interesting links, thank you.
|
| As for splitting the graph into biconnected component, that
| mirrors what I know about automated layout of graphs
| (essentially the same problem?) in that it makes sense to
| have a very high-level algorithm of:
|
| 1) split graph into bi- (or tri-) connected components 2)
| layout these components individually 3) layout the block-
| tree of components
|
| With the goal for layout to make it 'look nice' in some
| sense, while the goal for CAD is more that the constraints
| should ... make the final structure buildable and the
| 'right' shape?
| ramboldio wrote:
| Am I the only one to find it crazy that basically all of
| engineering is using the same proprietary constraint solver
| that only one company knows how to build?
|
| Sounds like a big Achilles heel to civilization in some
| ways.. :D
|
| I mean, even with search engines, there is more
| competition..
| Chris_Newton wrote:
| Disclosure: I also used to work at D-Cubed, on the 2D
| constraint solver, but I haven't for a long time and I'm
| speaking only for myself here.
|
| _Am I the only one to find it crazy that basically all
| of engineering is using the same proprietary constraint
| solver that only one company knows how to build?_
|
| Perhaps, but it's a surprisingly complicated problem and
| at the same time a highly specialised one. Having the big
| players in the CAD world, who all need to solve much the
| same problem here, essentially funding a small group of
| specialists enough to work on it might just be economic
| incentives doing their job.
|
| I have no insider knowledge about this, but given that
| D-Cubed was first bought by UGS (a customer, and a direct
| competitor of many of its other customers) prior to
| becoming part of Siemens, I expect the lawyers all had
| provisions in place to deal with any dependency concerns.
| samwillis wrote:
| It isn't just the constraint solver, almost all of above
| use either Parasolid from Siemens PLM or ACIS from
| Dassault Systemes for their geometric kernal:
|
| https://en.m.wikipedia.org/wiki/Parasolid
|
| https://en.m.wikipedia.org/wiki/ACIS
|
| Even Autodesk use a fork of an old version of ACIS they
| own:
|
| https://en.m.wikipedia.org/wiki/ShapeManager
| freemint wrote:
| Has the word Homotopy continuation ever appeared in
| proposals for new solver designs?
| IshKebab wrote:
| Interesting, though I have to say I found Solvespace to
| have a much more stable solver than SOLIDWORKS. It's a
| really solid CAD modeller, it just has some critical
| missing features - notably no bevels/chamfers/drafts.
| phkahler wrote:
| >> Interesting, though I have to say I found Solvespace
| to have a much more stable solver than SOLIDWORKS.
|
| The original author of solvespace said the same thing. He
| set out to make a constraint solver that behaved more
| intuitively than the commercial ones he'd used. He still
| licenses the solver for commercial use.
| tonyarkles wrote:
| > Not sure what the Big Players (Autodesk, Dassault Systemes,
| Siemens, ...) use, though.
|
| In Autodesk Fusion 360, they seem to use something similar
| but with weird discontinuities in the computation. You'll be
| smoothly moving a point or edge or something and then at some
| point the 1px movement causes everything to snap differently
| and confusingly :). And if you pull back in the direction you
| came from, it doesn't go back the way it was. At least Ctrl-Z
| generally works pretty well :D
| prova_modena wrote:
| Certain situations in solidworks can cause similar
| behavior. For example, tangent arcs inverting themselves.
| My uneducated suspicion is that there are geometric
| conditions that cause these sorts of "gimbal lock" type
| problems in all CAD solvers. Although I don't have enough
| hours in F360 to say if you are describing something
| qualitatively different.
| delhanty wrote:
| There's a summary of methods used on Wikipedia
|
| > A general scheme of geometric constraint solving consists of
| modeling a set of geometric elements and constraints by a
| system of equations, and then solving this system by non-linear
| algebraic solver. For the sake of performance, a number of
| decomposition techniques could be used in order to decrease the
| size of an equation set:[8] decomposition-recombination
| planning algorithms,[9][10] tree decomposition,[11] C-tree
| decomposition,[12] graph reduction,[13] re-parametrization and
| reduction,[14] computing fundamental circuits,[15] body-and-cad
| structure,[16] or the witness configuration method.[17]
|
| https://en.wikipedia.org/wiki/Geometric_constraint_solving
| jerry1979 wrote:
| This is from the (apparently) beloved "how to build anything"
| mit class...
|
| See https://vimeo.com/454404808 at the 9:25 and at the 28:36
| timestamps.
___________________________________________________________________
(page generated 2022-03-10 23:01 UTC)