// Tolerance for detecting near-zero values,
// used to account for floating-point precision errors.
const double ANGLE_EPSILON = 1E-15;
// Checks if a given number is near zero, within a defined tolerance.
public static bool IsNearZero(double num)
{
return num < ANGLE_EPSILON && num > -ANGLE_EPSILON;
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
extract_pdf_scales.py | |
This tool extracts scale information from Bluebeam-calibrated PDF files. It identifies scale ruler values, drawing scale annotations, and slope annotations embedded in the PDF metadata. | |
qpdf: https://github.com/qpdf/qpdf | |
Usage: | |
python extract_pdf_scales.py file.json | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Autodesk.Forge; | |
using Autodesk.Forge.Api; | |
using Autodesk.Forge.Client; | |
using RestSharp; | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Net; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project DefaultTargets="Build" ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<ItemGroup Label="ProjectConfigurations"> | |
<ProjectConfiguration Include="Debug|x64"> | |
<Configuration>Debug</Configuration> | |
<Platform>x64</Platform> | |
</ProjectConfiguration> | |
</ItemGroup> | |
<PropertyGroup Label="Globals"> | |
<ProjectGuid>{21E65A9C-E654-4DDA-B631-4CA512141022}</ProjectGuid> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Updates the profile curve of an associative planar surface in AutoCAD. | |
/// Assumes the user has selected a planar surface with a rectangular profile curve. | |
/// Demonstrates the workflow for: | |
/// - Verifying surface associativity | |
/// - Extracting and transforming the profile | |
/// - Updating the surface with a modified profile | |
/// </summary> | |
[CommandMethod("UpdateAssociatePlanarSurface")] | |
public static void UpdateAssociatePlanarSurface() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------------------------------------------- | |
//----- acrxEntryPoint.cpp | |
//----------------------------------------------------------------------------- | |
#include "StdAfx.h" | |
#include "resource.h" | |
//----------------------------------------------------------------------------- | |
#define szRDS _RXST("MAD") | |
using namespace System; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Autodesk.Forge.Core; | |
using Autodesk.Forge.DesignAutomation; | |
using Kurukuru; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; | |
using Newtonsoft.Json; | |
using Serilog; | |
using System; | |
using System.Text; |
Forge Design Automation for AutoCAD Engine accepts two kinds of modules
- CRX, console runtime extension which is a C++ native application using AutoCAD Core ObjectARX API
- NET, a net assembly which is a managed application using AutoCAD Core .NET API.
We will discuss how to create a crx
application step by step, at the end of this tutorial you can also find a video tutorial and complete source code on GitHub.
- Please refer crx step by step
using Azure.Storage;
using Azure.Storage.Blobs;
using Azure.Storage.Blobs.Models;
using DotNetEnv;
using System;
using System.IO;
using System.Threading.Tasks;
namespace blobdwgTest
Please use the workitem json as it is, all you need is to edit the url in Outputfile Arguments and Authorization oAuthtoken I understand there is truncation erros when file sent to you. replace {{yourbucket}} with bucket you created replace {{output.dwg}} with object you put.
{
"activityId": "uLIUN5bLOzQCmoEARUNfG0g1Nr66hj7S.UpdateParameters+dev",
NewerOlder