actually make import samples run (#2398)

* actually make import samples run

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* format

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2024-05-19 17:02:25 -07:00
committed by GitHub
parent acd52ab350
commit 20838bf618
16 changed files with 412 additions and 386 deletions

File diff suppressed because one or more lines are too long

View File

@ -36168,9 +36168,7 @@
"name": "import", "name": "import",
"summary": "Import a CAD file.", "summary": "Import a CAD file.",
"description": "For formats lacking unit data (STL, OBJ, PLY), the default import unit is millimeters. Otherwise you can specify the unit by passing in the options parameter. If you import a gltf file, we will try to find the bin file and import it as well.\nImport paths are relative to the current project directory. This only works in the desktop app not in browser.", "description": "For formats lacking unit data (STL, OBJ, PLY), the default import unit is millimeters. Otherwise you can specify the unit by passing in the options parameter. If you import a gltf file, we will try to find the bin file and import it as well.\nImport paths are relative to the current project directory. This only works in the desktop app not in browser.",
"tags": [ "tags": [],
"norun"
],
"args": [ "args": [
{ {
"name": "file_path", "name": "file_path",
@ -36816,11 +36814,11 @@
"unpublished": false, "unpublished": false,
"deprecated": false, "deprecated": false,
"examples": [ "examples": [
"const model = import(\"thing.obj\")", "const model = import(\"tests/inputs/cube.obj\")",
"const model = import(\"cube.obj\", { type: \"obj\", units: \"m\" })", "const model = import(\"tests/inputs/cube.obj\", { type: \"obj\", units: \"m\" })",
"const model = import(\"my_model.gltf\")", "const model = import(\"tests/inputs/cube.gltf\")",
"const model = import(\"my_model.sldprt\")", "const model = import(\"tests/inputs/cube.sldprt\")",
"const model = import(\"my_model.step\")" "const model = import(\"tests/inputs/cube.step\")"
] ]
}, },
{ {

View File

@ -201,7 +201,7 @@ fn do_stdlib_inner(
.code_blocks .code_blocks
.iter() .iter()
.enumerate() .enumerate()
.map(|(index, code_block)| generate_code_block_test(&fn_name_str, code_block, index, &metadata.tags)) .map(|(index, code_block)| generate_code_block_test(&fn_name_str, code_block, index))
.collect::<Vec<_>>(); .collect::<Vec<_>>();
let tags = metadata let tags = metadata
@ -731,27 +731,13 @@ fn parse_array_type(type_name: &str) -> Option<(&str, usize)> {
// For each kcl code block, we want to generate a test that checks that the // For each kcl code block, we want to generate a test that checks that the
// code block is valid kcl code and compiles and executes. // code block is valid kcl code and compiles and executes.
fn generate_code_block_test( fn generate_code_block_test(fn_name: &str, code_block: &str, index: usize) -> proc_macro2::TokenStream {
fn_name: &str,
code_block: &str,
index: usize,
tags: &[String],
) -> proc_macro2::TokenStream {
let test_name = format_ident!("serial_test_example_{}{}", fn_name, index); let test_name = format_ident!("serial_test_example_{}{}", fn_name, index);
let test_name_mock = format_ident!("test_mock_example_{}{}", fn_name, index); let test_name_mock = format_ident!("test_mock_example_{}{}", fn_name, index);
let test_name_str = format!("serial_test_example_{}{}", fn_name, index); let test_name_str = format!("serial_test_example_{}{}", fn_name, index);
// TODO: We ignore import for now, because the files don't exist and we just want
// to show easy imports.
let ignored = if tags.contains(&"norun".to_string()) {
quote! { #[ignore] }
} else {
quote! {}
};
quote! { quote! {
#[tokio::test(flavor = "multi_thread")] #[tokio::test(flavor = "multi_thread")]
#ignored
async fn #test_name_mock() { async fn #test_name_mock() {
let tokens = crate::token::lexer(#code_block).unwrap(); let tokens = crate::token::lexer(#code_block).unwrap();
let parser = crate::parser::Parser::new(tokens); let parser = crate::parser::Parser::new(tokens);
@ -768,7 +754,6 @@ fn generate_code_block_test(
} }
#[tokio::test(flavor = "multi_thread", worker_threads = 5)] #[tokio::test(flavor = "multi_thread", worker_threads = 5)]
#ignored
async fn #test_name() { async fn #test_name() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),); let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);
let http_client = reqwest::Client::builder() let http_client = reqwest::Client::builder()

View File

@ -340,43 +340,6 @@ fn test_stdlib_doc_comment_with_code() {
expectorate::assert_contents("tests/doc_comment_with_code.gen", &get_text_fmt(&item).unwrap()); expectorate::assert_contents("tests/doc_comment_with_code.gen", &get_text_fmt(&item).unwrap());
} }
#[test]
fn test_stdlib_doc_comment_with_code_on_ignored_function() {
let (item, errors) = do_stdlib(
quote! {
name = "import",
tags = ["norun"]
},
quote! {
/// This is some function.
/// It does shit.
///
/// This is code.
/// It does other shit.
/// import
///
/// ```
/// This is another code block.
/// yes sirrr.
/// import
/// ```
fn inner_import(
/// The args to do shit to.
args: Option<kittycad::types::InputFormat>
) -> Result<Vec<Box<SketchGroup>>> {
args
}
},
)
.unwrap();
assert!(errors.is_empty());
expectorate::assert_contents(
"tests/doc_comment_with_code_on_ignored_function.gen",
&get_text_fmt(&item).unwrap(),
);
}
#[test] #[test]
fn test_stdlib_fail_non_camel_case() { fn test_stdlib_fail_non_camel_case() {
let (_, errors) = do_stdlib( let (_, errors) = do_stdlib(

View File

@ -1,303 +0,0 @@
#[cfg(test)]
mod test_examples_import {
#[tokio::test(flavor = "multi_thread")]
#[ignore]
async fn test_mock_example_import0() {
let tokens =
crate::token::lexer("This is another code block.\nyes sirrr.\nimport").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
#[ignore]
async fn serial_test_example_import0() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);
let http_client = reqwest::Client::builder()
.user_agent(user_agent)
.timeout(std::time::Duration::from_secs(600))
.connect_timeout(std::time::Duration::from_secs(60));
let ws_client = reqwest::Client::builder()
.user_agent(user_agent)
.timeout(std::time::Duration::from_secs(600))
.connect_timeout(std::time::Duration::from_secs(60))
.connection_verbose(true)
.tcp_keepalive(std::time::Duration::from_secs(600))
.http1_only();
let token = std::env::var("KITTYCAD_API_TOKEN").expect("KITTYCAD_API_TOKEN not set");
let mut client = kittycad::Client::new_from_reqwest(token, http_client, ws_client);
if let Ok(addr) = std::env::var("LOCAL_ENGINE_ADDR") {
client.set_base_url(addr);
}
let tokens =
crate::token::lexer("This is another code block.\nyes sirrr.\nimport").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext::new(&client, Default::default())
.await
.unwrap();
ctx.run(program, None).await.unwrap();
ctx.engine
.send_modeling_cmd(
uuid::Uuid::new_v4(),
crate::executor::SourceRange::default(),
kittycad::types::ModelingCmd::ZoomToFit {
object_ids: Default::default(),
padding: 0.1,
},
)
.await
.unwrap();
let resp = ctx
.engine
.send_modeling_cmd(
uuid::Uuid::new_v4(),
crate::executor::SourceRange::default(),
kittycad::types::ModelingCmd::TakeSnapshot {
format: kittycad::types::ImageFormat::Png,
},
)
.await
.unwrap();
let output_file =
std::env::temp_dir().join(format!("kcl_output_{}.png", uuid::Uuid::new_v4()));
if let kittycad::types::OkWebSocketResponseData::Modeling {
modeling_response: kittycad::types::OkModelingCmdResponse::TakeSnapshot { data },
} = &resp
{
std::fs::write(&output_file, &data.contents.0).unwrap();
} else {
panic!("Unexpected response from engine: {:?}", resp);
}
let actual = image::io::Reader::open(output_file)
.unwrap()
.decode()
.unwrap();
twenty_twenty::assert_image(
&format!("tests/outputs/{}.png", "serial_test_example_import0"),
&actual,
1.0,
);
}
#[tokio::test(flavor = "multi_thread")]
#[ignore]
async fn test_mock_example_import1() {
let tokens = crate::token::lexer("This is code.\nIt does other shit.\nimport").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext {
engine: std::sync::Arc::new(Box::new(
crate::engine::conn_mock::EngineConnection::new()
.await
.unwrap(),
)),
fs: std::sync::Arc::new(crate::fs::FileManager::new()),
stdlib: std::sync::Arc::new(crate::std::StdLib::new()),
settings: Default::default(),
is_mock: true,
};
ctx.run(program, None).await.unwrap();
}
#[tokio::test(flavor = "multi_thread", worker_threads = 5)]
#[ignore]
async fn serial_test_example_import1() {
let user_agent = concat!(env!("CARGO_PKG_NAME"), ".rs/", env!("CARGO_PKG_VERSION"),);
let http_client = reqwest::Client::builder()
.user_agent(user_agent)
.timeout(std::time::Duration::from_secs(600))
.connect_timeout(std::time::Duration::from_secs(60));
let ws_client = reqwest::Client::builder()
.user_agent(user_agent)
.timeout(std::time::Duration::from_secs(600))
.connect_timeout(std::time::Duration::from_secs(60))
.connection_verbose(true)
.tcp_keepalive(std::time::Duration::from_secs(600))
.http1_only();
let token = std::env::var("KITTYCAD_API_TOKEN").expect("KITTYCAD_API_TOKEN not set");
let mut client = kittycad::Client::new_from_reqwest(token, http_client, ws_client);
if let Ok(addr) = std::env::var("LOCAL_ENGINE_ADDR") {
client.set_base_url(addr);
}
let tokens = crate::token::lexer("This is code.\nIt does other shit.\nimport").unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let ctx = crate::executor::ExecutorContext::new(&client, Default::default())
.await
.unwrap();
ctx.run(program, None).await.unwrap();
ctx.engine
.send_modeling_cmd(
uuid::Uuid::new_v4(),
crate::executor::SourceRange::default(),
kittycad::types::ModelingCmd::ZoomToFit {
object_ids: Default::default(),
padding: 0.1,
},
)
.await
.unwrap();
let resp = ctx
.engine
.send_modeling_cmd(
uuid::Uuid::new_v4(),
crate::executor::SourceRange::default(),
kittycad::types::ModelingCmd::TakeSnapshot {
format: kittycad::types::ImageFormat::Png,
},
)
.await
.unwrap();
let output_file =
std::env::temp_dir().join(format!("kcl_output_{}.png", uuid::Uuid::new_v4()));
if let kittycad::types::OkWebSocketResponseData::Modeling {
modeling_response: kittycad::types::OkModelingCmdResponse::TakeSnapshot { data },
} = &resp
{
std::fs::write(&output_file, &data.contents.0).unwrap();
} else {
panic!("Unexpected response from engine: {:?}", resp);
}
let actual = image::io::Reader::open(output_file)
.unwrap()
.decode()
.unwrap();
twenty_twenty::assert_image(
&format!("tests/outputs/{}.png", "serial_test_example_import1"),
&actual,
1.0,
);
}
}
#[allow(non_camel_case_types, missing_docs)]
#[doc = "Std lib function: import\nThis is some function.\nIt does shit."]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, schemars :: JsonSchema, ts_rs :: TS)]
#[ts(export)]
pub(crate) struct Import {}
#[allow(non_upper_case_globals, missing_docs)]
#[doc = "Std lib function: import\nThis is some function.\nIt does shit."]
pub(crate) const Import: Import = Import {};
fn boxed_import(
args: crate::std::Args,
) -> std::pin::Pin<
Box<
dyn std::future::Future<
Output = anyhow::Result<crate::executor::MemoryItem, crate::errors::KclError>,
> + Send,
>,
> {
Box::pin(import(args))
}
impl crate::docs::StdLibFn for Import {
fn name(&self) -> String {
"import".to_string()
}
fn summary(&self) -> String {
"This is some function.".to_string()
}
fn description(&self) -> String {
"It does shit.".to_string()
}
fn tags(&self) -> Vec<String> {
vec!["norun".to_string()]
}
fn args(&self) -> Vec<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = true;
let mut generator = schemars::gen::SchemaGenerator::new(settings);
vec![crate::docs::StdLibFnArg {
name: "args".to_string(),
type_: "kittycad::types::InputFormat".to_string(),
schema: <Option<kittycad::types::InputFormat>>::json_schema(&mut generator),
required: false,
}]
}
fn return_value(&self) -> Option<crate::docs::StdLibFnArg> {
let mut settings = schemars::gen::SchemaSettings::openapi3();
settings.inline_subschemas = true;
let mut generator = schemars::gen::SchemaGenerator::new(settings);
Some(crate::docs::StdLibFnArg {
name: "".to_string(),
type_: "[SketchGroup]".to_string(),
schema: <Vec<SketchGroup>>::json_schema(&mut generator),
required: true,
})
}
fn unpublished(&self) -> bool {
false
}
fn deprecated(&self) -> bool {
false
}
fn examples(&self) -> Vec<String> {
let code_blocks = vec![
"This is another code block.\nyes sirrr.\nimport",
"This is code.\nIt does other shit.\nimport",
];
code_blocks
.iter()
.map(|cb| {
let tokens = crate::token::lexer(cb).unwrap();
let parser = crate::parser::Parser::new(tokens);
let program = parser.ast().unwrap();
let mut options: crate::ast::types::FormatOptions = Default::default();
options.insert_final_newline = false;
program.recast(&options, 0)
})
.collect::<Vec<String>>()
}
fn std_lib_fn(&self) -> crate::std::StdFn {
boxed_import
}
fn clone_box(&self) -> Box<dyn crate::docs::StdLibFn> {
Box::new(self.clone())
}
}
#[doc = r" This is some function."]
#[doc = r" It does shit."]
#[doc = r""]
#[doc = r" This is code."]
#[doc = r" It does other shit."]
#[doc = r" import"]
#[doc = r""]
#[doc = r" ```"]
#[doc = r" This is another code block."]
#[doc = r" yes sirrr."]
#[doc = r" import"]
#[doc = r" ```"]
fn inner_import(
#[doc = r" The args to do shit to."] args: Option<kittycad::types::InputFormat>,
) -> Result<Vec<Box<SketchGroup>>> {
args
}

View File

@ -129,27 +129,27 @@ pub async fn import(args: Args) -> Result<MemoryItem, KclError> {
/// not in browser. /// not in browser.
/// ///
/// ```no_run /// ```no_run
/// const model = import("thing.obj") /// const model = import("tests/inputs/cube.obj")
/// ``` /// ```
/// ///
/// ```no_run /// ```no_run
/// const model = import("cube.obj", {type: "obj", units: "m"}) /// const model = import("tests/inputs/cube.obj", {type: "obj", units: "m"})
/// ``` /// ```
/// ///
/// ```no_run /// ```no_run
/// const model = import("my_model.gltf") /// const model = import("tests/inputs/cube.gltf")
/// ``` /// ```
/// ///
/// ```no_run /// ```no_run
/// const model = import("my_model.sldprt") /// const model = import("tests/inputs/cube.sldprt")
/// ``` /// ```
/// ///
/// ```no_run /// ```no_run
/// const model = import("my_model.step") /// const model = import("tests/inputs/cube.step")
/// ``` /// ```
#[stdlib { #[stdlib {
name = "import", name = "import",
tags = ["norun"], tags = [],
}] }]
async fn inner_import( async fn inner_import(
file_path: String, file_path: String,
@ -163,6 +163,9 @@ async fn inner_import(
})); }));
} }
//print the current working directory
println!("Current working directory: {:?}", std::env::current_dir().unwrap());
// Make sure the file exists. // Make sure the file exists.
if !args.ctx.fs.exists(&file_path, args.source_range).await? { if !args.ctx.fs.exists(&file_path, args.source_range).await? {
return Err(KclError::Semantic(KclErrorDetails { return Err(KclError::Semantic(KclErrorDetails {

View File

@ -1058,9 +1058,7 @@ layout: manual
fn_docs.push_str("\n```\n\n"); fn_docs.push_str("\n```\n\n");
// If the function has tags, we should add them to the docs. // If the function has tags, we should add them to the docs.
let mut tags = internal_fn.tags().clone(); let tags = internal_fn.tags().clone();
// Remove norun tag from the list of tags.
tags.retain(|tag| tag != "norun");
if !tags.is_empty() { if !tags.is_empty() {
fn_docs.push_str("### Tags\n\n"); fn_docs.push_str("### Tags\n\n");
for tag in tags { for tag in tags {
@ -1079,9 +1077,7 @@ layout: manual
// If this is not a "utilities" function, // If this is not a "utilities" function,
// we should add the image to the docs. // we should add the image to the docs.
if !internal_fn.tags().contains(&"utilities".to_string()) if !internal_fn.tags().contains(&"utilities".to_string()) {
&& !internal_fn.tags().contains(&"norun".to_string())
{
// Get the path to this specific rust file. // Get the path to this specific rust file.
let dir = env!("CARGO_MANIFEST_DIR"); let dir = env!("CARGO_MANIFEST_DIR");

View File

@ -0,0 +1,108 @@
{
"asset": {
"generator": "Khronos glTF Blender I/O v3.4.50",
"version": "2.0"
},
"scene": 0,
"scenes": [
{
"name": "Scene",
"nodes": [0]
}
],
"nodes": [
{
"mesh": 0,
"name": "Cube"
}
],
"materials": [
{
"doubleSided": true,
"name": "Material",
"pbrMetallicRoughness": {
"baseColorFactor": [
0.800000011920929, 0.800000011920929, 0.800000011920929, 1
],
"metallicFactor": 0,
"roughnessFactor": 0.5
}
}
],
"meshes": [
{
"name": "Cube",
"primitives": [
{
"attributes": {
"POSITION": 0,
"TEXCOORD_0": 1,
"NORMAL": 2
},
"indices": 3,
"material": 0
}
]
}
],
"accessors": [
{
"bufferView": 0,
"componentType": 5126,
"count": 24,
"max": [1, 1, 1],
"min": [-1, -1, -1],
"type": "VEC3"
},
{
"bufferView": 1,
"componentType": 5126,
"count": 24,
"type": "VEC2"
},
{
"bufferView": 2,
"componentType": 5126,
"count": 24,
"type": "VEC3"
},
{
"bufferView": 3,
"componentType": 5123,
"count": 36,
"type": "SCALAR"
}
],
"bufferViews": [
{
"buffer": 0,
"byteLength": 288,
"byteOffset": 0,
"target": 34962
},
{
"buffer": 0,
"byteLength": 192,
"byteOffset": 288,
"target": 34962
},
{
"buffer": 0,
"byteLength": 288,
"byteOffset": 480,
"target": 34962
},
{
"buffer": 0,
"byteLength": 72,
"byteOffset": 768,
"target": 34963
}
],
"buffers": [
{
"byteLength": 840,
"uri": "data:application/octet-stream;base64,AACAPwAAgD8AAIC/AACAPwAAgD8AAIC/AACAPwAAgD8AAIC/AACAPwAAgL8AAIC/AACAPwAAgL8AAIC/AACAPwAAgL8AAIC/AACAPwAAgD8AAIA/AACAPwAAgD8AAIA/AACAPwAAgD8AAIA/AACAPwAAgL8AAIA/AACAPwAAgL8AAIA/AACAPwAAgL8AAIA/AACAvwAAgD8AAIC/AACAvwAAgD8AAIC/AACAvwAAgD8AAIC/AACAvwAAgL8AAIC/AACAvwAAgL8AAIC/AACAvwAAgL8AAIC/AACAvwAAgD8AAIA/AACAvwAAgD8AAIA/AACAvwAAgD8AAIA/AACAvwAAgL8AAIA/AACAvwAAgL8AAIA/AACAvwAAgL8AAIA/AAAgPwAAAD8AACA/AAAAPwAAID8AAAA/AADAPgAAAD8AAMA+AAAAPwAAwD4AAAA/AAAgPwAAgD4AACA/AACAPgAAID8AAIA+AADAPgAAgD4AAMA+AACAPgAAwD4AAIA+AAAgPwAAQD8AACA/AABAPwAAYD8AAAA/AAAAPgAAAD8AAMA+AABAPwAAwD4AAEA/AAAgPwAAAAAAACA/AACAPwAAYD8AAIA+AAAAPgAAgD4AAMA+AAAAAAAAwD4AAIA/AAAAAAAAAAAAAIC/AAAAAAAAgD8AAACAAACAPwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIC/AACAPwAAAAAAAACAAAAAAAAAAAAAAIA/AAAAAAAAgD8AAACAAACAPwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIA/AACAPwAAAAAAAACAAACAvwAAAAAAAACAAAAAAAAAAAAAAIC/AAAAAAAAgD8AAACAAAAAAAAAgL8AAACAAACAvwAAAAAAAACAAAAAAAAAAAAAAIC/AAAAAAAAAAAAAIA/AACAvwAAAAAAAACAAAAAAAAAgD8AAACAAAAAAAAAgL8AAACAAAAAAAAAAAAAAIA/AACAvwAAAAAAAACAAQAOABQAAQAUAAcACgAGABIACgASABYAFwATAAwAFwAMABAADwADAAkADwAJABUABQACAAgABQAIAAsAEQANAAAAEQAAAAQA"
}
]
}

View File

@ -0,0 +1,12 @@
# Blender MTL File: 'None'
# Material Count: 1
newmtl Material
Ns 359.999993
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2

Binary file not shown.

View File

@ -0,0 +1,254 @@
ISO-10303-21;
HEADER;
FILE_DESCRIPTION (( 'STEP AP203' ),
'1' );
FILE_NAME ('Cube_1m.STEP',
'2023-07-31T15:10:19',
( '' ),
( '' ),
'SwSTEP 2.0',
'SolidWorks 2023',
'' );
FILE_SCHEMA (( 'CONFIG_CONTROL_DESIGN' ));
ENDSEC;
DATA;
#1 = AXIS2_PLACEMENT_3D ( 'NONE', #133, #116, #72 ) ;
#2 =( LENGTH_UNIT ( ) NAMED_UNIT ( * ) SI_UNIT ( .MILLI., .METRE. ) );
#3 = FACE_OUTER_BOUND ( 'NONE', #99, .T. ) ;
#4 = CARTESIAN_POINT ( 'NONE', ( 500.0000000000000000, 1000.000000000000000, -500.0000000000000000 ) ) ;
#5 = VECTOR ( 'NONE', #233, 1000.000000000000000 ) ;
#6 = ORIENTED_EDGE ( 'NONE', *, *, #15, .T. ) ;
#7 = DIRECTION ( 'NONE', ( -0.000000000000000000, -1.000000000000000000, -0.000000000000000000 ) ) ;
#8 = ORIENTED_EDGE ( 'NONE', *, *, #75, .T. ) ;
#9 = VECTOR ( 'NONE', #205, 1000.000000000000000 ) ;
#10 = LOCAL_TIME ( 11, 10, 19.00000000000000000, #88 ) ;
#11 = PLANE ( 'NONE', #220 ) ;
#12 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 1000.000000000000000, 500.0000000000000000 ) ) ;
#13 = DIRECTION ( 'NONE', ( -0.000000000000000000, -1.000000000000000000, -0.000000000000000000 ) ) ;
#14 = CARTESIAN_POINT ( 'NONE', ( 500.0000000000000000, 1000.000000000000000, -500.0000000000000000 ) ) ;
#15 = EDGE_CURVE ( 'NONE', #40, #58, #139, .T. ) ;
#16 = CALENDAR_DATE ( 2023, 31, 7 ) ;
#17 = AXIS2_PLACEMENT_3D ( 'NONE', #175, #73, #126 ) ;
#18 = PERSON_AND_ORGANIZATION ( #134, #228 ) ;
#19 = PLANE ( 'NONE', #145 ) ;
#20 = PERSON_AND_ORGANIZATION ( #134, #228 ) ;
#21 =( GEOMETRIC_REPRESENTATION_CONTEXT ( 3 ) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT ( ( #152 ) ) GLOBAL_UNIT_ASSIGNED_CONTEXT ( ( #2, #168, #174 ) ) REPRESENTATION_CONTEXT ( 'NONE', 'WORKASPACE' ) );
#22 = FACE_OUTER_BOUND ( 'NONE', #137, .T. ) ;
#23 = PRODUCT_DEFINITION ( 'UNKNOWN', '', #51, #86 ) ;
#24 = DIRECTION ( 'NONE', ( 0.000000000000000000, 0.000000000000000000, -1.000000000000000000 ) ) ;
#25 = APPLICATION_PROTOCOL_DEFINITION ( 'international standard', 'config_control_design', 1994, #59 ) ;
#26 = PLANE ( 'NONE', #17 ) ;
#27 = EDGE_LOOP ( 'NONE', ( #141, #8, #121, #123 ) ) ;
#28 = CARTESIAN_POINT ( 'NONE', ( 500.0000000000000000, 1000.000000000000000, -500.0000000000000000 ) ) ;
#29 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 0.000000000000000000, -500.0000000000000000 ) ) ;
#30 = FACE_OUTER_BOUND ( 'NONE', #78, .T. ) ;
#31 = LINE ( 'NONE', #183, #179 ) ;
#32 = PLANE ( 'NONE', #173 ) ;
#33 = VECTOR ( 'NONE', #44, 1000.000000000000000 ) ;
#34 = DATE_AND_TIME ( #16, #224 ) ;
#35 = ADVANCED_FACE ( 'NONE', ( #198 ), #26, .T. ) ;
#36 = CALENDAR_DATE ( 2023, 31, 7 ) ;
#37 = VECTOR ( 'NONE', #61, 1000.000000000000000 ) ;
#38 = CC_DESIGN_APPROVAL ( #210, ( #51 ) ) ;
#39 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 1000.000000000000000, 500.0000000000000000 ) ) ;
#40 = VERTEX_POINT ( 'NONE', #98 ) ;
#41 = ORIENTED_EDGE ( 'NONE', *, *, #119, .F. ) ;
#42 = ORIENTED_EDGE ( 'NONE', *, *, #69, .T. ) ;
#43 = CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT ( #167, #188, ( #180 ) ) ;
#44 = DIRECTION ( 'NONE', ( 0.000000000000000000, 0.000000000000000000, 1.000000000000000000 ) ) ;
#45 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 0.000000000000000000, 500.0000000000000000 ) ) ;
#46 = APPLICATION_CONTEXT ( 'configuration controlled 3d designs of mechanical parts and assemblies' ) ;
#47 = LINE ( 'NONE', #203, #101 ) ;
#48 = ORIENTED_EDGE ( 'NONE', *, *, #144, .F. ) ;
#49 = CARTESIAN_POINT ( 'NONE', ( 500.0000000000000000, 0.000000000000000000, 500.0000000000000000 ) ) ;
#50 = CARTESIAN_POINT ( 'NONE', ( 500.0000000000000000, 1000.000000000000000, 500.0000000000000000 ) ) ;
#51 = PRODUCT_DEFINITION_FORMATION_WITH_SPECIFIED_SOURCE ( 'ANY', '', #68, .NOT_KNOWN. ) ;
#52 = DATE_AND_TIME ( #110, #186 ) ;
#53 = CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT ( #192, #92, ( #68 ) ) ;
#54 = DATE_AND_TIME ( #117, #90 ) ;
#55 = VECTOR ( 'NONE', #209, 1000.000000000000000 ) ;
#56 = PLANE ( 'NONE', #129 ) ;
#57 = VERTEX_POINT ( 'NONE', #127 ) ;
#58 = VERTEX_POINT ( 'NONE', #49 ) ;
#59 = APPLICATION_CONTEXT ( 'configuration controlled 3d designs of mechanical parts and assemblies' ) ;
#60 = EDGE_CURVE ( 'NONE', #57, #80, #185, .T. ) ;
#61 = DIRECTION ( 'NONE', ( -0.000000000000000000, -1.000000000000000000, -0.000000000000000000 ) ) ;
#62 = ORIENTED_EDGE ( 'NONE', *, *, #211, .F. ) ;
#63 = LINE ( 'NONE', #232, #236 ) ;
#64 = ORIENTED_EDGE ( 'NONE', *, *, #96, .F. ) ;
#65 = CARTESIAN_POINT ( 'NONE', ( 500.0000000000000000, 0.000000000000000000, -500.0000000000000000 ) ) ;
#66 = PLANE ( 'NONE', #70 ) ;
#67 = CLOSED_SHELL ( 'NONE', ( #226, #164, #169, #234, #35, #219 ) ) ;
#68 = PRODUCT ( 'Cube_1m', 'Cube_1m', '', ( #155 ) ) ;
#69 = EDGE_CURVE ( 'NONE', #80, #120, #31, .T. ) ;
#70 = AXIS2_PLACEMENT_3D ( 'NONE', #138, #105, #217 ) ;
#71 = DATE_AND_TIME ( #172, #194 ) ;
#72 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, 0.000000000000000000 ) ) ;
#73 = DIRECTION ( 'NONE', ( 0.000000000000000000, 1.000000000000000000, 0.000000000000000000 ) ) ;
#74 = VERTEX_POINT ( 'NONE', #124 ) ;
#75 = EDGE_CURVE ( 'NONE', #80, #135, #81, .T. ) ;
#76 = LINE ( 'NONE', #50, #170 ) ;
#77 = CC_DESIGN_APPROVAL ( #166, ( #23 ) ) ;
#78 = EDGE_LOOP ( 'NONE', ( #97, #199, #230, #42 ) ) ;
#79 = CARTESIAN_POINT ( 'NONE', ( 0.000000000000000000, 0.000000000000000000, 0.000000000000000000 ) ) ;
#80 = VERTEX_POINT ( 'NONE', #28 ) ;
#81 = LINE ( 'NONE', #103, #85 ) ;
#82 = DIRECTION ( 'NONE', ( -1.000000000000000000, -0.000000000000000000, -0.000000000000000000 ) ) ;
#83 = CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT ( #93, #115, ( #23 ) ) ;
#84 = APPROVAL_DATE_TIME ( #112, #210 ) ;
#85 = VECTOR ( 'NONE', #82, 1000.000000000000000 ) ;
#86 = DESIGN_CONTEXT ( 'detailed design', #59, 'design' ) ;
#87 = APPROVAL_STATUS ( 'not_yet_approved' ) ;
#88 = COORDINATED_UNIVERSAL_TIME_OFFSET ( 5, 0, .BEHIND. ) ;
#89 = COORDINATED_UNIVERSAL_TIME_OFFSET ( 5, 0, .BEHIND. ) ;
#90 = LOCAL_TIME ( 11, 10, 19.00000000000000000, #154 ) ;
#91 = PERSON_AND_ORGANIZATION ( #134, #228 ) ;
#92 = PERSON_AND_ORGANIZATION_ROLE ( 'design_owner' ) ;
#93 = PERSON_AND_ORGANIZATION ( #134, #228 ) ;
#94 = APPLICATION_PROTOCOL_DEFINITION ( 'international standard', 'config_control_design', 1994, #46 ) ;
#95 = APPROVAL ( #87, 'UNSPECIFIED' ) ;
#96 = EDGE_CURVE ( 'NONE', #74, #57, #162, .T. ) ;
#97 = ORIENTED_EDGE ( 'NONE', *, *, #144, .T. ) ;
#98 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 0.000000000000000000, 500.0000000000000000 ) ) ;
#99 = EDGE_LOOP ( 'NONE', ( #6, #125, #64, #118 ) ) ;
#100 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, -0.000000000000000000 ) ) ;
#101 = VECTOR ( 'NONE', #204, 1000.000000000000000 ) ;
#102 = EDGE_LOOP ( 'NONE', ( #178, #202, #41, #48 ) ) ;
#103 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 1000.000000000000000, -500.0000000000000000 ) ) ;
#104 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 1000.000000000000000, -500.0000000000000000 ) ) ;
#105 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, 0.000000000000000000 ) ) ;
#106 = PRODUCT_RELATED_PRODUCT_CATEGORY ( 'detail', '', ( #68 ) ) ;
#107 = EDGE_CURVE ( 'NONE', #135, #215, #140, .T. ) ;
#108 = CC_DESIGN_APPROVAL ( #95, ( #180 ) ) ;
#109 = SHAPE_DEFINITION_REPRESENTATION ( #146, #222 ) ;
#110 = CALENDAR_DATE ( 2023, 31, 7 ) ;
#111 = PERSON_AND_ORGANIZATION ( #134, #228 ) ;
#112 = DATE_AND_TIME ( #36, #10 ) ;
#113 = APPROVAL_PERSON_ORGANIZATION ( #18, #95, #130 ) ;
#114 = APPROVAL_PERSON_ORGANIZATION ( #111, #210, #132 ) ;
#115 = PERSON_AND_ORGANIZATION_ROLE ( 'creator' ) ;
#116 = DIRECTION ( 'NONE', ( 0.000000000000000000, 0.000000000000000000, 1.000000000000000000 ) ) ;
#117 = CALENDAR_DATE ( 2023, 31, 7 ) ;
#118 = ORIENTED_EDGE ( 'NONE', *, *, #128, .T. ) ;
#119 = EDGE_CURVE ( 'NONE', #215, #40, #63, .T. ) ;
#120 = VERTEX_POINT ( 'NONE', #159 ) ;
#121 = ORIENTED_EDGE ( 'NONE', *, *, #211, .T. ) ;
#122 = DIRECTION ( 'NONE', ( 0.000000000000000000, 0.000000000000000000, 1.000000000000000000 ) ) ;
#123 = ORIENTED_EDGE ( 'NONE', *, *, #96, .T. ) ;
#124 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 1000.000000000000000, 500.0000000000000000 ) ) ;
#125 = ORIENTED_EDGE ( 'NONE', *, *, #189, .F. ) ;
#126 = DIRECTION ( 'NONE', ( 0.000000000000000000, -0.000000000000000000, 1.000000000000000000 ) ) ;
#127 = CARTESIAN_POINT ( 'NONE', ( 500.0000000000000000, 1000.000000000000000, 500.0000000000000000 ) ) ;
#128 = EDGE_CURVE ( 'NONE', #74, #40, #142, .T. ) ;
#129 = AXIS2_PLACEMENT_3D ( 'NONE', #4, #195, #171 ) ;
#130 = APPROVAL_ROLE ( '' ) ;
#131 = APPROVAL_DATE_TIME ( #71, #166 ) ;
#132 = APPROVAL_ROLE ( '' ) ;
#133 = CARTESIAN_POINT ( 'NONE', ( 0.000000000000000000, 0.000000000000000000, 0.000000000000000000 ) ) ;
#134 = PERSON ( 'UNSPECIFIED', 'UNSPECIFIED', 'UNSPECIFIED', ('UNSPECIFIED'), ('UNSPECIFIED'), ('UNSPECIFIED') ) ;
#135 = VERTEX_POINT ( 'NONE', #214 ) ;
#136 = APPROVAL_PERSON_ORGANIZATION ( #91, #166, #151 ) ;
#137 = EDGE_LOOP ( 'NONE', ( #158, #176, #157, #212 ) ) ;
#138 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 1000.000000000000000, -500.0000000000000000 ) ) ;
#139 = LINE ( 'NONE', #45, #55 ) ;
#140 = LINE ( 'NONE', #177, #37 ) ;
#141 = ORIENTED_EDGE ( 'NONE', *, *, #60, .T. ) ;
#142 = LINE ( 'NONE', #231, #193 ) ;
#143 = FACE_OUTER_BOUND ( 'NONE', #227, .T. ) ;
#144 = EDGE_CURVE ( 'NONE', #120, #215, #47, .T. ) ;
#145 = AXIS2_PLACEMENT_3D ( 'NONE', #39, #24, #207 ) ;
#146 = PRODUCT_DEFINITION_SHAPE ( 'NONE', 'NONE', #23 ) ;
#147 = PERSON_AND_ORGANIZATION_ROLE ( 'creator' ) ;
#148 = CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT ( #165, #147, ( #51 ) ) ;
#149 = DATE_TIME_ROLE ( 'classification_date' ) ;
#150 = EDGE_CURVE ( 'NONE', #58, #120, #163, .T. ) ;
#151 = APPROVAL_ROLE ( '' ) ;
#152 = UNCERTAINTY_MEASURE_WITH_UNIT (LENGTH_MEASURE( 1.000000000000000082E-05 ), #2, 'distance_accuracy_value', 'NONE');
#153 = CC_DESIGN_SECURITY_CLASSIFICATION ( #180, ( #51 ) ) ;
#154 = COORDINATED_UNIVERSAL_TIME_OFFSET ( 5, 0, .BEHIND. ) ;
#155 = MECHANICAL_CONTEXT ( 'NONE', #46, 'mechanical' ) ;
#156 = VECTOR ( 'NONE', #229, 1000.000000000000000 ) ;
#157 = ORIENTED_EDGE ( 'NONE', *, *, #60, .F. ) ;
#158 = ORIENTED_EDGE ( 'NONE', *, *, #150, .T. ) ;
#159 = CARTESIAN_POINT ( 'NONE', ( 500.0000000000000000, 0.000000000000000000, -500.0000000000000000 ) ) ;
#160 = ORIENTED_EDGE ( 'NONE', *, *, #119, .T. ) ;
#161 = DIRECTION ( 'NONE', ( 0.000000000000000000, 1.000000000000000000, 0.000000000000000000 ) ) ;
#162 = LINE ( 'NONE', #12, #9 ) ;
#163 = LINE ( 'NONE', #65, #5 ) ;
#164 = ADVANCED_FACE ( 'NONE', ( #30 ), #32, .F. ) ;
#165 = PERSON_AND_ORGANIZATION ( #134, #228 ) ;
#166 = APPROVAL ( #196, 'UNSPECIFIED' ) ;
#167 = PERSON_AND_ORGANIZATION ( #134, #228 ) ;
#168 =( NAMED_UNIT ( * ) PLANE_ANGLE_UNIT ( ) SI_UNIT ( $, .RADIAN. ) );
#169 = ADVANCED_FACE ( 'NONE', ( #143 ), #66, .F. ) ;
#170 = VECTOR ( 'NONE', #7, 1000.000000000000000 ) ;
#171 = DIRECTION ( 'NONE', ( 0.000000000000000000, 0.000000000000000000, 1.000000000000000000 ) ) ;
#172 = CALENDAR_DATE ( 2023, 31, 7 ) ;
#173 = AXIS2_PLACEMENT_3D ( 'NONE', #104, #184, #100 ) ;
#174 =( NAMED_UNIT ( * ) SI_UNIT ( $, .STERADIAN. ) SOLID_ANGLE_UNIT ( ) );
#175 = CARTESIAN_POINT ( 'NONE', ( 0.000000000000000000, 1000.000000000000000, 0.000000000000000000 ) ) ;
#176 = ORIENTED_EDGE ( 'NONE', *, *, #69, .F. ) ;
#177 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 1000.000000000000000, -500.0000000000000000 ) ) ;
#178 = ORIENTED_EDGE ( 'NONE', *, *, #150, .F. ) ;
#179 = VECTOR ( 'NONE', #13, 1000.000000000000000 ) ;
#180 = SECURITY_CLASSIFICATION ( '', '', #223 ) ;
#181 = FACE_OUTER_BOUND ( 'NONE', #102, .T. ) ;
#182 = ORIENTED_EDGE ( 'NONE', *, *, #107, .T. ) ;
#183 = CARTESIAN_POINT ( 'NONE', ( 500.0000000000000000, 1000.000000000000000, -500.0000000000000000 ) ) ;
#184 = DIRECTION ( 'NONE', ( 0.000000000000000000, 0.000000000000000000, 1.000000000000000000 ) ) ;
#185 = LINE ( 'NONE', #14, #156 ) ;
#186 = LOCAL_TIME ( 11, 10, 19.00000000000000000, #221 ) ;
#187 = CC_DESIGN_DATE_AND_TIME_ASSIGNMENT ( #54, #197, ( #23 ) ) ;
#188 = PERSON_AND_ORGANIZATION_ROLE ( 'classification_officer' ) ;
#189 = EDGE_CURVE ( 'NONE', #57, #58, #76, .T. ) ;
#190 = APPROVAL_STATUS ( 'not_yet_approved' ) ;
#191 = PERSON_AND_ORGANIZATION_ROLE ( 'design_supplier' ) ;
#192 = PERSON_AND_ORGANIZATION ( #134, #228 ) ;
#193 = VECTOR ( 'NONE', #216, 1000.000000000000000 ) ;
#194 = LOCAL_TIME ( 11, 10, 19.00000000000000000, #208 ) ;
#195 = DIRECTION ( 'NONE', ( -1.000000000000000000, 0.000000000000000000, 0.000000000000000000 ) ) ;
#196 = APPROVAL_STATUS ( 'not_yet_approved' ) ;
#197 = DATE_TIME_ROLE ( 'creation_date' ) ;
#198 = FACE_OUTER_BOUND ( 'NONE', #27, .T. ) ;
#199 = ORIENTED_EDGE ( 'NONE', *, *, #107, .F. ) ;
#200 = ORIENTED_EDGE ( 'NONE', *, *, #128, .F. ) ;
#201 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 1000.000000000000000, -500.0000000000000000 ) ) ;
#202 = ORIENTED_EDGE ( 'NONE', *, *, #15, .F. ) ;
#203 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 0.000000000000000000, -500.0000000000000000 ) ) ;
#204 = DIRECTION ( 'NONE', ( -1.000000000000000000, -0.000000000000000000, -0.000000000000000000 ) ) ;
#205 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, 0.000000000000000000 ) ) ;
#206 = DIRECTION ( 'NONE', ( 0.000000000000000000, -0.000000000000000000, 1.000000000000000000 ) ) ;
#207 = DIRECTION ( 'NONE', ( -1.000000000000000000, 0.000000000000000000, -0.000000000000000000 ) ) ;
#208 = COORDINATED_UNIVERSAL_TIME_OFFSET ( 5, 0, .BEHIND. ) ;
#209 = DIRECTION ( 'NONE', ( 1.000000000000000000, 0.000000000000000000, 0.000000000000000000 ) ) ;
#210 = APPROVAL ( #190, 'UNSPECIFIED' ) ;
#211 = EDGE_CURVE ( 'NONE', #135, #74, #213, .T. ) ;
#212 = ORIENTED_EDGE ( 'NONE', *, *, #189, .T. ) ;
#213 = LINE ( 'NONE', #201, #33 ) ;
#214 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 1000.000000000000000, -500.0000000000000000 ) ) ;
#215 = VERTEX_POINT ( 'NONE', #29 ) ;
#216 = DIRECTION ( 'NONE', ( -0.000000000000000000, -1.000000000000000000, -0.000000000000000000 ) ) ;
#217 = DIRECTION ( 'NONE', ( 0.000000000000000000, 0.000000000000000000, -1.000000000000000000 ) ) ;
#218 = CC_DESIGN_DATE_AND_TIME_ASSIGNMENT ( #52, #149, ( #180 ) ) ;
#219 = ADVANCED_FACE ( 'NONE', ( #181 ), #11, .F. ) ;
#220 = AXIS2_PLACEMENT_3D ( 'NONE', #79, #161, #206 ) ;
#221 = COORDINATED_UNIVERSAL_TIME_OFFSET ( 5, 0, .BEHIND. ) ;
#222 = ADVANCED_BREP_SHAPE_REPRESENTATION ( 'Cube_1m', ( #235, #1 ), #21 ) ;
#223 = SECURITY_CLASSIFICATION_LEVEL ( 'unclassified' ) ;
#224 = LOCAL_TIME ( 11, 10, 19.00000000000000000, #89 ) ;
#225 = CC_DESIGN_PERSON_AND_ORGANIZATION_ASSIGNMENT ( #20, #191, ( #51 ) ) ;
#226 = ADVANCED_FACE ( 'NONE', ( #22 ), #56, .F. ) ;
#227 = EDGE_LOOP ( 'NONE', ( #160, #200, #62, #182 ) ) ;
#228 = ORGANIZATION ( 'UNSPECIFIED', 'UNSPECIFIED', '' ) ;
#229 = DIRECTION ( 'NONE', ( -0.000000000000000000, -0.000000000000000000, -1.000000000000000000 ) ) ;
#230 = ORIENTED_EDGE ( 'NONE', *, *, #75, .F. ) ;
#231 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 1000.000000000000000, 500.0000000000000000 ) ) ;
#232 = CARTESIAN_POINT ( 'NONE', ( -500.0000000000000000, 0.000000000000000000, -500.0000000000000000 ) ) ;
#233 = DIRECTION ( 'NONE', ( -0.000000000000000000, -0.000000000000000000, -1.000000000000000000 ) ) ;
#234 = ADVANCED_FACE ( 'NONE', ( #3 ), #19, .F. ) ;
#235 = MANIFOLD_SOLID_BREP ( 'Boss-Extrude1', #67 ) ;
#236 = VECTOR ( 'NONE', #122, 1000.000000000000000 ) ;
#237 = APPROVAL_DATE_TIME ( #34, #95 ) ;
ENDSEC;
END-ISO-10303-21;

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB