mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 08:25:19 +01:00
fix verification errors for snippets
This commit is contained in:
parent
6289b8b343
commit
6172dded71
1 changed files with 82 additions and 84 deletions
|
|
@ -1,4 +1,5 @@
|
|||
//Make a pipe------------------------------------------------------------------------------------------------------
|
||||
{
|
||||
const ctx = __CAD_APP;
|
||||
const {commandInterface: oci, io} = ctx.occService;
|
||||
oci.beziercurve("spine", "4",
|
||||
|
|
@ -17,11 +18,11 @@ oci.mkplane("profile", "profile");
|
|||
oci.pipe("p", "spine", "profile");
|
||||
|
||||
ctx.services.exposure.addOnScene(io.getShell("p"));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//Doing a sweep ---------------------------------------------------------------------------------------------------
|
||||
{
|
||||
const ctx = __CAD_APP;
|
||||
const {commandInterface: oci, io} = ctx.occService;
|
||||
|
||||
|
|
@ -44,7 +45,7 @@ oci.polyline("c",
|
|||
oci.wire("w", "c");
|
||||
|
||||
|
||||
//dose not seem to work if I convert the profile in to a plane.
|
||||
//does not seem to work if I convert the profile in to a plane.
|
||||
//Need to figure this out to get a body and not just surfaces.
|
||||
//oci.mkplane("w", "w")
|
||||
|
||||
|
|
@ -54,10 +55,10 @@ oci.addsweep("w");
|
|||
|
||||
oci.buildsweep("r", "-S");
|
||||
ctx.services.exposure.addOnScene(io.getShell("r"));
|
||||
|
||||
|
||||
}
|
||||
|
||||
//Revolve ------------------------------------------------------------------------------------------------------
|
||||
{
|
||||
const ctx = __CAD_APP;
|
||||
const {commandInterface: oci, io} = ctx.occService;
|
||||
|
||||
|
|
@ -68,11 +69,10 @@ oci.revol("r", "p", "3", "0", "0", "0", "1", "0", "280");
|
|||
|
||||
|
||||
ctx.services.exposure.addOnScene(io.getShell("r"));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//fillet -------------------------------------------------------------------------------------------------------
|
||||
{
|
||||
const ctx = __CAD_APP;
|
||||
const {commandInterface: oci, io} = ctx.occService;
|
||||
|
||||
|
|
@ -81,22 +81,24 @@ oci.explode("b", "e");
|
|||
oci.blend("b", "b", "5", "b_2");
|
||||
|
||||
|
||||
|
||||
ctx.services.exposure.addOnScene(io.getShell("b"));
|
||||
}
|
||||
|
||||
//champher ----------------------------------------------------------------------------------------------------
|
||||
{
|
||||
const ctx = __CAD_APP;
|
||||
const {commandInterface: oci, io} = ctx.occService;
|
||||
|
||||
oci.box("b", "1", "2", "3");
|
||||
oci.explode("b", "e");
|
||||
var bla = ["ch", "b", "b_1", "0.2", "b_2", "0.2"];
|
||||
const bla = ["ch", "b", "b_1", "0.2", "b_2", "0.2"];
|
||||
oci.chamf.call(bla);
|
||||
|
||||
ctx.services.exposure.addOnScene(io.getShell("ch"));
|
||||
|
||||
}
|
||||
|
||||
//shell -------------------------------------------------------------------------------------------------------
|
||||
{
|
||||
const ctx = __CAD_APP;
|
||||
const {commandInterface: oci, io} = ctx.occService;
|
||||
|
||||
|
|
@ -106,11 +108,10 @@ oci.explode("b", "f")
|
|||
oci.offsetshape("body", "b", "-1", "1.e-3", "b_2", "b_3")
|
||||
|
||||
ctx.services.exposure.addOnScene(io.getShell("body"));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//loft --------------------------------------------------------------------------------------------------------
|
||||
{
|
||||
const ctx = __CAD_APP;
|
||||
const {commandInterface: oci, io} = ctx.occService;
|
||||
|
||||
|
|
@ -142,13 +143,10 @@ oci.thrusections("th", "issolid", "isruled", "w1", "w2", "w3");
|
|||
|
||||
|
||||
ctx.services.exposure.addOnScene(io.getShell("th"));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//Boolean operations ---------------------------------------------------------------------
|
||||
|
||||
{
|
||||
const ctx = __CAD_APP;
|
||||
const {commandInterface: oci, io} = ctx.occService;
|
||||
|
||||
|
|
@ -156,10 +154,10 @@ oci.box("b1", "10", "10", "10");
|
|||
oci.psphere("sp", "5");
|
||||
|
||||
|
||||
|
||||
oci.bop("b1", "sp");
|
||||
oci.bopcommon("result");
|
||||
//oci.bopfuse("result");
|
||||
//oci.bopcut("result");
|
||||
|
||||
ctx.services.exposure.addOnScene(io.getShell("result"));
|
||||
}
|
||||
Loading…
Reference in a new issue