Hi

I am trying to learn CATScript, and can you please help me to create a macro as below requirement.

Here I want to mainly learn how to allow user to select input from existing tree and use as input for further processing.

Please help on this topic

Macro requirement -> To create a sketch in which rectangle is predefined

Input- Macro to ask user to select Point and reference plane

Output required

1. With the input point & reference plane, create a new plane passing through input point and parallel to input reference plane

2. Using position sketch, create a sketch with rectangle. Length and breath to be asked as input

3. Please the sketch in the GS.

you might play with the command SetZoomExtendsBorder which allows you to control the border width for parallel and perspective views. This can also be done with a macro where you set your border value(s) before calling Zoom Extents or Zoom Selected and then resetting the border values to the defaults.


Catia Bounding Box Macro Download


Download Zip 🔥 https://urlgoal.com/2y2Eq2 🔥



I tested the SetZoomExtentsBorder command and it works great. However, Rhino still suffers a lot by the other issue described in my Wish #2, i.e. inability to place the model in the perfect middle of the screen due to using a 3d bounding box instead of a 2d one.

The edge is bounded by two vertices whose geometry are the macro point MP0 and MP1. These macro points are created by concatenation of points on the edge curves (CATPointOnEdgeCurve or Poec): for example MP1 represents Poec13s (start of edge curve EC13), Poec01e (end of edge curve EC01) and Poec12s (start of edge curve EC12 ).

Now, for each edge: Set its geometry (SetCurve): the edge curve, and the relative orientation of the edge curve and the edge. The orientation of the edge is given by the sense start edge -> end edge. Bound the edge by its start vertex (AddBoundingCell)  The "start" attribute is given by the matter side set to CATSideLeft The NULL argument states the fact that no domain is associated with a vertex The last argument details which poec of the macro point is the end of the edge curve   Bound the edge by its end vertex (AddBoundingCell)  The "end" attribute is given by the matter side set to CATSideRight The NULL argument states the fact that no domain is associated with a vertex The last argument states which poec of the macro point is the end of the edge curve   // Sets the geometry of Edge01: the sim curve, and the relative orientation // between the sim curve and the edge piEdge01->SetCurve(piSimCurve01,CATOrientationPositive); // Bounds Edge01 by Vertex0, // Vertex0 is the start vertex (CATSideLeft) // Vertex0 does not belong to any domain (NULL) // The corresponding geometry of Vertex0 in the context // of the edge Edge01 is Poec01Start piEdge01->AddBoundingCell(piVertex0,CATSideLeft,NULL,piPoec01Start); // Bounds Edge01 by Vertex1, // Vertex1 is the end vertex (CATSideRight) // Vertex0 does not belong to any domain (NULL) // The corresponding geometry of Vertex1 in the context // of the edge Edge01 is Poec01End piEdge01->AddBoundingCell(piVertex1,CATSideRight,NULL,piPoec01End); piEdge12->SetCurve(piSimCurve12,CATOrientationPositive); piEdge12->AddBoundingCell(piVertex1,CATSideLeft,NULL,piPoec12Start); piEdge12->AddBoundingCell(piVertex2,CATSideRight,NULL,piPoec12End); piEdge20->SetCurve(piSimCurve20,CATOrientationPositive); piEdge20->AddBoundingCell(piVertex2,CATSideLeft,NULL,piPoec20Start); piEdge20->AddBoundingCell(piVertex0,CATSideRight,NULL,piPoec20End); piEdge23->SetCurve(piSimCurve23,CATOrientationPositive); piEdge23->AddBoundingCell(piVertex2,CATSideLeft,NULL,piPoec23Start); piEdge23->AddBoundingCell(piVertex3,CATSideRight,NULL,piPoec23End); piEdge30->SetCurve(piSimCurve30,CATOrientationPositive); piEdge30->AddBoundingCell(piVertex3,CATSideLeft,NULL,piPoec30Start); piEdge30->AddBoundingCell(piVertex0,CATSideRight,NULL,piPoec30End); piEdge13->SetCurve(piSimCurve13,CATOrientationPositive); piEdge13->AddBoundingCell(piVertex1,CATSideLeft,NULL,piPoec13Start); piEdge13->AddBoundingCell(piVertex3,CATSideRight,NULL,piPoec13End); [Top]

Now, for each face: Declare that the face is bounded by a loop (AddDomain): only one loop per face can be external Associate with the surface (SetSurface), and sets the relative orientation of the face and the surface. The orientation of the face is given by the walk along its edges, that must be given continuously. The faces of a volume must point to the INSIDE of the volume. It is the reason why the face and the surface have opposite orientations (CATOrientationNegative) Bound the face by the edges (AddBoundingCell):  The matter side tells on which side is the matter when standing along the face normal and looking in the edge direction: so that it depends on the orientation of the faace and on the orientation of the edge. At the same time, the corresponding loop is updated The last argument details which PCurve of the edge curve is the geometry of the boundary.   Declare the completion of the loop (Done) // Face xy // Defines the external boundary of Facexy piFacexy->AddDomain(piLoopxy); // Associates with the geometry. // The orientation of the face and of its geometry are opposite // (CATOrientationNegative). piFacexy->SetSurface(piPlanexy,CATOrientationNegative); // The first bounding edge Edge20 // The matter is at the right side (CATSideRight) // The edge must be included in the Loopxy loop // The geometry of Edge20 in the context of Facexy is PLinexy20 piFacexy->AddBoundingCell(piEdge20,CATSideRight,piLoopxy,piPLinexy20); piFacexy->AddBoundingCell(piEdge12,CATSideRight,piLoopxy,piPLinexy12); piFacexy->AddBoundingCell(piEdge01,CATSideRight,piLoopxy,piPLinexy01); // Declares that the loop is finished piLoopxy->Done(); // Faceyz piFaceyz->AddDomain(piLoopyz); // Associates with the geometry and bounds the face piFaceyz->SetSurface(piPlaneyz,CATOrientationNegative); piFaceyz->AddBoundingCell(piEdge30,CATSideRight,piLoopyz,piPLineyz20); piFaceyz->AddBoundingCell(piEdge23,CATSideRight,piLoopyz,piPLineyz12); piFaceyz->AddBoundingCell(piEdge20,CATSideLeft,piLoopyz,piPLineyz01); piLoopyz->Done();// The loop is finished! // Facexz piFacexz->AddDomain(piLoopxz); // Associates with the geometry and bounds the face piFacexz->SetSurface(piPlanexz); piFacexz->AddBoundingCell(piEdge01,CATSideLeft,piLoopxz,piPLinexz01); piFacexz->AddBoundingCell(piEdge13,CATSideLeft,piLoopxz,piPLinexz12); piFacexz->AddBoundingCell(piEdge30,CATSideLeft,piLoopxz,piPLinexz20); piLoopxz->Done();// The loop is finished! // Facec piFacec->AddDomain(piLoopc); // Associates with the geometry and bounds the face piFacec->SetSurface(piPlanec); piFacec->AddBoundingCell(piEdge12,CATSideLeft,piLoopc,piPLinec01); piFacec->AddBoundingCell(piEdge23,CATSideLeft,piLoopc,piPLinec12); piFacec->AddBoundingCell(piEdge13,CATSideRight,piLoopc,piPLinec20); piLoopc->Done();// The loop is finished! [Top]

For each face, Recover its geometry: CATCell::GetGeometry Test the type of geometry (a CATPlane for the tetrahedron) Retrieve the edges of the face: one way is to get the bounding loops (GetDomain) and the edges of the loops (GetAllCells) as always done, or use a boundary iterator, that is explained here:  Create it: CATCell::CreateBoundaryIterator Skip to the CATBoundaryIterator::Next cell until the last one delete it.

 Using the boundary iterator, the number of edges is computed (4 for the tetrahedron).   for (int i=1;iGetGeometry(&ori); if (NULL==piGeom) { ::CATCloseCGMContainer(piGeomFactory); return (1); } // Is the geometry of Plane type? if (NULL == (piGeom->IsATypeOf(CATPlaneType)) ) // the geometry is a plane!... { ::CATCloseCGMContainer(piGeomFactory); return (14); } // Another way to retrieve the cells: use a boundary iterator CATBoundaryIterator * pBoundaryIt = listCells[i]->CreateBoundaryIterator(); if (NULL==pBoundaryIt) { ::CATCloseCGMContainer(piGeomFactory); return (1); } CATSide side; CATCell* piBcell = NULL; int nbEdges=0; while ((piBcell=pBoundaryIt->Next(&side,&piDomain)) != NULL) { nbEdges = nbEdges+1; } delete pBoundaryIt; pBoundaryIt=NULL; // There must be three edges for each face ... if (3!=nbEdges) { ::CATCloseCGMContainer(piGeomFactory); return (15); } } [Top]

You can write a macro script to automate your task. See Space Analysis on the Automation Documentation Home Page. Customizing Your Measure  Click Customize... in the Measure Inertia dialog box. The Measure Inertia Customization dialog box opens.

Toolbar+ is a part a free and open-source CAD+ Toolset add-in for SOLIDWORKS which allows organize the macro library in custom toolbars integrated to SOLIDWORKS environment. Add-in also allows to manage multi-user environment by storing the configuration in the centralized location.

All of these work-arounds are cumbersome and time consuming. Even macros would work only for the most basic orientations and shapes, but would not update values on rebuild. There was a great need for a dedicate tool, and now we have it!

More important, the bounding boxes would update automatically when the part is modified, without any fear of losing references for the dimensions linked to custom properties, which occurred in the past. That is an even more critical benefit that the new functionality adds to the user experience.

In the geometry of the selected representation, you can now see:

the axis systema bounding box parallel to the axes and bounding the selected itemcolor-coded axes of inertia: 

red: axis corresponding to the first moment M1green: axis corresponding to the second moment M2blue: axis corresponding to third moment M3 ff782bc1db

download hearing aids app

magic iso

tableau

dragon city hack gems 99999 download 2022 agosto

download driver printer hp laserjet 1010 windows 10 32 bit