xibyte / jsketcher Goto Github PK
View Code? Open in Web Editor NEWParametric 2D and 3D modeler written in pure javascript
Home Page: http://web-cad.org
License: Other
Parametric 2D and 3D modeler written in pure javascript
Home Page: http://web-cad.org
License: Other
Will allow for use of bool operations
Make sketches show up in history navigation pane untill they are consumed in to a feature such as extrude or revolve.
Most cad software allows for switching between solid and wire frame views.
It would be handy to be able to cancel current tool (or finish multiline) with right click.
Everything seams to work nicely on Firefox, except zoom in 2D sketcher (tested on Nightly-57.0a1 and 55.0.3).
Tool in the sketcher to allow for trimming of sketch geometry and creation of constraints.
Selecting a segment would remove that segment until it intersects with another segment or that segment ends. If the segment is trimmed to an existing segment what ever remains shall have a constraint created for either a point on curve or point on point.
I can provide a video demonstrating the desired affect.
Would also like a split segment tool that could break a line or curve in to multiple lines and curves based on selection of cutting curve and curve to be cut. No geometry would be destroyed. Just broken in to individual segments.
It would be great to be able to use a selection box with a key combination (shift + mouse click ad drag for example).
This is an amazing accomplishment.
I am truly blown away by what you have been able to get done here.
please keep up the good work.
HAve you considered kick starting this?
Binding keys to select tools, and basic actions (save, open, undo, redo...)
As the title. I am a new for this subject. Could you please explain the meaning of "cognate curve"
Hello,
Sorry to bother you but how can I go about installing this on my own server. I have cloned the git in to a directory on my server but when i visit the page receive blank page with resources it can't load.
Workflow would be to select a face and then click the plane command. Plane would initialy be created on the face and allow the user to specify an offset distance positive or negative.
Will make updating the part history tree faster and prevent loss of file if link is broken.
This is to make the model able to be edited by changing a few values.
Establish variable names.
Ability to use these variable names for dimensions in the sketcher and the dialogs for features.
Ability to use complex math such as +,-,*,/,(,),^,ect.
List the variables in a window that can be easy edited.
Each dimension established or value entered in to feature dialog should also create an expression that can be seen and edited in the expression dialog.
It would be beneficial to be able to create an offset curve in the 2d sketcher.
It would be desired to be able to select a series of curves and offset them by a specified distance such that modifying the original curve will also update the offset curve.
The center point of the whole part should be able to be used for constraining geometry in sketches. As the sketcher currently stands it is not really possible to fully constrain a sketch in a proper manner.
The code to reproduce:
var mat = new Matrix3();
var m = mat.translate(0, 0, 10);
var box1 = brep_prim.box(100, 100, 100, undefined);
var box2 = brep_prim.box(100, 100, 100, mat);
var shell = boolean.union(box1, box2);
Then shell will have zero faces.
STL file export button produces no stl file.
Would also be nice if the stl file could be stored to local storage.
will be fun to accomodate NURB surfaces in the boolean algorithm
In other cad programs it is common to select 2 lines that are to be filleted. The command would have to infer the point by looking for the point at which the 2 lines intersect.
Make the edit button say sketch instead. This is the common termonolagy in most cad programs.
See following data
VM6128:4 "TCAD.projects.dkkjkjkkkk": {"history":[{"type":"PLANE","solids":[],"params":{"basis":[[1,0,0],[0,1,0],[0,0,1]],"depth":"0"},"protoParams":["XY","0"]},{"type":"PAD","solids":[0],"face":"0:0","params":{"target":[0,0,650],"expansionFactor":"1"},"protoParams":["650","1","0","0"]},{"type":"REVOLVE","solids":[1],"face":"1:2","params":{"angle":-180,"resolution":45,"pivotSketchObjectId":"1:2:2"},"protoParams":[-180,45,"1:2:2"]},null]}
VM6128:4 "TCAD.projects.dkkjkjkkkk.sketch.0:0": {"layers":[{"name":"_dim","style":{"lineWidth":1,"strokeStyle":"#bcffc1","fillStyle":"#00FF00"},"readOnly":false,"data":[]},{"name":"bounds","style":{"lineWidth":2,"strokeStyle":"#fff5c3","fillStyle":"#000000"},"readOnly":true,"data":[{"id":6,"_class":"TCAD.TWO.Segment","aux":true,"edge":1,"points":[[0,[1,-400],[2,400]],[3,[4,-400],[5,-400]]],"children":[6]},{"id":13,"_class":"TCAD.TWO.Segment","aux":true,"edge":2,"points":[[7,[8,-400],[9,-400]],[10,[11,400],[12,-400]]],"children":[13]},{"id":20,"_class":"TCAD.TWO.Segment","aux":true,"edge":3,"points":[[14,[15,400],[16,-400]],[17,[18,400],[19,400]]],"children":[20]},{"id":27,"_class":"TCAD.TWO.Segment","aux":true,"edge":4,"points":[[21,[22,400],[23,400]],[24,[25,-400],[26,400]]],"children":[27]}]},{"name":"sketch","style":{"lineWidth":2,"strokeStyle":"#ffffff","fillStyle":"#000000"},"readOnly":false,"data":[{"id":34,"_class":"TCAD.TWO.Segment","points":[[28,[29,-205.29405549416745],[30,83.80786485010617]],[31,[32,135.92367996697888],[33,253.8885317517921]]],"children":[34]},{"id":41,"_class":"TCAD.TWO.Segment","points":[[35,[36,135.92367996697888],[37,253.8885317517921]],[38,[39,279.5943054243036],[40,-163.3901230691144]]],"children":[41]},{"id":48,"_class":"TCAD.TWO.Segment","points":[[42,[43,279.5943054243036],[44,-163.3901230691144]],[45,[46,-161.98158752541514],[47,-257.40987061104016]]],"children":[48]},{"id":55,"_class":"TCAD.TWO.Segment","points":[[49,[50,-161.98158752541514],[51,-257.40987061104016]],[52,[53,-205.29405549416745],[54,83.80786485010617]]],"children":[55]}]},{"name":"construction","style":{"lineWidth":1,"strokeStyle":"#aaaaaa","fillStyle":"#000000"},"readOnly":false,"data":[]}],"constraints":[["coi",[35,31]],["coi",[42,38]],["coi",[49,45]],["coi",[52,28]]]}
VM6128:4 "TCAD.projects.dkkjkjkkkk.sketch.1:1": {"layers":[{"name":"_dim","style":{"lineWidth":1,"strokeStyle":"#bcffc1","fillStyle":"#00FF00"},"readOnly":false,"data":[]},{"name":"bounds","style":{"lineWidth":2,"strokeStyle":"#fff5c3","fillStyle":"#000000"},"readOnly":true,"data":[{"id":6,"_class":"TCAD.TWO.Segment","aux":true,"edge":1,"points":[[0,[1,-161.98158752541514],[2,-257.40987061104016]],[3,[4,279.5943054243036],[5,-163.3901230691144]]],"children":[6]},{"id":13,"_class":"TCAD.TWO.Segment","aux":true,"edge":2,"points":[[7,[8,279.5943054243036],[9,-163.3901230691144]],[10,[11,135.92367996697888],[12,253.8885317517921]]],"children":[13]},{"id":20,"_class":"TCAD.TWO.Segment","aux":true,"edge":3,"points":[[14,[15,135.92367996697888],[16,253.8885317517921]],[17,[18,-205.29405549416745],[19,83.80786485010617]]],"children":[20]},{"id":27,"_class":"TCAD.TWO.Segment","aux":true,"edge":4,"points":[[21,[22,-205.29405549416745],[23,83.80786485010617]],[24,[25,-161.98158752541514],[26,-257.40987061104016]]],"children":[27]}]},{"name":"sketch","style":{"lineWidth":2,"strokeStyle":"#ffffff","fillStyle":"#000000"},"readOnly":false,"data":[{"id":31,"_class":"TCAD.TWO.Circle","c":[28,[29,-58.572377753911645],[30,-2.2107831628519663]],"r":86.4455699873516,"children":[31]}]},{"name":"construction","style":{"lineWidth":1,"strokeStyle":"#aaaaaa","fillStyle":"#000000"},"readOnly":false,"data":[{"id":39,"_class":"TCAD.TWO.Segment","points":[[33,[34,448.4807427273572],[35,195.61420259082547]],[36,[37,448.4807427273572],[38,5.891264035250864]]],"children":[39]}]}],"constraints":[]}
VM6128:4 "TCAD.projects.dkkjkjkkkk.sketch.1:2": {"layers":[{"name":"_dim","style":{"lineWidth":1,"strokeStyle":"#bcffc1","fillStyle":"#00FF00"},"readOnly":false,"data":[]},{"name":"bounds","style":{"lineWidth":2,"strokeStyle":"#fff5c3","fillStyle":"#000000"},"readOnly":true,"data":[{"id":6,"_class":"TCAD.TWO.Segment","aux":true,"edge":1,"points":[[0,[1,0],[2,-236.84874030595657]],[3,[4,655.2156340852148],[5,-236.84874030595657]]],"children":[6]},{"id":13,"_class":"TCAD.TWO.Segment","aux":true,"edge":2,"points":[[7,[8,655.2156340852148],[9,-236.84874030595657]],[10,[11,655.2156340852148],[12,109.86686260633178]]],"children":[13]},{"id":20,"_class":"TCAD.TWO.Segment","aux":true,"edge":3,"points":[[14,[15,655.2156340852148],[16,109.86686260633178]],[17,[18,0],[19,109.86686260633178]]],"children":[20]},{"id":27,"_class":"TCAD.TWO.Segment","aux":true,"edge":4,"points":[[21,[22,0],[23,109.86686260633178]],[24,[25,0],[26,-236.84874030595657]]],"children":[27]}]},{"name":"sketch","style":{"lineWidth":2,"strokeStyle":"#ffffff","fillStyle":"#000000"},"readOnly":false,"data":[{"id":34,"_class":"TCAD.TWO.Segment","points":[[28,[29,236.84476398956429],[30,-30.37394156675431]],[31,[32,396.1726218859359],[33,50.663503397779515]]],"children":[34]},{"id":41,"_class":"TCAD.TWO.Segment","points":[[35,[36,396.1726218859359],[37,50.663503397779515]],[38,[39,469.42680942449755],[40,-212.13589439681041]]],"children":[41]},{"id":48,"_class":"TCAD.TWO.Segment","points":[[42,[43,469.42680942449755],[44,-212.13589439681041]],[45,[46,249.66424680881258],[47,-144.37577092364089]]],"children":[48]},{"id":55,"_class":"TCAD.TWO.Segment","points":[[49,[50,249.66424680881258],[51,-144.37577092364089]],[52,[53,149.85541628752233],[54,-82.10971151586348]]],"children":[55]},{"id":62,"_class":"TCAD.TWO.Segment","points":[[56,[57,149.85541628752233],[58,-82.10971151586348]],[59,[60,236.84476398956429],[61,-30.37394156675431]]],"children":[62]}]},{"name":"construction","style":{"lineWidth":1,"strokeStyle":"#aaaaaa","fillStyle":"#000000"},"readOnly":false,"data":[]}],"constraints":[["coi",[35,31]],["coi",[42,38]],["coi",[49,45]],["coi",[56,52]],["coi",[59,28]]]}
When creating a blank empty part it should automaticly contain 3 planes for all the accesses.
This way the user can imediatly go in to sketching with out having to first create a plain.
it's not possible to apply hor/vert constraints to a group of selected segments now
When an item is selected display buttons next to it for delete entity, edit sketch (if applicable) and edit feature to bring up wizard.
Make single click not bring up the wizard automatically
I don't know if this is a feature loosing or something unproper. In my use case, I'd like to triangulate a
face enclosed by nurbs-curves directly. After taking a deep insight in your excellent code, I found you never do this, but by converting every thing to polygon and then calling the function in triangulate.js.
May be we are just on different use case, I'd like to improve your code in '{project}/web/app/3d/triangulation.js', and to make the 'TriangulateFace' function to support nurbs-curve. If you think it also useful for your project, I'd like to be a collaborator for you.
And as a code reader, I think it's better for this project to split the 'brep' and 'brep-3d' part to another project. And make it to be a modeling library project for all of the modelling project on web.
Having some buttons next to each feature in the list for a 3d model would be nice.
For example a smal sketch button to bring the user in to the sketch that constructed that feature, A delete feature button.
Will serve to make debugging buggy sketches easier and allow transfer of files to local storage for user transfer.
Mac OS V. 10.12.2
node: v0.10.36
on Chrome
Hi, I get a few errors after running the start command:
ERROR in .//css-loader?-url!.//less-loader!./web/css/app.less
Module build failed: ReferenceError: Promise is not defined
Hi !
Thank you for this project - love it !
I tried lauching locally on Fedora 25, npm 3.10, node 6.9.1.
npm install
gives:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] requires a peer of handlebars@>= 1.3.0 < 5 but none was installed.
If I do npm start
then it goes like this:
> [email protected] start /home/cyryl/dev/jsketcher
> webpack-dev-server --config webpack.config.dev.js --content-base web/ --port 3000
http://localhost:3000/webpack-dev-server/
webpack result is served from /static/
content is served from /home/cyryl/dev/jsketcher/web
If I'll try to access the URL given, however, I get:
WARNING in Cannot find module 'handlebars'
@ ./web/app/3d/ui/tmpl ^\.\/.*\.html$
WARNING in Cannot find module 'handlebars'
@ ./web/app/3d/ui/tmpl ^\.\/.*\.html$
WARNING in Cannot find module 'handlebars'
@ ./web/app/3d/ui/tmpl ^\.\/.*\.html$
ERROR in Cannot find module 'handlebars'
@ ./web/test/runner.js 5:16-48
webpack: bundle is now VALID.
I am happy to help here - please let me know if I'm doing something wrong or if you need more information.
Thank you !
Currently there is a button at the bottom of the screen to deselect all.
It would be nice that if you are not in a feature command like extrude or to make clicking in a blank empty area of the 3d space to deselect the current selection if there is one.
Unable to build working copy of jsketcher application to be copied to web server
If you create a circle, arc, ellipse, elliptical arc, or rectangle you will not be able to delete these entities until after the sketch has been saved and reopened.
The current BREP boolean algorithm works only for polyhedrons. To move forward we need to support NURBS surfaces and curves.
All user to toggle geometry in a sketch to and from being construction.
Move navigation tqbs for switching between model and sketches to the top of the screen.
Also move all the commands and menues from the bottom of the sdcreen to the top. Natural navigation tendancies in programs is to go to the top of a window.
Can be reproduced by drawing a square and putting a circle is side it. Then extruding.
In the feature list on left side the sketch button for each of the features dose not activate. It shows the button but not as active.
Iād like to encourage you to split your truly excellent work in two separate projects.
What you have develop looks awesome and separating internals into an UI independent JavaScript solid geometric modelling kernel would open tremendous possibilities and for sure attract other developers to support its development further.
Iām sure you considered this already, so what are your thoughts?
Daniel
1. This is amazing work, thank you so much for sharing! Wow!
2. Not sure if you'd be at all interested but I think this body of work deserves to be split up and shared:
I'd like to contribute to this project by pulling apart the components so that they may be used in various scenarios such as an NG2 app, React app, existing custom app framework, etc... A lot of the code is clean and modular already, I'd just like to further that effort and break things into semi-self contained modules such as:
I've already started pulling things apart and I'm trying to get a 2d sketcher module built.
It will take a while for me to grok some of your algorithms and guidance from you would be greatly appreciated.
The demo is outdated. New version is much better. Would be good to show it off.
A pmi view is a camera orientation/location/ zoom level with the ability to add 3d dimensions.
Allows for the geometry of the model to disclosed to manufacturer for the purposes of inspection, manufacturing and testing.
Contains dimensional information and annotations about faces, features and geometry such as notes about surface finish, hole sizes, ect.
Being able to add point at the intersection of 2 lines (of any type).
It could be for example, with point tool selected, when holding Ctrl key near an intersection, highlighting the nearest intersection point and being able to add it on click (creating corresponding constraints).
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.