[{"data":1,"prerenderedAt":296},["ShallowReactive",2],{"branding":3,"navigation":11,"social":38,"\u002Fdocs\u002Fexamples\u002Fplanes-and-frames":57,"\u002Fdocs\u002Fexamples\u002Fplanes-and-frames-python":209,"\u002Fdocs\u002Fexamples\u002Fplanes-and-frames-surround":210,"docs-navigation":219},{"id":4,"title":5,"description":6,"extension":7,"meta":8,"stem":9,"__hash__":10},"branding\u002Fbranding.yml","COMPAS","The Progressive Python Framework for AEC","yml",{},"branding","RZe_zlUXQhPN3ap5X6d0zUmiqalxe1ZFVRnIsmTB9VU",{"id":12,"title":13,"extension":7,"items":14,"meta":35,"stem":36,"__hash__":37},"navigation\u002Fnavigation.yml","Main Navigation",[15,19,23,27,31],{"label":16,"icon":17,"to":18},"Docs","i-heroicons-book-open","\u002Fdocs\u002Foverview\u002Fintroduction",{"label":20,"icon":21,"to":22},"Packages","i-heroicons-puzzle-piece","\u002Fpackages",{"label":24,"icon":25,"to":26},"Association","i-heroicons-users","\u002Fassociation",{"label":28,"to":29,"icon":30},"News","\u002Fnews","i-heroicons-newspaper",{"label":32,"icon":33,"to":34},"Forum","i-heroicons-chat-bubble-left-right","https:\u002F\u002Fforum.compas-framework.org\u002F",{},"navigation","0jaKadsuS1w-R-2CifQeF-7No6HqrVyF7jIP80oFYoM",{"id":39,"title":40,"extension":7,"items":41,"meta":54,"stem":55,"__hash__":56},"social\u002Fsocial.yml","Social Media",[42,46,50],{"label":43,"to":44,"icon":45},"GitHub","https:\u002F\u002Fgithub.com\u002Fcompas-dev","i-simple-icons-github",{"label":47,"to":48,"icon":49},"X","https:\u002F\u002Fx.com\u002Fcompas_dev","i-simple-icons-x",{"label":51,"to":52,"icon":53},"LinkedIn","https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Fcompas-association","i-simple-icons-linkedin",{},"social","495juwkNU0wtE_8lwERDZNWQES5uWYuMK_Wa6cQ9Wxg",{"id":58,"title":59,"body":60,"description":201,"extension":202,"headline":203,"meta":204,"navigation":112,"path":205,"seo":206,"stem":207,"__hash__":208},"docs\u002Fdocs\u002F3.examples\u002F3.planes-and-frames.md","Planes and frames",{"type":61,"value":62,"toc":198},"minimark",[63,78,83,184,194],[64,65,66,67,71,72,77],"p",{},"A plane is a point and a normal. A frame adds two axes, which makes it a full local coordinate system. This example builds a box on the world XY frame and moves it onto a tilted frame. It needs ",[68,69,70],"code",{},"compas_viewer","; see ",[73,74,76],"a",{"href":75},"\u002Fdocs\u002Fexamples\u002Fbox","Making a box"," to install it.",[79,80,82],"h2",{"id":81},"the-script","The script",[84,85,91],"pre",{"className":86,"code":87,"filename":88,"language":89,"meta":90,"style":90},"language-python shiki shiki-themes github-dark","from compas.geometry import Box, Frame, Plane, Transformation\nfrom compas_viewer import Viewer\n\nplane = Plane([0, 0, 0], [0, 0, 1])\nsource = Frame.from_plane(plane)\ntarget = Frame([4, 2, 1], [1, 1, 0], [-1, 1, 1])\n\nbox = Box(1, 1, 2, frame=source)\nX = Transformation.from_frame_to_frame(source, target)\nmoved = box.transformed(X)\n\nviewer = Viewer()\nfor obj in (source, target, box.to_mesh(), moved.to_mesh()):\n    viewer.scene.add(obj)\nviewer.show()\n","planes_and_frames.py","python","",[68,92,93,101,107,114,120,126,132,137,143,149,155,160,166,172,178],{"__ignoreMap":90},[94,95,98],"span",{"class":96,"line":97},"line",1,[94,99,100],{},"from compas.geometry import Box, Frame, Plane, Transformation\n",[94,102,104],{"class":96,"line":103},2,[94,105,106],{},"from compas_viewer import Viewer\n",[94,108,110],{"class":96,"line":109},3,[94,111,113],{"emptyLinePlaceholder":112},true,"\n",[94,115,117],{"class":96,"line":116},4,[94,118,119],{},"plane = Plane([0, 0, 0], [0, 0, 1])\n",[94,121,123],{"class":96,"line":122},5,[94,124,125],{},"source = Frame.from_plane(plane)\n",[94,127,129],{"class":96,"line":128},6,[94,130,131],{},"target = Frame([4, 2, 1], [1, 1, 0], [-1, 1, 1])\n",[94,133,135],{"class":96,"line":134},7,[94,136,113],{"emptyLinePlaceholder":112},[94,138,140],{"class":96,"line":139},8,[94,141,142],{},"box = Box(1, 1, 2, frame=source)\n",[94,144,146],{"class":96,"line":145},9,[94,147,148],{},"X = Transformation.from_frame_to_frame(source, target)\n",[94,150,152],{"class":96,"line":151},10,[94,153,154],{},"moved = box.transformed(X)\n",[94,156,158],{"class":96,"line":157},11,[94,159,113],{"emptyLinePlaceholder":112},[94,161,163],{"class":96,"line":162},12,[94,164,165],{},"viewer = Viewer()\n",[94,167,169],{"class":96,"line":168},13,[94,170,171],{},"for obj in (source, target, box.to_mesh(), moved.to_mesh()):\n",[94,173,175],{"class":96,"line":174},14,[94,176,177],{},"    viewer.scene.add(obj)\n",[94,179,181],{"class":96,"line":180},15,[94,182,183],{},"viewer.show()\n",[64,185,186,189,190,193],{},[68,187,188],{},"Frame(point, xaxis, yaxis)"," normalizes the axes and makes them perpendicular, so they don't need to be unit length. ",[68,191,192],{},"from_frame_to_frame"," maps one frame onto another; anything placed on the source frame lands on the target the same way.",[195,196,197],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":90,"searchDepth":103,"depth":103,"links":199},[200],{"id":81,"depth":103,"text":82},"Place geometry with frames and show it in COMPAS Viewer","md","Examples",{},"\u002Fdocs\u002Fexamples\u002Fplanes-and-frames",{"title":59,"description":201},"docs\u002F3.examples\u002F3.planes-and-frames","5nSp60oMaPtVgy3X9q91f0s0UCVXk4lDCbpNLVOOpEw",null,[211,215],{"title":212,"path":213,"stem":214,"children":-1},"Points and vectors","\u002Fdocs\u002Fexamples\u002Fpoints-and-vectors","docs\u002F3.examples\u002F2.points-and-vectors",{"title":216,"path":217,"stem":218,"children":-1},"Show it on your project","\u002Fdocs\u002Fcite\u002Fshow-it-on-your-project","docs\u002F4.cite\u002F1.show-it-on-your-project",[220],{"title":16,"path":221,"stem":222,"children":223,"page":249},"\u002Fdocs","docs",[224,250,280,289],{"title":225,"icon":226,"path":227,"stem":228,"children":229,"page":249},"Overview","i-heroicons-play","\u002Fdocs\u002Foverview","docs\u002F1.overview",[230,233,237,241,245],{"title":231,"path":18,"stem":232},"Introduction","docs\u002F1.overview\u002F1.introduction",{"title":234,"path":235,"stem":236},"Installation","\u002Fdocs\u002Foverview\u002Finstallation","docs\u002F1.overview\u002F2.installation",{"title":238,"path":239,"stem":240},"First Steps","\u002Fdocs\u002Foverview\u002Ffirst-steps","docs\u002F1.overview\u002F3.first-steps",{"title":242,"path":243,"stem":244},"What's Next","\u002Fdocs\u002Foverview\u002Fwhats-next","docs\u002F1.overview\u002F4.whats-next",{"title":246,"path":247,"stem":248},"Ecosystem","\u002Fdocs\u002Foverview\u002Fecosystem","docs\u002F1.overview\u002F5.ecosystem",false,{"title":251,"icon":252,"path":253,"stem":254,"children":255,"page":249},"Features","i-heroicons-sparkles-solid","\u002Fdocs\u002Ffeatures","docs\u002F2.features",[256,260,264,268,272,276],{"title":257,"path":258,"stem":259},"Robust Geometry Kernel","\u002Fdocs\u002Ffeatures\u002Fgeometry","docs\u002F2.features\u002F1.geometry",{"title":261,"path":262,"stem":263},"Flexible Data Models","\u002Fdocs\u002Ffeatures\u002Fdata","docs\u002F2.features\u002F2.data",{"title":265,"path":266,"stem":267},"Interoperability Across Tools","\u002Fdocs\u002Ffeatures\u002Finterop","docs\u002F2.features\u002F3.interop",{"title":269,"path":270,"stem":271},"Cross Platform","\u002Fdocs\u002Ffeatures\u002Fcross-platform","docs\u002F2.features\u002F4.cross-platform",{"title":273,"path":274,"stem":275},"Modular Extension Ecosystem","\u002Fdocs\u002Ffeatures\u002Fextensions","docs\u002F2.features\u002F5.extensions",{"title":277,"path":278,"stem":279},"Developer-Friendly Foundation","\u002Fdocs\u002Ffeatures\u002Fdevelopers","docs\u002F2.features\u002F6.developers",{"title":203,"icon":281,"path":282,"stem":283,"children":284,"page":249},"i-heroicons-beaker","\u002Fdocs\u002Fexamples","docs\u002F3.examples",[285,287,288],{"title":76,"path":75,"stem":286},"docs\u002F3.examples\u002F1.box",{"title":212,"path":213,"stem":214},{"title":59,"path":205,"stem":207},{"title":290,"icon":291,"path":292,"stem":293,"children":294,"page":249},"Cite & Credit","i-heroicons-academic-cap","\u002Fdocs\u002Fcite","docs\u002F4.cite",[295],{"title":216,"path":217,"stem":218},1791766075825]