Giter VIP home page Giter VIP logo

silk's Introduction

Silk Workbench

High quality & low weight surface modeling tools for design and engineering

example of current capability

Thats the goal anyway ;) it's not perfect yet, but take a look below and decide if these results relate to your goals.

example of current capability example of current capability example of current capability example of current capability example of current capability example of current capability example of current capability example of current capability example of current capability example of current capability

Description

NURBS Surface modeling tools focused on low degree and seam continuity (FreeCAD Workbench). Silk is the new name of the NURBSlib_EVM project.

NURBS: smooth curves and surfaces whose form is controlled by a relatively small number of "control points", which sort of float close to the curves and surfaces. As their name indicates, the "control points" are what the user modifies in order to control the curves or surfaces. The "refinement" of a NURBS is controlled by its degree, and the "distance of effect" of a control point is controlled by the knot vector of the NURBS.

example of current capability

Low Degree: Silk NURBS curves and surfaces are of the minimum degree suitable for the intended goal. The knot vectors are kept to a small consistent set. Often with NURBS modeling problems, the apparent solution is to increase the degree and number of knots. While this is perfectly valid, it raises the computational difficulty and organizational challenges of the control points. Silk aims to provide tools of the absolute minimum mathematical complexity for each problem solved.

Seam Continuity: Silk's goal is to allow complex models to be built from individual NURBS sections, alternatively creating new surfaces to be continuous to existing surfaces, or providing tools to to create smooth transitions where surfaces are initially created with discontinuities.

FreeCAD does the heavy lifting:

-providing a planar sketch interface that we can locate anywhere in 3D space to manipulate simple groups of very few control point (Silk can use multiple sketches in different planes to construct truly 3D curves and surface edges).

-drawing the beautiful and smooth surfaces once appropriate control grids have been prepared using Silk tools.

Silk merely provides methods for combining these simple sketches into control point grids, which FreeCAD converts to NURBS surfaces.

The animation below demonstrates fine surface tuning through sketches with full engineering control of curve and surface continuity. Notice the low number of control points used on the profile control sketch. Up to a certain complexity, Silk updates virtually in real time with sketch editing.

example of current capability

Limitations

Although Silk is intended to provide efficient and user friendly tools in the long term, at this time, it behaves more like a low level library with GUI access to its functions. The individual functions create individual document objects, and in the future, relevant functions might be chained together automatically to create complex nested objects. The current objects are very likely to persist, both as individual document objects, and as sub-objects in the future.

Modeling can be done in the current state, and the resulting data structures are efficient, but the process can be laborious. The best path forward for user friendliness will depend heavily upon the outcome of several debates within the FreeCAD community on how parts, solid bodies, assemblies, and object linking are organized.

In the meantime Silk does offer a few tools not otherwise available in FreeCAD (eg. 3D splines), and can in general be seen as a sandbox for surface design, control strategies, data structures, and algorithms.

example of current capability example of current capability

Installation

Recommended installation is through the FreeCAD Addon Manager via Tools -> Addon Manager

Documentation

Until documentation and tutorials are rewritten for Silk, NURBSlib_EVM is the best source of information regarding the project. The tutorials can still be followed, simply skip setup, color, and display mode instructions. All setup is handled by installing the workbench, and the object display properties have been set to reasonable defaults. (Silk Wiki in progress)

Licence

All program files (.py, .pyc, .FCMacro) are offered under the terms of the Gnu gpl-v3.0

gplv3

Icon .svg files, icon .png files, demo models .FCStd files, and tutorial model .FCStd files are offered under the terms of CC-BY 4.0

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

silk's People

Contributors

chennes avatar edwardvmills avatar luzpaz avatar przemof avatar syres916 avatar wandrewkeech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

silk's Issues

Bug: NStar Surfaces Not Writing Out Geometry Properties Correctly

Testing on Demo03, delete and recreate any of the NStar surfaces. Operation completes successfully, but on document save the following error is emitted:

CubicNStarSurface_NStar66 Init
09:12:16  GeomBSplineSurface::Save

This very quiet error results in a partially corrupted file, which upon reopening emits these errors:

09:12:16  GeomBSplineSurface::Save
09:15:18  GeomBSplineSurface::Restore
09:15:18  Fatal Error at file /home/.../Silk_Demo_03_NStarBug.FCStd, line 26884, char 27
09:15:18  Invalid Document.xml: expected end of tag 'Geometry'

The contents of the Document.xml file show the object malformed as such, with the GeometryList terminating immediately after starting the Part::GeomBSplineSurface object and leaving the GeometryList open:

<Property name="NSurf" type="Part::PropertyGeometryList" group="CubicNStarSurface_NStar66" doc="N Cubic Surfaces" attr="0" ro="0" hide="0" status="2097152">
               <GeometryList count="5">
                   <Geometry  type="Part::GeomBSplineSurface">
                   </Property>
                   <Property name="Placement" type="App::PropertyPlacement" status="8388608">
                       <PropertyPlacement Px="0.0000000000000000" Py="0.0000000000000000" Pz="0.0000000000000000" Q0="0.0000000000000000" Q1="0.0000000000000000" Q2="0.0000000000000000" Q3="1.0000000000000000" A="0.0000000000000000" Ox="0.0000000000000000" Oy="0.0000000000000000" Oz="1.0000000000000000"/>
                   </Property>
                   <Property name="Proxy" type="App::PropertyPythonObject">
                       <Python value="e30=" encoded="yes" module="ArachNURBS" class="CubicNStarSurface_NStar66"/>
                   </Property>
                   <Property name="Shape" type="Part::PropertyPartShape">
                       <Part file="PartShape268.brp"/>
                   </Property>
                   <Property name="Visibility" type="App::PropertyBool" status="648">
                       <Bool value="true"/>
                   </Property>
               </Properties>
           </Object>

Legibility on dark themes

@edwardvmills I'd be happy to overhaul the icons of this WB to be consistent with FreeCAD Artwork Guidelines and to be legible with dark themes:
image

Before I start one question: You have a .svg and .png version of the icons. Is the .png used anywhere? Also the same icons seem to be duplicated with a different name, could they be unified to use the same .svg source?

image

Video manual

Please consider making a short video manual showing basic functions. I played with the workbench for ~2 hours and I failed to go beyond creating cubic curve and I'm not sure if it's my lack of knowledge or errors in the code.

Start failture

Hello
In my custom build (git 0.18 and 0.17) i get this error
Missing parentheses in call to 'print'. Did you mean print('curves do not share endpoints')? (ArachNURBS.py, line 108)
Can you help me to get Silk wirking?
PS: on appimage freecad build all works fine
My libs:
Boost 1_65
Coin3D 4.0.0a
Open CASCADE Technology 7.3.0
Python 3.6.5
Qt 5.11.1
zlib 1.2.11

Create the surrounding ruling surfaces for a four corner surface

Hi Edward, hope you are alright? We haven't heard from you in a while?

I created a topic General surface creation with emills2 "Silk" in the FreeCAD forum where I asked you if you could show me how to create a general surface. Where the hard part is to create the surrounding ruling surfaces.

The ruling surfaces shall be created in such a way that each corner is forced to be, at least, tangent to the local plane. This will gaurantee tangency with the neighbouring surfaces.

As can be seen in the model, the first corner-point is parent for the other three corner-points.
Each corner-point is parent for the two vector-points making up the ends of the directional vectors per corner.
Each plane is defined by the corners directional vectors/lines, hence creating a way of forcing everything to be, at the very least, tangent to each other.

So, by having everything connected to the first point it is easy to move the whole package around with just one set of [x,y,z] values and still having everything fully parametric.

But the best part is that it will be rock steady with respect to TopoNaming!

Missing icons

Installed by cloning git repo:
Cannot find icon: /home/przemo/.FreeCAD/Mod/Silk/Resources/Icons\Point_onCurve.svg Cannot find icon: /home/przemo/.FreeCAD/Mod/Silk/Resources/Icons\SubGrid33_2Grid64.svg

Error on basic tutorials

I'm using the NURBLsLib tutorials on SILK in
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23463 (Git)
Build type: Release
Branch: master
Hash: adc6db8f32c17e9f67cb82aa7962d1e42ce061c6
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
2020-12-27_20-33-53

When trying to create a control polygon and then curve I get the errors shown in the screen capture

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.